Trytond-admin could not delete user


(Jean-Christophe Michel) #1

Not so good… worked on the dev db. On the production copy, raises

30362 140481034299136 [2019-02-07 00:47:26,529] ERROR trytond.convert Could not delete id: 10 of model res.user
There should be some relation that points to this resource
You should manually fix this and restart --update=module
Traceback (most recent call last):
  File "/home/tryton/venv/lib/python3.5/site-packages/trytond/convert.py", line 797, in post_import
    Model.delete([Model(db_id)])
  File "/home/tryton/venv/lib/python3.5/site-packages/trytond/res/user.py", line 414, in delete
    cls.raise_user_error('delete_forbidden')
  File "/home/tryton/venv/lib/python3.5/site-packages/trytond/error.py", line 74, in raise_user_error
    raise UserError(error)
trytond.exceptions.UserError: ('UserError', ('Les utilisateurs ne peuvent pas être supprimé pour des raisons de journalisation.\nVous devez les désactiver à la place.', ''))
30362 140481034299136 [2019-02-07 00:47:26,555] ERROR trytond.convert Could not delete id: 9 of model res.user
There should be some relation that points to this resource
You should manually fix this and restart --update=module
Traceback (most recent call last):
  File "/home/tryton/venv/lib/python3.5/site-packages/trytond/convert.py", line 797, in post_import
    Model.delete([Model(db_id)])
  File "/home/tryton/venv/lib/python3.5/site-packages/trytond/res/user.py", line 414, in delete
    cls.raise_user_error('delete_forbidden')
  File "/home/tryton/venv/lib/python3.5/site-packages/trytond/error.py", line 74, in raise_user_error
    raise UserError(error)
trytond.exceptions.UserError: ('UserError', ('Les utilisateurs ne peuvent pas être supprimé pour des raisons de journalisation.\nVous devez les désactiver à la place.', ''))

User 9 and 10 are Cron Process Sale and Purchase. Why does trytond-admin want to delete them? and fail?


Action text disappear in buttons
(Sergi Almacellas Abellana) #2

They are tryied to delete because the are no longer defined on the new modules (this error is from ugrade to 5.0). You can ignore this errors: See Issue 7771: Users can not be deleted for logging purpose - Tryton issue tracker for more details