Ir al contenido
Menú
Se marcó esta pregunta
2103 Vistas

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

 



Avatar
Descartar
Autor

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.

Publicaciones relacionadas Respuestas Vistas Actividad
1
sept 21
3061
0
mar 21
1639
0
nov 20
2695
0
nov 20
2787
3
oct 20
2350