Skip to Content
Menú
This question has been flagged

I have modified the Magento_integration module so it could be added to odoo 8.


To do this I have changed all sale.shop instances in to stock.warehouse and sale_shop to stock_warehouse
I have also changed sale.py on line 359 to:            
'pricelist_id': partner.property_product_pricelist.id,

Now I'm getting the following error while trying to import sale order (products import works):

  File "/opt/odoo/addons/magento_integration/partner.py", line 225, in find_or_create_address_as_partner_using_magento_data
    for address in parent.child_ids + [parent]:
  File "/opt/odoo/openerp/models.py", line 5352, in __add__
    raise except_orm("ValueError", "Mixing apples and oranges: %s + %s" % (self, other))
except_orm: ('ValueError', 'Mixing apples and oranges: res.partner() + [res.partner(6,)]')

The piece of code where this error comes from is:

  for address in parent.child_ids + [parent]:
            if self.match_address_with_magento_data(
                cursor, user, address, address_data
            ):
                break
        else:
            address = self.create_address_as_partner_using_magento_data(
                cursor, user, address_data, parent, context
            )

        return address



I guess this has to do with getting the right field, can anyone help me?

Thanks in advance

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
d’abr. 20
2448
2
de jul. 16
8685
1
de març 15
5214
7
de juny 21
13295
1
de febr. 18
12819