I created an automated action as such:
Name: Prevent duplicate vendor based on name
Model: Contact
Trigger: On Creation & Update
Trigger Fields: Before Update
Domain: Match all records
Apply on: Match all records
Action To Do: Execute Python Code
Code:
exists = env['res.partner'].search([('name','=',record.name),('id','!=',record.id)])
if exists:
raise UserError('Vendor "' + record.name + '" is already in Odoo!')
When I try to create a new PO as an admin, it works. However, when I try this as a user (user permission on purchase module), it provides me with the following error:
Access Error:
You are not allowed to access 'Automated Action' (base.automation) records. This operation is allowed for the following groups: - Administration/Settings Contact your administrator to request access if necessary.
What can I do? I need the automated action and also I need my regular user to be able to create a PO.
Thanks.
Which version of Odoo?
@Chris, v14
OK, it's a bug in Odoo 14 - I added an answer.