Issue 10791

Crash when finishing production with a product with empty list price
Nosy list
pokoli, reviewbot, roundup-bot
Assigned to

Created on 2021-09-24.14:20:58 by pokoli, last changed 5 days ago by roundup-bot.


New changeset 461a3e91162c by Sergi Almacellas Abellana in branch 'default':
Show warning when output product's list price is empty
New changeset f1d5c4d5c93d by Sergi Almacellas Abellana in branch 'default':
Show warning when output product's list price is empty
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-09-24.14:20:58

Since issue10244 it is possible to have products wihtout list price.
But when using a product without list price on a production I get the following traceback:

Traceback (most recent call last):
  File "/trytond/", line 117, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/", line 47, in rpc
    return methods.get(request.rpc_method, _dispatch)(
  File "/trytond/", line 84, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/", line 159, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/", line 181, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/model/", line 774, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/trytond/model/", line 37, in wrapper
    result = func(cls, filtered, *args, **kwargs)
  File "/trytond/modules/company/", line 67, in wrapper
    result = func(cls, records, *args, **kwargs)
  File "/trytond/modules/production/", line 736, in done
  File "/trytond/modules/production/", line 578, in set_cost
    product_price = (Decimal(str(output.quantity))
TypeError: unsupported operand type(s) for *: 'Decimal' and 'NoneType'
Date User Action Args
2021-10-13 11:08:46roundup-botsetmessages: + msg70987
2021-10-13 11:08:40roundup-botsetmessages: + msg70986
nosy: + roundup-bot
status: testing -> resolved
2021-10-08 10:07:22reviewbotsetmessages: + msg70758
2021-10-06 09:34:43reviewbotsetmessages: + msg70691
2021-10-05 09:04:51reviewbotsetmessages: + msg70653
2021-10-04 12:11:31reviewbotsetmessages: + msg70633
2021-09-24 14:27:52reviewbotsetmessages: + msg70383
nosy: + reviewbot
2021-09-24 14:22:41pokolisetkeyword: + review
reviews: 369771002
status: unread -> testing
2021-09-24 14:20:58pokolicreate

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