Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3170 Zobrazení

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
Zrušit
Autor

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>

Autor

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 Odpovědi Zobrazení Aktivita
2
pro 21
6149
1
kvě 21
4681
0
říj 24
661
2
pro 23
9748
2
bře 23
3705