diff options
| -rw-r--r-- | addons/purchase/views/account_invoice_views.xml | 2 |
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"> |
