Merge lp:~dorian-kemps/unifield-server/US-4800 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4974
Proposed branch: lp:~dorian-kemps/unifield-server/US-4800
Merge into: lp:unifield-server
Diff against target: 27 lines (+10/-7)
1 file modified
bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py (+10/-7)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-4800
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+349477@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py'
2--- bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py 2018-06-12 12:16:09 +0000
3+++ bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py 2018-07-13 15:36:41 +0000
4@@ -1390,13 +1390,16 @@
5 else:
6 errors.append(_('The import file is inconsistent. The matching line is not existing or was previously deleted'))
7 else:
8- write_vals['type_change'] = 'del'
9- if line.in_line_number:
10- to_delete = self.search(cr, uid, [
11- ('simu_id', '=', line.simu_id.id),
12- ('in_line_number', '=', line.in_line_number),
13- ], context=context)
14- self.write(cr, uid, to_delete, {'type_change': 'del'}, context=context)
15+ if line.po_line_id.state in ('validated', 'validated_n'):
16+ write_vals['type_change'] = 'del'
17+ if line.in_line_number:
18+ to_delete = self.search(cr, uid, [
19+ ('simu_id', '=', line.simu_id.id),
20+ ('in_line_number', '=', line.in_line_number),
21+ ], context=context)
22+ self.write(cr, uid, to_delete, {'type_change': 'del'}, context=context)
23+ else:
24+ write_vals['type_change'] = 'ignore'
25
26 if not line.in_line_number and not write_vals.get('imp_external_ref'):
27 errors.append(_('The line should have a Line no. or an Ext Ref.'))

Subscribers

People subscribed via source and target branches