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

Proposed by jftempo
Status: Merged
Merged at revision: 4659
Proposed branch: lp:~dorian-kemps/unifield-server/US-3879
Merge into: lp:unifield-server
Diff against target: 56 lines (+16/-1)
3 files modified
bin/addons/msf_profile/data/patches.xml (+4/-0)
bin/addons/msf_profile/msf_profile.py (+8/-0)
bin/addons/procurement_request/procurement_request.py (+4/-1)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-3879
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+335156@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
=== modified file 'bin/addons/msf_profile/data/patches.xml'
--- bin/addons/msf_profile/data/patches.xml 2017-11-28 17:41:34 +0000
+++ bin/addons/msf_profile/data/patches.xml 2017-12-13 16:51:22 +0000
@@ -30,6 +30,10 @@
30 <field name="method">us_3516_change_damage_reason_type_incoming_ok</field>30 <field name="method">us_3516_change_damage_reason_type_incoming_ok</field>
31 </record>31 </record>
3232
33 <record id="us_3879_set_pricelist_id_for_ir" model="patch.scripts">
34 <field name="method">us_3879_set_pricelist_id_for_ir</field>
35 </record>
36
33 <!-- OLD -->37 <!-- OLD -->
3438
35 <record id="us_3048_patch" model="patch.scripts">39 <record id="us_3048_patch" model="patch.scripts">
3640
=== modified file 'bin/addons/msf_profile/msf_profile.py'
--- bin/addons/msf_profile/msf_profile.py 2017-12-06 13:59:39 +0000
+++ bin/addons/msf_profile/msf_profile.py 2017-12-13 16:51:22 +0000
@@ -335,6 +335,14 @@
335 cr.execute("UPDATE stock_reason_type SET incoming_ok = 't' WHERE name = 'Damage'")335 cr.execute("UPDATE stock_reason_type SET incoming_ok = 't' WHERE name = 'Damage'")
336 return True336 return True
337337
338 def us_3879_set_pricelist_id_for_ir(self, cr, uid, *a, **b):
339 currency_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.currency_id.id
340 pricelist_id = self.pool.get('product.pricelist').search(cr, uid, [('type', '=', 'sale'),
341 ('currency_id', '=', currency_id)], limit=1)[0]
342
343 cr.execute("UPDATE sale_order SET pricelist_id = %s WHERE procurement_request = 't'" % (pricelist_id,))
344 return True
345
338 # OLD patches346 # OLD patches
339 def us_3048_patch(self, cr, uid, *a, **b):347 def us_3048_patch(self, cr, uid, *a, **b):
340 '''348 '''
341349
=== modified file 'bin/addons/procurement_request/procurement_request.py'
--- bin/addons/procurement_request/procurement_request.py 2017-12-01 09:08:44 +0000
+++ bin/addons/procurement_request/procurement_request.py 2017-12-13 16:51:22 +0000
@@ -368,6 +368,8 @@
368 if not context:368 if not context:
369 context = {}369 context = {}
370370
371 pricelist_obj = self.pool.get('product.pricelist')
372
371 if context.get('procurement_request') or vals.get('procurement_request', False):373 if context.get('procurement_request') or vals.get('procurement_request', False):
372 # Get the ISR number374 # Get the ISR number
373 if not vals.get('name', False):375 if not vals.get('name', False):
@@ -382,7 +384,8 @@
382 vals['partner_order_id'] = address_id384 vals['partner_order_id'] = address_id
383 vals['partner_invoice_id'] = address_id385 vals['partner_invoice_id'] = address_id
384 vals['partner_shipping_id'] = address_id386 vals['partner_shipping_id'] = address_id
385 pl = self.pool.get('product.pricelist').search(cr, uid, [], limit=1)[0]387 pl = pricelist_obj.search(cr, uid, [('type', '=', 'sale'),
388 ('currency_id', '=', company.currency_id.id)], limit=1)[0]
386 vals['pricelist_id'] = pl389 vals['pricelist_id'] = pl
387 if 'delivery_requested_date' in vals:390 if 'delivery_requested_date' in vals:
388 vals['ready_to_ship_date'] = compute_rts(self, cr, uid, vals['delivery_requested_date'], 0, 'so', context=context)391 vals['ready_to_ship_date'] = compute_rts(self, cr, uid, vals['delivery_requested_date'], 0, 'so', context=context)

Subscribers

People subscribed via source and target branches