File tree Expand file tree Collapse file tree 6 files changed +24
-9
lines changed
Expand file tree Collapse file tree 6 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,6 @@ Adds **Apps access** selection in user's access rights tab. Two options are avai
1313* *Allow installing apps *
1414* *Allow installing apps only from settings *
1515
16- Roadmap
17- =======
18-
19- * Access records (e.g. ``access_ir_module_module_group_user ``) should not be deleted. It has to be disactivated and make active on uninstallation
20-
2116Questions?
2217==========
2318
Original file line number Diff line number Diff line change 11from . import models
2+ from .hooks import uninstall_hook
Original file line number Diff line number Diff line change 1- # Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
1+ # Copyright 2018,2021 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
22# Copyright 2018 Ildar Nasyrov <https://it-projects.info/team/iledarn>
33# License MIT (https://opensource.org/licenses/MIT).
44{
77 "category" : "Access" ,
88 # "live_test_url": "",
99 "images" : [],
10- "version" : "14.0.1.3.3 " ,
10+ "version" : "14.0.2.0.0 " ,
1111 "application" : False ,
1212 "author" : "IT-Projects LLC, Ivan Yelizariev" ,
1313 "support" : "apps@itpp.dev" ,
2323 "post_load" : None ,
2424 "pre_init_hook" : None ,
2525 "post_init_hook" : None ,
26- "uninstall_hook" : None ,
26+ "uninstall_hook" : "uninstall_hook" ,
2727 "auto_install" : False ,
2828 "installable" : True ,
2929}
Original file line number Diff line number Diff line change 1+ `2.0.0 `
2+ -------
3+ - **Fix: ** restore original access rights on uninstallation
4+
15`1.3.3 `
26-------
37- **Fix: ** Grant `Allow installing apps ` to Admin and System users (it was only System)
Original file line number Diff line number Diff line change 1+ # Copyright 2021 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
2+ # License MIT (https://opensource.org/licenses/MIT).
3+ from odoo import api , SUPERUSER_ID
4+
5+
6+ def uninstall_hook (cr , registry ):
7+ env = api .Environment (cr , SUPERUSER_ID , {})
8+ access = env .ref ("base.access_ir_module_module_group_user" , raise_if_not_found = False )
9+ access .write ({'active' : True })
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2+ <!-- Copyright 2018,2021 Ivan Yelizariev <https://twitter.com/yelizariev>
3+ Copyright 2018 Ildar Nasyrov <https://it-projects.info/team/iledarn>
4+ License MIT (https://opensource.org/licenses/MIT).
5+ -->
26<odoo >
3- <delete id =" base.access_ir_module_module_group_user" model =" ir.model.access" />
7+ <record id =" base.access_ir_module_module_group_user" model =" ir.model.access" >
8+ <field name =" active" eval =" False" />
9+ </record >
410 <record id =" module_category_access_apps" model =" ir.module.category" >
511 <field name =" name" >Apps access</field >
612 <field name =" sequence" >18</field >
You can’t perform that action at this time.
0 commit comments