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()

-- 
Mailing list: https://launchpad.net/~credativ
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~credativ
More help   : https://help.launchpad.net/ListHelp

Reply via email to