Hello, I am using odoo 11.
I can't really understand why i keep getting this error. I used 'scaffold' to create a new custom module, and I wrote minimal content in the following files (what I wished to do is to add a column in the treeview for lot/serial number section):
models.py
# -*- coding: utf-8 -*- from odoo import models, fields, api class CustomLot(models.Model): _inherit = 'stock.production.lot' _name = 'stock.production.lot'
<odoo> <data> <record id="custom_lot_view" model="ir.ui.view"> <field name="name">custom.lot.view</field> <field name="model">stock.production.lot</field> <field name="inherit_id" ref="stock.view_production_lot_tree"/> <field name="arch" type="xml"> <xpath expr="//field[@name='product_id']" position="before"> <p>test</p> </xpath> </field> </record> </data> </odoo>
The details of the error:
File "/opt/odoo/odoo/odoo/addons/base/ir/ir_ui_view.py", line 343, in _check_xml raise ValidationError(_('Invalid view definition')) odoo.tools.convert.ParseError: "Invalid view definition None" while parsing /opt/odoo/odoo/custom_addons/custom_lot/views/views.xml:3, near <record id="custom_lot_view" model="ir.ui.view"> <field name="name">custom.lot.view</field> <field name="model">stock.production.lot</field> <field name="inherit_id" ref="stock.view_production_lot_tree"/> <field name="arch" type="xml"> <xpath expr="//field[@name='product_id']" position="before"> <p>PUPPA</p> </xpath> </field> </record>
Thank you very much in advnace for any help.