[FIX] account_voucher: in fields_view_get overwrite, also add the 'default_supplier/customer' properity in context.
With this the 'create and edit' menu will initiate the partner as a supplier. bzr revid: mat@openerp.com-20140110134845-hvbob1mii4ofqjay
This commit is contained in:
parent
b65cbbb0e5
commit
08e0003177
|
@ -226,7 +226,7 @@ class account_voucher(osv.osv):
|
|||
if context.get('type', 'sale') in ('purchase', 'payment'):
|
||||
nodes = doc.xpath("//field[@name='partner_id']")
|
||||
for node in nodes:
|
||||
node.set('context', "{'search_default_supplier': 1}")
|
||||
node.set('context', "{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}")
|
||||
if context.get('invoice_type','') in ('in_invoice', 'in_refund'):
|
||||
node.set('string', _("Supplier"))
|
||||
res['arch'] = etree.tostring(doc)
|
||||
|
|
Loading…
Reference in New Issue