Commit Graph
33 Commits
Author SHA1 Message Date
Christophe Simonis 717f458394 [MERGE] forward port branch saas-15 up to 93c22558f3 2018-10-11 14:48:49 +02:00
Christophe Simonis 93c22558f3 [MERGE] forward port branch saas-14 up to 77286e4296 2018-10-11 12:15:02 +02:00
Christophe Simonis 77286e4296 [MERGE] forward port branch 10.0 up to c2688e45f3 2018-10-11 10:34:48 +02:00
tutran81 c2688e45f3 [FIX] maintenance: make write override multi-compliant
The write method called self.stage_id which caused singleton error when
self contains more than one record
2018-10-11 10:02:27 +02:00
Martin Trigaux ed54418d62 [FIX] maintenance: translate team name
If the name of a crm.team is translated, why not the one of a maintenance.team

opw-805838
2018-01-30 14:42:09 +01:00
Christophe Simonis 2f95cfb8ed [MERGE] forward port branch saas-16 up to f99c4f2b48 2018-01-19 12:43:58 +01:00
Christophe Simonis f99c4f2b48 [MERGE] forward port branch saas-15 up to 0c54862cbf 2018-01-19 11:30:35 +01:00
Christophe Simonis 3e197bf000 [MERGE] forward port branch saas-14 up to 4887a75e2c 2018-01-18 16:27:43 +01:00
Christophe Simonis 4887a75e2c [MERGE] forward port branch 10.0 up to ea700016dd 2018-01-18 14:30:51 +01:00
Christophe Simonis e72eb4f38d [MERGE] forward port branch 9.0 up to 74b564cf8d 2018-01-17 18:00:05 +01:00
Martin Trigaux e1e3b5a56e [IMP] i18n: better terms and labels
add missing string labels
rephrase the error message
add missing _description
removed forward-ported hr_equipment.pot

was unclear, courtesy of the translators
2017-10-30 10:40:01 +01:00
qsm-odoo 09c35696a3 [FIX] *: dashboards automatic colors
* account, hr, hr_recruitment, maintenance, mrp, sales_team, stock

Adaptation of https://github.com/odoo/odoo/commit/a79d83e436e5e965d59663d4a06a0f8a62d8f694 for saas-18 new colors.

Also change back all color defaults to 0 instead of 1 (see
mentioned commit: they were changed from 0 to 1 as in saas-16
the color was applied to kanban headers which had to be gray
(the old color 1) by default).

Also add default violet color for 'Customer Invoices' and 'Vendor Bills'
dashboards.
2017-09-20 12:32:48 +02:00
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
Haresh Shyara 9e9d9e6490 [IMP] maintenance : team form and team members
This commit changes the maintenance team:
-In the form view -> replace Category name by Team name
-Replace the partner by a many2many with users
-Display the from view instead of editable list view of teams

In the model, the partner field is replaced by member_ids.
However this field is never used except in the form view.
2017-04-27 17:38:15 +02:00
Haresh Shyara e98f28671f [IMP] maintenance : add unscheduled maintenance
The feature added is a count of todo request that has no schedule date.
It will also add a link in the team dashboard that redirect to all
mainenance requests without a scheduled date.

The count is computed in the existing function '_compute_todo_requests'.
It will count requests that are not done and have no scheduled date.

This commit also modify the view and add the default filter 'unscheduled'
(created by a previous commit) for the action
'hr_equipment_todo_request_action_from_dashboard' which opens the maintenance
request for the active team.
2017-04-27 17:38:15 +02:00
Haresh Shyara 441f934d41 [IMP] maintenance : responsible added as follower
This commit add the following feature :
Add the responsible and the owner of the maintenance request as
follower.

This commit creates a new method that adds as follower the responsible and/or
the owner. This method is triggered in the create and in the write if they
are modified.

It will not remove old responsible or owner from the chatter.
2017-04-27 17:38:14 +02:00
sap e59c1b49c2 [IMP] web, various: apply kanban card color on header instead of whole card
Currently applying a color to a kanban item applies it to the whole
card. This creates usability issues as the content is not dynamically
updated to match the chosen color.

This commit proposes to apply the color only to the header and let the
card content standard. It helps designing cards that are always usable
and readable.
2017-04-24 10:36:29 +02:00
Haresh Shyara 183aa1591d [IMP] maintenance: added duration to maintenance request in calendar view
Use case when it happens:
* Create a maintenance request
* Schedule a date with a duration greater than 1 hour
* Switch to calendar view
* The maintenance request stop time is equal to start time plus 1 hour
and the duration is equal to 1hour.

The calendar view doesn't correctly display the duration and stop date because
the duration field was not passed to the xml view.

This commit pass the duration to the calendar view in the xml and corrects
the help text of the duration field.
2017-03-16 11:14:51 +01:00
Christophe Simonis 68176d80ad [MERGE] forward port branch saas-14 up to eddefc9948 2017-03-01 16:49:15 +01:00
Christophe Simonis 85368d7f86 [MERGE] forward port branch 10.0 up to 387b2acfcb 2017-02-23 20:15:38 +01: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
Christophe Simonis a282d4ae7f [MERGE] forward port branch saas-14 up to be9dfb331f 2017-02-10 18:41:06 +01:00
Christophe Simonis cbdd0b20dc [MERGE] forward port branch 10.0 up to ffd4442b06 2017-02-10 13:17: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
Pratima Gupta 82fc1ac326 [FIX] maintenance: make alias_id ondelete restrict instead of cascade
Seems a little dangerous to delete a maintenance category if the related alias is unlinked
2017-01-06 11:30:02 +01:00
Ravi Gadhia dce47eb4f5 [IMP] maintenance: add support of activities
maintenance.equipment and maintenance.request models now supports activities.
Filters have been added to ease their management.
2016-12-21 11:00:16 +01:00
Raphael Collet fa082019a0 [IMP] models: change API of _group_by_full
The dictionary `_group_by_full` is replaced by a field parameter `group_expand`
that is assigned to the method name.  The API of the method has been simplified
as well:

    @api.multi
    def _read_group_stage_ids(self, domain, read_group_order=None, access_rights_uid=None):
        # the stages are given by self.ids (wrong model);
        # read_group_order is the order given to read_group() on self;
        # return stages.name_get(), {stage.id: stage.fold)

    _group_by_full = {'stage_id': _read_group_stage_ids}

is now written:

    stage_id = fields.Many2one(..., group_expand='_read_group_stage_ids')

    @api.model
    def _read_group_stage_ids(self, stages, domain, order):
        # stages is a recordset;
        # order is the order to use on stages' model;
        # return a recordset which is a superset of stages
2016-09-16 17:35:24 +02:00
Christophe Simonis 235ed4b2c1 [MERGE] forward port branch saas-12 up to 9ad5f26 2016-08-20 18:08:19 +02:00
Thibault Delavallée 16d462da8c [FIX] various: fix fields index parameter in new API still called select 2016-08-09 11:29:57 +02:00
Raphael Collet 002fe629f0 [FIX] maintenance: wrong field dependency on maintenance.team.todo_request_ids 2016-08-01 16:39:50 +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 e7ef6e069c [ADD][SPLIT] maintenance: hr part
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.
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