summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2018-01-04 11:22:27 +0100
committerGoffin Simon <sig@odoo.com>2018-01-04 14:05:23 +0100
commitdeb00a703b6c2f676a551bcff45ddbd3225f8fb8 (patch)
treed14afa1d99f32673109a074ad64cb377826d5b41
parentb291494f648517a4e10b78daaec3e27817c1efe8 (diff)
[FIX] purchase: Adding a purchase order on a vendor bill
To keep the same behavior as in 11.0, you can only add a purchase order to a vendor bill when the vendor bill is in draft. Afterwards it is not longer possible. opw:803068
-rw-r--r--addons/purchase/views/account_invoice_views.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/purchase/views/account_invoice_views.xml b/addons/purchase/views/account_invoice_views.xml
index 7f4fc3bf4e0..3f23f6777d0 100644
--- a/addons/purchase/views/account_invoice_views.xml
+++ b/addons/purchase/views/account_invoice_views.xml
@@ -59,7 +59,7 @@
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<field name="reference" position="after" >
- <field name="purchase_id" attrs="{'invisible': [('state', '=', 'purchase')]}" class="oe_edit_only"
+ <field name="purchase_id" attrs="{'readonly': [('state','not in',['draft'])], 'invisible': [('state', '=', 'purchase')]}" class="oe_edit_only"
options="{'no_create': True}"/>
</field>
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='company_id']" position="after">