Commit Graph
909 Commits
Author SHA1 Message Date
Odoo Translation Bot 7fdbc66861 [I18N] Update translation terms from Transifex 2018-09-16 07:08:38 +02:00
Yannick Tivisse 7978d4ba0f Revert "[IMP] *: Define groups on res.users models"
This reverts commit 99f497b390.
2018-09-10 14:23:42 +02:00
Odoo Translation Bot 5e4d4c305f [I18N] Update translation terms from Transifex 2018-09-09 07:07:47 +02:00
Odoo Translation Bot a67c48b0b3 [I18N] Update translation terms from Transifex 2018-09-02 07:07:27 +02:00
Odoo Translation Bot f0ccdcb209 [I18N] Update translation terms from Transifex 2018-08-26 07:07:10 +02:00
Odoo Translation Bot 132d9ad18b [I18N] Update translation terms from Transifex 2018-08-19 07:14:31 +02:00
Martin Trigaux 86a25a68e7 [I18N] resynchronise all translations with .pot
Regenerate all child translations based on the .pot
Remove the terms that are either equal to the parent, either equal to the
source term.
Remove empty translation files
2018-08-17 01:29:55 +12:00
Odoo Translation Bot 566d1586bc [I18N] Update translation terms from Transifex 2018-08-12 07:14:34 +02:00
Odoo Translation Bot 935bac15df [I18N] Update translation terms from Transifex 2018-08-03 10:55:14 +02:00
Odoo Translation Bot 8aed99b0bd [I18N] Update translation terms from Transifex 2018-08-02 14:39:54 +02:00
Martin Trigaux 6b2dcd064d [I18N] export saas-11.4 source terms
For odoo-master transifex project
2018-08-02 13:32:24 +02:00
Christophe Simonis 73652a0b19 [MERGE] forward port branch saas-11.3 up to 50860317cc
Note: 1aacc96262 has been ignored and will
be forward-ported later
2018-06-15 13:27:27 +02:00
Christophe Simonis 50860317cc [MERGE] forward port branch saas-11.2 up to b170a753e1 2018-06-15 11:30:27 +02:00
Mathieu Duckerts-Antoine af999f40dd [IMP] *: review date type groupbys in search views archs
The parent commit allows to select a specific interval for any
date or datetime field in the groupby menu. This makes some filter
akward, for instance "Order Month".

Accordingly, we have rewritten the string and help attributes in
search views archs and removed groupbys related to the same field
(that would have become redundant).
2018-06-12 09:22:30 +02:00
Odoo Translation Bot 9a6ef3c99c [I18N] Update translation terms from Transifex 2018-06-10 07:03:54 +02:00
sed-odoo 22ee6df66b [IMP] fleet: Allow to search vehicles based on assignation logs
Purpose
=======
We can not get the list of vehicles who have been assigned to a driver.

Specification
=============
The user is able to get the list of the vehicles assigned to a specific driver, by searching the driver's name with the "Assigned to" filter.
2018-06-08 16:04:32 +02:00
Thibault Delavallée 3024dc12a3 [FIX] fleet: fix traceback when going to vehicle activities from systray
Default group by is required in order to correctly display a kanban view on
vehicles.

By the way activities fitlers were missing. This commit adds them.

This commit is related to a recent commit adding activities in fleet, see
7356c3b5b6 for more details.
2018-06-07 14:00:28 +02:00
Christophe Simonis f36e6917bd [MERGE] forward port branch saas-11.3 up to 37eed7c509 2018-05-29 17:34:43 +02:00
Yannick Tivisse 473c74f636 [IMP] various: Override _(name_)search instead of (name_)search
Purpose
=======
The method _name_search and _search add support to search as another user.

All the overrides of name_search and search redefine the behavior of the search.

This bring inconsistencies as the result of a call to _name_search and name_search
could differ on certain modules, which is not acceptable.

Specification
=============

Example:
~~~~~~~~

If the name_search method is overridden to search also on the driver name,
then calling name_search with a label 'JF' will return all the cars with a name containing
'JF' or all the cars with a driver name containing 'JF'. Let's say that we have a ir.rule
preventing a user to read the cars of another company. Then the call to name search only returns
the cars satisfying the previous condition AND belonging to his company.

Now, we want to overpass this constraint. We call _name_search with the attribute name_get_uid=1.
Then the call to _name_search returns all the cars from all the companies with a name like 'JF',
but nothing is done about the driver_name.

Example of wrong search redefinition on a model
-----------------------------------------------

    @api.model
    def name_search(self, name, args=None, operator='ilike', limit=100):
        domain = args or []
        domain = expression.AND([domain, [('name', 'ilike', name)]])
        partners = self.env['res.partner'].search([('name', operator, name)])
        if partners and name:
            domain = expression.OR([domain, ['|', ('driver_id', 'in', partners.ids), ('driver_id', '=', False)]])
        rec = self.search(domain, limit=limit)
        return rec.name_get()

Example of correct search redefinition on a model
-------------------------------------------------

    @api.model
    def _name_search(self, name, args=None, operator='ilike', limit=100, name_get_uid=None):
        domain = args or []
        domain = expression.AND([domain, [('name', operator, name)]])
        partner_ids = self.env['res.partner']._search([('name', operator, name)], access_rights_uid=name_get_uid)
        if partner_ids:
            domain = expression.OR([domain, ['|', ('driver_id', 'in', partner_ids), ('driver_id', '=', False)]])
        rec = self._search(domain, limit=limit, access_rights_uid=name_get_uid)
        return self.browse(rec).name_get()

The same logic should be applied on the overrides of the search method.
2018-05-23 11:15:46 +02:00
Thibault Delavallée 6639a6e74d [FIX] fleet: fix traceback when going to vehicle activities from systray
Default group by is required in order to correctly display a kanban view on
vehicles.

By the way activities fitlers were missing. This commit adds them.

This commit is related to a recent commit adding activities in fleet, see
7356c3b5b6 for more details.
2018-05-14 11:37:41 +02:00
Christophe Simonis 5a751fa200 [MERGE] forward port branch saas-11.2 up to aae54ecc15 2018-05-09 15:45:20 +02:00
Yannick Tivisse 6cb5052e85 [FIX] fleet: Fix the _name_search override on fleet.vehicle
Actually _search return a list of ids, not a browse record.
2018-05-07 10:11:58 +02:00
Yannick Tivisse 348447923a [IMP] fleet: Improve stages demo data
Remove the old one and defined stages that are more realistic.
2018-05-04 09:47:05 +02:00
Odoo Translation Bot 3596e67afb [I18N] Update translation terms from Transifex 2018-04-29 07:03:45 +02:00
Yannick Tivisse 8777236fd7 [IMP] fleet: Modify slightly some fleet views
1/ Remove 'odometer' from vehicle tree view
2/ Replace 'Activation Cost' by 'Driver' on contracts tree view
3/ Add fields to search on in contract search view
4/ Hide 'Renew Contract' button if in open state
5/ Move models menuitem from 'Configuration' to 'Vehicles'
2018-04-27 17:30:30 +02:00
Yannick Tivisse 66db893fa9 [IMP] fleet: Rename purchaser_id from 'Contractor' to 'Driver' 2018-04-27 17:30:30 +02:00
Yannick Tivisse 77171d482c [IMP] fleet: Add track_visibility='onchange' on some fields
1/ Use track_visibility instead of overriding write method on a fleet.vehicle

Instead of posting messages in the write method to notify that the record value
changes, use the attribute track_visibility='onchange' instead.

2/ Add track_visibility='onchange' on some fields

3/ Track visibility on 'recurring_cost_amount_depreciated'
2018-04-27 17:30:30 +02:00
Yannick Tivisse 02775e6cd2 [IMP] fleet: Introduce fleet.vehicle.assignation.log model
Purpose
=======

Currently it's impossible to know who was driving a given car at a given time.

We have some piece of information like the immatriculation date of a vehicle
or the date of the first contract. But it's not enough.

This is problematic to solve a rather common issue:
- Who is gonna pay the fine for having exceeded the speed limit?

Specification
=============

Introduce a simple model fleet.vehicle.assignation.log, containing info about:
- The driver
- The vehicle
- The start Date
- The end Date

A simple button on the fleet vehicle should be sufficient to solve the issue.

We cannot generate data from the salary package as these dates can't be predicted
at the contract signature.
2018-04-27 17:30:30 +02:00
Yannick Tivisse ef8befeef4 [IMP] fleet: Add subtype to track driver modifications 2018-04-27 17:30:30 +02:00
Yannick Tivisse 50dfff2462 [IMP] fleet: Allow to search vehicles based on the driver name 2018-04-27 17:30:30 +02:00
Yannick Tivisse 2958bcc383 [IMP] fleet: Archive related contracts when archiving a vehicle 2018-04-27 17:30:30 +02:00
Yannick Tivisse 7356c3b5b6 [IMP] fleet: Add 'Next Activities' on vehicles
This commit adds:
- The button on the chatter
- The button on the kanban card and a progress bar on top of the stage
2018-04-27 17:30:30 +02:00
Yannick Tivisse 3fc4c3b966 [IMP] fleet: Add an informative 'First Contract Date' field
The goal of this field is to be able to keep the value of the first contract
even if it has been closed/deteled.

It could be used to compute the depreciation of the car.
2018-04-27 17:30:30 +02:00
Yannick Tivisse 13bd8e7db6 [IMP] fleet: Order cars by plate, then by acquisition date
This commit allow users to see in the kanban/list view the oldest cars with no plates
2018-04-27 17:30:30 +02:00
Yannick Tivisse 47857a63ac [IMP] fleet: Remove the unicity constraint on the driver
It should be possible to assign 2 vehicles to the same person.

The constraint is too restrictive.
2018-04-27 17:30:29 +02:00
Yannick Tivisse 2bc85571a9 [IMP] fleet: Display all the stages on the fleet.vehicle kanban view
All the stage should be displayed to allow a user to move a car in another stage
even if no other cars are into it.
2018-04-27 17:30:29 +02:00
Yannick Tivisse b510e7f41b [IMP] fleet: Make the license plate not required
It's not mandatory for a car in the fleet to have a license plate.

It should be possible to create the car before the immatriculation date.
2018-04-27 17:30:29 +02:00
Yannick Tivisse 647292a963 [IMP] fleet: Add a default value for 'acquisition_date' 2018-04-27 17:30:29 +02:00
Yannick Tivisse 99f497b390 [IMP] *: Define groups on res.users models
The reified view on the res users will be dropped in the following commit.

The previous commit adds support to define each group as a computed field on the res users.

This commit defines:
- A boolean field for each 'isolated' res.group, i.e. a group in the hidden category.
- A selection field for each 'Application' res.group, i.e. a group in a application category.

Example:
- The group to manage pricelist in sales becomes a boolean field
- The groups project user/manager become a selection field
2018-04-26 15:13:38 +02:00
Christophe Simonis 1f22b81203 [MERGE] forward port branch saas-11.2 up to 7113b70762 2018-04-23 19:36:25 +02:00
Odoo Translation Bot bc4ed6fee5 [I18N] Update translation terms from Transifex 2018-04-22 07:03:20 +02:00
Christophe Simonis c309ccd7b3 [MERGE] forward port branch saas-11.2 up to fed775bc0c 2018-04-18 18:30:35 +02:00
Christophe Simonis fed775bc0c [MERGE] forward port branch 11.0 up to 8c64159b88 2018-04-18 18:20:40 +02:00
Yannick Tivisse a78442194a [FIX] fleet: Track driver modifications on vehicles 2018-04-18 11:53:32 +02:00
Christophe Simonis 74033eb007 [MERGE] forward port branch saas-11.2 up to 90f8f17fb4 2018-04-16 19:50:50 +02:00
Odoo Translation Bot cc583a4ab2 [I18N] Update translation terms from Transifex 2018-04-15 07:03:16 +02:00
Odoo Translation Bot 4bc2581521 [I18N] Update translation terms from Transifex 2018-04-15 04:12:33 +02:00
Odoo Translation Bot 5864fa7896 [I18N] Update translation terms from Transifex 2018-04-08 07:06:57 +02:00
Odoo Translation Bot d9f7490f55 [I18N] Update translation terms from Transifex 2018-04-08 04:13:24 +02:00
Christophe Simonis 860dfb5586 [MERGE] forward port branch 11.0 up to d277adf4d5 2018-04-06 15:36:10 +02:00