Commit Graph
134591 Commits
Author SHA1 Message Date
Nicolas Martinelli a12479aaa8 [FIX] web: rounding error
In JavaScript, the following computation introduces numerical errors:
```
Math.pow(10, -4) = 0.00009999999999999999
Math.pow(10, -5) = 0.000009999999999999999
```

In the context of `round_decimals`, such errors propagate to
`round_precision`, ultimately leading to inconsistencies between Python
and JS (see #47300 for detailed use case).

Instead of computing `Math.pow(10, decimals)`, we parse the scientific
notation to prevent such inaccuracies.

We also introduce tests in line with the Python tests.

opw-2205092

closes odoo/odoo#47694

X-original-commit: cb471897bfa08d1fee6a9f49e90d9c120e1733fc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-16 12:01:57 +00:00
Nicolas Martinelli 0067aec0dd [FIX] l10n_gt: default currency
The default currency of Guatemela is GTQ.

opw-2201797

closes odoo/odoo#47693

X-original-commit: c253dc883ad84359e6db23150ab794368c07def4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-16 11:26:49 +00:00
Andrii Skrypka cee6693165 [FIX] base: hide enterprise upgrade button
Combining a state and attrs does not work
Apply all in the same domain

closes odoo/odoo#47676

X-original-commit: 3588487ab4ef867f7fb981a395deaf298eb4a4e4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-03-16 10:20:28 +00:00
Josse Colpaert 34f62ae8a6 [FIX] l10n_cl: country_id needed on account tags of type taxes
closes odoo/odoo#47571

X-original-commit: 026447e78c16a8648fe413912b1cf6d75d21be1a
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-13 10:28:57 +00:00
Swapnesh Shah f409a2a364 [FIX] account: Display monetary widget
Before this commit, the monetary widget was not applied to the `amount` field since there was no `currency_id` field on this view.

In this commit, We add `currency_id` field to make the monetary widget work.

closes odoo/odoo#47308

X-original-commit: 4205344cdc518e923a1f3be8cfca4c3ed2bfc3ef
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-03-10 15:23:06 +00:00
Nicolas Martinelli 186733686f [FIX] sale: reference in down payment
Make the reference at down payment creation in line with regular invoice
creation as done in:

https://github.com/odoo/odoo/blob/387969f16a60c72d2a85a6df1aea7a04acda5c9f/addons/sale/models/sale.py#L526-L547

opw-2215124

closes odoo/odoo#47633

X-original-commit: aa98750fa4f9b1278eaf7d656c0c1a8c81f86325
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-16 08:26:57 +00:00
bart.vanbossche cd8a25c20a [CLA] add bartvanbossche to DynApps CLA
closes odoo/odoo#46819

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-03-16 07:57:09 +00:00
Julien Castiaux 92b17aadd2 [FIX] sql_db: remove unused __closer
The `__closer` attribute is filled with the origin of a call to
`cr.close()`. That information is reused in the `check` decotator that
ensure the user is not using a closed cursor. In case he is using a
closed cursor, an error is raised with that optional origin in case of
`--log-sql`.

The attribute is a dundler so it is only accessible within its class, as
the decorator has been moved outside of the class by 058cf208a8 it is
not directly accessible thus `__getattr__` is called as a fallback. The
`__getattr__` itself is protected by the `check` decorator thus they
call each other in a infinite recursion.

As the related dundler is no more used internally, it has been decided
to remove it entirely.

closes odoo/odoo#47616

Task: 2199895
X-original-commit: 3ebf7cb9cca37b05f44aaffc0b1f289cc65f300f
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2020-03-13 15:24:54 +00:00
Olivier Dony a61ddfe87b [FIX] reqs.txt: bump psutil from 5.5.1 to 5.6.6
Bumps [psutil](https://github.com/giampaolo/psutil) from 5.5.1 to 5.6.6.
- [Release notes](https://github.com/giampaolo/psutil/releases)
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](https://github.com/giampaolo/psutil/compare/release-5.5.1...release-5.6.6)

The only API-incompatible change in 5.6 is the removal of memory_maps() on
OSX, which we aren't relying on at this point:
  https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#560

closes odoo/odoo#47632

Original-signed-off-by: dependabot[bot] <support@github.com>
X-original-commit: a6026a4fc47421b1c4a1a8e42b3f56ab61027209
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-03-13 17:45:27 +00:00
Nicolas Lempereur 1b561d3a15 [FIX] website_membership: show website_published field
On the website for portal and public users, we only show membership
products that are set as website_published.

But if you only install eg. website_membership there is no clear way
through "Members" > "Configuration" | "Membership Products" to set
product as website_published.

opw-2202766
closes #47342

closes odoo/odoo#47604

X-original-commit: 37e78b65f0aad84aef011fa607d1a2539d9c6175
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-13 13:43:13 +00:00
Arnold Moyaux 343e46d97f [FIX] mrp: modify linked move remove quantity done
- create product comp1
- create product finished1
- created bom: 1 comp1 for 1 finished1
- activate PBM
- 100 units of comp1 in stock
- create an MO for 5
- on the pbm, deliver 3 and no backorder
- on the mo, check availability, produce 3
- on the pbm, unlock, change delivered qty from 3 to 5

On the mo, the raw move is reserved to 5 units but the 3 units
used in the first produce are removed.

It happens because editing the quantity or initial on a move
will try to reserve the next moves. In order to reserved,
_do_unreserve will destroy the stock.move.line and _action_assign
(call just after) will recreate them in order to regenerate the
reservation. In the process the qty_done on the stock.move.line will
be loss. We want to avoid this behavior in mrp so we call
_decrease_reserved_quantity from mrp that will keep stock.move.line
with quantity done.

opw-2206472

closes odoo/odoo#47617

X-original-commit: c6cf5841015c87163f8ea16dd75232e5cb855df6
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-03-13 15:25:19 +00:00
qsb-odoo 522c2c6fab [FIX] l10n_za: add country configurations in taxes' tags
closes odoo/odoo#47613

X-original-commit: d520050a118cf3f77731cd04b93f17b7c2746f77
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-13 15:02:26 +00:00
qsb-odoo c9fca2a6bc [FIX] l10n_mn: add country configurations in taxes' tags
X-original-commit: 75eb7ecc62e7a795b535cd978b660a6219e36338
2020-03-13 15:02:26 +00:00
qsb-odoo 30aab7e077 [FIX] l10n_cl: refine csv and add new currencies through xml
closes odoo/odoo#47609

X-original-commit: d1c22762764c7b976bed7745d254e6d2e40a4307
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-13 14:20:49 +00:00
jvm-odoo 3f9c3b475c [FIX] web: fix control panel long breadcrumb
Issue

	- Install CRM and Events
	- Change Azure Interior Name with a
	  very long string
	- Click on "1 Events" smart button

	The view is shifted out of the screen

Cause

	In 12.0, the control panel was separated
	with 2 div where width = 50%

	Now they use flex. (they are still 50% width
	by default)

	The long name is hidden by a `overflow:hidden`
	and there is a `text-overflow: ellipsis` to
	avoid extra-width issue.

	The problem is that there is a `white-space:
	no-wrap;` which force an extra width and
	this cause the shifting.

Solution

	We come back to the 50% even if there is no search view.
	Breadcrumb will always be on the top left area of the screen
	which simplifies the code and avoid jumping left to right
	(taking all the width of the screen) which can be disturbing
	for users.

closes #47063

OPW-2210786

closes odoo/odoo#47603

X-original-commit: 019dc91020a461263c29004ef0c304a8f91abae9
Related: odoo/enterprise#9219
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-13 13:40:26 +00:00
Richard Mathot 75483b910b [FIX] base: link to Apps platform
closes odoo/odoo#47601

X-original-commit: 49c9383af9eee6b6d01dff0bc1016faa7a3f9400
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2020-03-13 13:38:52 +00:00
Nicolas Lempereur 8a3c39e1d1 FIX] website: link enable google maps required billing
Since 11 June 2018, enabling Billing on your Google Project used for
showing static maps is required.

So you would follow the only direction of Odoo "Create a Google Project
and Get a Key" and nothing would work since you still need to enable
billing.

With this changeset, we add a link to the Google page explaining maps
billing costs, current free usage tier and so on. And on this page the
"Get started" button will enable billing if needed.

There is another page with deeper explanation but it is very technical
and currently only available in english:

https://developers.google.com/maps/gmp-get-started

note: also improve text of has_google_maps option

opw-2210346
closes #47227

closes odoo/odoo#47599

X-original-commit: 6035bba8b679620dcbfc7ba620aafa13009ff616
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-13 13:25:06 +00:00
b7b2475cc2 [MERGE] *: ControlPanel Owl
Refactoring of the control panel with the Owl framework.

The MVC structure of the control panel has been changed to a 'component <-> model'
relationship. As such:
- Removed the old control panel: view/model/controller/renderer
- Created a new Owl Component (ControlPanel)
- Created a new class: the Model (an Owl Store did not fit here) and a newly
  designed ControlPanelModel extending it

Refactored all inner subcomponents, including:
- Pager
- ActionMenus (peviously SideBar)
- Filter menu
    > Custom filter item
- Group by menu
    > Custom group by item
    > Removal of groupby_menu_mixin (and refactored graph controller in sibling commit)
- Time range menu
- Favorite menu
    > Custom favorite item
    > Moved the favorite menu registry to the favorite_menu file
- Search bar
    > Removed and splitted auto-completion dropdown logic between the new SearchBar
      Component (descriptions) and to the new ControlPanelModel (domains).

The templates (all in web/base.xml) have been adapted to the new standards. Most
of the DOM structure remains unchanged with some occasional improvements (replace
hiding with not rendering, removed pointless wrapper divs, etc.).

Task 2196029

closes odoo/odoo#41268

Related: odoo/enterprise#7108
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-03-13 17:11:16 +01:00
Julien MougenotandMathieu Duckerts-Antoine 804507ef49 [REF] *: Adapt all module tests to the new control panel
Use of the new control panel helpers to increase consistency and change the assertions
according to the new DOM/behaviour (e.g. components removed instead of turning invisible).

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 14:08:33 +00:00
Julien MougenotandMathieu Duckerts-Antoine bb8eb766a8 [REF] web: Control panel tests
Use of the new helpers in control panel (and subcomponents) tests and addition
of new tests.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 14:08:33 +00:00
Julien MougenotandMathieu Duckerts-Antoine e68d3bb09d [REF] *: Adapt all modules to new control panel
Adaptation of the code throughout all modules to properly instantiate the newly
refactored control panel and update it accordingly.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 14:08:33 +00:00
Julien MougenotandMathieu Duckerts-Antoine 18e5416636 [REF] web: Adapt views/actions to new control panel
Some web actions/controllers/viewsl have been adapted to properly instantiate the
newly refactored control panel and update it accordingly. We needed to adapt the
starting mechanism of actions and controllers to ensure that the control panel
instantiation did not delay the loading of any widget.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 14:08:33 +00:00
Julien MougenotandMathieu Duckerts-Antoine fbf347498f [REF] web: Control panel Owl
Refactoring of the control panel with the Owl framework.

The MVC structure of the control panel has been changed to a 'component <-> model'
relationship. As such:
- Removed the old control panel: view/model/controller/renderer
- Created a new Owl Component (ControlPanel)
- Created a new class: the Model (an Owl Store did not fit here) and a newly
  designed ControlPanelModel extending it

Refactored all inner subcomponents, including:
- Pager
- ActionMenus (peviously SideBar)
- Filter menu
    > Custom filter item
- Group by menu
    > Custom group by item
    > Removal of groupby_menu_mixin (and refactored graph controller in sibling commit)
- Time range menu
- Favorite menu
    > Custom favorite item
    > Moved the favorite menu registry to the favorite_menu file
- Search bar
    > Removed and splitted auto-completion dropdown logic between the new SearchBar
      Component (descriptions) and to the new ControlPanelModel (domains).

The templates (all in web/base.xml) have been adapted to the new standards. Most
of the DOM structure remains unchanged with some occasional improvements (replace
hiding with not rendering, removed pointless wrapper divs, etc.).

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 14:08:33 +00:00
Hemali Bhimani ed3fecb633 [IMP] sale: display expiry date on quotation portal view
Currently on the portal, when a quotation has a limited validity
period, it is expried as "This offers exprires in" Xdays but X is computed
always with a additional day and its show "expries in 0 days" so
after this commit it shows the expiry date
(like This offers expires on 20 december 2020) on portal view
instead of X duration.

closes odoo/odoo#46649

Task: 2186428
Closes: #46649
Related: odoo/upgrade#874
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-13 11:41:09 +00:00
Julien MougenotandMathieu Duckerts-Antoine 0a129284e4 [IMP] web,*: Enhance test helpers
1. Test utils helpers adapted to properly instantiate the new Owl control panel
2. New file 'test_utils_control_panel' to create a control panel and use helpers
3. New helper: createComponent (creates a generic component, see jsdoc)
4. Use of the new helpers in the current tests (more in sibling commits)
5. Helper 'addMockEnvironment' is now asynchronous
6. Owl config mode set to 'dev' in test suite (props validation)

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 11:39:53 +00:00
Julien MougenotandMathieu Duckerts-Antoine 72f1633532 [REF] web: Move control panel mobile to enterprise
Now that mobile is not supported anymore in community, the mobile layout of the
control panel has been entirely moved to enterprise. This caused some conflicts
with the community mobile test suite (which does not make sense anyway). The failing
tests and related style sheets have been moved as well.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 09:37:30 +00:00
Julien Mougenot da8790f0bb [IMP] web: Dialog: add option to stop click propagation
There are situations where we don't want clicks to be detected behind an opened
dialog: for example, when a dialog is opened by a dropdown, we may want to keep the
dropdown open while we interact with the dialog.

There is now an option (default: true) to stop clicks propagation when
they arrive at the dialog container.
2020-03-13 09:37:29 +00:00
Julien Mougenot 384e516218 [REF] web: Update generic files
General cleaning of some helpers and generic files. The idea is that they are
less likely to be entirely re-written in the near future so this is a way to
keep the code clean, readable and compliant to the current standards. Changes include:
- Use of async/await when possible
- Use of const/let instead of var
- Removal of underscore.js
- Use of native JS instead of jQuery when possible

The logic of the affected code remains the same.
2020-03-13 09:37:29 +00:00
Julien Mougenot 11ba58a311 [REF] web: Indent and reorganize generic files
The purpose of this commit is to correctly indent and order some generic files.
There is strictly no change in the code logic.
2020-03-13 09:37:29 +00:00
Xavier-Do 7313e4c7ec [IMP] core: change master release version.
Before this, the master version is the next major version without taking
intermediate saas versions into account.

Depending on the point of view, one or other choice can make more sense. Anyway,
master is always closer to next saas than next release.

Using next major release can be problematic from a technical reason, mainly for
upgrade scripts
A simple exemple is to write upgrade scripts for master. The script version
will be something like 13.3.1.2 since next saas is saas 13.3 and module version
1.2. The problem here is that installing a database in master will have module
versions setted to  14.0.1.2 since release.py indicates that version is 14.0,
making it impossible to test an incremental version script 13.3.1.3 in master
(will never be executed, 13.3.1.3 < 14.0.1.2)

Another exemple is when testing migrations on a not-rebased branch.
Hypotetically if all upgrade scripts are linked to a specific
version of a module (module version is incremented each time a
upgrade script is added), someone using an old version of the master
won't have the script 13.3.1.3 executed if current module version is 1.2.
(which is not true now since module version will be considered to be
14.0.1.2 (> 13.3.1.2).

closes odoo/odoo#47281

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-03-11 10:35:20 +00:00
yhu-odoo b08e3d114a [REF] stock,stock_account: archived products and quantities
PURPOSE

Keep consistent behavior of the stat buttons and the different stock
reports when archiving a product

SPECIFICATION

Currently, you can archive a product but the behavior of the different
stock reports, stat buttons isn't coherent afterwards. Here are the
different behaviors that should be improved:
1.Keep quantity on hand and forecasted quantity visible (in the stat
button + when opening it)
2.Automatically (un)archive RR and BOM if the product is (un)archived
3.Valuation report: show the archived products without the "archived"
filter (behaves already this way in the inventory and forecast reports)
4.When a product has been archived and still has quantity in stock,
include it in inventory adjustments for which counted quantity = default
to stock on hand (dont do so for archived exhausted products).

Also, revert #47478 since we don't have active field.

LINKS

Task 2178269
PR #45586
Fixes #41634

Related: odoo/upgrade#811
Related: odoo/enterprise#8513
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-13 08:37:26 +00:00
Jorge Pinna PuissantandNicolas Lempereur 7718199ae0 [FIX] base, website: process views without xml_id
The function get_inheriting_views_arch, retrieves the architecture of
views that inherit from the given view. In the case of the module init
is  currently in process only views from modules whose code is already
loaded are taken into account.

Before this commit, the function didn't process views that has been
copied (copy on write, web editor, customize show, manual copy, ...),
this raise an error when trying to install a module. For example,
install module website_sale, copy on write the view 'Main layout',
install module website_sale_wishlist.

Now, views that has been copied are also processed.

opw-2181968

closes odoo/odoo#47590

X-original-commit: d5a2890b30f869c9b4cf7aafed0e05aff9440360
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
2020-03-13 12:52:08 +00:00
Paul Morelle 828531d66f [FIX] mail: fix wrong calls to expression.AND
MailThread._mail_search_on_* was obviously never called with an
extra_domain yet, or it would have raised an exception: expression.AND
expects only one argument, with the list of expressions to AND, and here
we were passing them as *args.

closes odoo/odoo#47585

X-original-commit: b20c5350c4d0e0e140f8824e6f5d2a0009af9810
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-03-13 12:20:57 +00:00
Joseph Caburnay 78beadb748 [REV] web: allow patching getters
This reverts commit d6b854306c.

The reverted commit introduced issues in patching class methods.
Introducing getters in the patch function is not actually compatible
with the original method patching.

Test for patch method is also introduced to guard patch from future
invalid modification that happened.

A more robust  way of patching classes is now being developed.

closes odoo/odoo#47557

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-13 08:41:15 +00:00
jvm-odoo c7f095396e [FIX] product, purchase_stock: fix infinite loop on template name_search
Issue

	- Install purchase_product_matrix, Inventory
	- Create a (storable) Product P with default_code e.g. VOB2A
	  with a vendor V who uses a product_code e.g. VOB2a
	- Create a PO/RFQ for vendor V
	- Add a product, search "vob2" (copy/paste)

	Infinite loop

Cause

	purchase_product_matrix replace purchase.order_line.product.product
	by product.template so the name_search is different and the
	product.template's name_search loop doesn't support the case where
	you have default_code == product_code

Solution

	Check if the product's name_search returned a product containing
	product_template_ids that we did not wanted (as mentionned in the
	domain). If yes, it means that we will have an infinite loop so
	we should break.

Additional note: the issue could be in versions < 13 but
purchase_product_matrix is only in 13.0 and this is not a
very common case.

OPW-2193005

closes odoo/odoo#47576

X-original-commit: 9d5d80f77bc04be83d5b2ca0569a6ea50e26a07e
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-13 11:26:09 +00:00
Lucas Lefèvre 594ca5ea8b [FIX] fleet: Assign internal user as driver
With a user with only Fleet Administrator rights.
Assign an internal user as the driver of a vehicle (other than the
current user) => access error, you cannot write on model `res.user`.

Writing on a partner linked to an internal user requires write access to
this user.

closes odoo/odoo#47572

X-original-commit: a693b368d3faddef6774004d40567e26b7d59cec
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2020-03-13 10:30:10 +00:00
Anh Thao Pham (pta) 73a9dc77b6 [IMP] hr: move "Job Position" to "HR Settings" tab after "Related User"
closes odoo/odoo#46656

Related: odoo/enterprise#8950
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-13 09:59:06 +00:00
Lucas Lefèvre 119eddf7cc [FIX] hr_contract: Allow HR user to read first contract date
An HR user (without any rights on contracts) could not open
an employee form view since it needs the `first_contract_date`
field which needs contracts access rights.

closes odoo/odoo#47561

X-original-commit: 14855eee0f9c5737ee5aaa792defe88e138e0d7d
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2020-03-13 09:27:17 +00:00
Raphael Collet 5771772b61 [FIX] core: do not force recomputation of fields on new records
The method `recompute()` should not recompute fields on new records.
This is both a speedup (those recomputations are not necessary), and
fixes an error following an `onchange()` (a field recomputed in an
environment with the wrong context.)

OPW 2184998

closes odoo/odoo#47545

X-original-commit: fa852ba1c5707b71469c410063f338eef261ab2b
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-12 17:46:06 +00:00
Martin Trigaux b53614fcc5 [FIX] base_vat: apply child changes before propagation
The synchronisation of commercial_partner_id was introduced at
0d68acff8e as a way to ensure the value is always correct.
The order or the operation was not important though.

This synchronisation has a side effect in the following scenario:

0. install base_vat
1. disable vat_check_vies in the settings
2. set an invalid VAT number on a company with at least one contact
3. enable vat_check_vies in the settings
4. correct the VAT number on the company with a valid one
--> an error was raised for an invalid VAT number on the contact

This is because the commercial_partner_id synchronisation is done
before the update of the VAT number. Even if the value has not
changed, this triggers the check_vat method.

Invert both instructions

Courtesy of Wolfgang Taferner

Closes odoo/odoo#43065
Closes odoo/odoo#42973

closes odoo/odoo#47543

X-original-commit: d9b2605eadc129924d085fffc4056d777cfbbbeb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-03-13 08:20:32 +00:00
Katherine Zaoral 23e7d0f46c [ADD] l10n_ar: make Sales "IVA No Corresponde" tax inactive
This tax is only used on purchases to monotributistas or exentos but
it's not used on sales.

We deactivate to avoid confusions and will be removed in next version.

closes odoo/odoo#47554

X-original-commit: aaa066d43e6c697cb91714fdc65ee7a18e5a53e5
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-13 07:56:43 +00:00
Aaron Bohy f692a39677 [FIX] web: FieldMany2ManyTags: failing quick create record
The FieldMany2One allows to quick create record (name_create).
However, sometimes, required fields on the co-model make the
name_create crash. In this case, the FieldMany2one opens a form
view in a dialog to let the user specify those fields, and create
a new record with the 'create' method. This was working fine.

The FieldMany2ManyTags embeds a FieldMany2One to let the user
search for and select or (quick) create tags. In this case, failing
quick creation didn't fallback on the dialog form view, but
displayed a server error instead. This commit fixes this issue.

Bug introduced by 50bf8309f8

Task 2192754

closes odoo/odoo#47183

X-original-commit: 63ab065f3298c13bb19ae1245d7fd2652581b254
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-09 10:31:01 +00:00
Simon Lejeune d07066bd11 [FIX] stock: routes report: handle mtso
At the moment, when a rule has a supply method "Take from stock, if
unavailable, trigger another rule", it is displayed as a "take from
stock" rule

In order to differentiate the rule supply method, we should rather show,
thanks to a vertical bar, when a rule is in take from stock, and use
both a vertical bar and the three dots when it is in "take from stock,
if unavailable, trigger another rule"

task-2205748

closes odoo/odoo#47541

X-original-commit: e1c1093c3d5fb7be69e8d1d26bcac184b5dc07b2
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-12 17:15:06 +00:00
Laurent Smet 2ab4119c5f [FIX] account: Fix missing field 'always_set_currency_id' in account.move form
This field is used by the account.move.line to know the currency of the invoice.
However, the currency_id is not always set when dealing with a single currency.
In this case, currency_id is False on account.move.line and we need the additional
always_set_currency_id field to know the currency to be used to round the price_subtotal/price_total.

closes odoo/odoo#47528

X-original-commit: 0af1a38a094f92eeccb295a4ceddda26ec399064
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-12 16:12:03 +00:00
Benjamin Vray 1a323596cf [FIX] website: restore hidden indicators in gallery snippet
Indicators were hidden in editor when switching to slideshow mode
from any other mode. Because the class of the selected mode was defined
after rendering and we need this class before the rendering. This also
fixes other small issues when switching between different modes.

Part of https://github.com/odoo/odoo/pull/44180
task-2162952

closes odoo/odoo#47519

X-original-commit: a99150b11a463901121bbe9751370231e3564ca2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-12 15:00:38 +00:00
Benjamin Vray 490723b406 [FIX] website: keep same spaces between carousel indicators links
Before that the space between the first two links was more spaced than
the others.

Part of https://github.com/odoo/odoo/pull/44180
task-2162952

X-original-commit: baeb08da7a32b5c185c358ec6820f8a66c6edb4f
2020-03-12 15:00:38 +00:00
Benjamin Vray b339310d31 [FIX] website: update links ids in duplicated carousel snippets
(+ gallery snippet in carousel mode)

Part of https://github.com/odoo/odoo/pull/44180
task-2162952

X-original-commit: 6237c59d607389cb0ed57694bb23b253f49805c8
2020-03-12 15:00:38 +00:00
Simon Lejeune d944e67b46 [FIX] stock_account: _action_done performance
Validating a receipt of 90 stock moves having ~300k products in the
database goes from 7 minutes to 11 seconds thanks to the addition of
"active_test=False in the context before doing the searches on valuation
layers.

Most searches on "stock.valuation.layer" are done when validating a
move, but since this model contains an active field, the orm will
pathologically complete the searches expression by adding "id in active"
products. If the list is long, it slows down everything.

Since this field was only added to have a filter on the valuation
reports, it doesn't matter at all to ignore it in "_action_done".

It would probably have been cleaner to just remove the field but it
doesn't fit the stable policy. Nevertheless, we're going to remove the
field in master with task-2178269, as well as this patch.

opw-2209797

closes odoo/odoo#47523

X-original-commit: 466a8319547e11e2193dd8594b0e50e3c27d4b3e
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-12 15:36:03 +00:00
William Henrotin 31db39a052 [FIX] purchase_requisition: correct search domain
bug introduced by ef16266ad6

Task : 2210230

closes odoo/odoo#47400

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-11 13:40:53 +00:00
Thanh Dodeur 14c0550b29 [FIX] web_editor: fixes the rgb/rgba color selection
Before this commit, `selectStyle` could incorrectly split the
widgetValue (as described below) which resulted in invalid CSS.

widgetValue: `"rgba(55, 12, 99, 0.7) 55px"`
result: `["rgba(55,", "12,", "99,", "0.7)", "55px"]`
expected: `["rgba(55, 12, 99, 0.7)", "55px"]`
fixed: `["rgba(55,12,99,0.7)", "55px"]`

This commit fixes the issue.

closes odoo/odoo#47515

X-original-commit: 37e6b87341e58769ec2c1d080986e84286d84978
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-12 14:24:38 +00:00