[FIX] Account: Bug in fields_view_get in invoice.py
lp bug: https://launchpad.net/bugs/672626 fixed bzr revid: mra@mra-laptop-20101116042728-eeglnqomskwd18z3
This commit is contained in:
parent
44300bb3be
commit
87372a16de
|
@ -326,7 +326,9 @@ class account_invoice(osv.osv):
|
|||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
if context.get('active_model','') in ['res.partner']:
|
||||
if context is None:
|
||||
context = {}
|
||||
if context.get('active_model', '') in ['res.partner'] and context.get('active_ids', False) and context['active_ids']:
|
||||
partner = self.pool.get(context['active_model']).read(cr, uid, context['active_ids'], ['supplier','customer'])[0]
|
||||
if not view_type:
|
||||
view_id = self.pool.get('ir.ui.view').search(cr, uid, [('name', '=', 'account.invoice.tree')])[0]
|
||||
|
|
Loading…
Reference in New Issue