c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #26880
[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 Greme,
It has been fixed in Stable 6.0.
Thanks for notifying us.
** Changed in: openobject-addons
Status: Confirmed => Fix Released
--
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):
Fix Released
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/778152/+subscriptions
References