Merge lp:~kinner-vachhani/openobject-addons/6.1-bom-duplicate-suffix-1069681 into lp:openobject-addons/6.1

Proposed by Kinner Vachhani
Status: Needs review
Proposed branch: lp:~kinner-vachhani/openobject-addons/6.1-bom-duplicate-suffix-1069681
Merge into: lp:openobject-addons/6.1
Diff against target: 16 lines (+5/-1)
1 file modified
mrp/mrp.py (+5/-1)
To merge this branch: bzr merge lp:~kinner-vachhani/openobject-addons/6.1-bom-duplicate-suffix-1069681
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+172586@code.launchpad.net

Description of the change

To post a comment you must log in.

Unmerged revisions

7234. By Kinner Vachhani

[Fix] Only use copy suffix for BOM and not for BOM lines lp:1069681

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mrp/mrp.py'
2--- mrp/mrp.py 2012-10-05 10:44:47 +0000
3+++ mrp/mrp.py 2013-07-02 15:09:27 +0000
4@@ -357,7 +357,11 @@
5 if default is None:
6 default = {}
7 bom_data = self.read(cr, uid, id, [], context=context)
8- default.update({'name': bom_data['name'] + ' ' + _('Copy'), 'bom_id':False})
9+ #[Fix] Only use copy suffix for BOM and not for BOM lines
10+ if '__copy_data_seen' in context:
11+ default.update({'name': bom_data['name'], 'bom_id':False})
12+ else:
13+ default.update({'name': bom_data['name'] + ' ' + _('Copy'), 'bom_id':False})
14 return super(mrp_bom, self).copy_data(cr, uid, id, default, context=context)
15
16 mrp_bom()