devendrapathi / sneldev-magento-openerp

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

Product import/ sales import fails ResponseError() #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. download the connector and install it in both magento and openerp
2. create new instance and attempt to sync products
3. openerp returns a ResponseError()

What is the expected output? What do you see instead?
[2010-11-05 10:34:08,742] INFO:init:module hr_timesheet_sheet: loading objects
[2010-11-05 10:34:08,757] INFO:init:module report_task: loading objects
[2010-11-05 10:34:08,765] INFO:init:module report_analytic_planning: loading 
objects
[2010-11-05 10:34:08,779] INFO:init:module sale: loading objects
[2010-11-05 10:34:08,797] INFO:init:module sneldev_magento: loading objects
[2010-11-05 10:34:08,798] INFO:init:module sneldev_magento: registering objects
[2010-11-05 10:34:08,837] INFO:init:module board_project: loading objects
[2010-11-05 10:34:08,837] INFO:init:module profile_service: loading objects
[2010-11-05 10:34:08,919] WARNING:init:module sneldev_magento: no quality 
certificate
[2010-11-05 10:34:09,178] INFO:web-service:successful login from 'admin' using 
database 'dev1'
[2010-11-05 10:44:02,990] ERROR:web-services:[01]: 
[2010-11-05 10:44:02,992] ERROR:web-services:[02]: Environment Information : 
[2010-11-05 10:44:02,992] ERROR:web-services:[03]: System : 
Linux-2.6.32-24-generic-i686-with-Ubuntu-10.04-lucid
[2010-11-05 10:44:02,992] ERROR:web-services:[04]: OS Name : posix
[2010-11-05 10:44:02,993] ERROR:web-services:[05]: Distributor ID:  Ubuntu
[2010-11-05 10:44:02,993] ERROR:web-services:[06]: Description: Ubuntu 10.04.1 
LTS
[2010-11-05 10:44:02,993] ERROR:web-services:[07]: Release: 10.04
[2010-11-05 10:44:02,993] ERROR:web-services:[08]: Codename:    lucid
[2010-11-05 10:44:02,994] ERROR:web-services:[09]: Operating System Release : 
2.6.32-24-generic
[2010-11-05 10:44:02,994] ERROR:web-services:[10]: Operating System Version : 
#42-Ubuntu SMP Fri Aug 20 14:24:04 UTC 2010
[2010-11-05 10:44:02,994] ERROR:web-services:[11]: Operating System 
Architecture : 32bit
[2010-11-05 10:44:02,994] ERROR:web-services:[12]: Operating System Locale : 
en_US.UTF8
[2010-11-05 10:44:02,994] ERROR:web-services:[13]: Python Version : 2.6.5
[2010-11-05 10:44:02,995] ERROR:web-services:[14]: OpenERP-Server Version : 
5.0.6
[2010-11-05 10:44:02,995] ERROR:web-services:[15]: Last revision No. & ID : 
[2010-11-05 10:44:02,995] ERROR:web-services:[16]: Exception in call: Traceback 
(most recent call last):
[2010-11-05 10:44:02,995] ERROR:web-services:[17]:   File 
"/usr/lib/openerp-server/wizard/__init__.py", line 73, in execute_cr
[2010-11-05 10:44:02,995] ERROR:web-services:[18]:     action_res = 
action(self, cr, uid, data, context)
[2010-11-05 10:44:02,996] ERROR:web-services:[19]:   File 
"/usr/lib/openerp-server/addons/sneldev_magento/wizard/sneldev_magento_products_
import.py", line 39, in do_products_import
[2010-11-05 10:44:02,996] ERROR:web-services:[20]:     
self.pool.get('sneldev.magento').import_products(cr, uid)
[2010-11-05 10:44:02,996] ERROR:web-services:[21]:   File 
"/usr/lib/openerp-server/addons/sneldev_magento/sneldev_magento.py", line 492, 
in import_products
[2010-11-05 10:44:02,996] ERROR:web-services:[22]:     products = 
server.call(session, 'product.list',[])
[2010-11-05 10:44:02,997] ERROR:web-services:[23]:   File 
"/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
[2010-11-05 10:44:02,997] ERROR:web-services:[24]:     return 
self.__send(self.__name, args)
[2010-11-05 10:44:02,997] ERROR:web-services:[25]:   File 
"/usr/lib/python2.6/xmlrpclib.py", line 1491, in __request
[2010-11-05 10:44:02,997] ERROR:web-services:[26]:     verbose=self.__verbose
[2010-11-05 10:44:02,997] ERROR:web-services:[27]:   File 
"/usr/lib/python2.6/xmlrpclib.py", line 1253, in request
[2010-11-05 10:44:02,998] ERROR:web-services:[28]:     return 
self._parse_response(h.getfile(), sock)
[2010-11-05 10:44:02,998] ERROR:web-services:[29]:   File 
"/usr/lib/python2.6/xmlrpclib.py", line 1394, in _parse_response
[2010-11-05 10:44:02,998] ERROR:web-services:[30]:     return u.close()
[2010-11-05 10:44:02,998] ERROR:web-services:[31]:   File 
"/usr/lib/python2.6/xmlrpclib.py", line 836, in close
[2010-11-05 10:44:02,998] ERROR:web-services:[32]:     raise ResponseError()
[2010-11-05 10:44:02,999] ERROR:web-services:[33]: ResponseError: 
ResponseError()

What version of the product are you using? On what operating system?

newest, and newest ubuntu synaptic package manager openerp server
Please provide any additional information below.
This works with a clean magento install but not our database. We have two 
different websites and they are completely independent and the same result 
shows.

Original issue reported on code.google.com by GadgetsC...@gmail.com on 5 Nov 2010 at 3:47

GoogleCodeExporter commented 8 years ago
Hi, This bug is because of a fundamental issue with magento and a connector. If 
you have more than 2000 products your import will automatically fail because 
the connector tries to load all of the items into the memory at once. This bug 
exists in this module and the others. You have to add a filter to specify small 
increments.

Original comment by GadgetsC...@gmail.com on 15 Nov 2010 at 3:15

GoogleCodeExporter commented 8 years ago
How can you specify a filter?

Original comment by epikou...@gmail.com on 22 Nov 2010 at 9:18

GoogleCodeExporter commented 8 years ago
ids_or_filter = [{'store_id': {'eq': magento_storeview_id}, 'increment_id': 
{'from': u'100000500', 'to': u'100000250'}}]
This is only an example. You have to know a little python to get that to work.
This is from the sale.py file but a different connector.

Original comment by GadgetsC...@gmail.com on 23 Nov 2010 at 3:57

GoogleCodeExporter commented 8 years ago
Hello,

Thanks for all the info. We will look at this as soon as possible to make a new 
version of the connector.

Original comment by sneldev@gmail.com on 24 Nov 2010 at 8:44

GoogleCodeExporter commented 8 years ago
We have added some improvement in 0.7.6 (similar to what GadgetsCentralService 
is suggesting). 
It still need to be perfected, but we would really appreciate some feedback 
from tests with this new version.

Nico

Original comment by sneldev@gmail.com on 24 Nov 2010 at 11:12

GoogleCodeExporter commented 8 years ago
Hi, I will test it this weekend.
Another developer in a different module used instead of the increment idea.
SALE_ORDER_MAPPING = {1: 100000001, 3: 300000001, 2: 200000001}
SALE_ORDER_IMPORT_STEP = 200
I may report several bugs if that is ok :)
I should note any code I post here is not my property and I didn't write it, im 
only providing it as a suggestion.

Original comment by GadgetsC...@gmail.com on 26 Nov 2010 at 1:16

GoogleCodeExporter commented 8 years ago
Hello,

Do not hesitate to report all bugs you see :)
Regarding the increment. We are trying to find a clean solution hat will not 
impact too much the performances of the connector. No finale decision taken yet.

Original comment by sneldev@gmail.com on 26 Nov 2010 at 9:16

GoogleCodeExporter commented 8 years ago
A solution was implemeted in 0.7.6. It should fix this issue.

Original comment by sneldev@gmail.com on 18 Jan 2011 at 9:04