This commit adds tools methods related to activities in the mail.activity mixin. It gives to models inheriting from the activity mixin an easy-to-use API to schedule, unlink or mark activities as done. Purpose of those methods is to avoid having people manually managing activities in the code to hide the technical details of the activities model, notably access rights or activity types. A field is added on activity model to indicate they have been generated automatically. This way when rescheduling or unlinking based on some specific activity types we do not change user-created activities. Those methods include scheduling activities, changing their dates, marking them as done or unlinking them. Future commits will use those methods in various addons to automatically generate activities based on workflow we want to implement. This commit also adds tests for the newly added code. Future commits should probably have a look at activity security and add some tests cases to check it is correctly taken into account. It is considered a bit out of scope for this task. Thanks to @jem-odoo for its in-depth review of this commit. Well thanks for other commits also.
25 lines
704 B
Python
25 lines
704 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
{
|
|
'name': 'Mail Tests',
|
|
'version': '1.0',
|
|
'category': 'Hidden',
|
|
'sequence': 9876,
|
|
'summary': 'Mail Tests: performances and tests specific to mail',
|
|
'description': """This module contains tests related to mail. Those are
|
|
contained in a separate module as it contains models used only to perform
|
|
tests independently to functional aspects of other models. """,
|
|
'depends': ['test_performance', 'mail'],
|
|
'data': [
|
|
'security/ir.model.access.csv',
|
|
'data/data.xml',
|
|
],
|
|
'demo': [
|
|
'data/demo.xml',
|
|
'data/subtype_demo.xml',
|
|
'data/template_demo.xml',
|
|
],
|
|
'installable': True,
|
|
'application': False,
|
|
}
|