projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b65cbbb
)
[FIX] account_voucher: in fields_view_get overwrite, also add the 'default_supplier...
author
Martin Trigaux
<mat@openerp.com>
Fri, 10 Jan 2014 13:48:45 +0000
(14:48 +0100)
committer
Martin Trigaux
<mat@openerp.com>
Fri, 10 Jan 2014 13:48:45 +0000
(14:48 +0100)
With this the 'create and edit' menu will initiate the partner as a supplier.
bzr revid: mat@openerp.com-
20140110134845
-hvbob1mii4ofqjay
addons/account_voucher/account_voucher.py
patch
|
blob
|
history
diff --git
a/addons/account_voucher/account_voucher.py
b/addons/account_voucher/account_voucher.py
index
7e7cd9d
..
f6ce6e0
100644
(file)
--- a/
addons/account_voucher/account_voucher.py
+++ b/
addons/account_voucher/account_voucher.py
@@
-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)