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 am wondering how I get other fields values of a one2many related model (and field)...?
first LOC (extending Magento Bridge by Webkul in product.template) is - unsing the old API:
'mage_sync_id': fields.one2many('magento.product.template','template_name','Magento Sync Id', readonly=True),
and I thought this might do it, but nothing comes out - maybe only works on many2one field relations, which would make sense:
'update_date': fields.related('mage_sync_id', 'write_date', type="datetime", relation='magento.product.template',readonly=True, store=True, string="Updated Date"),
So I must compute the field and search the many entries behind mage_sync_id for a special field and get out the values?
But how can I do that?
Something like this?
related_recordset = self.env["magento.product.template"].search()
self.products = related_recordset.update_date
Messing up with verions?
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: 10/27/16, 3:21 PM|
|Seen: 884 times|
|Last updated: 10/27/16, 6:39 PM|