Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
5969 Представления

When the Add Customer prompt is brought up as I try to add a new Company, Odoo tells me:

The requested operation cannot be completed due to security restrictions. Please contact your system administrator.(Document type: Contact, Operation: create)


and /var/log/audit/audit.log tells me

2019-02-12 18:04:19,613 3189 INFO odoo12 odoo.models: Access Denied by record rules for operation: create on record ids: [825], uid: 6, model: res.partner
2019-02-12 18:04:19,615 3189 INFO odoo12 werkzeug: 162.246.248.137 - - [12/Feb/2019 18:04:19] "POST /web/dataset/call_kw/res.partner/create HTTP/1.1" 200 - 41 0.016 0.042


The way I got here was that I tried to create an outside_sales group that has limited access to contacts.  I think I backed out of my new rules and groups and as far as I can tell, the settings look the same as a new installation.  The other change was that new user had a different email domain.  That user is completely gone now.


Is there any logging I can turn on or anything that I can do to help debug this?  I prefer not to have to build this all from scratch but at this point it is my quickest option to get functional again.

Аватар
Отменить
Автор Лучший ответ

(EDIT: The stuff below was probably a cause but still didn't fix it for whatever reason.  I was able to add a company once and haven't been able to since. )


I tracked down the bad edit.

In Groups there is something called Extra Rights Contact Creation.  I had a really bad Record Rules in there that said:

Contact, Contact, [('is_company', '=', False)], [Apply for Create]


If I'm reading that correctly, it is saying if someone is in the company, they cannot create a contact.  That seems to be the opposite of what I wanted.


I had to remove it and reboot a couple times.  It didn't work at first but did after the 5th time.  I have no idea why that is other than maybe I was using some cached version.  It works now though after removing that bit.

This answer probably won't help anyone else other than warning people about the dangers of not documenting all changes.  But if you are looking to implement that rule, don't!

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
янв. 23
2693
1
мая 25
1508
1
мар. 25
1650
MERGING CONTACTS Решено
1
февр. 25
3926
2
февр. 25
3114