a53e2d871d7b9992691a91f2c780578ab7d5025a
PURPOSE
Fix and add tests for posting messages in multi company environment as well
as posting on readonly documents when greated by '_mail_post_access'
class parameter.
SPECIFICATIONS
Fix multicompany issues which are generally trying to answer a ping on a record
users cannot reach due to MC ACLs.
Effectively support '_mail_post_access' parameter at chatter level. On readonly
documents it is currently always deactivated while it should respect that
parameter. Some record models allow to post without write access.
Add tests to justify the various access rights avoided using sudo, notably
* check attachments: attachments check is stricter than message check
as it always require at least read and often write access on docuemnt.
This does not work when posting on unreachable documents due to
answering a notification;
* check document access: sudo some document value fetch (like display
name) as access is granted at message creation level and should not
crash due to a missing read access on document;
See sub commits for more details.
Task-3213982 (Mail: fix 'multi-company' post support)
Task-3178885 (Mail: fix 'readonly' post support)
closes odoo/odoo#114511
Forward-port-of: odoo/odoo#114464
Forward-port-of: odoo/odoo#114175
Related: odoo/enterprise#37863
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%