Skip to Content
Menu
This question has been flagged
2 Replies
1699 Views

Hello,

I need to add a bills of materials for cosmetic product, the idea is every product for skin care has a quantity of water depend of the total amount of the other ingredients, for example if my product quantity is 100 g and the total of  my item quantity it's 40 g the water should automatically be 60 g, if i change the quantity of any other item the quantity of the water should be automatically changed too.

Could you please help me to find a solution for that how can i change BOM object to have this working.

Best regards.

Avatar
Discard
Author Best Answer

Thanks for your Help Baiju , But the idea is to make the quantity of the water be changed automatically in depend of the other lines,

so I'm thinking to work in the xml view and add jquery script or AJAX , What do you think, any idea?

Best regards.

Avatar
Discard

Please check now, I updated the Answer

Best Answer

Hi,

You can achieve this by invoking create and write method of "mrp.bom" object. Develop a script to add the product 'water' to BOM after necessary computation, to add for the first time in create method and to update existing for write method. Dont miss to call super.


Hope this helps.

Avatar
Discard