跳至内容
菜单
此问题已终结
3177 查看

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



形象
丢弃
编写者

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>

编写者

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>

相关帖文 回复 查看 活动
2
12月 21
6161
1
5月 21
4687
0
10月 24
661
2
12月 23
9765
2
3月 23
3708