Merge lp:~credativ/openobject-addons/6.1-lp1069681-components_name_duplicating_BOM into lp:~credativ/openobject-addons/6.1

Proposed by Kinner Vachhani
Status: Merged
Merged at revision: 7044
Proposed branch: lp:~credativ/openobject-addons/6.1-lp1069681-components_name_duplicating_BOM
Merge into: lp:~credativ/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:~credativ/openobject-addons/6.1-lp1069681-components_name_duplicating_BOM
Reviewer Review Type Date Requested Status
Kinner Vachhani Approve
Review via email: mp+172596@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Kinner Vachhani (kinner-vachhani) wrote :

Merging into main branch on Craig's review.

Revision history for this message
Kinner Vachhani (kinner-vachhani) :
review: Approve

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:27:26 +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()

Subscribers

People subscribed via source and target branches

to all changes: