File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 20
20
=====
21
21
22
22
After 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
24
25
entries under this menu (in that order) and find out if there is orphaned data
25
26
in your database. You can either delete entries by line, or sweep all entries
26
27
in 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):
24
24
@api .model
25
25
def create (self , values ):
26
26
# 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 :
29
29
raise AccessDenied
30
30
return super (CleanupPurgeLine , self ).create (values )
31
31
@@ -86,8 +86,8 @@ def name_get(self):
86
86
@api .model
87
87
def create (self , values ):
88
88
# 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 :
91
91
raise AccessDenied
92
92
return super (PurgeWizard , self ).create (values )
93
93
Original file line number Diff line number Diff line change 7
7
<field name =" sequence" eval =" 10" />
8
8
<!-- attach to Settings -> Technical -->
9
9
<field name =" parent_id" ref =" base.menu_custom" />
10
+ <field name =" groups_id" eval =" [(6,0, [ref('base.group_erp_manager')])]" />
10
11
</record >
11
12
12
13
<record model =" ir.ui.menu" id =" menu_purge_modules" >
You can’t perform that action at this time.
0 commit comments