This question has been flagged

Dear Odoo users and Python experts,

In default Odoo when you use products in you have the option to use Internal Reference, within our multi-company system these are set as required.

We want the Internal Reference to be visible in the Product Line itself (both in Sales Order Lines and Purchase Order Lines). The adding of a related field that refers to product_id.default_code is not that difficult, and when you select a product, this automatically fills in. 

However, we also want to be able to make a product via the Product Line, and thus when we fill in this new related field (x_studio_field_oNAcb) in the Sales Order Lines model, it should fill in the Internal Reference within the product itself as well. 

The related field is named x_studio_field_oNAcb and belongs to Model 'Sales Order Line' and the Internal Reference is default_code and belongs to Model 'Product Template'

This connection is missing and I think this should be some kind of Automated Action that uses Python to read the x_studio_field_oNAcb, and refers to the default_code of the product made within the Product Line. (column 1)



Avatar
Discard
Best Answer

Hello @Marco,

If your purpose here is to update the default code in product when any changes is made to the default code's related field in SO line or PO line this can be donw with studio itself without any automated action.

Please check the below demo video link:
https://drive.google.com/file/d/1CPQsUjtynr0BQeHcKP1BlWEnuWm9cAPB/view?usp=sharing

Hope this helps. 

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Discard
Author

Precisely what I need. Somehow I did not get it to work this way. I just realised I did get this far, I just didn't bother saving it again for the change as I assumed it would do this immediately Thank you!