Sale Configuraion: 'NoneType' object has no attribute 'id'
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