c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #23699
[Bug 778152] Re: [stable 6.0] stock/wizard/stock_partial_picking.py has bad currency determination as uses optional field to determine value with no failsafe
Hello Graeme,
I have checked your issue.
But I am not able to get your point exactly where you faced the problem.
So would you please elaborate with more information or provide the
proper steps on this.
Thanks and waiting for your reply!
** Changed in: openobject-addons
Status: New => Incomplete
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/778152
Title:
[stable 6.0] stock/wizard/stock_partial_picking.py has bad currency
determination as uses optional field to determine value with no
failsafe
Status in OpenERP Modules (addons):
Incomplete
Bug description:
The offending function is this one
def __create_partial_picking_memory(self, picking, pick_type):
move_memory = {
'product_id' : picking.product_id.id,
'quantity' : picking.product_qty,
'product_uom' : picking.product_uom.id,
'prodlot_id' : picking.prodlot_id.id,
'move_id' : picking.id,
}
if pick_type == 'in':
move_memory.update({
'cost' : picking.product_id.standard_price,
'currency' : picking.product_id.company_id.currency_id.id,
})
When creating a product company is an optional field. Especially
useful in multicompany, however when looking for currency it uses this
field to find it. Moreover this is incorrect anyhow as new security
rules introduced to share partners and products means that it is
looking potentially at the wrong company to determine currency for the
move.
If a company is not set, you receive a NoneType error.
Follow ups
References