Skip to Content
Menu
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
Discard
Related Posts Replies Views Activity
1
Apr 20
2111
2
Jul 16
8350
1
Mar 15
4921
7
Jun 21
12824
1
Feb 18
12503