This question has been flagged
1 Reply
2526 Views

In m security, I have created access rules that allows the specific user to create, read, update, and delete. certain transaction. However, when I try to make transaction using that user it pop ups except_osv: (u'Access Denied', u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: Invoice, Operation: create)')

  <record id="account_invoice_rule" model="ir.rule">
    <field name="name">Account Invoice</field>
    <field name="model_id" ref="model_account_invoice"/>
    <field name="global" eval="True"/>
    <field name="groups" eval="[(3,ref('group_pcci_supplier_invoice'))]"/>
    <field eval="1" name="perm_unlink" />
    <field eval="1" name="perm_write" />
    <field eval="1" name="perm_read" />
    <field eval="1" name="perm_create" />
</record>

 

Avatar
Discard
Best Answer

You can go to Settings >> Technical >> Security >> Access Control List, search for model account.invoice and see who (which groups has the accesses).  Add the group that you want to have access to the list.  If the list is not as per your need (say, Delete is not checked), then you can create a new record.

Note that aside from the Access Control List, there is Record Rules (Settings >> Technical >> Security >> Record Rules) that you need to check also.

If you want to load it from a module, usually it is loaded via a CSV file ir.model.access.csv.  You can find samples in the official addons (account addon will be a good place to start).

Avatar
Discard
Author

Hi already did this but nothing happen.. Do you have any idea?? please...

If the access control list and record rules are all in order, you should not be getting this error. The XML that you post in the question is incorrect. It tells OpenERP to remove group with XML ID group_pcci_supplier_invoice.

Author

Thanks Ivan