Tryton - Issues

 

Issue8792

Title Timestamp should always read
Priority bug Status testing
Superseder Nosy List ced, pokoli, reviewbot
Type behavior Components proteus
Assigned To ced Keywords backport, review
Reviews 268331002
View: 268331002

Created on 2019-11-04.23:07:32 by ced, last changed by pokoli.

Messages
msg53141 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-11-12.08:19:41
You are right, updating to 5.4.1 solved the issue.
msg53140 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-11-11.19:34:04
This should be fixed by rev 3e6a252d097b
msg53139 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-11-11.19:25:04
Can we push this? 

Currently this breaks the import_countries script on 5.4:

  File "/usr/local/bin/trytond_import_countries", line 11, in <module>
    load_entry_point('trytond-country==5.4.0', 'console_scripts', 'trytond_import_countries')()
  File "/usr/local/lib/python3.7/dist-packages/trytond/modules/country/scripts/import_countries.py", line 173, in run
    main(args.database, args.config_file)
  File "/usr/local/lib/python3.7/dist-packages/trytond/modules/country/scripts/import_countries.py", line 151, in main
    do_import()
  File "/usr/local/lib/python3.7/dist-packages/trytond/modules/country/scripts/import_countries.py", line 156, in do_import
    countries = update_countries(countries)
  File "/usr/local/lib/python3.7/dist-packages/trytond/modules/country/scripts/import_countries.py", line 60, in update_countries
    Country.save(records)
  File "/usr/local/lib/python3.7/dist-packages/proteus/__init__.py", line 103, in newfunc
    return self.func(owner, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/proteus/__init__.py", line 858, in save
    proxy.write(*values)
  File "/usr/local/lib/python3.7/dist-packages/proteus/config.py", line 188, in __call__
    result = rpc.result(meth(*args, **kwargs))
  File "/usr/local/lib/python3.7/dist-packages/trytond/modules/country/country.py", line 84, in write
    super(Country, cls).write(*args)
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/modelsql.py", line 159, in wrapper
    return func(cls, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/modelsql.py", line 951, in write
    cls.__check_timestamp(all_ids)
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/modelsql.py", line 551, in __check_timestamp
    'Records were modified in the meanwhile')
trytond.exceptions.ConcurrencyException: Records were modified in the meanwhile
review268331002 updated at https://codereview.tryton.org/268331002/#ps278081002
msg53027 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-11-04.23:07:32
Since r 879829bc1534, the _timestamp are not loaded as _fields is always not empty.
The other clients always read the timestamp to be sure to always have the last value.
History
Date User Action Args
2019-11-12 08:19:41pokolisetmessages: + msg53141
2019-11-11 19:34:04cedsetmessages: + msg53140
2019-11-11 19:25:04pokolisetnosy: + pokoli
messages: + msg53139
2019-11-08 17:43:13pokolisetkeyword: + backport
2019-11-04 23:35:15reviewbotsetnosy: + reviewbot
messages: + msg53028
2019-11-04 23:08:13cedsetstatus: in-progress -> testing
reviews: 268331002
keyword: + review
2019-11-04 23:07:32cedcreate

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