Hi
I keep getting this error
what am i doing wrong?????!??!!?!
Field `drawing` does not exist Error context: View `product.product.form.inherit` [view_id: 853, xml_id: n/a, model: product.product, parent_id: 388] None" while parsing file:/c:/program files (x86)/odoo 12.0/server/odoo/addons/product_inherit/views/product_inherit.xml:3, near <record id="view_product_form_inherit" model="ir.ui.view"> <field name="name">product.product.form.inherit</field> <field name="model">product.product</field> <field name="inherit_id" ref="product.product_normal_form_view"/> <field name="arch" type="xml"> <xpath expr="//field[@name='default_code']" position="after"> <field name="drawing"/> </xpath> </field> </record>
here is my code
Model# -*- coding: utf-8 -*-
from odoo import models, fields, api
class product_product(models.Model):
_name = "product.product"
_description = "Product"
_inherit = 'product.product'
_columns = {
'drawing' : fields.binary('Drawing'),
'date_modify' : fields.datetime('Date Modified')
}
product_product()
xml file<odoo>
<data>
<record id="view_product_form_inherit" model="ir.ui.view">
<field name="name">product.product.form.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='default_code']" position="after">
<field name="drawing"/>
</xpath>
</field>
</record>
</data>
</odoo>