Message 63913

Author
htgoebel
Date
2021-01-16.18:11:44
Message id
63913

Content

In a fresh database, when opening "Sale Configuration", but not saving the record, the following exception is raised:

  File "/home/hartmut/projekte/regionalkollektiv/tryton/_venv/lib64/python3.7/site-packages/tryton/gui/main.py", line 864, in _sig_remove_book
    res = page.sig_close()
  File "/home/hartmut/projekte/regionalkollektiv/tryton/_venv/lib64/python3.7/site-packages/tryton/gui/window/form.py", line 565, in sig_close
    return self.modified_save()
  File "/home/hartmut/projekte/regionalkollektiv/tryton/_venv/lib64/python3.7/site-packages/tryton/gui/window/form.py", line 558, in modified_save
    return record_id == self.screen.current_record.id

AttributeError: 'NoneType' object has no attribute 'id'

How to reproduce

Confg file:

[database]
uri = sqlite://
path = /path/to/tryton/var
default_name = test1

Setup fresh instance

cd /path/to/tryton
python3 -m venv _venv --upgrade --system-site-packages
. _venv/bin/activate
pip install trytond trytond-sale-subscription

rm -rf var ; mkdir var
touch var/test1.sqlite

trytond-admin -c trytond.conf -d test1 --all
trytond-admin -c trytond.conf -d test1 --update-modules-list
trytond-admin -c trytond.conf -d test1 -u sale_subscription --activate-dependencies
trytond -c trytond.conf &
tryton

In the client:
* Open Sale → Configuration → Sale Condifuration
* Close the tab, without changing anything
* Request will show up, asking to save
→ click "No"
→Error

History
Date User Action Args
2021-01-16 18:11:44htgoebelsetmessageid: <1610817104.2422783.BHIRLRH6SNZIGMF2.issue10004@tryton.org>
2021-01-16 18:11:44htgoebellinkissue10004 messages
2021-01-16 18:11:44htgoebelcreate

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