openerp-connector-community team mailing list archive
-
openerp-connector-community team
-
Mailing list archive
-
Message #00661
Re: [Magento connector] Doubt invoking _call function
On Thu, Jul 9, 2015 at 2:32 PM, Francisco Peiro
<francisco.peiro@xxxxxxxxxxxxxxx> wrote:
>
> Finally I thought the best solution is ovewrite the read function in
> ProductProductAdapter like:
>
> def read(self, id, storeview_id=None, attributes=None):
> """ Returns the information of a record
>
> :rtype: dict
> """
> product_res = self._call('ol_catalog_product.info',
> [int(id), storeview_id, attributes, 'id'])
>
> if product_res['type_id']=='configurable':
> attribute_options_res =
> self._call('ol_catalog_product_link.listSuperAttributes',
> [int(id)])
>
>
Yes it might be a good idea to do so if you always need data of the
products and of the attributes together.
Another option would be to add this info on the Magento side in
ol_catalog_product.info but needs Magento knowledge :-(
References