[FIX] purchase: correctly link purchase order and invoice
When creating an invoice from the purchase order, the later one wasn't correctly linked anymore (and the invoice couldn't be found through the stat button). The link is actually done with an onchange at the invoice creation. The problem here was that the readonly attribute was set on the fields description but it was not overriden in the view. The onchange was taken into account in previous versions but with the new views, the correct behaviour has been implemented: if a field is readonly, the onchange won't write on it.
This commit is contained in:
@@ -63,8 +63,8 @@
|
||||
options="{'no_create': True}"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='company_id']" position="after">
|
||||
<field name="purchase_line_id" invisible="1"/>
|
||||
<field name="purchase_id" invisible="1"/>
|
||||
<field name="purchase_line_id" invisible="1" readonly="0"/>
|
||||
<field name="purchase_id" invisible="1" readonly="0"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user