I am working on a custom addon for the sales quotation form in odoo 15 while inheriting the sale.order.template model. I am trying to add a new field next to the quantity field but i keep getting a "Field [field-name] does not exist error" in relation to my views file. Here is the code in my views file:
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="sales_quotation_form_inherit" model="ir.ui.view">
<field name="name">sale.order.template.form.inherit</field>
<field name="model">sale.order.template</field>
<field name="inherit_id" ref="sale_management.sale_order_template_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='sale_order_template_line_ids']/form[@string='Quotation Template Lines']/group/group[1]/div/field[@name='product_uom_qty']" positon="after">
<field name='price'/>
</xpath>
</field>
</record>
</data>
</odoo>
And my model.py code:
from odoo import models, fields
class SalesQuotation(models.Model):
_inherit = "sale.order.template"
price = fields.Many2one(string='Unit Price')
Can someone please point me in the right direction as to what may be the issue?