Hi, I’m trying to run a wizard that forces a shipment that comes from a purchase to be drafted, but when I try to run it I get the message:
File "/home/yenezz_pcmaster/tryton/fix-proteus2.py", line 193, in <module>
Wizard('stock.shipment.in.force_draft').execute('force_draft')
File "/home/yenezz_pcmaster/tryton/lib/python3.10/site-packages/proteus/__init__.py", line 1239, in execute
result = self._proxy.execute(self.session_id, data, self.state,
File "/home/yenezz_pcmaster/tryton/lib/python3.10/site-packages/proteus/config.py", line 203, in __call__
result = rpc.result(meth(*args, **kwargs))
File "/home/yenezz_pcmaster/tryton/lib/python3.10/site-packages/trytond/wizard/wizard.py", line 306, in execute
wizard = cls(session_id)
File "/home/yenezz_pcmaster/tryton/lib/python3.10/site-packages/trytond/wizard/wizard.py", line 355, in __init__
data = json.loads(session.data, object_hook=JSONDecoder())
File "/home/yenezz_pcmaster/tryton/lib/python3.10/site-packages/trytond/model/fields/field.py", line 344, in __get__
return inst.__getattr__(self.name)
File "/home/yenezz_pcmaster/tryton/lib/python3.10/site-packages/trytond/model/modelstorage.py", line 1647, in __getattr__
read_data = self.read(list(index.keys()), list(ffields.keys()))
File "/home/yenezz_pcmaster/tryton/lib/python3.10/site-packages/trytond/model/modelsql.py", line 792, in read
cls.__check_domain_rule(
File "/home/yenezz_pcmaster/tryton/lib/python3.10/site-packages/trytond/model/modelsql.py", line 1270, in __check_domain_rule
raise AccessError(msg)
trytond.model.modelstorage.AccessError: Está intentando leer los registros "38665" del modelo "Sesión de asistente" que ya no existen. -
I am working with a proteus file, this is the code i am trying to execute.
compra2 = Compra(5847)#numero; 3872
print(compra2.number)
shipment, = Stock.find([('reference', '=',compra2.number)])
Wizard('stock.shipment.in.force_draft').execute('force_draft')