Commit Graph
1060 Commits
Author SHA1 Message Date
Odoo Translation Bot 62ab7eb88b [I18N] Update translation terms from Transifex 2018-09-30 07:02:39 +02:00
Odoo Translation Bot 2521b9990e [I18N] Update translation terms from Transifex 2018-09-23 07:02:35 +02:00
Odoo Translation Bot 7fdbc66861 [I18N] Update translation terms from Transifex 2018-09-16 07:08:38 +02:00
Yannick Tivisse 4587816198 Revert "[IMP] base: Remove unused module categories"
This reverts commit 382fbd3520.
2018-09-10 14:23:43 +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
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
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
Christophe Simonis 2ab7ad8361 [MERGE] forward port branch saas-11.3 up to c00df14654 2018-06-07 11:43:07 +02:00
Christophe Simonis 969eb3fa2f [MERGE] forward port branch saas-11.2 up to c834c0f587 2018-06-06 15:46:36 +02:00
Nicolas Martinelli 21e233cba5 [FIX] analytic: read_group
Oversight of forward-port 9001a75f23

opw-1853068
2018-05-31 08:20:46 +02:00
Christophe Simonis f36e6917bd [MERGE] forward port branch saas-11.3 up to 37eed7c509 2018-05-29 17:34:43 +02:00
Christophe Simonis 37eed7c509 [MERGE] forward port branch saas-11.2 up to 58e3552246 2018-05-25 14:34:18 +02:00
Christophe Simonis 2bc6ea1b37 [MERGE] forward port branch 11.0 up to 02ee3fd88e 2018-05-23 19:33:40 +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
Odoo Translation Bot b658aeb3b7 [I18N] Update translation terms from Transifex 2018-05-20 07:04:05 +02:00
Odoo Translation Bot 9dd56e1972 [I18N] Update translation terms from Transifex 2018-05-20 04:09:56 +02:00
Christophe Simonis 8383181b8f [MERGE] forward port branch saas-15 up to 021d0e6a98 2018-05-18 18:59:06 +02:00
Christophe Simonis 021d0e6a98 [MERGE] forward port branch saas-14 up to cabe0951af 2018-05-18 18:54:26 +02:00
Christophe Simonis cabe0951af [MERGE] forward port branch 10.0 up to 9001a75f23 2018-05-18 18:53:56 +02:00
Carlos Dauden 9001a75f23 [IMP] analytic: Performance on _compute_debit_credit_balance
Courtesy of Carlos Dauden.
Was PR #24660
2018-05-18 17:39:00 +02:00
qdp-odoo f53d9c369d [IMP] analytic: slightly improves demo data
by adding an analytic group to analytic accounts
2018-05-15 15:06:39 +02:00
Christophe Simonis 5a751fa200 [MERGE] forward port branch saas-11.2 up to aae54ecc15 2018-05-09 15:45:20 +02:00
Odoo Translation Bot 98a74c613b [I18N] Update translation terms from Transifex 2018-05-06 04:11:15 +02:00
Odoo Translation Bot 3596e67afb [I18N] Update translation terms from Transifex 2018-04-29 07:03:45 +02:00
Odoo Translation Bot b8112869f0 [I18N] Update translation terms from Transifex 2018-04-29 04:12:39 +02:00
Odoo Translation Bot 5ff3c03410 [I18N] Update translation terms from Transifex 2018-04-29 00:28:03 +02:00
Yannick Tivisse 382fbd3520 [IMP] base: Remove unused module categories
The categories other extra rigths and hidden are not used now.
2018-04-26 15:13:38 +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 b192431aee [MERGE] forward port branch saas-11.3 up to ec5e27bb7c 2018-04-24 17:42:41 +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
Odoo Translation Bot 851356bf23 [I18N] Update translation terms from Transifex 2018-04-22 00:28:35 +02:00
Odoo Translation Bot 6ff8eeea36 [I18N] Update translation terms from Transifex 2018-04-20 11:22:41 +02:00
Christophe Simonis 0cd2cff259 [MERGE] forward port branch saas-11.3 up to fdef30fc29 2018-04-17 16:24:27 +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 4bc2581521 [I18N] Update translation terms from Transifex 2018-04-15 04:12:33 +02:00
Odoo Translation Bot 2901c0f0e5 [I18N] Update translation terms from Transifex 2018-04-15 00:29:26 +02:00
Yannick Tivisse 7a282c9965 [IMP] *: Replace all occurences of 'compute' by '_convert' 2018-04-13 16:54:28 +02:00
Nicolas Martinelli 3b158b65c1 [FIX] analytic, hr_timesheet: recompute order
When creating a timesheet, several fields need to be recomputed:
- `currency_id`
- `group_id`
- `department_id`
- `is_timesheet`
- `validated`

When `validated` is computed before the other fields, the recomputation
will lead to an `AccessError` because of the rule
`hr_timesheet.timesheet_line_rule_user`.

Since the test `test_timesheet_validation_user` expects an
`AccessError`, the test succeeds. However, from time to time,
`validated` is computed last => the `AccessError` is not raised.

Actually, a `ValidationError` should be raised in this case (from the
`create` override in `timesheet_grid`).

This commit is a cherry-pick of 802339c12d
and dcca2e8b9d
2018-04-13 10:47:11 +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
Nicolas Martinelli 802339c12d [FIX] analytic, hr_timesheet: recompute order
When creating a timesheet, several fields need to be recomputed:
- `currency_id`
- `group_id`
- `department_id`
- `is_timesheet`
- `validated`

When `validated` is computed before the other fields, the recomputation
will lead to an `AccessError` because of the rule
`hr_timesheet.timesheet_line_rule_user`.

Since the test `test_timesheet_validation_user` expects an
`AccessError`, the test succeeds. However, from time to time,
`validated` is computed last => the `AccessError` is not raised.

Actually, a `ValidationError` should be raised in this case (from the
`create` override in `timesheet_grid`).
2018-04-03 08:30:30 +02:00
Odoo Translation Bot 0b927cf590 [I18N] Update translation terms from Transifex 2018-04-01 07:07:32 +02:00