Commit Graph
126578 Commits
Author SHA1 Message Date
Christophe Simonis ce4165780a [FIX] mail: avoid race condition in test 2019-06-05 09:08:31 +00:00
Christophe Simonis 76275c2c12 [FIX] web: correct forward-port of e9350993ca 2019-06-04 16:27:42 +00:00
Nicolas Lempereur 32f13fae14 [FIX] web: list editable test forward-port
Now in 12.3, when the a editable list view is grouped, the "Create"
button is no longer shown as was the case before (when it would open the
form view when clicked).
2019-06-04 16:16:41 +00:00
Nicolas Lempereur bbc8c9fc26 [FIX] web: fix form resequence test e61639723
In 12.3 when lines are resequenced, the position of the current line
does not take into account that it could have been changed (because of
drag and dropping a line before or after).

opw-1966589
closes #33878
2019-06-04 15:09:44 +00:00
Christophe Simonis a89a7b30a4 [FIX] web: correct forward-port of e9350993ca 2019-06-04 14:56:19 +00:00
Christophe Simonis 3a1bb663c7 [FIX] sale_product_configurator: remove duplicated method
Oversight of previous forward-port.
2019-06-04 14:56:19 +00:00
Christophe Simonis 2b0118b984 [FIX] sale: correctly adapt forward-port of 51ef8514ea 2019-06-04 14:56:19 +00:00
Christophe Simonis 47fefea909 [FIX] sale: propage new parameter to sub-function
Oversight of previous forward-port.
2019-06-03 20:10:34 +02:00
Christophe Simonis 43d133d504 [FIX] *: correct some javascript errors
Oversight of previous forward-port.
2019-06-03 19:06:03 +02:00
Christophe Simonis e6146b0b08 [FIX] website_sale_delivery: use defined variable
Oversight of previous forward-port.
2019-06-03 18:10:46 +02:00
Christophe Simonis eaa6198c9f [FIX] website_forum: remove extra closing xml tag
Oversight of previous forward-port.
2019-06-03 18:10:02 +02:00
Christophe Simonis c8d7ad9a6b [MERGE] forward port branch saas-12.2 up to 995aa1685e 2019-06-03 15:49:31 +02: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
Cedric Snauwaert 8085f259c8 [FIX] l10n_ca: tag_ids is not used anymore, remove it
closes odoo/odoo#33754

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-05-29 12:46:59 +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
Parth Choksi e20c81efcd [FIX] l10n_ch: traceback when installing module
Getting traceback when installing the l10n_ch module.

In the form view of journal, the field "l10n_ch_postal" is added using the xpath.
However the field provided in the expression of xpath('bank_acc_number') doesn't
seem to exist anymore in the form view of account journal.

Hence, it is replaced with the existing field('bank_account_id') in form view
of journal.

task-1999654

closes odoo/odoo#33702

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-05-27 12:45:51 +00: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
Nicolas Martinelli c868da4de6 [FIX] tools: export UTF-8 characters
- Install Babel 2.3.4 as specified in the `requirements.txt`
- In a Python file, do not add the line `# -*- coding: utf-8 -*-`
- Create a translatable string with a non-ASCII character, e.g.
`Amount in €`
- Export the translation

The exported term is incorrect: `Amount in â¬`.

Since the default encoding for Python 3 is UTF-8, it is logical for the
Babel extraction to use it as a default encoding.

The issue was solved in Babel 2.4.0 with commit:

https://github.com/python-babel/babel/commit/33a8fc40d417b401162e2d20021fcbebcc4ab7db

opw-1984480

closes odoo/odoo#33671

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-27 09:11:25 +00:00
Cas Vissers ccdaf9a085 [FIX] fleet: avoid singleton error
When doing a write on multiple records, message_post expects a single record
if self.ids:
self.ensure_one()

closes odoo/odoo#33645

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 09:00:41 +00:00
Raphael Collet f14ae73a98 [FIX] models: do less snapshots in onchange()
As snapshots are costly to compute, we now create exactly two snapshots:
one initial snapshot and one final snapshot.  All intermediate checks
are done with respect to the initial snapshot.

Note also that checks are costly for x2many fields.  Therefore, once a
field has changed, it will never be checked again.  This optimization is
correct since, by contract, the onchanges of a field are processed at
most once.  This guarantees the absence of cycles in onchange.

For instance, assume that field A modifies fields B and C, and that
field C modifies fields D, E and F:
- before: 7 snapshots (snapshot, process A, snapshot, process B,
snapshot, process C, snapshot, process D, snapshot, process E,
snapshot, process F, snapshot)
- after: 2 snapshots (snapshot, process A, process B, process C,
process D, process E, process F, snapshot)

closes odoo/odoo#31872

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-05-27 08:20:07 +00:00
Odoo Translation Bot ec792da72b [I18N] Update translation terms from Transifex 2019-05-26 03:07:48 +02:00
Carmen Miranda 28823cf837 [CLA] Update Vauxoo's CLA
Incorporate Carmen Miranda (CarmenMiranda) as Vauxoo's contributor
I confirm I have signed the CLA and read the PR guidelines at
www.odoo.com/submit-pr

closes odoo/odoo#33627

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-23 15:04:54 +00:00
Adrian Torres 73235ad6ae [FIX] purchase: truncate description for stock.move.line
Before this commit, when creating a PO line with a description that was long
enough (~2712 bytes long) and then confirming the PO, a traceback would
pop up with an error from postgres "index row size exceeds maximum".

This is because when confirming a PO, a stock.move is created with a
stock.move.line mirroring the purchase.order.line, however the "name"
field on stock.move.line is indexed (whereas the purchase.order.line is
not), thus triggering the aforementioned error.

This commit solves this issue by truncating the name field on the
stock.move.line to 2000 bytes (for simplicity's sake) upon creation.

Fixes #33549

closes odoo/odoo#33607

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-05-23 11:34:07 +00:00