By not emptying the 'sale_lines' field in the 'copy' method, it will duplicate the associated line in the sale. This occurs in any state of the sale. I have encountered this behavior in version 6.0, I don't see the 'copy' method being adapted in later versions so I guess it will continue to happen.
It can be reproduced in tryton client versions 6.0 and 7.0 (I have tested them). To reproduce it: On a selected menu item, we press ctrl and double click to open it. By holding ctrl pressed, the menu item will be deselected, but will call the action and throw error.
ERROR:tryton.common.common:Traceback (most recent call last):
File "usrlocallibpython3.11dist-packagestrytondwsgi.py", line 109, in dispatch_request
return endpoint(request, **request.view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondprotocolsdispatcher.py", line 43, in rpc
return methods.get(request.rpc_method, _dispatch)(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondwsgi.py", line 75, in wrapper
return func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondprotocolswrappers.py", line 197, in wrapper
return func(request, pool, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondprotocolsdispatcher.py", line 196, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondiraction.py", line 274, in get_keyword
if model_id >= 0:
^^^^^^^^^^^^^
TypeError: '>=' not supported between instances of 'NoneType' and 'int'
Fault: '>=' not supported between instances of 'NoneType' and 'int'
With tryton==6.0.30 numeric values are not displayed in form views. I think it is from this commit: 2be02f249a1d I put an example below comparing between versions 6.0.29 and 6.0.30
In addition to not showing the values, when trying to write, it only leaves me a "5" as decimal, leaving "xx.5", it does not allow me to write "xx.2" for example.
unit_price = Numeric(..., digits=(16, 4))
llp = Numeric(..., digits=(16, 4))
discount = Float(..., digits=(16, 4)) # factor 100 in view
unit_price | discount | llp |
---|---|---|
10.4600 | 0.257 | 10.4600 |
This shouldn't be a problem since #9640 (closed). Or is there something I have misunderstood?
I am implementing an adaptation for a custom validation for when the user login. But when I raise a UserError in this process it does not behave as such, but as a tryton or sao error.
I am conscious that this topic will most likely go nowhere due to lack of information, but I have not achieved anything. But I think it's interesting to report it to put on record that something like this has happened.
Context: Tryton deployed on Docker (trytond==6.0.20)
Every time a user login in a specific computer from the client or from sao, and make some daily action, Tryton would 'freeze'.
No one else could log in, (the docker service is still up normally), but cannot establish connection with this one anymore.
As all verbose as possible both on the server and also on the client, there was no unusual log. Neither any posgresql process.
To get it working again it was enough to do a docker restart container_name
It is not a problem with the res.user itself, because the same res.user on another computer did not cause any problems. And from that machine with any user it caused the same problem.
Still unable to find the problem, this person, for some other reason, reinstalled his OS. And after that, the problem no longer occurred.
I have also tried in the html editor, using the button to exit. The problem also appears.
I don't think that's what it's about, the first thing is that when you close the browser and log in again, it asks again for username and password. (I understand that if you reuse the session it would not ask for the credentials. This is what happens when you close the TAB)
I have also done this scenario using 2 different browsers, and the result is the same.
First of all, I don't know if this incident should be confidential, I set it as confidential just in case.
https://foss.heptapod.net/tryton/tryton/-/blob/2a6561df7ef67b695c947ee242e1af1960f12fa6/trytond/trytond/ir/routes.py#L187 I have only been able to replicate it in routes like this one. When changing user, as long as the transaction cache lasts, accessing, for example Transaction().user returns the cached user, not the current one.
Steps to reproduce
José Antonio Díaz Miralles (f0ea5e86) at 12 Feb 14:34
Sort purchase request by purchase and line key before create purcha...
... and 12 more commits
José Antonio Díaz Miralles (d8b5a11c) at 12 Feb 14:33
Sort purchase request by purchase and line key before create purcha...
I have been testing this and summing takes 1/2 the time it takes to expand.
José Antonio Díaz Miralles (8bc30801) at 10 Feb 20:42
Sort purchase request by purchase and line key instead only purchas...
... and 28 more commits
Closes #12073
José Antonio Díaz Miralles (3fee6b8f) at 10 Feb 20:35
Sort purchase request by purchase and line key instead only purchas...
When creating the purchase from the requests, the lines of each purchase are not currently sorted before grouping. This causes them not to group as expected.
José Antonio Díaz Miralles (6ba6ad79) at 04 Feb 13:48
Do not write creation values in ModelSingleton
... and 2 more commits
Why make an unnecessary call?