Amit Dodiya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-17991-ado into
lp:openobject-addons/6.0.
Requested reviews:
Raphael Collet (OpenERP) (rco-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-17991-ado/+merge/78208
Hello,
"[FIX]: AttributeError: NoneType object has no attribute id for MRP"
Thanks,
Amit
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-17991-ado/+merge/78208
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-17991-ado.
=== modified file 'mrp/mrp.py'
--- mrp/mrp.py 2011-04-04 11:25:26 +0000
+++ mrp/mrp.py 2011-10-05 07:43:25 +0000
@@ -771,9 +771,9 @@
'general_account_id': wc.costs_general_account_id.id,
'journal_id': wc.costs_journal_id.id,
'ref': wc.code,
- 'product_id': wc.product_id.id,
+ 'product_id': wc.product_id and wc.product_id.id or False,
'unit_amount': wc_line.hour,
- 'product_uom_id': wc.product_id.uom_id.id
+ 'product_uom_id': wc.product_id.uom_id and wc.product_id.uom_id.id or False
} )
if wc.costs_journal_id and wc.costs_general_account_id:
value = wc_line.cycle * wc.costs_cycle
@@ -787,9 +787,9 @@
'general_account_id': wc.costs_general_account_id.id,
'journal_id': wc.costs_journal_id.id,
'ref': wc.code,
- 'product_id': wc.product_id.id,
+ 'product_id': wc.product_id and wc.product_id.id or False,
'unit_amount': wc_line.cycle,
- 'product_uom_id': wc.product_id.uom_id.id
+ 'product_uom_id': wc.product_id.uom_id and wc.product_id.uom_id.id or False
} )
return amount
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp