parent
617a991b88
commit
6e27c304dc
|
@ -20,7 +20,8 @@ Usage
|
||||||
=====
|
=====
|
||||||
|
|
||||||
After installation of this module, go to the Settings menu -> Technical ->
|
After installation of this module, go to the Settings menu -> Technical ->
|
||||||
Database cleanup. Go through the modules, models, columns and tables
|
Database cleanup. This menu is only available to members of the *Access Rights*
|
||||||
|
group. Go through the modules, models, columns and tables
|
||||||
entries under this menu (in that order) and find out if there is orphaned data
|
entries under this menu (in that order) and find out if there is orphaned data
|
||||||
in your database. You can either delete entries by line, or sweep all entries
|
in your database. You can either delete entries by line, or sweep all entries
|
||||||
in one big step (if you are *really* confident).
|
in one big step (if you are *really* confident).
|
||||||
|
|
|
@ -24,8 +24,8 @@ class CleanupPurgeLine(models.AbstractModel):
|
||||||
@api.model
|
@api.model
|
||||||
def create(self, values):
|
def create(self, values):
|
||||||
# make sure the user trying this is actually supposed to do it
|
# make sure the user trying this is actually supposed to do it
|
||||||
if not self.env.ref('database_cleanup.menu_database_cleanup')\
|
if self.env.ref(
|
||||||
.parent_id._filter_visible_menus():
|
'base.group_erp_manager') not in self.env.user.groups_id:
|
||||||
raise AccessDenied
|
raise AccessDenied
|
||||||
return super(CleanupPurgeLine, self).create(values)
|
return super(CleanupPurgeLine, self).create(values)
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@ class PurgeWizard(models.AbstractModel):
|
||||||
@api.model
|
@api.model
|
||||||
def create(self, values):
|
def create(self, values):
|
||||||
# make sure the user trying this is actually supposed to do it
|
# make sure the user trying this is actually supposed to do it
|
||||||
if not self.env.ref('database_cleanup.menu_database_cleanup')\
|
if self.env.ref(
|
||||||
.parent_id._filter_visible_menus():
|
'base.group_erp_manager') not in self.env.user.groups_id:
|
||||||
raise AccessDenied
|
raise AccessDenied
|
||||||
return super(PurgeWizard, self).create(values)
|
return super(PurgeWizard, self).create(values)
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<field name="sequence" eval="10" />
|
<field name="sequence" eval="10" />
|
||||||
<!-- attach to Settings -> Technical -->
|
<!-- attach to Settings -> Technical -->
|
||||||
<field name="parent_id" ref="base.menu_custom"/>
|
<field name="parent_id" ref="base.menu_custom"/>
|
||||||
|
<field name="groups_id" eval="[(6,0, [ref('base.group_erp_manager')])]"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.menu" id="menu_purge_modules">
|
<record model="ir.ui.menu" id="menu_purge_modules">
|
||||||
|
|
Loading…
Reference in New Issue