Using Odoo 10 (fetched from GitHub commit 7413b26
, branch 10.0
), installing a module which I'm porting over from Odoo 8.
This module forces the purchase.order.line
form to show up upon clicking a line in purchase.order
by removing the editable
attribute from the tree
, but when saving changes done in that form Odoo raises:
Error: Unknown field state in domain [["state","in",["purchase","to approve","done","cancel"]]]
purchase_order_error.xml:
<record id="purchase_order_line_tree" model="ir.ui.view">
<field name="name">purchase.order.form</field>
<field name="model">purchase.order</field>
<field name="priority" eval="33"/>
<field name="type">form</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook/page/field[@name='order_line']/tree" position="attributes">
<attribute name="editable"/>
</xpath>
</field>
</record>
The __manifest__.py
is:
{'name': "purchase_order_error",'depends': ['base', 'product', 'purchase'],'data': ['purchase_order_error.xml',],'installable':True}
and __init__.py
is just the usual from . import purchase_order_error
.
Here are some more observations:
- The field
state
can have the following Selection values:[draft]
,[sent]
,[to approve]
,[purchase]
,[done]
,[cancel]
;[draft]
and[sent]
do not appear in the error. - An Odoo user reported same problem on the Odoo GitHub bug tracker, without any solution as the time of writing.
Is there a workaround ?