Commit Graph
7 Commits
Author SHA1 Message Date
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Pierre Masereel d63bb0837b [FIX] maintenance: maintenance team and duration in cron
When you define recurring maintenance requests on an equipment, the
maintenance duration and the maintenance team is not set on the created
requests.

The problem comes from the creation method called by the cron that
doesn't use the duration and maintenance team to create new requests.

We now use these fields in the request creation
2017-02-16 16:13:02 +01:00
Josse Colpaert 8810a34864 [FIX] equipment: activate cron for preventive requests
The xml file with the cron that creates the recurrent
preventive requests was not loaded in the system, so we needed to add
it.

Before, the cron was foreseen to only create the maintenance request on
the day that the request was foreseen (in the morning).  Now, it will
create a request if none exists on the next_action_date. That way the
requests can be planned for.

The other problem is that the '_compute_next_maintenance' method
for calculating the next_action_date does not take into account
the possibly manually already created requests.  So, now, the next
maintenance is calculated with the closed requests and the open ones.

If the first new one is in the past, it takes that date in the past. If it is in
the future, it will see if the gap is big enough to put a maintenance
in between the last done maintenance (or now) and the first new one.
If none exists, it is today + period.

That's why we have to add the 'request_date' in the depends. And take
into account the preventive requests existing on an equipment.
2017-02-03 18:56:10 +01:00
Martin Trigaux 11812b0b9e [FIX] all: remove external ids fakely from base
Several modules defines records with the external ID `base.foo_bar` while it is
created inside this module (typically menus and groups).
While there is no technical reasons to do so but this may introduce issues:

- these records will not be deleted during uninstall
- if a language is loaded before the installation of the module, it won't be
  translated

The uninstallation will only remove the records with an external id linked to
this module (these would only be removed when removing base).

Installing a language before the module will drop the translations not linked
to an existing external id (as it can not be resolved).

This commit correct all the external ids tagged as from base or other incorrect
modules.
2016-09-02 16:14:26 +02:00
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
Josse Colpart 9a20c6556f [REF] (hr_)maintenance
- rename models from hr.equipment.something to maintenance.something
 - add concept of maintenance team and dashboard
 - remove generic alias for maintenance
2016-07-04 16:22:37 +02:00
Thibault Delavallée 12a35ec1a9 [MOV] hr_equipment to maintenance
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.
2016-07-04 16:22:37 +02:00