thaond / magento-openerp-smile-synchro

Automatically exported from code.google.com/p/magento-openerp-smile-synchro
0 stars 0 forks source link

Import sale orders #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

1. I uploaded products to Magento
2. Magento user creates an order
3. Through OpenERP, Magento->Synchronization->Import sale orders

I get in openerp-server console:

File
"/root/openerp-server/bin/addons/magento_openerp/wizard/magento_so_import.py",
line 224, in do_import
    ship_product=self.pool.get('product.product').browse(cr, uid,
ship_product_id[0])
IndexError: list index out of range

This happens with openerp-server-5.0.0-rc1.1 and Magento 1.1.8

What about this "ship_product_id"? What should it contain?

Regards,
LB

Original issue reported on code.google.com by eLBaddy on 16 Dec 2008 at 5:50

GoogleCodeExporter commented 8 years ago
Hi,
we worked this out in IRC at #openerp on freenode.

Bascially this is due to some misconfiguration, and it will happen if you don't 
load
the OpenERP demo data or make an equivalent configuration yourself. Of course we
could improve here to make sure the error message is more explicit.

The workaround is:
15:34   rvalyi  eLBati: hello, looking at it
15:35       *** japerry_cat joined #openerp
15:36   rvalyi  eLBati: I know!
15:37   rvalyi  eLBati: This is because your OpenERP delievery module isn't 
properly
configured
15:37   eLBati  oops
15:37   rvalyi  usually the delivery module come with properly configured demo data
15:38   eLBati  I did not load demo data
15:38   rvalyi  eLBati: no pb, now do this:
15:38   rvalyi  in Stock Management > Configuration > Delivery > Delivery Method
15:39   rvalyi  now make sure there is at least one
15:39   rvalyi  also, inside the delivery method, select a product (create a new 
one if
needed, demo data come with such a product) that will be presented as the 
delivery
cost line
15:40   rvalyi  eLBati: now your Magento connector should pass here
15:41   rvalyi  eLBati: still, you might want to configure/alter the code to do 
what you
want: make this cost appear/hide it, assume it as a charge inside your 
accounting or
invoice it on the contrary

Raphaël Valyi.

Original comment by rva...@gmail.com on 17 Dec 2008 at 2:43

GoogleCodeExporter commented 8 years ago
By default, magento_openerp module has the following dependencies: product, 
stock,
sale, account and account_tax_include. So, I guess, it should depend even from
delivery module

Original comment by eLBaddy on 17 Dec 2008 at 3:06

GoogleCodeExporter commented 8 years ago
eLBaddy, thank you for the report, I added the dependency to the delivery 
module in
the trunk (rev #132)

We could also add an appropriate error message in rev #133

Thank you very much for your detailed report!

Original comment by rva...@gmail.com on 19 Dec 2008 at 2:04