Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4199 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 20
2587
Nested tree view Đã xử lý
2
thg 7 16
8852
1
thg 3 15
5324
7
thg 6 21
13546
1
thg 2 18
12980