Last active
December 21, 2015 12:19
-
-
Save ecarreras/6305140 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # "access_giscedata_polissa","giscedata.polissa","model_giscedata_polissa","giscedata_polissa.group_polissa_r",1,1,1,0 | |
| for MODULE in `ls -1`; do | |
| mkdir -p $MODULE/security; | |
| if [ ! -e $MODULE/security/ir.access.csv ]; then | |
| echo '"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"' > $MODULE/security/ir.access.csv | |
| psql -tA saltos -c "SELECT 'access_' || replace(m.model, '.', '_'), m.model, 'model_' || replace(m.model, '.', '_') from ir_model_data i left join ir_model m on (i.res_id = m.id) where i.module like '${MODULE}' and i. model = 'ir.model' order by i.module asc;" >> $MODULE/security/ir.access.csv; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT m.model,i.module from ir_model_data i left join ir_model m on (i.res_id = m.id) where i.module like 'base%' and i. | |
| model = 'ir.model' order by i.module asc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment