File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020=====
2121
2222After installation of this module, go to the Settings menu -> Technical ->
23- Database cleanup. Go through the modules, models, columns and tables
23+ Database cleanup. This menu is only available to members of the *Access Rights *
24+ group. Go through the modules, models, columns and tables
2425entries under this menu (in that order) and find out if there is orphaned data
2526in your database. You can either delete entries by line, or sweep all entries
2627in one big step (if you are *really * confident).
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ def purge(self):
2424 @api .model
2525 def create (self , values ):
2626 # make sure the user trying this is actually supposed to do it
27- if not self .env .ref ('database_cleanup.menu_database_cleanup' )\
28- . parent_id . _filter_visible_menus () :
27+ if self .env .ref (
28+ 'base.group_erp_manager' ) not in self . env . user . groups_id :
2929 raise AccessDenied
3030 return super (CleanupPurgeLine , self ).create (values )
3131
@@ -86,8 +86,8 @@ def name_get(self):
8686 @api .model
8787 def create (self , values ):
8888 # make sure the user trying this is actually supposed to do it
89- if not self .env .ref ('database_cleanup.menu_database_cleanup' )\
90- . parent_id . _filter_visible_menus () :
89+ if self .env .ref (
90+ 'base.group_erp_manager' ) not in self . env . user . groups_id :
9191 raise AccessDenied
9292 return super (PurgeWizard , self ).create (values )
9393
Original file line number Diff line number Diff line change 77 <field name =" sequence" eval =" 10" />
88 <!-- attach to Settings -> Technical -->
99 <field name =" parent_id" ref =" base.menu_custom" />
10+ <field name =" groups_id" eval =" [(6,0, [ref('base.group_erp_manager')])]" />
1011 </record >
1112
1213 <record model =" ir.ui.menu" id =" menu_purge_modules" >
You can’t perform that action at this time.
0 commit comments