Enforce strict types for returned values for
* create
* write
* unlink
* default_get
to make those methods more consistent and reliable.
Also make sure they can be called with empty self/values,
i.e. that they follow the same behavior as the base methods
defined in the main orm Model.
closesodoo/odoo#116809
Related: odoo/enterprise#38880
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
before this commit, from the function action_validate the function _original_records is called twice to assign the value to original_records variable.
after this commit, redundant function calling will be deleted.
closesodoo/odoo#115844
X-original-commit: 61e12347beef8666b47e51c3c4846cf1d5b2e17e
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Currently notification process called notably by message_{post,notify} does
not notify message's author by default. Rationale is that as he typed the
message he is already aware of it.
However in some cases we want to skip this step, notably when messages are
generated in the name of the author and when we want him to be notified if
he should.
This is currently controllable through a context key 'mail_notify_author'.
In this commit we add an explicit parameter propagated through the notify
process, allowing to remove some context key usage and instead use real
parameters.
Note that all context keys usage cannot be removed as it is not always
possible to propagate this parameter.
Followup of odoo#99482
Task-2710804 (Mail: Clean MailThread API)
Part-of: odoo/odoo#107356
Notification method 'message_notify' is sometimes used as a standalone method
to send notifications. In that case it is called directly on MailThread
abstract model, notably when there is no context record or when it does not
inherit from 'mail.thread' directly. This is done mostly in technical models.
However in that case some model-specific code is not called, notably methods
computing default subject. In this commit we improve some calls to be sure
notifications have content enough to be understandable.
When possible, we also redirect the notification method on real records
inheriting from mail.thread, enabling a more complete process.
See community PR for more details.
Task-2710804 (Mail: Clean MailThread Posting API)
Part-of: odoo/odoo#99482
Purpose
=======
This commit brings a new community application to allow recycling
automatically/manually the existing records. Here is some business
examples that could be achieved using this tool:
- Delete all livechat sessions without any messages for more than
1 week.
- Archive all tasks on a given support project that are in Cancelled
stage for more than 2 years.
- Delete all applications that we refused 6 months ago.
The tools allows to delete/unlink spotted records based on a widget
domain (stage.name='Cancelled') and temporal fields (last_stage_update
is passed since 2 years). Either the recycling is done automatically
by a cron, or a notification report is sent to specified users letting
them know how many untreated records have been found.
This application is regrouped with the enterprise features of
data cleaning and data merging under the same application set.
closesodoo/odoo#89312
Taskid: 2827911
Related: odoo/enterprise#26568
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>