[FIX] account: invoices - missing field in tree view
bzr revid: ara@tinyerp.com-20110429085355-uysrsn2scz8dsctt
This commit is contained in:
parent
2a0be4932f
commit
864cdd87f1
|
@ -123,7 +123,7 @@
|
|||
<field name="date_invoice"/>
|
||||
<field name="number"/>
|
||||
<field name="partner_id" groups="base.group_user"/>
|
||||
<field name="reference"/>
|
||||
<field name="reference" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id" invisible="1"/>
|
||||
<field name="period_id" invisible="1" groups="account.group_account_user"/>
|
||||
|
|
|
@ -319,11 +319,11 @@ class account_invoice(osv.osv):
|
|||
doc.remove(node)
|
||||
|
||||
if view_type == 'tree':
|
||||
partner_string = _('Supplier')
|
||||
if context.get('type', 'in_invoice') in ('out_invoice', 'out_refund'):
|
||||
partner_string = _('Customer')
|
||||
partner_string = _('Customer')
|
||||
if context.get('type', 'out_invoice') in ('in_invoice', 'in_refund'):
|
||||
partner_string = _('Supplier')
|
||||
for node in doc.xpath("//field[@name='reference']"):
|
||||
doc.remove(node)
|
||||
node.set('invisible', '0')
|
||||
for node in doc.xpath("//field[@name='partner_id']"):
|
||||
node.set('string', partner_string)
|
||||
res['arch'] = etree.tostring(doc)
|
||||
|
|
Loading…
Reference in New Issue