credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #05241
[Branch ~credativ/openobject-addons/6.1] Rev 7044: [BugFix] Only use copy suffix for BOM and not for BOM lines lp:1069681
------------------------------------------------------------
revno: 7044
fixes bug: https://launchpad.net/bugs/1069681
committer: Kinner Vachhani <kin.vachhani@xxxxxxxxx>
branch nick: credativ-openobject
timestamp: Tue 2013-07-02 16:13:35 +0100
message:
[BugFix] Only use copy suffix for BOM and not for BOM lines lp:1069681
modified:
mrp/mrp.py
--
lp:~credativ/openobject-addons/6.1
https://code.launchpad.net/~credativ/openobject-addons/6.1
Your team credativ is subscribed to branch lp:~credativ/openobject-addons/6.1.
To unsubscribe from this branch go to https://code.launchpad.net/~credativ/openobject-addons/6.1/+edit-subscription
=== modified file 'mrp/mrp.py'
--- mrp/mrp.py 2012-10-05 10:44:47 +0000
+++ mrp/mrp.py 2013-07-02 15:13:35 +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()