Commit Graph
90833 Commits
Author SHA1 Message Date
Yannick Tivisse e1ee9fee8d [IMP] sale,pos: Use a correct class name according to guidelines 2017-06-19 17:37:38 +02:00
Yannick Tivisse 3055b00c44 [IMP] base: Introduce generic methods get_default_field and set_fields
Method `get_default_fields`
===========================

Currently all the methods beginning by `get_default` are used to fetch their default values, usually by looking in the ir.config_parameter table.

As several methods `get_default_fields` have been defined in res_config classes, it better to define it in base and calling to super to avoid side effects like the following example
- 2 classes that override the same class and define the same method. In that case one method will never be called, as it is ovewritten by the other.

Method `set_fields`
===================

Currently all the methods beginning by `set_` are used to set their values, usually in the ir.config_parameter table.

As several methods `set_fields` have been defined in res_config classes, it better to define it in base and calling to super to avoid side effects like the following example
- 2 classes that override the same class and define the same method. In that case one method will never be called, as it is ovewritten by the other.

Methods `get_default_foo` and `set_foo`
=======================================

This commit deprecates the method starting with `get_default_` or `set_` in the res.config models. A warning is raised in that case.
2017-06-19 17:37:38 +02:00
Yannick Tivisse 3eb37589ab [IMP] purchase: Remove useless default value for po_lead 2017-06-19 17:37:38 +02:00
Yannick Tivisse a38a3e93c2 [MOV] *: Reorganize configuration files according to guidelines 2017-06-19 17:37:38 +02:00
Hiral Bhavsar 100ab909e6 [IMP] website: Restructure the 'Google Analytics' wizard.
* Set the blocking warning if the user enters a 'Client ID' without
   any 'Tracking ID'.
 * 'Google Analytics in Dashboard' field is visible only if
   'Google Analytics' is checked in website settings.
 * Get/Set the value of 'google_analytics_key' and
   'google_management_client_id' from 'website' model instead of
   'ir.config_parameter' on 'Google Analytics' wizard.
 * If ID is set on 'Google Analytics' wizard then activated the related
 features and populate fields in website settings.
2017-06-19 17:37:38 +02:00
Thibault Delavallée e331c0bd19 [IMP] website: improve setting ga_client_id from dashboard
It now update the website settings parameter use_google_analytics_dashboard
so that the settings are correctly updated with the user choice.

Implementation is changed so that the dashboard uses a jsonRpc call instead
of directly calling ir_config_parameter set_param.
2017-06-19 17:37:38 +02:00
Thibault Delavallée ac23ca499e [REF] website: use config parameter instead of ir values in settings
Fields like `default_foo` still used ir.values although those are system-wide
parameters and should therefore be stored in ir.config_parameter
table.

When no default_model is set on a field, don't prefix it by `default_`.
2017-06-19 17:37:38 +02:00
Thibault Delavallée a3301757f0 [FIX] website: dashboard should correctly check user groups
Probably to backport.
2017-06-19 17:37:38 +02:00
Thibault Delavallée 2bbfce88d0 [REF] stock: use config parameter instead of ir values in settings
Fields like `default_foo` still used ir.values although those are system-wide
parameters and should therefore be stored in ir.config_parameter
table.

When no default_model is set on a field, don't prefix it by `default_`.
2017-06-19 17:37:38 +02:00
Thibault Delavallée 7efa2b63a6 [REF] sale_stock: use config parameter instead of ir values in settings
Fields like `default_foo` still used ir.values although those are system-wide
parameters and should therefore be stored in ir.config_parameter
table.

When no default_model is set on a field, don't prefix it by `default_`.

Also, reset security_lead when use_security_lead is unchecked to avoid it to be used in further computations
2017-06-19 17:37:38 +02:00
Thibault Delavallée 71e5c8b0b5 [REF] (website_)sale: use config parameter instead of ir values in settings
Fields like `default_foo` still used ir.values although those are system-wide
parameters and should therefore be stored in ir.config_parameter
table.

When no default_model is set on a field, don't prefix it by `default_`.
2017-06-19 17:37:38 +02:00
Thibault Delavallée fdace36840 [REF] sale: fix use of default terms and conditions
Various code using the sale_note field (default terms and conditions)
is updated to check the use_sale_note field that is the setting
enabling it.

This is a preferred solution compared to resetting sale_note each time
use_sale_note is set to False in order to avoid loosing the data
users may have entered in sale_note field.
2017-06-19 17:37:38 +02:00
Thibault Delavallée 682a648be0 [REF] purchase: use config parameter instead of ir values in settings
Fields like `default_foo` still used ir.values although those are system-wide
parameters and should therefore be stored in ir.config_parameter
table.

When no default_model is set on a field, don't prefix it by `default_`.

Also, reset po_lead when use_po_lead is unchecked to avoid it to be used it further computations.
2017-06-19 17:37:38 +02:00
Thibault Delavallée b9c45fbabc [REM] project: remove deprecated generation of alias on sales team
According to usability experts configuring a sales team alias should
be done directly on the sales team view and not through an hidden
and strangely configured settings.
2017-06-19 17:37:38 +02:00
Thibault Delavallée b55a5aa605 [REF] point_of_sale: use config parameter instead of ir values in settings
Fields like `default_foo` still used ir.values although those are system-wide
parameters and should therefore be stored in ir.config_parameter
table.

When no default_model is set on a field, don't prefix it by `default_`.
2017-06-19 17:37:38 +02:00
Thibault Delavallée 8572ac79e7 [REF] mrp: use config parameter instead of ir values in settings
Also, correctly reset manufacturing lead time

Settings now correctly use an ir.config_parameter telling whether to
use or not manufacturing lead time. An onchange is added in order to
ensure that lead time is not still used by code although the settings
is unchecked.
2017-06-19 17:37:38 +02:00
Thibault Delavallée 76bf5dc83d [REF] hr_expense: fix settings using volatile checkboxes
This commit fixes

 * `default_alias_email` is now called use_mailgateway to better reflect its use. When
   unchecked the alias_prefix value is set to False in order to
   reset the alias.
 * empty list message displays receipts alias only if the mailgateway
   option is activated
 * some code cleaning so that get_default_ and set_ methods are put
   into a sole method in order to lessen code size
2017-06-19 17:37:38 +02:00
Thibault Delavallée 4b5513cfd4 [REF] crm: use config parameter instead of ir values in settings
Fields like `default_foo` still used ir.values although those are system-wide
parameters and should therefore be stored in ir.config_parameter
table.

When no default_model is set on a field, don't prefix it by `default_`.

Also, remove deprecated generation of alias on sales team.

According to usability experts configuring a sales team alias should
be done directly on the sales team view and not through an hidden
and strangely configured settings.
2017-06-19 17:37:38 +02:00
qsm-odoo 0bd189d280 [FIX] website(_*): properly style primary buttons
* portal, sale

Some primary buttons had both the 'btn-primary' and 'btn-default'
classes, which is wrong. In standard bootstrap, the 'btn-default'
class seems to be masked by the use of 'btn-primary' but it is not
the case in some of our themes.
2017-06-19 16:10:30 +02:00
Florent de Labarre 004412749b [IMP] purchase: clarify code
The sum of list is confusing
Work with recordsets directly

Closes #17673
2017-06-19 14:06:32 +02:00
Richard Mathot 9bcd928bca [FIX] hr_recruitment: fix d83e8e4eb5
People want to be able to edit their email templates without having them
overwritten at upgrade.
2017-06-19 08:38:54 +02:00
Fabien Pinckaers dfe6769f47 [IMP] hr_recruitment: mails CSS fix 2017-06-16 15:34:51 -07:00
Fabien Pinckaers d83e8e4eb5 [IMP] hr_recruitment: Improved email templates & website thank you page 2017-06-16 11:59:54 -07:00
Benjamin Willig ff8c2d66a1 [IMP] point_of_sale: add extendable method
To build the key when grouping data for account move line creation

Closes #17596
2017-06-16 10:45:56 +02:00
Christophe Simonis fd78b89a02 [MERGE] forward port branch saas-16 up to acfebff880 2017-06-15 21:50:35 +02:00
Christophe Simonis acfebff880 [FIX] *: correct PY3 compatibility introduced by previous forward-ports 2017-06-15 19:24:03 +02:00
Christophe Simonis 2a008d5168 [MERGE] forward port branch saas-15 up to 2f6edfef49 2017-06-15 19:04:51 +02:00
Christophe Simonis 2f6edfef49 [FIX] resource: remove bad test introduced by previous forward-port 2017-06-15 19:00:54 +02:00
Christophe Simonis ed2ddeccdf [MERGE] forward port branch saas-16 up to 1b50c829ef 2017-06-15 18:46:47 +02:00
Christophe Simonis 1b50c829ef [MERGE] forward port branch saas-15 up to 9713dc2e1f 2017-06-15 18:44:16 +02:00
Christophe Simonis 9713dc2e1f [MERGE] forward port branch saas-14 up to 96595772e0 2017-06-15 18:39:59 +02:00
Christophe Simonis 96595772e0 [MERGE] forward port branch 10.0 up to dc8b473a03 2017-06-15 18:35:46 +02:00
Christophe Simonis dc8b473a03 [MERGE] forward port branch saas-11 up to dd7b2556c6 2017-06-15 17:52:49 +02:00
Christophe Simonis dd7b2556c6 [MERGE] forward port branch 9.0 up to 9e324c061c 2017-06-15 17:48:26 +02:00
Simon Lejeune cb73aaf71b [FIX] stock: inventory adjustment and negative quants
It is still possible to have negative and positive quants in the same
location because of returns: if you send something to the customer that
is not there and you return it, you will still be able to reserve the
returned goods to send to another client.

Before, if you would do an inventory adjustment, it would not take into
account these returned quants and their negative counterpart, which made
them difficult to get out of the system.

This fix takes them into account by creating two movements for one
inventory line: move the positive counterpart to the inventory location
before getting back from this location the same quantity.

This way, even if you have 0 as quantity on hand but you have those 2
quants, it will eliminate them. (if you are increasing the stock, part
of the process might have done it automatically already).

Test cases contributed by @jir-odoo

Cherry-pick of be9dce625c
2017-06-15 17:42:10 +02:00
Christophe Simonis 9e324c061c [MERGE] forward port branch saas-6 up to 88802b066c 2017-06-15 17:29:17 +02:00
Christophe Simonis 88802b066c [MERGE] forward port branch 8.0 up to 89eca96476 2017-06-15 17:26:15 +02:00
Olivier Dony 89eca96476 [FIX] anonymization: correct pickle protocol and import 2017-06-15 16:36:05 +02:00
Olivier Dony e40a4baf41 [FIX] anonymization: correct pickle protocol and import 2017-06-15 16:34:47 +02:00
Olivier Dony 625c0d5d8e [FIX] anonymization: correct pickle protocol and import 2017-06-15 16:25:25 +02:00
Olivier Dony 16714a7e71 [FIX] auth_oauth: correctly register token field 2017-06-15 16:23:44 +02:00
Olivier Dony 0527564463 [FIX] auth_oauth: correctly register token field 2017-06-15 16:21:32 +02:00
Olivier Dony 090d7a51be [FIX] auth_oauth: correctly register token field 2017-06-15 16:17:35 +02:00
Florent de Labarre acf7c1460a account: Backport of a5361605
[IMP] account: hide deprecated accounts

To be consistent with other domain added at ee97028

Closes #15432
2017-06-15 16:06:42 +02:00
Martin Trigaux b144e09a10 [FIX] sale_margin: apply same logic than sale override
If some required fields are not present in the created values, they are computed
based on the onchange.
This was introduced at 5c4765130 to allow to import sale order lines without
specifying uom.

If sale_margin is installed, the same issue will occure as it assumes there is
a value for product_uom

Add test, courtesy of Mourad Elhadj Mimoune, Akretion

Closes #17613
2017-06-15 15:43:36 +02:00
Nicolas Martinelli 2bf6005e6a [FIX] point_of_sale: tax on line
Complement of commit f0f45c8fa2

The result of the onchange is incorrectly interpreted by the web client,
leading to taxes not saved.

opw-746827
2017-06-15 13:55:41 +02:00
Dharmraj Jhala 156e07f638 [IMP] project: Display kanban status on chatter instead of state
Purpose
=======

The new kanban status history in the chatter is not clear for the end user.

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

When the state of a task is change the chatter should display the kanban state custom label instead of the kanban state
2017-06-15 13:47:02 +02:00
Nicolas Lempereur b79b27c2b2 [FIX] website: browser lang > default lang revert 174d7e8
This reverts commit 174d7e8e49.

The default language is the language if no lang corresponding to
the current language is found. Thus the browser language if available in
languages has priority over the default language.

opw-746776
closes #17637
2017-06-15 13:39:05 +02:00
Martin Geubelle 0c2e018d4c [FIX] web: display dashboard graphs in full-width
With the new views, the class `o_field_widget` is added on every field widget
and is styled with `display: inline-block`.

The dashboards used to display graphs in full-width so this behaviour is
restored.
2017-06-15 13:22:08 +02:00
Martin Geubelle d88d1abcf0 [FIX] web: reimplement group_by_tooltip option in kanban
This option hadn't been implemented in the new views.
It allows to display informative explanations as tooltips on column over.

It can be set on a many2one field in the kanban view, e.g.:

```<field name="stage_id" options='{"group_by_tooltip":
    {"<tooltipFieldOnStageModel>": "<ABeautifulTitle>"}
}'/>
```

An extra RPC needs to be done on the many2one relation to fetch these additional
fields and the data are stored in the datapoint under the key `tooltipData`.
2017-06-15 13:22:07 +02:00