summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2018-02-21 15:31:40 +0100
committerGoffin Simon <sig@odoo.com>2018-02-22 11:21:13 +0100
commit5cdefcc39a75f7f77f00bf0ab6e999d8461667d0 (patch)
tree9cacb28b44e284fdd98c61f01f6b4162a7e5fa0f
parentab37094ec44ff841a0d9a20781622565b52b844c (diff)
[FIX] purchase: Adding PO on refund vendor bill
The function _prepare_invoice_line_from_po_line has not been designed to compute in a right the quantity for a line in an in_refund invoice. So it has no sens to display the field purchase_id for a refund vendor bill. Closes #23095 opw:816717
-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 3f23f6777d0..583f2f40b56 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="{'readonly': [('state','not in',['draft'])], 'invisible': [('state', '=', 'purchase')]}" class="oe_edit_only"
+ <field name="purchase_id" attrs="{'readonly': [('state','not in',['draft'])], 'invisible': ['|', ('state', '=', 'purchase'), ('type', '=', 'in_refund')]}" class="oe_edit_only"
options="{'no_create': True}"/>
</field>
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='company_id']" position="after">