OCA / connector-prestashop

Connect Odoo with Prestashop
GNU Affero General Public License v3.0
91 stars 170 forks source link

[v10] Not A Issue: Is it possible to extend the functionality without modifying the core modules #127

Closed omalbastin closed 5 years ago

omalbastin commented 5 years ago

Im trying to sync between product pricelist items and specific prices to prestashop. So I create a new module and components(adapter, binder, importer, exporter,listener) for specific prices are added. then class SpecificPriceProductTemplateImporter(Component): _inherit = 'prestashop.product.template.importer' and added codes to sync the pricelist items.

but now the error getting is NoComponentError: No component found for collection 'prestashop.backend', usage 'prestashop.importer', model_name 'prestashop.product.template'.

In connector_prestashop module I saw https://github.com/OCA/connector-prestashop/blob/af05419e40bfc9fe6a738fb6b60bde2b4cb7c1e7/connector_prestashop/models/product_template/importer.py#L682

So do I have to update the core modules.

FFernandez-PlanetaTIC commented 5 years ago

Hi @omalbastin

Here is an example of importing product features:

https://github.com/PlanetaTIC/connector-prestashop/blob/10.0-ADD-connector_prestashop_product_custom_info/connector_prestashop_product_custom_info/models/product_template/importer.py#L24

Hope this can help you.

Regards

FFernandez-PlanetaTIC commented 5 years ago

Hi @omalbastin

We also need to sync between Odoo pricelists and Prestashop specific prices.

Do you need to import to Odoo or to export to Prestashop using catalog manager? For v10.0?

I you want we can share our work. We are now starting the export to Prestashop.

Regards

omalbastin commented 5 years ago

Hi @FFernandez-PlanetaTIC , sorry for the late reply. I have completed the work. im sharing my code. https://github.com/omalbastin/connector-prestashop/tree/10.0/connector_prestashop_specific_price Only updating the custom modules i have created as i have made many changes in the connector_prestashop and connector_prestashop_catalog_manger for my customer, i havent updating that now.

omalbastin commented 5 years ago

is it possible to call the connector components from any odoo tables. for example prestashop has so many images + what is available in odoo. i want to delete all existing images of a product from ps and re import again so that only the images availabe in odoo will be there in ps also. But when i search for the compoent im getting NoComponentError

    ```

ps_backend = self.env['prestashop.backend'].search([],limit=1) with ps_backend.work_on('prestashop.product.image') as work:

omalbastin commented 5 years ago

sorry. completly my fault. wrong usage was given