openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #03137
[Merge] lp:~enlightx/openerp-icm/7.0_fix_1180743 into lp:openerp-icm
Davide Corio @ LS has proposed merging lp:~enlightx/openerp-icm/7.0_fix_1180743 into lp:openerp-icm.
Requested reviews:
openerp-icm (openerp-icm)
Related bugs:
Bug #1180743 in openerp-icm: "Error creating invoice from settlement"
https://bugs.launchpad.net/openerp-icm/+bug/1180743
For more details, see:
https://code.launchpad.net/~enlightx/openerp-icm/7.0_fix_1180743/+merge/202804
--
https://code.launchpad.net/~enlightx/openerp-icm/7.0_fix_1180743/+merge/202804
Your team openerp-icm is requested to review the proposed merge of lp:~enlightx/openerp-icm/7.0_fix_1180743 into lp:openerp-icm.
=== modified file 'sale_commission/settled.py'
--- sale_commission/settled.py 2013-12-16 22:05:58 +0000
+++ sale_commission/settled.py 2014-01-23 08:56:06 +0000
@@ -184,17 +184,17 @@
_name = 'settlement.agent'
- def _invoice_line_hook(self, cursor, user, move_line, invoice_line_id):
+ def _invoice_line_hook(self, cursor, user, move_line, invoice_line_id, context=None):
'''Call after the creation of the invoice line'''
return
def _get_address_invoice(self, cr, uid, settlement, context=None):
- '''Return {'contact': address, 'invoice': address} for invoice'''
+ '''Return {'default: address, 'contact': address, 'invoice': address} for invoice'''
if context is None:
context = {}
partner_obj = self.pool.get('res.partner')
partner = settlement.agent_id.partner_id
- return partner_obj.address_get(cr, uid, [partner.id], ['contact', 'invoice'], context=context)
+ return partner_obj.address_get(cr, uid, [partner.id], ['default', 'contact', 'invoice']), context=context)
def _invoice_hook(self, cr, uid, picking, invoice_id, context=None):
'''Call after the creation of the invoice'''
@@ -230,7 +230,7 @@
_('Agent to settle hasn\'t assigned partner.'))
#El tipo es de facura de proveedor
account_id = partner.property_account_payable.id
- address_contact_id, address_invoice_id = \
+ address_default_id, address_contact_id, address_invoice_id = \
self._get_address_invoice(cr, uid, settlement, context=context).values()
# No se agrupa
invoice_vals = {
Follow ups