[MERGE] fix of bug 1084819
lp bug: https://launchpad.net/bugs/1084819 fixed bzr revid: qdp-launchpad@openerp.com-20130213175155-sicmreihpw8qviie
This commit is contained in:
@@ -1394,7 +1394,12 @@ class account_invoice_line(osv.osv):
|
||||
# XXX this gets the default account for the user's company,
|
||||
# it should get the default account for the invoice's company
|
||||
# however, the invoice's company does not reach this point
|
||||
prop = self.pool.get('ir.property').get(cr, uid, 'property_account_income_categ', 'product.category', context=context)
|
||||
if context is None:
|
||||
context = {}
|
||||
if context.get('type') in ('out_invoice','out_refund'):
|
||||
prop = self.pool.get('ir.property').get(cr, uid, 'property_account_income_categ', 'product.category', context=context)
|
||||
else:
|
||||
prop = self.pool.get('ir.property').get(cr, uid, 'property_account_expense_categ', 'product.category', context=context)
|
||||
return prop and prop.id or False
|
||||
|
||||
_defaults = {
|
||||
|
||||
Reference in New Issue
Block a user