credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #05238
lp:~credativ/openobject-addons/6.1-lp1069681-components_name_duplicating_BOM into lp:~credativ/openobject-addons/6.1
Kinner Vachhani has proposed merging lp:~credativ/openobject-addons/6.1-lp1069681-components_name_duplicating_BOM into lp:~credativ/openobject-addons/6.1.
Requested reviews:
credativ (credativ)
Related bugs:
Bug #1069681 in OpenERP Addons: "Names of components after duplicating a BOM"
https://bugs.launchpad.net/openobject-addons/+bug/1069681
For more details, see:
https://code.launchpad.net/~credativ/openobject-addons/6.1-lp1069681-components_name_duplicating_BOM/+merge/172596
lp:1069681
If user duplicate a BoM they have created, all component parts will display "copy" after the name in the BoM Components screen and the BoM structure printout.
--
https://code.launchpad.net/~credativ/openobject-addons/6.1-lp1069681-components_name_duplicating_BOM/+merge/172596
Your team credativ is requested to review the proposed merge of lp:~credativ/openobject-addons/6.1-lp1069681-components_name_duplicating_BOM into lp:~credativ/openobject-addons/6.1.
=== modified file 'mrp/mrp.py'
--- mrp/mrp.py 2012-10-05 10:44:47 +0000
+++ mrp/mrp.py 2013-07-02 15:27:26 +0000
@@ -357,7 +357,11 @@
if default is None:
default = {}
bom_data = self.read(cr, uid, id, [], context=context)
- default.update({'name': bom_data['name'] + ' ' + _('Copy'), 'bom_id':False})
+ #[Fix] Only use copy suffix for BOM and not for BOM lines
+ if '__copy_data_seen' in context:
+ default.update({'name': bom_data['name'], 'bom_id':False})
+ else:
+ default.update({'name': bom_data['name'] + ' ' + _('Copy'), 'bom_id':False})
return super(mrp_bom, self).copy_data(cr, uid, id, default, context=context)
mrp_bom()
Follow ups