Answer.Cost price not sync + customized field not sync

Bug #1380713 reported by David on 2014-10-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Connector - Magento
Undecided
Unassigned

Bug Description

Hello, i'm in magento 1.9 with the version 7 for the connector revision 1020

I'm trying to extend the connector with a module, to be capable to import other fields like msrp from magento.

I have write this in new module magento19_extended/product.py

@magento_myversion
class MyProductImportMapper(ImportMapper):
    _model_name = 'magento.product.product'

    @mapping
    def msrp(self, record):
        return {'pvp': record.get('msrp', 0.0)}

The pvp field is a field that belongs to another module that extends product.product module.

The fiels msrp is not synced, is this definition correctly?

And a second question : Why the cost price isn't synced too? this is in the default module:

@magento
class ProductImportMapper(ImportMapper):
    _model_name = 'magento.product.product'
    # TODO : categ, special_price => minimal_price
    direct = [('name', 'name'),
              ('description', 'description'),
              ('weight', 'weight'),
              ('cost', 'standard_price'),
              ('short_description', 'description_sale'),
              ('sku', 'default_code'),
              ('type_id', 'product_type'),
              (normalize_datetime('created_at'), 'created_at'),
              (normalize_datetime('updated_at'), 'updated_at'),
              ]

Thanks, and excuseme to use this form, but in anwers, i can't

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers