Commit Graph
126979 Commits
Author SHA1 Message Date
Aaron Bohy cea3f51e2f [FIX] web: batch read of m2m in o2m after onchange
Let's assume a one2many field (editable list) in a form view with
a many2many (e.g. many2many_tags), and an onchange on the one2many
such that, when a row is added to the relation, the server returns
update commands for (a subset of) the records being already in the
relation. For thoses updated records, the many2many field needs to
be read (the onchange only returns the ids in the relation).

Before this rev., the many2many field was read independently for
each record in the one2many. This could cause a performance issue
on large relations. For instance, this was the case on
account.invoice records with a lot of lines.

Issue 2027356

closes odoo/odoo#34785

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-07-11 10:43:42 +00:00
Lucas Lefèvre 646ccfc530 [FIX] web: Display boolean title in list views
Since commit 9fbb4fb, the `title` attribute is added
to list views `<td>`. The title value is given
by field utils formatting methods, according to the
field type. However, for boolean fields, the formatting
method does not return a string but a jquery element
(unless `forceString: true` is given as an option).
Hence, the displayed title is `[Object object]`.

After this commit, boolean fields do not have any title.

closes odoo/odoo#34657

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-11 11:25:32 +00:00
Lucas Lefèvre 9d29056989 [FIX] website_slides: Display button when not in fullscreen
When answering a quiz, the button "Check your answers"
is not displayed when not in fullscreen.

JS error: `def.resolve is not a function`
because an already instantiated Promise does not have a
resolve function.
A promise cannot be resolved from outside its callback scope.

closes odoo/odoo#34762

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-11 07:14:05 +00:00
Olivier Colson 7dd718f0e5 [FIX] l10n_br: invoice and refund accounts had been inverted on some taxes
closes odoo/odoo#34693

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-07-09 11:56:05 +00:00
RomainLibert 6157a3876c [FIX] base: revert of 9607f4e801
In website_sale we don't want to synchronize the company_id of the
parent partner so use sudo to fix opw-1930305
2019-07-10 12:55:48 +02:00
Odoo Translation Bot 5a438cec13 [I18N] Update translation terms from Transifex 2019-07-07 06:07:54 +02:00
Christophe Simonis 66bb578ac9 [MERGE] forward port branch saas-12.2 up to be5e8fdab8 2019-07-05 16:14:48 +02:00
qsm-odoo 201c5b5878 [FIX] website: restore read_events and edit_events
Since https://github.com/odoo/odoo/pull/29442, "Animations" became
"Public Widgets" (even though the Animation class still exists as an
extension of standard PublicWidget).

Since that refactoring an error was introduced which made the code
modify the prototype of the 'events' key each time a public widget with
a 'read_events' or 'edit_events' was instantiated (while the goal was
to modify the widget's own 'events' key, not from the prototype). This
was the cause of very ununderstandable errors...

closes odoo/odoo#34600

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-04 15:28:17 +00:00
Goffin Simon 625b25ecf0 [FIX] hr_holidays: Not able to fill holiday request
Steps to reproduce the bug:
- Log as admin user in company C
- Go to Leaves module and click on Managers > Allocations
- Create a leave.allocation with type = Compensatory Days, duration = 7 days
mode = By Company and Company = C
- Approve the allocation
- Create a leave request LR for all the company C and approve it
- Log as demo user (only user access right for Leaves)
- Go to Leaves > My Leaves and click on "Leaves requests"

Bug:

A traceback was raised

opw:2005813

closes odoo/odoo#33899

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-04 11:16:48 +02:00
Aaron Bohy 869cc15232 [FIX] web: form: combine field and renderer classnames
The rendering of field widgets is asynchronous (as it returns a
native Promise). However, the '_renderFieldWidget' method of basic
renderers is sync, and returns a fake div that will be replaced by
the widget'$el afterwards.

The form renderer sometimes needs to add classNames on the rendered
nodes (e.g. each child of an outer group as class 'o_group_col_x').

To handle this, once the field widget is ready, we copied all
attributes of the fake node to the widget's node. Unfortunately, we
were erasing the attr value (e.g. className) by the new one. As a
consequence, the className defined in the widget were lost. This
could be observed for the 'note' field in 'sale.order'.

As this was only necessary for classNames, this rev. only retrieves
the class attribute of the fake node, and adds it to the classNames
of the widget's $el.

closes odoo/odoo#34528

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-03 06:29:46 +00:00
Hetal Dhanak 2512dcdd0a [FIX] web: many2many tag doesn't show delete icon when long text
Before this commit, sometimes it was difficult to delete many2many
tag because of X sign not being displayed due to long text of tag.

After this commit, if text is long then it will have ellipsis and
we will always have X icon to delete tag.

task-1986017

closes odoo/odoo#34316

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-06-26 13:40:42 +00:00
Xavier Morel 87e3e840ac [FIX] base: don't overwrite existing extensions
The point was to fix files attachments without an extension,
potentially appending to existing extensions was not a smart idea.

See #34299, 5eb15c01b5
2019-07-02 10:06:18 +02:00
RomainLibert 35b5dfa8ea [FIX] hr_recruitment: fix multi company issue
This fix is far from perfect as you still can break things if
you clicked on the menu and change company afterwards
But it should work the first time you click on it

closes odoo/odoo#34488

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-01 12:55:34 +00:00
Pierre Masereel d8a1f4ab03 [FIX] point_of_sale: Ask password after scaning badge
Since changes made on Promises in rev: 5f3b5f0a9d

If a user scans his badge, it's pin code if he has any, is not asked,
and he's imediatly connected to it's employee.

To avoid this behavior, we are handeling correctly the Promise to avoid
this connection shortcut.

closes odoo/odoo#34449

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-07-01 06:45:04 +00:00
Odoo Translation Bot f2b1d58f9c [I18N] Update translation terms from Transifex 2019-06-30 06:15:32 +02:00
Goffin Simon 0247d2f35f [FIX] sale_coupon, sale_coupon_delivery: Wrong discount on promotion program
Let's consider a product P with a unit price = 100€
When a price list PL with a discount of 20% was applied, and
a coupon program CP with a discount of 10% was also applied,
system still calculated the rate based on unit price of the product
and not on the discounted price.

So in this example, the amount of the CP discount was 10€ instead of
8€ because the CP discount was computed on the unit price 100€
instead of the discounted price 80€ (with 20% discount of PL)

opw:2006829

X-port/Cherry-pick of odoo/enterprise@23739e8a71
2019-06-27 19:14:28 +02:00
Christophe Simonis 6c5783bd5a [MERGE] forward port branch saas-12.2 up to 465909f0fd 2019-06-27 19:10:09 +02:00
Christophe Simonis 465909f0fd [MERGE] forward port branch 12.0 up to cd21c016b0 2019-06-27 18:01:07 +02:00
Christophe Simonis cd21c016b0 [MERGE] forward port branch saas-11.3 up to 2f2bc67c06 2019-06-27 17:24:24 +02:00
Nicolas Martinelli 52749f9a02 [FIX] payment_stripe: UserError
In case of failure at token creation, raise a proper UserError instead
of a generic traceback.

opw-2025723

closes odoo/odoo#34420

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-27 13:07:18 +00:00
Christophe Simonis 2f2bc67c06 [MERGE] forward port branch 11.0 up to b1d43cc80e 2019-06-27 14:40:32 +02:00
Christophe Simonis b1d43cc80e [MERGE] forward port branch saas-15 up to d090c92782 2019-06-27 14:25:31 +02:00
Nicolas Martinelli 7670c6c80a [FIX] pos_discount: change customer
- Enable general discounts for POS
- Create a POS session
- Add a product
- Create a general discount of 10%
- Change the customer

The discount is reset to the product price.

When changing the customer, the prices are reset:

https://github.com/odoo/odoo/blob/3b1699e02d4483913159681bf7e10839e6493244/addons/point_of_sale/static/src/js/screens.js#L1251

In the case of a global discount, the price is therefore reset to the
product price in:

https://github.com/odoo/odoo/blob/3b1699e02d4483913159681bf7e10839e6493244/addons/point_of_sale/static/src/js/models.js#L2304

To avoid this, we set the price as manually set. Conceptually, this is
indeed the case since we manually chose the percentage, therefore the
price.

opw-2009761

closes odoo/odoo#34416

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-27 11:51:54 +00:00
Christophe Simonis d090c92782 [MERGE] forward port branch saas-14 up to 1985a49b92 2019-06-27 12:41:55 +02:00
Christophe Simonis 1985a49b92 [MERGE] forward port branch 10.0 up to 5eb15c01b5 2019-06-27 12:41:15 +02:00
Nicolas Martinelli 365110e9eb [FIX] sale: no company
Avoid crash at currency conversion when no company is set on the SO

opw-2009044

closes odoo/odoo#34408

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-27 09:37:22 +00:00
Priyanka Kakadiya 5eb15c01b5 [FIX] base, web: missing extension on binary downloads
It's currently possible for binary downloads to be missing an
extension entirely. Generate an extension from the mimetype and use
that. Also ensure the existing extension (if any) matches the
mimetype.

Warning: this may require adding new mimetype/extensions pairs to the
local mimetype database similar to
f413d155df.

Also fix missing or incorrect filenames on records without a filename
field: in some Odoo versions the client would send a filename of
"null", resulting in a download of e.g. "null.pdf" instead of the
attachment or inferred name.

Task 2025716

closes odoo/odoo#34299

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-27 08:26:49 +00:00
William Henrotin fdcabf19b2 [FIX] mrp: wrong message construction
The error message is built from string pieces except one that is a list.
This commit cast this list into a proper string to be able to build the
error message.

closes odoo/odoo#34402

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-06-27 08:23:59 +00:00
Christophe Simonis cf18c9bae1 [MERGE] forward port branch saas-14 up to 2a89adef2a 2019-06-26 19:26:58 +02:00
Christophe Simonis 2a89adef2a [MERGE] forward port branch 10.0 up to 7b16abbae1 2019-06-26 19:26:33 +02:00
Christophe Simonis b5beeb0901 [MERGE] forward port branch 11.0 up to 7742887e96 2019-06-26 13:52:44 +02:00
Nicolas Martinelli d870749d79 [FIX] l10n_fr_fec: remove new line
- Make a SO with a product that have a carriage return in its
description
- Export FEC report

The CSV contains new lines and is not correctly formatted.

opw-2026861

closes odoo/odoo#34385

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-26 11:45:57 +00:00
Nicolas Martinelli da986aa479 [FIX] l10n_fr_fec: backport fixes
Backport of:

a3519638a3
fe9e7d47b8

opw-2026861
2019-06-26 11:41:41 +00:00
Christophe Simonis d65953124c [MERGE] forward port branch saas-14 up to 61a51a8651 2019-06-26 11:15:32 +02:00
Christophe Simonis 61a51a8651 [MERGE] forward port branch 10.0 up to ea4ddff117 2019-06-26 11:12:36 +02:00
Nicolas Martinelli 6387614dca [FIX] product: create variants in multi-company
- Install stock module
- Activate multi-company and variants
- Create a second company
- Create a product with 2 variants
- Create a picking with the product for both companies
- Add an attribute on the product with 2 values
- Save

An AccessError is raised on `stock.move`.

It arises because the field `product_qty` on `stock.move` must be
recomputed but is on a record in a different company.

The `try` / `except` clause doesn't protect against the recomputation.
Indeed, what happens is:
- try to unlink in batch => AccessError due to recomputation
- try to unlink individually => AccessError due to recomputation
- try to write individually => the field couldn't be recomputed before
(flagged as dirty), so try again to recompute => AccessError

We perform the operation as sudo, and take care of checking the access
rights beforehand.

opw-2009450

closes odoo/odoo#34369

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-26 07:21:22 +00:00
Romain Derie 762b809f71 [FIX] website_sale_delivery: adapt test to 55ed70f405
There is a conflict in saas-12.3.
Indeed, the optional popup on a product when adding to cart got encapsulated
into a new module with 55ed70f405.

But 9308180089 introduced a new test in 12.0 about free delivery.
The tour expects the popup to be shown, but it is not the case anymore.

The tour needed to be adapted. Standard runbot was green since the test would
luckily be executed after `website_sale_product_configurator` would be
installed. That was not the case on runbot theme.

The chance is also taken to ensure the test is executed on the correct
delivery.

closes odoo/odoo#34367

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-25 16:53:08 +00:00
Nicolas Seinlet 33f47e0ae9 [FIX] sale: larger terms and conditions field
In edit mode, the terms and condtions field is too small

closes odoo/odoo#34332

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-06-26 10:39:20 +00:00
Olivier Colson 8c7d7e0c2f [FIX] account: correct default country on new tax repartition lines
When creating a new tax, before saving, the default-computed repartition lines had no country_id associated. It only 'appeared' when saving the record.

closes odoo/odoo#34359

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-06-26 08:11:17 +00:00
Bohdan Lisnenko 7742887e96 [FIX] http_routing: slugify_lib - max_length param should be int
closes odoo/odoo#33858

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>

closes odoo/odoo#34363

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-25 12:15:37 +00:00
Vincent Schippefilt 793933a128 [FIX] web: fix wrapping of many2one in list view
Before this fix, the many2one text in the list view was not wrapping.
After this fix, the text will wrap according to the available space
(managed automatically by the browser).

closes odoo/odoo#34345

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-06-25 08:34:11 +00:00
Christophe Simonis fbd874368a [FIX] website_sale_comparison: correct product removal from comparison list
Oversight of previous forward-port.
2019-06-24 14:48:54 +02:00
Goffin Simon 3d27337f6d [FIX] account: correct communication when registering payment for multiple invoices
When registering a payment against multiple vendor bills and change the memo,
the memo must be populated to all the payments. This behavior has been introduced
with the following commit in stable 11.0: c04065abd8

opw:2024652

closes odoo/odoo#34322

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-06-24 11:29:08 +00:00
Jorge Pinna Puissant 49b949759f [FIX] crm: change team with the default one
Backport from 12.0 to 11.0 (commit: 3cbdfe8807)

- Have two crm teams with the same team leader, and without team members
(team1, team2 as instance).
- Create a new lead, add as Salesperson the team leader, and as Sales
team the second previously created team (team2).
- Save the new lead.

Before this commit, when we save the lead, the sales team will change,
to set the default sales team for the chosen Salesperson, in this case
team1.

opw-2005924

closes odoo/odoo#33898

closes odoo/odoo#34327

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-06-24 11:22:23 +00:00
qmo-odoo cd8afe8546 [IMP] website(_sale)_slides: Add login,join,buy button on quiz
This commit improves the elearning onboarding on the quizzes

If the user is not logged in, a log in button will show up under
the quiz

If he is logged in but not a member of the course and the course is public,
a join button will appear under the quiz

If the course needs to be bought, a buy button will appear under the quiz.

If the course is on invite only, a message under the quiz will inform the
user about it

TaskID: 2003986
PR: #33861

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-06-24 10:51:27 +00:00
sri-odoo d334313125 [FIX] website_profile: fix ranks' imgs alignment
task-2025167

closes odoo/odoo#34238

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-06-27 10:24:50 +00:00
Christophe Simonis 0862963877 [FIX] sale_mrp: adapt test to new version
Since 9df79f42d0, you cannot confirm MO
without raw moves.

Oversight of previous forward-port.
2019-06-24 10:58:32 +02:00
Odoo Translation Bot eaeb75a3fb [I18N] Update translation terms from Transifex 2019-06-23 06:15:20 +02:00
Odoo Translation Bot 149783fb19 [I18N] Update translation terms from Transifex 2019-06-23 03:06:47 +02:00
Christophe Simonis 78b2063b29 [MERGE] forward port branch saas-12.2 up to 8747d72f1e 2019-06-21 15:16:54 +02:00