Commit Graph
110451 Commits
Author SHA1 Message Date
Yannick Tivisse 057ed8eacf [IMP] base: Remove a seemingly unused method 2017-06-19 17:37:38 +02:00
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 f5df7c6002 [FIX] base: Store correctly ir.values according to the basemodel field type 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
Jerther 3553c555e0 [IMP] tools: add filename in error message of bad schema
To easily identify the file responsible for the error

Closes #17622
Fixes #15869
2017-06-19 15:20:24 +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
Richard Mathot 2dcf233a28 [IMP] tests: better reporting of PhantomJS crashes
When PhantomJS crashes due to a memory leak/segmentation fault, it will
now be logged, allowing to distinguishes timeouts from crashes more
easily.
2017-06-16 14:21:12 +02: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
Joren Van Onder b31435ab5d [FIX] http: replace forward-ported urlparse with werkzeug.urls
Introduced by forward-port of eaa3682bb6
at ed2ddeccdf. At
01e3514147 urlparse was replaced with
werkzeug.urls.
2017-06-15 14:19:30 -07:00
Richard Mathot 41e2a7de77 [FIX] base: forbidden Py2 builtin reintroduced by forward-port ed2ddeccdf 2017-06-15 22:31:20 +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 eaa3682bb6 [FIX] http: force protocol when missing in URL 2017-06-15 16:23:35 +02:00
Olivier Dony 4acfe3577b [FIX] sql_db: port fix from psycopg/psycopg2#459
NUL characters must not be used in query parameters,
as they will be ignored by libpq, being end-of-string
characters.

Preventing NULs avoids unexpected results from
queries. It is only necessary with psycopg2
versions before 2.7, which includes the upstream
fix.
2017-06-15 16:23:35 +02:00
Olivier Dony 0527564463 [FIX] auth_oauth: correctly register token field 2017-06-15 16:21:32 +02:00