跳至內容
選單
此問題已被標幟
2020 瀏覽次數

How would I link a one2many table to a bom one2many table using a checkbox?


 One Check box in bom and the other is in inventory product. So if both proposed checkboxes(x) are checked it with will display the line with the using the component of that line as a reference. I tried using studio but I am unable to figure it out. 


There was a tab added to product templates. and a one2many table added to product.py

I have added to a class defined in this python code which is the one2many table.

landed_cost = fields.Float(
'Landed Cost', default=0.0, digits='Landed Cost',
required=False, help="The price after shipment")
proposed = fields.Selection(
[('price', 'Price'),('product_name','Vendor Product Name'),)'name', 'Vendor')],string='Proposed' help="Select One Proposed component to be show in BOM")


And i've added to the product_views.xml

 



頭像
捨棄
作者

It wont let me edit this post

this is in the xml view

<field name="landed_cost" string="Landed Cost" optional="hide"/>
<field name="proposed" widget="toggle_button" />

How can I add have mrp.bom.line update if both the bom component line and product proposed checkboxes are checked?

Hi Eli,
one2Many display is based on the parent_id. I cann't see any thing related to parent_id (say Product_id in your case). You can add some domains with checkbox values on top of it, but parent id is the base for one2Many record visibility.

相關帖文 回覆 瀏覽次數 活動
1
9月 21
2956
0
3月 21
1605
0
11月 20
2660
0
11月 20
2739
3
10月 20
2320