Skip to Content
Menu
This question has been flagged
2176 Views

Hi, 

I want help to solve this issue:

I created a new field in the product page:





product.product.form.inherit
product.product









And I want to get the value from this field (in product page) to a field I aslo created in the work order. Here is the code for work order:





mrp.production.work.order.form.inherit
mrp.workorder









I want the data to be editable on the product page, and readonly in the work order so may anyone help?

Waiting for a reply.


Thanks



Avatar
Discard
Author

Code for product page:
<?xml version="1.0"?>
<odoo>
<data>
<record id="product_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 position="after" expr="//field[@name='product_id']">
<field name="net_weight"/>
<field name="gross_weight"/>
</xpath>
</field>
</record>
</data>
</odoo>

Author

for work order:
<?xml version="1.0"?>
<odoo>
<data>
<record id="mrp_production_work_order_form_inherit" model="ir.ui.view">
<field name="name">mrp.production.work.order.form.inherit</field>
<field name="model">mrp.workorder</field>
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
<field name="arch" type="xml">
<xpath position="after" expr="//field[@name='product_id']">
<field name="doc.product_id.net_weight"/>
<field name="doc.product_id.gross_weight"/>
<field name="technician_id"/>
<field name="worker_ids"/>
<field name="supervisor_id"/>
</xpath>
</field>
</record>
</data>
</odoo>

Related Posts Replies Views Activity
2
Dec 21
4514
1
May 21
3374
0
Oct 24
661
2
Dec 23
8353
2
Mar 23
2032