Created on 2021-01-13.12:38:54 by 2cadz, last changed 2 months ago by roundup-bot.
New changeset c9f21b1d7cb2 by Cédric Krier in branch '5.8': Manage missing attribute on sale in on_change_origin https://hg.tryton.org/modules/sale_payment/rev/c9f21b1d7cb2
New changeset f38ad30c6b0c by Cédric Krier in branch 'default': Manage missing attribute on sale in on_change_origin https://hg.tryton.org/tryton-env/rev/f38ad30c6b0c
New changeset 009610ee7f1c by Cédric Krier in branch 'default': Manage missing attribute on sale in on_change_origin https://hg.tryton.org/modules/sale_payment/rev/009610ee7f1c
Indeed the on_change_origin
method should not consider that all attribute of origin are available.
Ok it is not possible to make the payment of a draft sale :-) ... can be deactivate the button as long as the sale is not in the state or it is possible to enter a payment.
Tryton Version 5.9
To reproduce: On an new Tryton session, create a new sale, click on the 'payment' button, and in the new open view click on '+' to create a new payment:
Traceback (most recent call last):
File "/trytond/model/model.py", line 290, in __getattr__
return self._values[name]
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 111, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 48, in rpc
request, database_name, *request.rpc_params)
File "/trytond/wsgi.py", line 78, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 131, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 186, in _dispatch
result = rpc.result(meth(inst, *c_args, **c_kwargs))
File "/trytond/model/modelview.py", line 88, in wrapper
result = func(self, *args, **kwargs)
File "/trytond/model/fields/field.py", line 118, in wrapper
return func(self, *args, **kwargs)
File "/trytond/modules/sale_payment/account.py", line 47, in on_change_origin
self.party = sale.invoice_party or sale.party
File "/trytond/model/modelstorage.py", line 1443, in __getattr__
return super(ModelStorage, self).__getattr__(name)
File "/trytond/model/model.py", line 293, in __getattr__
% (self.__name__, name, self._values))
AttributeError: 'sale.sale' Model has no attribute 'invoice_party': None
Fault: 'sale.sale' Model has no attribute 'invoice_party': None
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-01-28 23:00:04 | roundup-bot | set | keyword:
- backport messages: + msg64150 |
2021-01-22 01:17:43 | ced | set | keyword: + backport |
2021-01-22 01:17:06 | roundup-bot | set | messages: + msg64030 |
2021-01-22 01:16:59 | roundup-bot | set | messages:
+ msg64029 nosy: + roundup-bot status: testing -> resolved |
2021-01-20 22:16:24 | reviewbot | set | messages:
+ msg64008 nosy: + reviewbot |
2021-01-20 22:04:14 | ced | set | keyword:
+ review reviews: 355071002 status: in-progress -> testing |
2021-01-20 20:38:03 | ced | set | assignedto: ced messages: + msg64007 nosy: + ced status: unread -> in-progress type: crash |
2021-01-13 15:53:09 | 2cadz | set | messages: + msg63870 |
2021-01-13 12:38:54 | 2cadz | create |
Showing 10 items. Show all history (warning: this could be VERY long)