Alvaro Fuentes 17bb0af7a8 [FIX] mail: check res_id!=0 when checking access rules
Although 0 is a valid value (integer), this has been (ab)used to signal
that a mail activity is not linked to any other record via res_id.

The issue is that when we have `0` as res_id value we get an error here
https://github.com/odoo/odoo/blob/158c0ae425b3be446d81c3a6f4387b2d9426d10e/addons/mail/models/mail_activity.py#L377
more specifically on
https://github.com/odoo/odoo/blob/158c0ae425b3be446d81c3a6f4387b2d9426d10e/odoo/models.py#L3603
with `AttributeError: 'int' object has no attribute 'origin'`

To avoid the issue, here we discard id `0` when checking the linked
records access rules.

On #81292 (targeting master, >15.1 at the moment of writing) a
constraint will be added to avoid `0` on `res_id`.

closes odoo/odoo#82281

X-original-commit: f96cec284a0714ae8eaa264d7adee503a96618d7
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-01-05 16:21:59 +00:00
2022-01-04 20:16:47 +00:00
2021-10-21 19:09:48 +00:00
…
…
…
2021-11-04 10:21:58 +00:00
2021-10-07 17:59:53 +00:00
2021-12-09 14:36:58 +00:00
2021-10-21 19:09:48 +00:00

Build Status Tech Doc Help Nightly Builds

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

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%