Tryton - Issues

 

Issue7771

Title V5 update : Users can not be deleted for logging purpose
Priority bug Status unread
Superseder Nosy List risto3
Type Components
Assigned To Keywords
Reviews

Created on 2018-10-07.09:02:51 by risto3, last changed by risto3.

Messages
msg44351 (view) Author: [hidden] (risto3) Date: 2018-10-07.09:02:50
I'm seeing the following during update to V5:

21060 140057328604672 [2018-10-07 06:35:05,092] INFO trytond.convert Deleting 3@res.user from sale.user_process_sale
21060 140057328604672 [2018-10-07 06:35:05,124] ERROR trytond.convert Could not delete id: 3 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 "/opt/trytond/trytond/convert.py", line 797, in post_import
    Model.delete([Model(db_id)])
  File "/opt/trytond/trytond/res/user.py", line 414, in delete
    cls.raise_user_error('delete_forbidden')
  File "/opt/trytond/trytond/error.py", line 74, in raise_user_error
    raise UserError(error)
trytond.exceptions.UserError: ('UserError', ('Users can not be deleted for logging purpose.\nInstead you must inactivate them.', ''))
21060 140057328604672 [2018-10-07 06:35:05,164] INFO trytond.convert Deleting 3@ir.cron from purchase.cron_process_purchase
21060 140057328604672 [2018-10-07 06:35:05,194] INFO trytond.convert Deleting 38@res.user-res.group from purchase.user_process_purchase_group_purchase
21060 140057328604672 [2018-10-07 06:35:05,207] INFO trytond.convert Deleting 4@res.user from purchase.user_process_purchase
21060 140057328604672 [2018-10-07 06:35:05,211] ERROR trytond.convert Could not delete id: 4 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 "/opt/trytond/trytond/convert.py", line 797, in post_import
    Model.delete([Model(db_id)])
  File "/opt/trytond/trytond/res/user.py", line 414, in delete
    cls.raise_user_error('delete_forbidden')
  File "/opt/trytond/trytond/error.py", line 74, in raise_user_error
    raise UserError(error)
trytond.exceptions.UserError: ('UserError', ('Users can not be deleted for logging purpose.\nInstead you must inactivate them.', ''))


These are Cron processes:
$ psql foo -c '\copy res_user to stdout csv'
0,Root,f,root,,2018-09-14 21:09:46.784194,0,,,2,,,,,,,,,
2,Cron Trigger,f,user_cron_trigger,,2018-09-14 21:09:46.510312,0,,,2,,,,,,,,,
1,Administrator,t,admin,,2018-09-14 21:09:46.510312,0,admin,9,2,<sorry stina>,,,Administrator,2018-09-16 05:13:09.199355,1,1,,1
3,Cron Process Sale,f,user_cron_process_sale,,2018-09-14 21:14:19.878087,0,,,2,,,,"",2018-10-07 06:35:05.12769,0,,,
4,Cron Process Purchase,f,user_cron_process_purchase,,2018-09-14 21:14:30.215088,0,,,2,,,,"",2018-10-07 06:35:05.21346,0,,,
History
Date User Action Args
2018-10-07 09:02:51risto3create

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