Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I have created a many2many field on product.product, relating it to another object.
Then I created a many2many field on the other object (relating it to the product), and also added a few other columns to that object.
When the product view is displayed it fetches all related data correctly (in a tree), but there is another column that I need to add (type: fields.function - float), but the value that this function has to return depends on the product that is being displayed. Since this function is in the other object, the product_id is not on the context. How could I get the product_id in order to get the other values needed (I have to pass the product_id as a parameter to another function) to calculate the value that this function has to return?
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/28/14, 10:53 PM|
|Seen: 1095 times|
|Last updated: 3/16/15, 8:10 AM|