1

i have create a group in security.xml as

   <record id="group_requester" model="res.groups">
       <field name="name">Requester</field>
       <field name="category_id" ref="IT_asset_module.module_category_it_assets"/>
       <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
   </record>

and in view.xml as

   <button name="action_submit" states="draft" string="Submit" type="object" class="oe_highlight" groups="IT_asset_module.group_requester"/>

But when i click on button following error occur;

You are not allowed to access 'System Parameter' (ir.config_parameter) records. This operation is allowed for the following groups: - Administration/Settings Contact your administrator to request access if necessary.

I do not want to give Administration/Settings access to user. Please guide.

  • I think you should try simple create group and add manually in user setting and try.Try to remove category_id and implied ids and test it.I used groups like that in my module. – Neural Aug 17 '21 at 14:19
  • I have remove category_id and implied_ids but still same. Please guide any code written in ir.model.access.csv? – Muhammad Saleem Aug 19 '21 at 06:56

1 Answers1

2

change implied_ids to:

<field name="implied_ids" eval="[(4, ref('base.group_system'))]"/>

or add your group in model ir.config_parameter inside your module security/ir.model.access.csv

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_ir_config_parameter_requester,config_parameter_requester,base.model_ir_config_parameter,IT_asset_module.group_requester,1,1,1,1
Bima Wijaya
  • 183
  • 2
  • 16
  • with base.group_system, Administration/Settings permission assigned and Accounting, Apps and Setting allow to user. I do not want to give these permission to user. – Muhammad Saleem Aug 20 '21 at 06:30
  • I have _inherit = ['mail.thread', 'mail.activity.mixin'] can you guide group related to these, those i can add against group_requester. – Muhammad Saleem Aug 20 '21 at 12:02
  • Thank you. By changing in security/ir.model.access.csv file my problem has been solved. – Muhammad Saleem Aug 20 '21 at 18:03