Importing Customers groups PrestaShopWebServiceError: 'Unsupported parameters: date_filter'

Asked by rycaga on 2012-10-17

Hello, installed openerp 6.1, PS 1.51, new branches and prestapyt. Sync referential setting and impor products works. But when i'm trying import customers groups i get this :

Server Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 593, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base_sale_multichannels/external_referential.py", line 51, in import_customer_groups
    self.import_resources(cr, uid, ids, 'res.partner', context=context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base_external_referentials/external_osv.py", line 557, in import_resources
    res = self.pool.get(resource_name)._import_resources(cr, uid, external_session, defaults, method=method, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base_external_referentials/external_osv.py", line 587, in _import_resources
    ext_ids = self._get_external_resource_ids(cr, uid, external_session, resource_filter, mapping=mapping, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base_external_referentials/decorator.py", line 49, in wrapped
    return func(self, cr, uid, argument, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/addons/prestashoperpconnect/prestashop_osv.py", line 147, in _get_external_resource_ids
    return external_session.connection.search(ext_resource, options = resource_filter)
  File "/usr/local/lib/python2.7/dist-packages/prestapyt/prestapyt.py", line 409, in search
    search(resource, options=options)
  File "/usr/local/lib/python2.7/dist-packages/prestapyt/prestapyt.py", line 268, in search
    return self.get(resource, options=options)
  File "/usr/local/lib/python2.7/dist-packages/prestapyt/prestapyt.py", line 284, in get
    self._validate_query_options(options)
  File "/usr/local/lib/python2.7/dist-packages/prestapyt/prestapyt.py", line 211, in _validate_query_options
    % (', '.join(tuple(unsupported)),))
PrestaShopWebServiceError: 'Unsupported parameters: date_filter'

Any idea where to look for answer?

Question information

Language:
English Edit question
Status:
Answered
For:
Prestashop OpenERP Connector Edit question
Assignee:
No assignee Edit question
Last query:
2012-10-17
Last reply:
2013-01-09
Caner Candan (canercandan) said : #1

get the same error!

Hi,

Apply this patch and try.
--- prestashoperpconnect/prestashop_osv.py 2012-11-28 18:06:19 +0000
+++ prestashoperpconnect/prestashop_osv.py 2013-01-09 19:39:42 +0000
@@ -145,7 +145,7 @@
     self._set_last_imported_date(cr, uid, external_session, date='default', context=context)
     if last_export:
         date = datetime.strptime(last_export, DEFAULT_SERVER_DATETIME_FORMAT)
- resource_filter['date_filter'] = [['date_upd', '>', date]]
+ resource_filter['date'] = [['date_upd', '>', date]]
     return resource_filter

 @override(osv.osv, 'prestashop_')

MasterPrenium (masterprenium) said : #3

Patch works for me, thanks !

Can you help with this problem?

Provide an answer of your own, or ask rycaga for more information if necessary.

To post a message you must log in.