Odoo Help

1

odoo 8 magento_integration: import sale orders error

By
Tankgirl
on 11/14/14, 6:13 AM 1,425 views

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

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 11/14/14, 6:13 AM
Seen: 1425 times
Last updated: 6/15/15, 6:58 AM