Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I am trying to add 2 new fields to module Product with this xml code:
<record id="product_product_template_only_form_view" model="ir.ui.view">
<field name="inherit_id" ref="product.product_template_only_form_view" />
<field name="arch" type="xml">
<field name="list_price" position="after">
<field name="boatlength" />
<field name="fuelcapacity" />
I have no error message but the fields are not showing where they should be. I checked that the view was correct and it seems to be:
Manage Views (product.template)
5 product.template.form.inherit Form product.template account.product_template_form_view product.template.common.form
8 product.template.product.form Form product.template product.product_template_only_form_view product.template.common.form
16 product.form.mrp.inherited Form product.template mrp.view_mrp_product_template_form_inherited
list_price is there :
Sale Price (name= list_price)
What am I doing wrong??
I am new to Odoo and I made the following steps as I have done before to find the view form.
In developer mode, I open a product record, choose "manage views" from the debug dropdown and product.product_template_only_form_view is the external ID of the one that is selected (I assume that if the radio button is selected then it is the correct view I should be taken). The rest listed seem to be inherited from other modules, tree or kanban views. Not sure what I need to be looking at here to check higher priority.
When I check fields list_price(settings>>data structures) it is under this view: product.product_template_form_view. When I change my xml file to match this, again it is the same. No error, no fields. My two new fields are listed under module product.product.
The other form I can see is product.product_normal_form_view that has list_price on it. Tried this and got following error:
'<field name="list_price">' cannot be located in parent view
Changed the field to lst_price as this was an alternative name (public price not sale price) and my fields now show up on Product Variant view but not product view.
Really not sure what I need to here to make this work.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/11/15, 5:54 AM|
|Seen: 2240 times|
|Last updated: 11/18/15, 8:26 AM|