Issue 9848

Title
Can not delete products on web_shop_vue_storefront
Priority
bug
Status
chatting
Nosy list
ced, iehoshia
Assigned to
Keywords

Created on 2020-11-18.17:42:25 by iehoshia, last changed 6 days ago by ced.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-11-27.00:33:32

I guess it happens because the product was removed before even being pushed to elasticsearch.
I think we can just catch the NotFoundError on each delete call.

Author: [hidden] (iehoshia)
Date: 2020-11-18.17:42:25

Hi,

I'm trying the new modules web_shop and web_shop_vue_storefront

I found these issue when I do the follows steps:

  1. Create a Shop of type "Vue Storefront".
  2. Add warehouses, products, categories and attributes.
  3. Execute Scheduled Action, Update Vue Storefront. At these point all works fine.
  4. Delete products.
  5. Execute Scheduled Action, Update Vue Storefront.

I use elasticsearch 7.10.0

Traceback (most recent call last):
  File "/opt/vita/lib/python37/site-packages/trytond/wsgipy", line 111, in dispatch_request
    return endpoint(request, **requestview_args)
  File "/opt/vita/lib/python37/site-packages/trytond/protocols/dispatcherpy", line 48, in rpc
    request, database_name, *requestrpc_params)
  File "/opt/vita/lib/python37/site-packages/trytond/wsgipy", line 78, in auth_required
    return wrapped(*args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/protocols/wrapperspy", line 131, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/protocols/dispatcherpy", line 181, in _dispatch
    result = rpcresult(meth(*c_args, **c_kwargs))
  File "/opt/vita/lib/python37/site-packages/trytond/model/descriptorspy", line 33, in newfunc
    return selffunc(owner, *args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/model/modelviewpy", line 736, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/modules/company/irpy", line 95, in run_once
    super(Cron, cls)run_once([cron])
  File "/opt/vita/lib/python37/site-packages/trytond/model/descriptorspy", line 33, in newfunc
    return selffunc(owner, *args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/model/modelviewpy", line 736, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/ir/cronpy", line 114, in run_once
    getattr(Model, method)()
  File "/opt/vita/lib/python37/site-packages/trytond/modules/web_shop_vue_storefront/webpy", line 210, in vsf_update
    id=productvsf_identifierid)
  File "/opt/vita/lib/python37/site-packages/trytond/modules/web_shop_vue_storefront/webpy", line 24, in wrapper
    return func(*args, **kwargs)
  File "/opt/vita/lib/python37/site-packages/trytond/modules/web_shop_vue_storefront/webpy", line 37, in delete
    return super()delete(**kwargs)
  File "/opt/vita/lib/python37/site-packages/elasticsearch/client/utilspy", line 152, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
  File "/opt/vita/lib/python37/site-packages/elasticsearch/client/__init__py", line 597, in delete
    "DELETE", _make_path(index, doc_type, id), params=params, headers=headers
  File "/opt/vita/lib/python37/site-packages/elasticsearch/transportpy", line 392, in perform_request
    raise e
  File "/opt/vita/lib/python37/site-packages/elasticsearch/transportpy", line 365, in perform_request
    timeout=timeout,
  File "/opt/vita/lib/python37/site-packages/elasticsearch/connection/http_urllib3py", line 269, in perform_request
    self_raise_error(responsestatus, raw_data)
  File "/opt/vita/lib/python37/site-packages/elasticsearch/connection/basepy", line 313, in _raise_error
    status_code, error_message, additional_info
elasticsearchexceptionsNotFoundError: NotFoundError(404, '{"_index":"vue_storefront_catalog_product","_type":"_doc","_id":"6","_version":3,"result":"not_found","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":26,"_primary_term":1}')
History
Date User Action Args
2020-11-27 00:33:32cedsetmessages: + msg62230
nosy: + ced
status: unread -> chatting
2020-11-18 17:42:25iehoshiacreate

Showing 10 items. Show all history (warning: this could be VERY long)