Commit Graph
132047 Commits
Author SHA1 Message Date
Thibault Delavallée c3be4c3bc6 [IMP][MOV] mail: move / pimp test tools and asserts to mail
PURPOSE

Currently tools and asserts for mail tests are located inside test_mail
module. It makes difficult to re-use them in application tests or force them
to write custom quick and dirty tools and asserts. Purpose of this merge
is therefore to move tools classes and mocks to mail directly and use them
in various sub modules.

SPECIFICATIONS

Have class, mocks, tools and asserts available in mail so that all modules
below from mail can use them.

Including

  * mock mail gateway in a clean way: mock server connection, email building
    and sending;
  * allow to simulate errors while sending emails to test corner cases;
  * provide tools to insert emails in mail gateway;
  * mock mail application to check record creation (message, notifications,
    mails, ...);
  * mock bus notification;
  * provide clearer assert methods for bus and mail notifications;
  * provide clearer emails sending and content methods;
  * provide a with_user tool context manager for tests allowing to quickly
    change current user given a login;

Most of those tools, asserts and mocks come from test_mail/tests/common.py.
They have been partially rewritten to be easier to use or to perform tests
more cleanly.

Future commits will gradually update existing tests in test_mail, test_mass
mailing and test_mail_full.

LINKS

Task ID 2068986
PR #38070
2019-11-20 16:00:32 +00:00
qdp-odoo fd5264c5a5 [REV] account: reverts tags of the Indirect Method Cash Flow
This reverts commit 4f524dbad6 that was merged with PR #36206.

Those tags are unused, were added in account module by mistake (could maybe be acceptable in a l10n_xx module) and were rejected in master (at PR #35522) because of https://github.com/odoo/enterprise/pull/5052#issuecomment-540456794...

closes odoo/odoo#40575

X-original-commit: ed981b02fe2cd000c53f1f995b31c3860e0781c3
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-11-20 15:47:36 +00:00
ryv-odoo 4c6a625f65 [REM] mass_mailing: remove useless db param in url
Methods _get_unsubscribe_url and _get_tracking_url
create url with a db parameter (GET), but it isn't used
in the targeted controller. Then we removed it.

task-2087379

closes odoo/odoo#40568

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-20 14:52:03 +00:00
laa 92cc770c90 [IMP] website_slides: indicate new content on courses to users
Purpose of this commit is to help users knowing there is new content in a
course by adding a visual insight. It is done through a new content arrow
displayed in courses homepage.

Regarding the file "website_slides_templates_homepage.xml", the choice to
incorporate the t-call attribute into a 't' balise was necessary to display
the customize option (part front) associated with the model course_card.

Side dish usability improvements raised during development

  * display completed courses as last instead of first in "my courses";
  * do not show promote strategy field for training courses as it has no
    use, only for documentation courses;

TASK ID 2025186
Closes PR #36703

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-20 14:59:07 +00:00
Thibault Delavallée a8449773dc [FIX] website_slides: add explicit depends on non stored computed fields
Even if it works in current flows it is better to give some fields their
right triggers (fields and uid).

PR #36703
2019-11-20 14:43:15 +00:00
Thibault Delavallée 7a3217f810 [MOV] website_slides: keep files well organized
Oversight of 9b38bcec12

PR #36703
2019-11-20 14:43:03 +00:00
Arnold Moyaux 3b7766ad83 [FIX] delivery: debug loger with new ORM
Using the debug mode on carrier and validate a picking with a
carrier will block and run until request's timeout.

It happens because log_xml create a new cursor and a new environement.
So it should be flush before the ir.logging creation since it's in
another env.

closes odoo/odoo#40561

X-original-commit: cdc09f5b70ad200014ac38f314bf1ec53cd5b8ca
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-11-20 13:21:05 +00:00
Ankita Raval 3651ab082d [IMP] Inventory: Usability improvements
In this commit,
-Modify the message shown when we try to delete a done picking.
-In transfers, in detailed operations, set default hide on on
"Reserved" and "Lot/Serial Number".

task-id : 2124115

closes odoo/odoo#40309

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-11-20 13:03:43 +00:00
Debauche Stéphane 249aad8f70 [IMP] website_slides: update demo data course responsible / attendee
Before
======
In the demo data, we manually add ``admin`` as an attendee of his course,
and then we remove it with ``_remove_membership`` because he will be added
automatically in python.

Now
===
We do not add ``admin`` as an attendee of the course, and we remove the
``_remove_membership`` call. We also change the responsible of some courses
so admin can join some courses.

Task ID 2120225
PR #39886

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-20 13:07:20 +00:00
Xavier Morel 5d0fce56a9 [IMP] core: view validation error reporting
* allow chaining tracebacks of exceptions when using view validation
  in order to provide better issue location
* provide actual error messages in get_domain_identifiers to pinpoint
  issues better than "expression is not a valid domain" which
  depending on the domain might not make it entirely clear *why* the
  expression is not a valid domain

closes odoo/odoo#40468

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-11-20 12:54:11 +00:00
Patrick Hoste 99b7605167 [IMP] gamification: bring back karma field to res_users form view
The karma field has been removed with this PR #35587 but before it
was displayed in the res_users form view through the website_forum
addon under the name "Forum Karma". This task adds it directly in
the gamification inherited view for more consistency.

Task ID : 2116759

closes odoo/odoo#40316

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-19 09:08:50 +00:00
svs-odoo ab3d9f9d08 [FIX] product: sequence on product vendor list
The sequence on product supplier info (vendor list) has the handle
widget to be adjusted but was readonly.

task-2123442

closes odoo/odoo#40552

X-original-commit: 79c439470084fa960360228ebe53e8ff13cf4ff5
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-11-20 11:11:28 +00:00
Ankita Raval 94ee1ed5ab [IMP] Inventory : Usability improvements
In this commit,
- Prevent the product type 'Services' to be selectable from detailed
 operations of a picking.
- Change the place of 'product_uom_id' field on the internal transfers.

closes odoo/odoo#40551

Task-id: 2124093
X-original-commit: 9209e7f2b842161eb1704cebc02675a0b5248750
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-11-20 11:11:10 +00:00
Aaron Bohy 8aba4cd406 [FIX] web: handle m2o whose comodel name field is an m2o
This is a weird situation, but the python handles it. Let's assume
a many2one field F1 on model M1 with comodel M2, and on M2 the name
field (which is the _rec_name) being itself a many2one, and the
following scenario:
 - create a new record for M1
 - for field F1, select 'Create and Edit': it opens a form view for
   M2 in a dialog
 - type something in F2 input, and click 'Quick create'
 - save the dialog

Before this rev., the value of F1 was [object Object]. Now, the new
value is properly displayed.

OPW 2091106

closes odoo/odoo#40549

X-original-commit: 5a04ea848abf50b1fb1f9893d1fcd98013bc025d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-11-20 10:39:29 +00:00
Thibault Delavallée d72070e986 [REM] mail: remove unreachable demo data
Mail contains demo data related to private discussions. However this kind of
use of mail has been removed since several versions. This demo data only
creates noise in mail.message without adding any real demo for any users.

As messages should be linked to existing business documents, existing
demo data in demo channel and additional messages coming in other applications
should be sufficient. Let us remove those demo you can see only in technical
menus.

Task ID 2121319
PR #39907

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-20 09:57:25 +00:00
Simon Lejeune df79800545 [REM] stock: forecast view not imported
rev[0] only removed the override by mrp. The new report was merged in
rev[1].

[0] dc35b88411
[1] b311d9ccba

closes odoo/odoo#40543

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-11-20 08:35:54 +00:00
Simon Lejeune 09f66f4885 [REM] stock: unused controller
This was a remnant of the old old barcode client action.
2019-11-20 08:35:31 +00:00
Jorge Pinna Puissant c9d08fb3ef [FIX] sale_timesheet: remove key from translation terms
Before this commit, the key from the sales_timesheet.progressbar was in
the translation terms, if one of this was translated, then an error was
raised, the translated key wasn't expected into the function.

Now, only the labels can be translated.

opw-2123570

closes odoo/odoo#40541

X-original-commit: 8b4a647c94a4ec334327de72af9594a8de183006
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-11-20 08:27:05 +00:00
Katherine Zaoral 698c1e3cc1 [ADD] l10n_ar: show country AFIP code in the form/tree view
Currently all the countries that match between odoo and AFIP list where
set with the respective value.

This commit add the AFIP code field to both tree (for consult) and form
view (in developer mode only) to let the user the posibility to set/edit this
field for any of the next cases:

* need to consult the code.
* need to be changed.
* need to create a new country that exist in AFIP list and not in odoo
  and need to add the related AFIP code

closes odoo/odoo#40532

X-original-commit: 1b95bfe202576583d6458c6bd1a707dd988e6d95
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-19 17:39:03 +00:00
fw-bot d2b974d22a [FIX] l10n_eu_service: make use of the new tax model
closes odoo/odoo#40526

X-original-commit: 87f2aae6c91e70f4f4102bf7ea41858db7dee16f
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-19 16:08:16 +00:00
Goffin Simon a1ed7aa2ca [FIX] stock: Salesman not able to confirm an order
Steps to reproduce the bug:

- Install Inventory, Sales
- In General Settings/Inventory/Traceability tick "Lots & Serial Numbers"
- Create a stockable product A (e.g. duplicate Apple E-COM08)  tracked by lots
- Update Qty on Hand: put the quantity inside a lot
- Change Demo User's settings: remove Inventory access
- Connect as Demo, create a quotation with A, try to confirm sale

Bug:

An access error was raised.

opw:2092809

closes odoo/odoo#40499

X-original-commit: 1da97d4b842444dd69a54692de0d6edfc20d1123
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-11-19 12:57:25 +00:00
Jeremy Kersten 3ff6efac8d [FIX] website: set controller favicon.ico as nomultilang
Avoid redirect from /favicon.ico to /<lang>/facivon.ico at each request

closes odoo/odoo#40535

X-original-commit: 94bcbc92e5e5a6fd3de7267e3c01f8c11fb045f4
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-19 18:29:20 +00:00
ryv-odoo c7a1a2d964 [REF] rating, various: improve rating.rating ACLs
PURPOSE

Rating model should be available only for internal users. External users
access them only through dedicated routes or controllers using sudo and/or
granting access through tokens. Therefore simplifying ACLs should be feasible.

SPECIFICATIONS

Remove access to rating.rating for public and portal users. Only employees
can access it, with full access given to system admins.

Update various functional flows to use sudo() and check that access is
verified before using sudo.

Impacted modules

  * rating / mail: add groups on some rating related fields as only
    internal users should access them now;
  * rating / mail: set some statistics fields using compute_sudo as their
    value should be accessible for external people even without access to
    the underlying rating.rating records;
  * project: makes some use of rating and has to be updated, notably for
    the public rating page;
  * website_{livechat, rating, slides}: add sudo in public routes as access
    is already granted;
  * website_slides: set statistics field using compute_sudo as their
    value should be accessible for external people;

TASK ID 2053096
PR #36592

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-19 15:46:51 +00:00
Barad MahendraandShreya Thakrar b6af1f368d [IMP] rating: improve rating feedback user interface
Before this commit, when user land after clicking on the smiley in the
e-mail for rating, user cannot change its rating. Its click limits the
available choice.

Now users will be able to choose rating and write feedback before submitting
its rating.

Task ID 1936849
Closes PR #33979

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Shreya Thakrar<sht@odoo.com>
2019-11-19 16:29:55 +00:00
Odoo's Mergebot b3b4a793f8 [REF] survey : use js widget and simplify validation and submit flow
PURPOSE

Purpose of this PR is to standardize and update JS code of the survey
application. It impacts mainly save, pagination and validation flows
when taking surveys.

Python code will have to be adapted consequently.

SPECIFICATIONS: UDPATE WIDGETS

Update JS code remove global selectors / global JS and use standard
widgets. Lessen number of RPCs and clean old code for prefilling and
validation of surveys.

Contains update of notably

  * Survey Form: make it a real widget calling routes in RPC and
    doing some validation;
  * Prefill is now handled in the template instead of in js controller;
  * Submit is now done in json rpc;
  * Survey Timer: make timer a real widget;
  * Survey Result Analysis: make result, graph and pagifation
    real widgets;
  * Charts handling have been externalised in a sub widget;
  * Pagination have been externalised in a sub widget;

Clean Prefill: prefill can be done directly in the template as the template
has already all the needed values (in answer object).

Clean Validation: validation is done at server side and is independent
from prefilling values.

Dates: dates are now formatted directly in the template at rendering using
a format_date fonction pointer called in the template.

Don't use widget in review mode: remove o_survey_form class from review
template as only dates were processed in the widget for review template.

Breadcrumb: remove button previous, prev=prev and go_back mechanism.
The previous page is handled by the breadcrump. Remove redirect url
mechanism. Breadcrumb now saves the answers when going to a previous page.
Move o_survey_form class to a higher div to englobe breadcrumb in the widget
and ease his handling.

Modify the route type of survey submit to work in json. The js survey form
controller calls now manually the route via rpc.

SPECIFICATIONS: UDPATE CONTROLLERS

Refactor questions naming, validation and save flow. Simplify the answer_tag
and question name by removing the survey_id (uses now only question id)
for the most simple cases.

Factorise the save and validate survey answers to avoid duplicate code.

Review posted submit data :

  * process all questions by question type (instead of using form data
    (key,value) that needed key parsing and was un-typed)
  * regroup answers by questions and adapt all validation and save flow
  * remove post data in save and validate question methods
    and uses directly the answer(s)
  * remove useless input names

Validation and submit functions have been rewritten to avoid
duplicated code as many question types have quite the same
validation and save process.

SPECIFICATIONS: MISC

Partial Forward Port : Web assets have been split into another
template to avoid multiple load of those assets when website is
installed.

Also reset is_time_limited on scoring type change.

Also remove locale load as already done in session.js#load_modules

See sub commits for more details.

Task ID 1930132
Closes PR #32419

closes odoo/odoo#39501

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-19 17:57:58 +01:00
Lucas Lefèvre 4f59004a0f [IMP] hr_leave: Request leave in the employee's timezone
Purpose
=======
If a manager creates a leave for an employee in another timezone,
the employee's timezone should be used, not the user's timezone.
Currently, if a manager with timezone UTC creates a leave (one day)
for an employee in New Zealand timezone, the leave is during the
night from the employee's perspective.

Specification
=============
1) Use the employee's timezone for saving leave dates.
2) Display a warning if the user and the employee have different timezones.

closes odoo/odoo#34020

Taskid: 2008407
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-19 15:17:53 +00:00
David Beguin 6e79112e1d [IMP] survey : apply URLSearchParams to manage filters in survey results
URLSearchParams is not supported in IE, so we had to build our own
object to store the query string params nicely.
Now that IE will not be supported anymore in odoo from v13,
URLSearchParams can be used to handle this for us.

Task ID : 1930132
PR #32419
2019-11-19 12:52:22 +00:00
Aurélien Warnon 08541b6376 [REF] survey: make result graph a widget
Task ID: 1930132
PR#32419
2019-11-19 12:52:22 +00:00
Aurélien Warnon 64759a5ae7 [REF] survey: make result pagination a widget
Task ID: 1930132
PR#32419
2019-11-19 12:52:22 +00:00
David Beguin ee0b11f2ce [REF] survey : make survey result a widget
This commit cake the survey result analysis js constroller become a widget.
This also simplify style rules using CSS (was handled in JS).
This also modifies the handling of filters to use real
and correctly formated GET parameters.
Redirect url with parameters are now handled automatically
using URLSearchParams() instead of building manually the query string.

Task ID : 1930132
PR #32419
2019-11-19 12:52:22 +00:00
David Beguin f462bf0d93 [REF] survey : make survey timer a widget
This commit makes the survey timer js controller become a widget.
This widget is called by the survey form widget.
When the time is over, the widget triggers a time_up event
instead of calling the submit.
the time_up event is catched by the survey form widget that
calls himself the submit, as the submit is on the form
and not on the timer itself.

Task ID : 1930132
PR #32419
2019-11-19 12:52:22 +00:00
David Beguin 3bb4ac8dc6 [IMP-REF] survey : refactor questions naming, validation and save flow
This commit simplifies the answer_tag and question name
by removing the survey_id (uses now only question id) for the most simple cases

Factorise the save and validate survey answers to avoid duplicate code

Review posted submit data :
- process all questions by question type (instead of using form data
(key,value) that needed key parsing and was un-typed)
- regroup answers by questions and adapt all validation and save flow
- remove post data in save and validate question methods
  and uses directly the answer(s)
- remove useless input names

The tests have been adapted consequently

Task ID : 1930132
PR #32419
2019-11-19 12:52:22 +00:00
David Beguin b1e32976a6 [REF] survey : make survey form a widget
Purpose of this commit is
- to make the survey js controller a widget, to be more 'odoo-standard'.
- to lessen number of RPCs and clean old code for prefilling and validation of
surveys.

Clean Prefill :
Prefill can be done directly in the template as the template has already
all the needed values (in answer object).

Clean Validation :
Validation is done at server side and is independant from prefilling values.

Dates:
Dates are now formatted directly in the template, at rendering, using a
format_date fonction pointer called in the template.

Don't use widget in review mode:
Remove o_survey_form class from review template as only dates were processed in
the widget for review template.

Breadcrumb :
Remove button previous, prev=prev and go_back mechanism :
The previous page is handled by the breadcrump
Remove redirect url mechanism.
Breadcrumb now saves the answers when going to a previous page.
Move o_survey_form class to a higher div to englobe breadcrumb in the widget
and ease his handling.

Remove locale load as already done in session.js#load_modules

This commit modifies the route type of survey submit to work in json.
The js survey form controller calls now manually the route via rpc.

Task ID : 1930132
PR #32419
2019-11-19 12:51:55 +00:00
David Beguin 52a6b00fa7 [FIX] survey : reset is_time_limited on scoring type change
add is_time_limited in the reset values of the onchange.

Tass ID : 1930132
PR #32419
2019-11-19 12:50:53 +00:00
Florian Gilbert abed0272b6 [IMP] account: Add "To check" checkbox for invoices/bills.
Add the "To check" checkbox for invoices/bills
The "To check" checkbox is useful when an accountant want to be reviewed (or review later)
some entries as Odoo will add a reminder + counter in the related accounting journal dashboard.

Task ID: 2092088

closes odoo/odoo#39366

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-12 09:13:07 +00:00
oco-odoo ec603e2593 [IMP] account: remove now useless (and kind of unusable) "bank accounts" menu
Everything is managed from the regular "journals" menu, now.

closes odoo/odoo#40496

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-11-19 12:29:52 +00:00
pawa2007 fb8e9f824b [ADD] base: add locale for en_IN
English (India) needs its own locale definition so that it can be
selected at the time of database creation.

For example, the amounts in India are displayed/printed as
99,99,99,999.99 (crore, lakh/lac, thousand, etc.) instead of
999,999,999,999.99 (billion, million, thousand, etc.)

closes odoo/odoo#40393

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-19 09:16:32 +00:00
pawa2007 af98694eb6 [CLA] signature for pawa2007 2019-11-19 09:15:22 +00:00
Odoo's Mergebot f591ec1ea9 [IMP] *: translation methods cleaning
Extract some cleaning wanted in #30759 but not related to language packs

- `amount_to_text` should work only on activated languages
- deprecate `load_lang` and rely on `_create_lang` or `_activate_lang`
- `trans_load_data` and `_load_module_terms` no longer silently activate languages
- pass explicitly parameters instead of relying on context content
- replace some `IrTranslation._load_module_terms(['base'], ['fr_FR'])` by `BaseModule._update_translations(['fr_FR'])` for higher level methods
- create `TranslationExporter` class to clarify the `trans_export` method (and clean dead code)

closes odoo/odoo#38859

Task-id: 2088290
Pad: https://pad.odoo.com/p/r.f6f789f8711d21314bd902972153ea9d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-19 14:58:29 +01:00
Victor Feyens ab4507ed32 [IMP] doc: with_company display
closes odoo/odoo#40497

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-19 10:52:35 +00:00
Nikunj Ladava 76dc26aad9 [ADD] l10n_no: added a new accounts
This Commit is related to task ID 37726

closes odoo/odoo#40490

X-original-commit: 43000c7f2ed10e960f9611b004e3b48adb568c5a
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-19 11:34:13 +00:00
Nikunj Ladava c6f7caca53 [ADD] l10n_no: convert existing account to csv
This Commit is related to task ID 37726

X-original-commit: 98e41dfeb133a941389cccf44b3cb232b94ac85d
2019-11-19 11:34:12 +00:00
Martin Trigaux 95ed21795d [IMP] tools: create TranslationModuleReader class
Instead of previous long methods, use a class to clarify what the
export actually does.
The TranslationModuleReader is written to copy the API of the
TranslationFileWriter.
This way, exporting translations is reduced to:
1. create a reader that will fetch all module translations (either
   from db or from static files)
2. create a writer in a specific format (po or csv)
3. export the content from the reader to the writer

Simplify the writer by deducing modules from exported translations
instead of fetching it again in a oneliner (this way can benefit from
yield operations)

Remove the 'all_installed' possibility in modules as it was not
working (creating query with 2 WHERE clause).

The new methode _get_translatable_records works on a per model basis.
This will allow a big performance gain as the previous code was
making a .exists() for each record individually.
In the future, this method could be removed as the main goal is to
test the presence of the rare attribute _translate=False.
2019-11-19 11:36:57 +01:00
Martin Trigaux 62d3675869 [IMP] tools: remove module_name parameter
It was misleading as only forced for translations of type 'code' but
for the other translations, it was retrieved from the imported file
(the comment in a .po file or column in a .csv)

This will allow another optimisation in the next commit, moving to a
TranslationModuleReader instance
2019-11-19 11:36:57 +01:00
Martin Trigaux f5e2038386 [IMP] base: use less tools method
Instead, updating the translations of a module can be done directly
on the ir.module.module record
Remove one call to _update_translation by the actual creation of the
language
2019-11-19 11:36:52 +01:00
Martin Trigaux 8790173ee6 [IMP] base: update comment
To keep up with the new API
Note we still do not have a good solution for the problem mentionned
below.
2019-11-19 10:38:19 +01:00
Martin Trigaux ac63556e23 [IMP] base: explicitly pass parameters for translation methods
Instead of relying on the context content, pass explicit values for
overwrite and create_empty_translations
applu this to trans_load and trans_load_data
Adapt the test that was trying to create empty translations.
2019-11-19 10:37:07 +01:00
Martin Trigaux 49fbab5329 [IMP] base: split and deprecate load_lang
load_lang was a kind of hybrid method trying to active or creating a
language if not found. This was error prone.
Instead rely on two methods with clear purpose:
ResLang._create_lang(lang, lang_name=None)
  - create a new res.lang entry using the locale of the server
    return the res.lang record to match the API of _activate_lang

ResLang._active_lang(code)
  - activate the given code lang

Most of the time, _active_lang is what is expected

tools.trans_load_data and IrTranslation._load_module_terms no longer
activate the language if not active.
Loading the translations should be explicit on an activated language,
it is too error prone to silently activate/create a language if not
found.
Remove lang_name from trans_load_data as no longer needed.
2019-11-19 10:37:01 +01:00
Martin Trigaux 7bf6992869 [IMP] base: do not use unactivated language
Only activated languages should be used in "amount to text" features.
If a language code of a not-used language is used, it should be
ignored for consistency with the rest of the interface.
2019-11-19 10:36:52 +01:00
jdoutreloux 700a81feca [IMP] project: Merge project/fsm form views
Purpose
=======

Merge the form views of project tasks and fsm tasks so that it is
consistent and coherent wherever the user is in odoo.

closes odoo/odoo#40273

Taskid: 2070964
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-19 09:36:50 +00:00