Odoo10 xpath inherit field on purchase order line

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

ParseError: "Error while validating constraint

Field new_currency does not exist

Error context:

anyone can help me?

#python #xml

3 Likes2.15 GEEK