Tryton - Issues



Title Can't remove a product when is not in the list
Priority bug Status chatting
Superseder Nosy List pokoli, resteve
Type crash Components stock_supply_production
Assigned To Keywords

Created on 2019-05-15.18:10:12 by resteve, last changed by pokoli.

msg49806 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2019-05-22.15:11:20
Yes, I understand the traceback but I'm wondering why the product removed is not present. That's why I'm asking on some steps to reproduce the issue as it seems it's only raised with some data values (not always)
msg49805 (view) Author: [hidden] (resteve) Date: 2019-05-22.15:09:32
Module stock_supply_production:

The traceback remove in the list a product_id that not found.
msg49802 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2019-05-22.11:45:59
Could you provide some sample steps to reproduce the issue on a fresh database?
msg49728 (view) Author: [hidden] (resteve) Date: 2019-05-15.18:10:11
Get a traceback when "Supply Stock" menu and "stock_supply_production" module installed.

Traceback (most recent call last):
  File "/trytond/", line 73, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/", line 46, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/", line 44, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/", line 122, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/", line 176, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/wizard/", line 287, in execute
    return wizard._execute(state_name)
  File "/trytond/wizard/", line 318, in _execute
    result = self._execute(transition())
  File "/trytond/modules/stock_supply_production/", line 96, in transition_create_
    return super(StockSupply, self).transition_create_()
  File "/trytond/modules/stock_supply/", line 72, in transition_create_
    created |= bool(getattr(self, 'generate_%s' % type_)(first))
  File "/trytond/modules/stock_supply_production/", line 106, in generate_production
    clean=clean, **self._production_parameters)
  File "/trytond/modules/stock_supply_production/", line 109, in generate_requests
    quantities, products_period, product2ops)
  File "/trytond/modules/stock_supply_production/", line 200, in get_shortage
ValueError: list.remove(x): x not in list

Detected in v5.0
Date User Action Args
2019-05-22 15:11:21pokolisetmessages: + msg49806
2019-05-22 15:09:32restevesetmessages: + msg49805
2019-05-22 11:46:00pokolisetnosy: + pokoli
messages: + msg49802
2019-05-15 18:10:12restevecreate

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