This commit improves maintenance requests management through a better
integration of activities and addition of automated activities. Several
things are done in this commit :
* automatic activities generation is added for maintenance requests.
Activities are generated to remind assigned users about maintenance to
perform. They are also automatically removed or updated if the scheduled
date is changed or if the request is done to avoid bloating users with
unnecessary activities;
* a menu to configure activity types is added. Indeed equipment managers
should be able to see and configure activity types related to their job;
It is simpler to have data split by main model or application like we
already do for models and views. It allows to easily have an overview
of data a module holds.
As we will work on mail related data like adding activities or tweaking
subtypes and templates, having them all in a single file and not lost
between other data helps finding and working with it.
This commit only moves code. No functional change should occur.
The purpose of this commit is to handle code execution only in server
action and delegate schedule management to ir_cron model.
ir.cron model now inherits from ir.actions.server. Fields model, function
and args are removed as well as the logic to handle them. There is no
more code manipulation and evaluation in ir_cron, only a call to the run
method of ir.actions.server.
Cron form view use server action form view as primary view. This way
automated actions use the same base form as server actions with
cron details added.
Thanks to @fpodoo for the original idea and preliminary work. Thanks to
@jpr-odoo for first developments. Thanks to @jem-odoo for reviewing.
- rename models from hr.equipment.something to maintenance.something
- add concept of maintenance team and dashboard
- remove generic alias for maintenance
maintenance is not dependant on hr anymore. A new module hr_maintenance is
added that adds hr-related fields (employee owner, ...). This way maintenance
is a stand alone application.
hr_equipment module is renamed to maintenance. No change is performed to the
module itself. It prepares further changes, mainly splitting maintenance from
hr_maintenance.