I'm trying to code on module.
but i'm stuck. it doesn't work.
Python code
class PurchaseCurrency(models.Model):
_inherit = "purchase.order.line"
new_currency = fields.Float(string="Test")
my xml
<record id="new_currency_line" model="ir.ui.view">
<field name="name">purchase.order.form</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/tree/field[@name='product_qty']" position="after">
<field name="new_currency"/>
</xpath>
</field>
</record>
and error warning
ValueError: Field new_currency
does not exist
Error context:
View purchase.order.form
[view_id: 1074, xml_id: purchase.purchase_order_form, model: purchase.order, parent_id: n/a]
anyone can help me?
new_currency
does not exist Error context: Viewpurchase.order.form
[view_id: 1074, xml_id: purchase.purchase_order_form, model: purchase.order, parent_id: n/a] – zzob