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

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~dorian-kemps/unifield-server/US-8737
Merge into: lp:unifield-server
Diff against target: 18 lines (+6/-1)
1 file modified
bin/addons/sourcing/sale_order_line.py (+6/-1)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-8737
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+408657@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/sourcing/sale_order_line.py'
2--- bin/addons/sourcing/sale_order_line.py 2021-08-11 15:37:51 +0000
3+++ bin/addons/sourcing/sale_order_line.py 2021-09-15 15:25:43 +0000
4@@ -1090,8 +1090,13 @@
5 if ('supplier' in vals and not vals.get('supplier')) or ('po_cft' in vals and vals.get('po_cft') in ('cft', 'rfq')):
6 vals['related_sourcing_id'] = False
7
8+ # Remove supplier if the selected PO/CFT is Tender
9+ if ids and vals.get('po_cft', False) and vals['po_cft'] == 'cft' and\
10+ self.read(cr, uid, ids, ['supplier'], context=context)[0]['supplier']:
11+ vals['supplier'] = False
12+
13 # UFTP-139: if make_to_stock and no location, put Stock as location
14- if ids and 'type' in vals and vals.get('type', False) == 'make_to_stock' and not vals.get('location_id', False):
15+ if ids and 'type' in vals and vals.get('type', False) == 'make_to_stock' and not vals.get('location_id', False):
16 # Define Stock as location_id for each line without location_id
17 for line in self.read(cr, uid, ids, ['location_id'], context=context):
18 line_vals = vals.copy()

Subscribers

People subscribed via source and target branches