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 this field the suppliers field in the model mrp.bom.line
_inherit = 'mrp.bom.line'
suppliers = fields.Selection(string='Supplier',selection="_select_objects")
suppliers = self.env['product.supplierinfo'].search([('product_tmpl_id', '=', self.product_id.product_tmpl_id.id)])
name_fields = [(supplier.id, supplier.name.name) for supplier in suppliers]
But, the problem is that I never get the selected product_id even though the product is selected.
With the instruction `_logger.debug(self.product_id)` I always get `product.product()` without the id
Am I doing anything wrong? Is there another way to do this?
I tried to override the onchange method of product_id, but without any solution
Thanks in advance
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: 3/31/15, 6:38 AM|
|Seen: 618 times|
|Last updated: 3/31/15, 6:38 AM|