Issue 10004

Sale Configuraion: 'NoneType' object has no attribute 'id'
Can not close singleton without saving (issue 9936)
Nosy list
Timitos, htgoebel
Assigned to

Created on 2021-01-16.18:11:44 by htgoebel, last changed 1 week ago by ced.


Author: [hidden] (Timitos) Tryton translator
Date: 2021-02-18.15:55:34

I think this is a duplicate of issue9936. It should be fixed in all maintained versions now. Can you confirm this?

Author: [hidden] (htgoebel)
Date: 2021-01-16.18:11:44

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/", 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/", line 565, in sig_close
    return self.modified_save()
  File "/home/hartmut/projekte/regionalkollektiv/tryton/_venv/lib64/python3.7/site-packages/tryton/gui/window/", line 558, in modified_save
    return record_id ==

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

How to reproduce

Confg file:

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 &

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

Date User Action Args
2021-02-19 10:46:24cedsetstatus: testing -> closed
superseder: + Can not close singleton without saving
2021-02-18 15:55:34Timitossetmessages: + msg64688
nosy: + Timitos
status: unread -> testing
2021-01-18 15:53:40htgoebelsetcomponent: + sale
2021-01-16 18:11:44htgoebelcreate

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