Merge lp:~enlightx-deactivatedaccount/openerp-icm/7.0_fix_1180743 into lp:~openerp-icm/openerp-icm/7.0

Proposed by Davide Corio
Status: Merged
Merged at revision: 14
Proposed branch: lp:~enlightx-deactivatedaccount/openerp-icm/7.0_fix_1180743
Merge into: lp:~openerp-icm/openerp-icm/7.0
Diff against target: 33 lines (+4/-4)
1 file modified
sale_commission/settled.py (+4/-4)
To merge this branch: bzr merge lp:~enlightx-deactivatedaccount/openerp-icm/7.0_fix_1180743
Reviewer Review Type Date Requested Status
Maxime Chambreuil (http://www.savoirfairelinux.com) Approve
Pedro Manuel Baeza code review Approve
Review via email: mp+202804@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Davide Corio (enlightx-deactivatedaccount) wrote :

i didn't put attention to pep8 as the module would need a complete review :)

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM

review: Approve (code review)
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve
Revision history for this message
Davide Corio (enlightx-deactivatedaccount) wrote :

FYI: i don't have the permissions, so if you need this branch to be merged, just do it :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale_commission/settled.py'
2--- sale_commission/settled.py 2013-12-16 22:05:58 +0000
3+++ sale_commission/settled.py 2014-01-23 08:56:06 +0000
4@@ -184,17 +184,17 @@
5
6 _name = 'settlement.agent'
7
8- def _invoice_line_hook(self, cursor, user, move_line, invoice_line_id):
9+ def _invoice_line_hook(self, cursor, user, move_line, invoice_line_id, context=None):
10 '''Call after the creation of the invoice line'''
11 return
12
13 def _get_address_invoice(self, cr, uid, settlement, context=None):
14- '''Return {'contact': address, 'invoice': address} for invoice'''
15+ '''Return {'default: address, 'contact': address, 'invoice': address} for invoice'''
16 if context is None:
17 context = {}
18 partner_obj = self.pool.get('res.partner')
19 partner = settlement.agent_id.partner_id
20- return partner_obj.address_get(cr, uid, [partner.id], ['contact', 'invoice'], context=context)
21+ return partner_obj.address_get(cr, uid, [partner.id], ['default', 'contact', 'invoice']), context=context)
22
23 def _invoice_hook(self, cr, uid, picking, invoice_id, context=None):
24 '''Call after the creation of the invoice'''
25@@ -230,7 +230,7 @@
26 _('Agent to settle hasn\'t assigned partner.'))
27 #El tipo es de facura de proveedor
28 account_id = partner.property_account_payable.id
29- address_contact_id, address_invoice_id = \
30+ address_default_id, address_contact_id, address_invoice_id = \
31 self._get_address_invoice(cr, uid, settlement, context=context).values()
32 # No se agrupa
33 invoice_vals = {

Subscribers

People subscribed via source and target branches