Merge lp:~rr.clearcorp/openobject-addons/7.0-elico-rr into lp:~clearcorp-drivers/openobject-addons/elico-7.0-ccorp

Proposed by Ronald Rubi on 2015-08-21
Status: Merged
Merged at revision: 42
Proposed branch: lp:~rr.clearcorp/openobject-addons/7.0-elico-rr
Merge into: lp:~clearcorp-drivers/openobject-addons/elico-7.0-ccorp
Diff against target: 37 lines (+10/-6)
2 files modified
base_intercompany_sale/purchase.py (+5/-3)
base_intercompany_sale/sale.py (+5/-3)
To merge this branch: bzr merge lp:~rr.clearcorp/openobject-addons/7.0-elico-rr
Reviewer Review Type Date Requested Status
ClearCorp drivers 2015-08-21 Pending
Review via email: mp+268792@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 'base_intercompany_sale/purchase.py'
2--- base_intercompany_sale/purchase.py 2015-08-21 16:28:09 +0000
3+++ base_intercompany_sale/purchase.py 2015-08-21 17:59:11 +0000
4@@ -69,9 +69,11 @@
5 for purchase in purchases:
6 if purchase.icops_bind_ids:
7 for icops_bind_id in purchase.icops_bind_ids:
8- icops_record_id = icops_record_obj.search(cr, uid, [('binding_id','=',icops_bind_id.id)], context=context)[0]
9- icops_record =icops_record_obj.browse(cr, uid, [icops_record_id], context=context)[0]
10- sale_order_obj.action_unlock(cr, uid, [icops_record.record_id], context=context)
11+ icops_record_ids = icops_record_obj.search(cr, uid, [('binding_id','=',icops_bind_id.id)], context=context)
12+ if icops_record_ids:
13+ icops_record_id = icops_record_ids[0] #Always only has one
14+ icops_record =icops_record_obj.browse(cr, uid, [icops_record_id], context=context)[0]
15+ sale_order_obj.action_unlock(cr, uid, [icops_record.record_id], context=context)
16 return res
17
18 def unlink(self, cr, uid, ids, context=None):
19
20=== modified file 'base_intercompany_sale/sale.py'
21--- base_intercompany_sale/sale.py 2015-08-21 16:28:09 +0000
22+++ base_intercompany_sale/sale.py 2015-08-21 17:59:11 +0000
23@@ -68,9 +68,11 @@
24 for sale in sales:
25 if sale.icops_bind_ids:
26 for icops_bind_id in sale.icops_bind_ids:
27- icops_record_id = icops_record_obj.search(cr, uid, [('binding_id','=',icops_bind_id.id)], context=context)[0]
28- icops_record =icops_record_obj.browse(cr, uid, [icops_record_id], context=context)[0]
29- purchase_order_obj.action_unlock(cr, 1, [icops_record.record_id], context=context)
30+ icops_record_ids = icops_record_obj.search(cr, uid, [('binding_id','=',icops_bind_id.id)], context=context)
31+ if icops_record_ids:
32+ icops_record_id = icops_record_ids[0] #Always only has one
33+ icops_record =icops_record_obj.browse(cr, uid, [icops_record_id], context=context)[0]
34+ purchase_order_obj.action_unlock(cr, 1, [icops_record.record_id], context=context)
35 return res
36
37 def unlink(self, cr, uid, ids, context=None):

Subscribers

People subscribed via source and target branches

to all changes: