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
Odoo Training Center
|Asked: 10/27/16, 3:21 PM|
|Seen: 722 times|
|Last updated: 10/27/16, 6:39 PM|