Skip to Content
Menu
This question has been flagged
2 Replies
1639 Views

I had inherited the model sale.order in my custom module and I want to customize it according to my requirements. some fields I can hide but some of them I cannot hide 





class InheritedSales(models.Model):
_inherit = 'sale.order'

the manifest file is ok with depends...

and I had also defined that field in my module but also doesn't work

the error is

ile "/home/nazir/odoo13/odoo/addons/base/models/ir_ui_view.py", line 614, in raise_view_error
    raise ValueError(message)
odoo.tools.convert.ParseError: "Element '' cannot be located in parent view
Error context:
View `sale.order.form`
[view_id: 1692, xml_id: pharmacy_management_system.sale_template_form_inherit, model: sale.order, parent_id: 753]" while parsing /home/nazir/odoo13/custome_addons/pharmacy_management_system/views/inherited_sales.xml:2, near


Avatar
Discard
Author Best Answer

Thanks, the error was solved later actually the field was inherited from another model so I use the ref of that model, and the issue was solved then.

Avatar
Discard
Best Answer

HI Nazir Wazir,


Need to check with the .xml file for this. Do make sure that all the fields mentioned on new xml file are present in the your inherit id reference.

If the fields are not present int he inherit_id reference form view/tree view, you will get this error.


If the fields you are using are in different form ids, you need to inherit them separately.

Avatar
Discard