[FIX] mail: fix ACLs issue with mail composer in new mode
As create_uid has no value on mail.compose.message model when being in onchange
or new mode, 'Mail Compose Message Rule' record rule may crash. In this
commit we fix that issue by adding a value for create_uid. An unit test is
added to ensure it effectively fixes the use case.
Steps to reproduce this warning:
1. Create automated action for the 'mail.compose.message' model
2. Try to open 'Email compose Wizard'
Warning:
"Due to security restrictions, you are not allowed to modify 'Email composition
wizard' (mail.compose.message) records.
Records: mail.compose.message,NewId_0x7f8e99762310 (id=NewId_0x7f8e99762310)
User: USERNAME (id=2)
This restriction is due to the following rules:
Contact your administrator to request access if necessary."
Task-2641572
opw-2628005
PR odoo#76159
Closes#75369
Part-of: odoo/odoo#76159
Co-authored-by:
Thibault Delavallee <tde@odoo.com>
Showing
- addons/base_automation/tests/__init__.py 2 additions, 0 deletionsaddons/base_automation/tests/__init__.py
- addons/base_automation/tests/test_mail_composer.py 39 additions, 0 deletionsaddons/base_automation/tests/test_mail_composer.py
- addons/mail/tests/test_mail_full_composer.py 1 addition, 1 deletionaddons/mail/tests/test_mail_full_composer.py
- addons/mail/wizard/mail_compose_message.py 4 additions, 0 deletionsaddons/mail/wizard/mail_compose_message.py
Loading
Please register or sign in to comment