Skip to Content
Menu
This question has been flagged

i have created a new many2one field in product.category model which relates to stock.warehouse in python file.Then i created the following view.


<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>

<!-- Inherit Form View to Modify it -->
<record id="product_category_warehouse" model="ir.ui.view">
<field name="name">product.category.Warehouse</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml">

<xpath expr="/form/sheet/group/group//field[@name='property_cost_method']" position="after">
<field name="warehouse_id" options="{'no_quick_create': True, 'no_create_edit' : True}"/>
</xpath>

</field>
</record>

when I installed this module. this module successfully installed and the field is shown after property_cost_method  field. but when I upgrade the module it throwing errors as below. Note: if I uninstall and then reinstall the module it installed successfully again. what causes that behavior?

Avatar
Discard
Best Answer

Hi,

  Did you added the dependency correctly?

Avatar
Discard
Related Posts Replies Views Activity
4
Dec 23
16609
1
Sep 24
88
0
Sep 24
71
2
May 24
898
1
Feb 24
530