[FIX] account: fixed buildbot. an occurence of removed field 'refund_journal' was forgotten

bzr revid: qdp-launchpad@openerp.com-20110303170700-59jko6gkzr8ozgst
This commit is contained in:
Quentin (OpenERP) 2011-03-03 18:07:00 +01:00
parent 5a2123a9a0
commit aadac1dea3
1 changed files with 1 additions and 3 deletions

View File

@ -51,11 +51,9 @@ class account_invoice(osv.osv):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
company_id = context.get('company_id', user.company_id.id)
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale_refund', 'in_refund': 'purchase_refund'}
refund_journal = {'out_invoice': False, 'in_invoice': False, 'out_refund': True, 'in_refund': True}
journal_obj = self.pool.get('account.journal')
res = journal_obj.search(cr, uid, [('type', '=', type2journal.get(type_inv, 'sale')),
('company_id', '=', company_id),
('refund_journal', '=', refund_journal.get(type_inv, False))],
('company_id', '=', company_id)],
limit=1)
return res and res[0] or False