Issue 11217

Title
AttributeError: 'NoneType' object has no attribute 'inventory_moves in when click done in production
Priority
bug
Status
chatting
Nosy list
booraa0a, pokoli
Assigned to
Keywords

Created on 2022-02-04.03:45:59 by booraa0a, last changed 2 months ago by pokoli.

Messages

Author: [hidden] (booraa0a)
Date: 2022-02-11.16:11:01

I am using only standard modules. I reproduced the same error in the demo6.2 instance.

1- Activate all modules
2- Create product template (Produciable and Salable), go to production tab and select supply on sale
3- Create BOM
4- Create Routing
5- Assign BOM and Routing to the product
6- Create Sales Order with product and confirm the Sales Order
7- Click on Supply Stock Wizard to create production requests automatically.
8- Go to create production request and click on Wait--> then Assign--> then Run --> then Done
9- When you click done, the error will show up.

The error will show only when production request created from sales order.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2022-02-11.12:06:23

Could you please share some details on how to reproduce it on an empty database?
It seems that you have some code that creates a sale move not linked to any shipment but I do not see how this is possible using standard modules. Did you have some custom code?

Author: [hidden] (booraa0a)
Date: 2022-02-04.03:45:58

I got this error in 6.2 when I click done in production/productions

Traceback (most recent call last):
  File "/usr/local/lib/python39/dist-packages/trytond/wsgipy", line 117, in dispatch_request
    return endpoint(request, **requestview_args)
  File "/usr/local/lib/python39/dist-packages/trytond/protocols/dispatcherpy", line 46, in rpc
    return methodsget(requestrpc_method, _dispatch)(
  File "/usr/local/lib/python39/dist-packages/trytond/wsgipy", line 84, in auth_required
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python39/dist-packages/trytond/protocols/wrapperspy", line 159, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/usr/local/lib/python39/dist-packages/trytond/protocols/dispatcherpy", line 180, in _dispatch
    result = rpcresult(meth(*c_args, **c_kwargs))
  File "/usr/local/lib/python39/dist-packages/trytond/model/modelviewpy", line 774, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/usr/local/lib/python39/dist-packages/trytond/model/workflowpy", line 37, in wrapper
    result = func(cls, filtered, *args, **kwargs)
  File "/usr/local/lib/python39/dist-packages/trytond/modules/production_work/productionpy", line 135, in done
    super(Production, cls)done(productions)
  File "/usr/local/lib/python39/dist-packages/trytond/model/modelviewpy", line 774, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/usr/local/lib/python39/dist-packages/trytond/model/workflowpy", line 37, in wrapper
    result = func(cls, filtered, *args, **kwargs)
  File "/usr/local/lib/python39/dist-packages/trytond/modules/production_outsourcing/productionpy", line 242, in done
    super(Production, cls)done(productions)
  File "/usr/local/lib/python39/dist-packages/trytond/model/modelviewpy", line 774, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/usr/local/lib/python39/dist-packages/trytond/model/workflowpy", line 37, in wrapper
    result = func(cls, filtered, *args, **kwargs)
  File "/usr/local/lib/python39/dist-packages/trytond/modules/sale_supply_production/productionpy", line 27, in wrapper
    func(cls, productions)
  File "/usr/local/lib/python39/dist-packages/trytond/modules/sale_supply_production/productionpy", line 82, in done
    productionassign_supplied()
  File "/usr/local/lib/python39/dist-packages/trytond/modules/sale_supply_production/productionpy", line 115, in assign_supplied
    sale_lineassign_supplied(pbl[sale_lineproduct], grouping=grouping)
  File "/usr/local/lib/python39/dist-packages/trytond/modules/sale_supply/salepy", line 223, in assign_supplied
    for inv_move in moveshipmentinventory_moves:
AttributeError: 'NoneType' object has no attribute 'inventory_moves'
History
Date User Action Args
2022-05-20 14:27:12pokolisetstatus: need-eg -> chatting
2022-02-11 16:11:01booraa0asetmessages: + msg74024
2022-02-11 12:06:23pokolisetcomponent: + sale_supply_production, - production, sale_supply
messages: + msg74013
nosy: + pokoli
status: unread -> need-eg
2022-02-04 03:45:59booraa0acreate

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