Commit Graph
125797 Commits
Author SHA1 Message Date
Odoo Translation Bot bafe82309a [I18N] Update translation terms from Transifex 2019-06-09 06:06:20 +02:00
Lucas Lefèvre 12ace54a9f [FIX] hr_holidays: Fix out of office message default value
If a user has an ooom in his Preferences, it should be
used as the default value for a leave ooom.

closes odoo/odoo#33890

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-06-07 12:51:02 +00:00
Lucas Lefèvre 8dff37f3ec [FIX] hr_holidays: Fix out of office message edition
Purpose
=======
Currently, the ooom field is editable in the leave view but an ir.rule
prevents the employee to save as soon as the leave is approved.

Specification
=============
An employee should be able to edit the out of office message
even if the leave is already approved.
2019-06-07 12:51:02 +00:00
Cedric Snauwaert cc6cc7ae8b [FIX] account: remove the warning in reconciliation widget for to_check
The goal of the to_check checkbox in the reconciliation widget is to set the to_check field present on the move that will be created. However since the UI is not perfect, the to_check checkbox was added on the wizard when we create a new line in the widget, which cause the following problem: what if we select to_check on line1 and then deselect it on line2, previously it was not possible to do this, a warning was thrown to tell the user that he had some line with to_check set and some other not. A better way to do this, and more user friendly is by preventing the user from deselecting the checkbox if some other line has the to_check value set.

closes odoo/odoo#33956

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-06-07 09:15:43 +00:00
wan e358c41313 [FIX] account: manual reconciliation no data
The function get_all_data_for_manual_reconciliation got an empty list instead of None. This leads to not query the db. However we want to get results in the default behavior for get_all_data_for_manual_reconciliation

closes odoo/odoo#33711

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-06-06 10:26:42 +00:00
Goffin Simon d1a5ce02dc [FIX] hr: Impossible to change job_id in hr.employee
The field job_id is displayed in the tree view but it was not available in the form view
like in 12.0. So it was not possible to change it.

opw:2006084

closes odoo/odoo#33933

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-06-06 08:16:12 +00:00
RomainLibert 4783253ba3 [FIX] hr_holidays: add method to override selection of calendar
closes odoo/odoo#33905

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-06-05 11:29:17 +00:00
RomainLibert c081ee0462 [FIX] hr_holidays: fix multi company issue in onchange
If you are logged into a company that differs from the company of your
employee, you won't be able to read the informations on that employee,
and you will have a crash.
Instead of taking the employee linked to the current user, we use search
in order to first apply the ir.rules hence we ensure that we will be
able to read the needed informations.
2019-06-05 11:14:55 +00:00
Nicolas Seinlet 691b0e7e6f [FIX] lunch : row_number with order
row_number without order is not invariant depending on the readed
fields. The order by clause on the partition solve this.

closes odoo/odoo#33573

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-05-22 13:28:04 +00:00
Toufik Ben Jaa dac369453c [FIX] lunch: on mobile crashes when grouping by field
- On mobile grouping by a field crashes.
This is due to the code assuming a function parameter
is always passed where it is actually an optional parameter.

closes odoo/odoo#33891

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-06-05 07:50:56 +00:00
William Henrotin 5999d47d6b [FIX] mrp: use of 'self' inside a loop
Commit a5342daf9d use an iterable inside
a loop on itself. This break as soon as 'self' has more than one element

closes odoo/odoo#33856

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-06-04 07:34:50 +00:00
Pierre Paridans 8040f85b4f [FIX] web: form's title should take all width in edit mode
Form sheet's title (with class .oe_title) when in editable mode has a
maximum width. The goal according to FP is to make a clear
differentiation between the main title/name of a record and its other
fields.

An issue with the existing rule in the Project application is that the
"title" row (with class .oe_title) not only contains the name of the
task but also its priority and state.

The aforementioned rule should then be applied only on the "name" part
and not to the whole row to prevent the "state" from moving between
read_only and editable modes.

To do so the maximum width is "moved" from the row element to the task
name's element.

Sadly the current stylesheet in this project is still a regular CSS
file, preventing us from using the SCSS expression coming from
`addons/web/static/src/scss/form_view.scss`.

Task ID: 1946570

closes odoo/odoo#33845

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-06-03 14:13:40 +00:00
Jigar Patel 1fd9d1e908 [FIX] base: allow users to define fields and templates in any order for Gantt View
Before this commit, if you try to define some field tags before the
templates tag in a gantt view you will get a validation error.

closes odoo/odoo#33826

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-06-03 11:03:14 +00:00
Cedric Snauwaert d773715046 [FIX] account: fix to_check warning being thrown when opening reconciliation widget
In the reconciliation widget, we added a to_check functionality. However in some cases, the propositions don't have a default value for
to_check, which result in a warning being thrown when doing a comparison to ensure that all lines have the same to_check value.
This commit add a default value to to_check for all propositions (when loading the data and when performing a quick create).

closes odoo/odoo#33824

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-06-03 09:47:00 +00:00
Xavier Morel a0bd33e0e5 [FIX] web: properly update qweb view state in reload
closes odoo/odoo#33822

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-03 09:49:53 +00:00
qsm-odoo 1f600826af [FIX] survey: fix assets forward-port
For saas-12.2 a file was added in survey assets with
https://github.com/odoo/odoo/commit/445541989f9dc094bf81201a715abe0a68ed1c63
(even though the file itself was added in the repo with
https://github.com/odoo/odoo/commit/afb1abbb60e5cdc4f76ab7b5a1b54b5e8a9283d5)

As a saas-12.1 fix, this was made:
https://github.com/odoo/odoo/commit/92cb648882082cc8d84d3bbe75304def5196998c
That fix split the survey assets in two parts. After forward-port, the
file added in saas-12.2 ended up in the wrong part.

Bug found while working on task-1961045

closes odoo/odoo#33821

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-06-03 09:42:13 +00:00
David Monjoie 494a2b2675 [FIX] web: log missing view warning rather than error
The point of this warning is to help a view developer realize that
his view is not loaded at all. However, console 'error' and 'warn'
are observed by the runbot clickall tour as meaningful errors
regarding a build resulting status. It makes sense, but it is an
issue for community modules which have a gantt view that only
exists in Enterprise. We don't want to create a bridge module
for each and every module which uses a view that only exists in
Enterprise, so we need to live with this warning. Since its
purpose is for developers only, they can read the log and notice
the error even if we use console.log rather than console.error,
and that will not alter the result of the runbot clickall tour.

closes odoo/odoo#33814

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-06-03 08:01:45 +00:00
Toufik Ben Jaa a7649a3d86 [FIX] sale_timesheet: performance for project with a lot of tasks
closes odoo/odoo#33766

Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
2019-06-03 08:19:50 +00:00
Odoo Translation Bot 15187da85a [I18N] Update translation terms from Transifex 2019-06-02 06:06:25 +02:00
Toufik Ben Jaa 7576ae519f [FIX] base: avoid crash on empty record rule domain
- Since 12.2 when a record rule forbids you to access a record
an error message is displayed with the list of the record rules
that have forbid the access and an example of the forbidden records.

The issue here is that a specific message is displayed to warn the
user that the record rule may be a "Multi-company" record rule.

To do so, it checks if `company_id` is present in the record rules'
domain but if the domain is empty it crashes.

OPW-2004827

closes odoo/odoo#33801

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-05-31 14:54:28 +00:00
Christophe Simonis 995aa1685e [FIX] purchase_stock: correctly set cost_method and valuation in tests
Oversight of previous forward-port.
2019-05-31 16:31:44 +02:00
Christophe Simonis b1970c6f08 [FIX] stock_account: correctly force cost_method in tests
Oversight of previous forward-port.
2019-05-31 16:13:49 +02:00
Christophe Simonis 6c16a1f3ba [FIX] product: correct variant image test
Oversight of previous forward-port.
2019-05-31 15:12:11 +02:00
Christophe Simonis cfe0523714 [MERGE] forward port branch 12.0 up to 8f21148e1a 2019-05-31 14:37:38 +02:00
Nicolas Martinelli 8f21148e1a [FIX] hr_contract: contract type name
Make the contract type name translatable.

opw-2003957

closes odoo/odoo#33781

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-31 05:41:25 +00:00
Toufik Ben Jaa 29762514ae [FIX] sale: singleton error when validating payments
- When validating a payment an "expected singleton" exception is
raised due to the fact that we are using a recordset with multiple
record instead of a recordset with a single record.

OPW-1981632

closes odoo/odoo#33767

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-05-29 16:16:18 +00:00
Nicolas Martinelli d92acc602c [FIX] event_sale: no currency
If the company is not set on the SO, the creation of a SO line crashes
because `currency` is empty.

opw-2005143

closes odoo/odoo#33783

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-31 06:36:55 +00:00
Nicolas Martinelli 5fccb75fde [FIX] account_analytic_default: default based on user
- Create an Analytic Distribution for:
Product A
Current user (e.g. Mitchell Admin)
- Sell the product in the POS, request an invoice

The analytic account defined is not used.

This is due to the invoice created as SUPERUSER.

We should first take into account the user on the invoice, then the
current user.

opw-2003935

closes odoo/odoo#33758

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-29 12:49:24 +00:00
Florent de Labarre 897feb553e [IMP] doc: add information about index attribute
closes odoo/odoo#32606

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 16:29:50 +00:00
Nathan de Pryck d71f2116d9 [FIX] account_voucher: unnecessary copy of payment memo
Before this commit, the payment memo was copied during the duplication
of a voucher. The issue is that the payment memo is not always shown in
the view, and it's mostly unique by voucher.

Now, the payment memo it's not copied anymore.

opw-1986544

closes odoo/odoo#33708

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-29 12:45:27 +00:00
Christophe Simonis 8d7ee39213 [MERGE] forward port branch saas-11.3 up to 8a0e819d0b 2019-05-29 14:06:12 +02:00
Christophe Simonis 8a0e819d0b [MERGE] forward port branch 11.0 up to 3e12f2ff56 2019-05-29 11:10:34 +02:00
Nans Lefebvre 3e12f2ff56 [FIX] mail: fix mail template onchange
The stable behaviour of the mail composer is the following:
- if a template adds new attachments, the composer only has this list
- if a template doesn't add attachments, the list is unchanged
- if no template is set, the list is cleared up
In the case of templates, we also check that both static and dynamic attachments
are added to the list.

We clean up after c6d718f211 and subsequently 516f22c398 which failed to take
into account the fact that the attachement list could be a blend of commands
and ids.
Transforming that is taken care of by _convert_to_write, which semantics was
changed by c6d718f211.
To keep the second behaviour, we thus need to add a (5,) command.

opw 2003197

closes odoo/odoo#33706

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-28 18:44:09 +00:00
Navarro Presas Moisés Alejandro 7ca0fe3c9f [CLA] Signature for AfroMonkey
closes odoo/odoo#32396

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-05-28 15:58:33 +00:00
Navarro Presas Moisés Alejandro f1d8691985 [FIX] sale_order: Set qty_delivered to 0 if not moves.
In `_compute_qty_delivered` function
Python `all` function returns `True` if list is empty; thast why check
if `moves` is not empty to set `qty_delivered` to `product_uom_qty`.
2019-05-28 15:58:33 +00:00
mreficent fa294d2059 [FIX] mail: correctly detect if model is a mail thread
closes odoo/odoo#31799

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-29 08:03:24 +00:00
Richard Mathot 76131748f9 [FIX] iap: avoid a crash when multiple accounts are found
Before the fix, if you had multiple accounts for a specific service, the
settings page was crashing.
(eg: for a service, you have one account specific to a company and
another account with no company set).

We now prefer accounts specific to the current company and tie-break on
the most recently created one

opw-2003744

closes odoo/odoo#33736

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2019-05-29 06:57:43 +00:00
Richard Mathot edf90bb1da [FIX] iap: allow admins to remove IAP accounts
opw-2003744
2019-05-29 06:49:55 +00:00
Nans Lefebvre c52b9dfc37 [FIX] mail: fix mail template onchange
The stable behaviour of the mail composer is the following:
- if a template adds new attachments, the composer only has this list
- if a template doesn't add attachments, the list is unchanged
- if no template is set, the list is cleared up
In the case of templates, we also check that both static and dynamic attachments
are added to the list.

We clean up after c6d718f211 and subsequently 516f22c398 which failed to take
into account the fact that the attachement list could be a blend of commands
and ids.
Transforming that is taken care of by _convert_to_write, which semantics was
changed by c6d718f211.
To keep the second behaviour, we thus need to add a (5,) command.

opw 2003197

closes odoo/odoo#33707

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-28 18:19:26 +00:00
Martin Trigaux 44d11fe777 [FIX] fields: inherit context_dependent from parent fields
If a field is inherited from another model, the attribute context_dependent
was not propagated correctly.

Example of bug:
>>> product = self.env['product.product'].search([], limit=1)
>>> product.name
'Whiteboard Pen'
>>> product.with_context(lang='fr_FR').name
'Whiteboard Pen'  # cache used
>>> template = product.product_tmpl_id
>>> template.name
'Whiteboard Pen'
>>> template.with_context(lang='fr_FR').name
'Marqueur pour Tableau Blanc'
>>> product._fields['name'].context_dependent
False
>>> template._fields['name'].context_dependent
True

Fixes odoo/odoo#33641
Closes odoo/odoo#33722

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-05-28 14:26:29 +00:00
Christophe Simonis 5adbaf827e [FIX] hr_expense: use defined variables
Oversight of previous forward-port.
2019-05-28 16:24:15 +02:00
Christophe Simonis cffd147cfd [MERGE] forward port branch 11.0 up to a20a31486c 2019-05-28 15:52:00 +02:00
Christophe Simonis a20a31486c [MERGE] forward port branch saas-15 up to cad0be27e7 2019-05-28 15:04:40 +02:00
Christophe Simonis cad0be27e7 [MERGE] forward port branch saas-14 up to 6b6d2c8455 2019-05-28 14:36:59 +02:00
Christophe Simonis 6b6d2c8455 [MERGE] forward port branch 10.0 up to 01020e18e9 2019-05-28 14:07:09 +02:00
Romain Derie e9350993ca [FIX] web: restore /apps/<app> controller
Since JS refactoring of ActionManager at 32b8cec536, the /apps/<app> controller
was not working anymore as the refactoring dropped the support of `sa` as URL
state.

closes odoo/odoo#33679

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-27 11:44:08 +00:00
Benoit Aimont 01020e18e9 [FIX] hr_expense: prepare method for move values
There was no way to inherit properly action_move_create method.

opw:1974069

closes odoo/odoo#33488

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-27 07:04:27 +00:00
Benoit Aimont c8b87f66f8 [CLA] Add Benoit Aimont in Acsone CCLA 2019-05-27 07:02:58 +00:00
Luis 0379c51be3 [FIX] web: refresh calendar if error
If an error is raised when saving a calendar event, the transaction is
correctly rolled back. However, the view is not refreshed and the
incorrect information is displayed.

We simply reload in all cases.

opw-2002186

closes odoo/odoo#33028

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-24 10:45:48 +00:00
Julien Castiaux 042966ccae [IMP] web: better logging of errors
When an error is raised server-side, the complete traceback is displayed
in the JS console. This traceback can be very useful since it might
contain information not recorded anywhere else by default. For example,
access errors due to record rules or SQL constrains do not have their
traceback displayed in the UI or recorded in the log [1], but it is
logged in the JS console.

However, the information is logged in the JS console as a stringified
version of the `result.error` object. The final result is a long and
non-formatted string which is unreadable.

We replace by a new format more convenient for technical teams. The
error is now formatted as:

Error code
Error message
Error data message
Error data debug

This will hopefully give a better starting point for debugging purposes.

[1] SQL constrains tracebacks are only recorded in the log in debug
mode:

https://github.com/odoo/odoo/blob/ec792da72b92b22349b6f325e53fd37d953c7db3/odoo/service/model.py#L122

closes odoo/odoo#33650

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-27 06:41:56 +00:00