Commit Graph
140248 Commits
Author SHA1 Message Date
lejeune quentin 2be28bfbde [IMP] hw_drivers: Map drivers actions
Add possibilities to map actions for the drivers

To avoid a sequence of "if elif else" we integrate a '_actions()' dictionary
where the key is the name of the action and the value is
the name of the function to be executed in the drivers
with the action data as a parameter

closes odoo/odoo#63375

Related: odoo/enterprise#15310
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-12-16 15:52:34 +00:00
Pierre Masereel 6843d63769 [FIX] point_of_sale: having negative value with decrease quantity
When you have a localisation like the french one that does not allow
you to decrease the value of a line, you cannot make returns because the
popup that shows you new value to encode, does not let you enter
negative numbers.

To allow those negative values, we let the modification of the line if
we are on the last line, and the quantity is equal to 1 which is the
default value of the line. It is the same behavior as in 13.0.

OPW-2411356

closes odoo/odoo#63538

X-original-commit: b6b5e7c148f2b7b44830022325aa9010a4c683ba
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-12-17 13:14:13 +00:00
Nicolas Galler 303c04348e [FIX] stock: in forecast report, associate MTO lines only with their source
Behavior prior to this commit:

If I have a pre-existing order (confirmed, but without available
product) on a product with an MTO route, and I now place a new order on
that product then confirm the generated PO, in the forecast report the
quantities from the PO will be shown as being applied to the
pre-existing order first.

For example:
 - create a product with an MTO route (set a vendor)
 - create a SO (SO1) for 5 units of that product and confirm it.  Verify that
 a PO (PO1) was generated.  Cancel the PO.
 - create a new SO (SO2) for 10 units of the product and confirm it.  Confirm
 the PO (PO2) that is generated.
 - run the forecast report.  It should show:

| Replenishment | Quantity | Used By |
|------------------------------------|
|   PO          |   10     | SO2     |
| Not available |   -5     | SO1     |

But instead it shows:

| Replenishment | Quantity | Used By |
|------------------------------------|
|   PO          |    5     | SO1     |
|   PO          |    5     | SO2     |
| Not available |   -5     | SO2     |

When the product is received for PO, the quantity received is correctly
applied to SO2, not SO1.

Behavior after this commit:

 - when generating the forecast report, we have to tie each outgoing
 shipment with 0 or more incoming shipment.  After this commit, the
 computation will be made without considering candidate incoming
 shipments that are linked (via `move_dest_ids`) to a different
 outgoing shipment.
 - for receipts that are not tied to another move (move_dest_ids is
 empty), there is no change of behavior
 - for receipts that are "over-delivering", for example if there was a
 generated PO for 10 units but they manually increased it to 15 to cover
 both SO, there is no change of behavior: it will still show as
 replenishing both SO.

Note:

 - in a multi step environment the report does not correctly allocate
 quantities once some steps of the order are processed (the quantity
 will be shown as coming from stock, but in fact not all steps have been
 processed), this is accepted as a known limitation to prevent making
 too much of a performance hit for the MTO case (this behavior is the
 same as what was present before the commit)

opw-2412137

closes odoo/odoo#63529

X-original-commit: 95435c056236438c61688855748b3afac57416a2
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2020-12-17 12:21:55 +00:00
Adrien Widart c915456b94 [FIX] point_of_sale: barcode and decimal notation
In some languages, if the thousands/decimals separators are different
from ','/'.' , when scanning a barcode that contains a decimal quantity,
the conversion won't be correct.

To reproduce the error:
1. Go to Settings > Inventory
2. Enable "Units of Measure"
3. Go to Point of Sale > Products > Products
4. Create a Product P
	- Set a barcode, e.g. 2112345000008
	- Set UoM to 'kg'
5. Go to Settings > Translations > Languages
6. Add and switch to French (BE)
7. Run one POS
8. Use the debugging window to simulate a scan
	- Enter the code, e.g. 2112345087550
		(It means 8.755kg of product P)
	- Click on "Scan EAN-13"

=> Here is the error: it actually adds 8755kg of P-product. This comes
from the quantity conversion. The barcode provides the qty as a number with
basic decimal notation (.) but later, it is converted using the user's
language configuration.

OPW-2412561

closes odoo/odoo#63491

X-original-commit: 6abd50ae8e1b19339163c717705826544e222e13
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-12-17 08:47:38 +00:00
Alexandre Kühn 6e8488caa4 [FIX] mail: inconsistency of new message style
The style of discuss new message (+) and chat window new message
should be consistent, as they both cover the exact same feature.

closes odoo/odoo#63530

X-original-commit: d8e816f95e2c51071415a3d4a9171d7014bb7b1c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-12-17 12:24:20 +00:00
Siddarth Gajjar 4f5c4911cf [IMP] website: improve autocomplete dropdown UI
- Before this commit, Autocomplete dropdown ui is not
compatible with existing editor ui.
- After this, Autocomplete dropdown UI for url and GMAP imrpoved.

closes odoo/odoo#63528

Taskid: 2352870
Closes: https://github.com/odoo/odoo/pull/60735
X-original-commit: d44339190ba90c3a3564cc30b78477a1724efaee
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-17 12:20:30 +00:00
Gorash 1a8ac6b79e [FIX] web_editor: Show the toolbar when select the text in forum edition
closes odoo/odoo#63527

X-original-commit: 610c546138bdfea952d775bef48ea9046f8cfb5b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-17 12:06:15 +00:00
ijas ahammedandThibault Delavallée 0b6a2ee5fb [FIX] crm: do not propagate lead phone to partner if formatting differs
With a recent commit[1], we fixed the issue of false warning while changing
the partner on lead. But that fix ignored the fact that the lead has an
automatic formatting that may lead to false warning.

Right way to detect a phone number change is
  * lead phone is different from partner phone;
  * lead formatted phone is different from partner formatted phone;

If those two conditions are met we are quite sure numbers are different and
not only differs in their formatting.

In this commit we also fix inverse of phone number. When updating lead phone
value we have to use the same heuristic to update partner phone value. That
was we avoid unnecessary partner update when only formatting differs.

Tests are added to ensure new behavior and that ribbon message is effectively
trig erred with correct content.

LINKS

Task ID-2390287

[1] - https://github.com/odoo/odoo/commit/d29862c1de6208f7fdb7c8104afe0d35241d130b

closes odoo/odoo#63521

X-original-commit: 5154f40544e7913f7bcd0ff73f034d111700f580
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Ijas Ahammed <ija@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-12-17 11:32:52 +00:00
oco-odoo 68230bda64 [FIX] l10n_fr: use correct account type for "chèques à encaisser"
This account is intended to be used on a bank journal instead of the bank account. Making it reconcilable is required so that it can be reconciled with a statement made in another bank journal (representing the actual bank account).

https://github.com/odoo/odoo/commit/7df9704845f99ad985607940386bacf691ef28db changed this account's type to liquidity, but that breaks the above use case, as a liquidity account is not supposed to be reconcilable at all (and so, instead of creating a writeoff, only statement_line_id is set on the check's line, and the statement balances of each journals don't match the general ledger).

OPW 2356956

closes odoo/odoo#63520

X-original-commit: 90a178da9f535a7aad59033d697323dc32623b8b
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-12-17 11:31:38 +00:00
Lavish Chhatwani 3df926b30b [FIX] websites_slides: remove active test from context
Before Commit :
-when user archive a course content, it's still visible
 on the course itself, without real difference between
 active content and archived. it was confusing.

After Commit :
-now when user archive a course content, it's not visible
 anymore on the course.

closes odoo/odoo#63508

Task-id: 2411211
X-original-commit: 363dcd4e19e88854118e10c11ee2c6bbdf13b537
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-17 10:42:22 +00:00
Simran Gajsinghani 6f9a2ca2fb [IMP] website: show searched pages count on website pages
in this commit, when activated 'Show # found' option in Customize menu,
the count of searched records for the manage your pages, event, and form page
displayed on the search button(#found).

task-2115526

closes odoo/odoo#40121

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-17 10:25:28 +00:00
Antoine Guenet 96fdf12ff1 [FIX] web_editor: properly position sidebar scrollbar
closes odoo/odoo#63495

X-original-commit: 3c249d385f46c0276ce04d5c3cce4fda620d2ba3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-17 09:33:19 +00:00
Jigar Vaghela 29c82528d0 [FIX] account: correct management of groups of taxes on misc operations
Using group of taxes with type_tax_use='none' children messed up the sign of the tax_base_amount and line tags.

closes odoo/odoo#63479

X-original-commit: 3642c429899c4d5def27c9ba10ae76c763a8a566
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-12-16 17:46:30 +00:00
Adrien Widart 79fc263373 [FIX] hr_expense: expense reconciliation
The reconciliation between an expense and a bank statement does not
update the expense and its sheet.

To reproduce the error:
(Need account_accountant)
1. Go to Expenses
2. Create one (e.g. an expense of $20)
3. Save, Create Report, Approve, Post Journal Entries
4. Go to Accounting > Bank
5. Create a bank statement (e.g. $-20)
6. Save, Post, Reconcile
7. Select the expense, Validate
8. Go to Expense > The created expense

=> The expense's state is still 'Approved'. It should be 'Paid'.
Moreover, if you click on the associated report ("View Report"), the
same error appears: the sheet's state is 'Posted' instead of 'Paid'.

The problem was that the method 'action_invoice_paid' (deleted in this
commit) was never reached. Moreover, there was no way to get the
expense's residual amount.

OPW-2389414

closes odoo/odoo#63486

Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-12-17 06:54:30 +00:00
Goffin Simon 1b2aef65f4 [FIX] l10n_ch, l10n_ch_qriban: Impossible to create a vendor bill
Fine tuning of this commit: https://github.com/odoo/odoo/commit/6e374e25943106be84711233f3960f2f3a4b9aa9

To fix the issue when l10n_ch_qriban is not installed

opw:2416809

closes odoo/odoo#63478

X-original-commit: b226f07628618aac6ada0ffce736e29cb1cdc550
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-12-16 17:39:33 +00:00
Gorash c9fdf4bd14 [FIX] mass_mailing: adapt tour to the new editor design.
closes odoo/odoo#63471

X-original-commit: 537914d7e74790a832f8d6c24d79ffe2fb463f7e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-16 16:07:47 +00:00
Ivan Yelizariev 03d6d0d3e7 [FIX] calendar, calendar_sms: stop sending wrong reminders
STEPS:
* Update cron "Calendar: Event Reminder": set Execute every 2 minutes
* create a recurring event:

  * date: now() - 8 weeks
  * time: now() + 1 hour + 3 minutes
  * Repeat every 1 week, until "now() + 8 weeks"
  * Reminders: "Notification-1 hour", "Email-1 hour", "SMS-1 hour"

* wait 3 minutes
* Wait 0-5 minutes
* Check menu ``[[ Settings ]] >> Technical >> Discuss >> Messages``
* Check menu ``[[ Settings ]] >> Technical >> Phone / SMS >> SMS``

BEFORE: you get mail/sms/UI notifications for all passed dates

AFTER: you get mail/sms/UI notifications only for the comming event

WHY: in v13.0-, recurring calendar.event records were virtual, so
_get_occurrences was used to generate those virtual records. In Odoo v14+ it's not needed

---

opw-2389877

closes odoo/odoo#63466

X-original-commit: 0e434d8cedd6ff9c65e539febeef220b0334e584
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-12-16 15:34:38 +00:00
oco-odoo 71ebdcbf3c [REV] account: remove the ability for the automatic entries wizard to generate multiple entries at once
This reverts commit 7e3e99adb4.

Usability of that new wizard was too poor. We revert it for now; it'll make a comeback eventually.

closes odoo/odoo#63436

X-original-commit: 1d75786b8b45fd4f6b08d726165b60875b62b1e7
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-12-16 11:29:57 +00:00
Hardik Prajapati 1a58bcce08 [FIX] mail: Update the kanban record on activity creation/updation
Currently, scheduling the activity from the document chatter does not
appear on the kanban record on activity button.
and the 'onchange' action receives the ID of the activity that was
marked as done and thus the 'Missing record' error

So in this commit, on creation and done of activity reload the view to
update the record on kanban card.

The opportunity is taken to make a pass on all of the "reload" to add the
`keepChanges` flag to prevent from losing pending changes on reload, especially
useful in form view.

closes odoo/odoo#63464

Taskid: 2362964
X-original-commit: 6d75304604687d873b296c630b87bc184e221018
Related: odoo/enterprise#15345
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-16 15:04:06 +00:00
Raphael ColletandNasreddin b6c688caa2 [FIX] core: accounting groups field dropped from users' form view
To reproduce this issue, install the module "Accounting" in English,
then switch language to Dutch, and go to a user's form.  The selection
field for accounting groups is missing from the users' form view.

The source of the bug is the special case introduced for accounting
groups in d8c5cc1335.  The groups in that
selection field are not totally ordered, and the non-ordered elements
are de facto ordered by name, which is a translated field!  In the
example above, the English version uses the field name
`sel_groups_22_23_24_25` while the Dutch version uses the field name
`sel_groups_23_22_24_25`.  Because the first one is used in the form
view, and it is not found in the model's documented fields (which uses
the second one), the field is discarded from the view.

The patch is much simpler than former versions, which are constrained by
the stable branch policy.  We simply normalize the selection field's
name by ordering the group ids used in the name.

OPW-2394209

closes odoo/odoo#63462

X-original-commit: 399b4f1ceb31f560ce534ee8d9605ca43733f68c
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Nasreddin (bon) <bon@odoo.com>
2020-12-16 14:59:04 +00:00
Didier (did) 7e0c645d37 [FIX] mail: mark all needaction as read when opening the thread
This was the case before the refactoring.

task-2411114

closes odoo/odoo#63461

X-original-commit: bcb32beb49e5d86ea0d6307cbeeb7e85a22d18b0
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-16 14:42:21 +00:00
Thanh Dodeur d1919017b5 [FIX] mail: prevents image loading errors
Before this commit, an event listener was still active after the removal
of the attachment viewer, which caused the the onLoad function to be
called on an removed component if the component was unmounted before
the image was loaded. This commit fixes this issue by adding the
eventListener through the owl template.

Additionally, when a new image was loading, the old image was kept in
the dom until the end of the loading of the new image, this commit
also fixes this issue by adding a t-key on the image element.

part of task-2363522

closes odoo/odoo#63452

X-original-commit: 31f71f500b88aa3eb0688ab990d0c5f00676c71e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-16 13:52:55 +00:00
oco-odoo 72e3b4e136 [FIX] account: display account.journal's currency_id field at the right place in form view
Before that, that field was located under "Outgoing payment", which made no sense.

closes odoo/odoo#63448

X-original-commit: fb68cc93f9a04adf5430f1ed473b62110edd8ef8
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-12-16 13:05:51 +00:00
nie 6dd627a14a [FIX] website: gallery img inside anchor is too large
Steps:
- Go to "Website" > "Go to Website"
- Click Edit
- Add an image gallery
- Add an image to the gallery
- Click the image
- Click on the Link button in the bottom-right of the side panel
- Add a link and save

Bug:
The image is too large.

Explanation:
The flex layout is not carried over to `img` when it's nested into an `a` tag. Redefining the flex layout on the `a` tag fixes the issue.

This fixes portrait images:
```css
height: 100%;
width: 100%;
```

And adding this also fixes landscape and smaller images:
```css
display: flex;
```

opw:2394953

closes odoo/odoo#63446

X-original-commit: a9c96699e5d96ef8a17dfcf61e5693feba2a5481
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-12-16 13:04:26 +00:00
Goffin Simon a7afb5377c [FIX] l10n_ch_qriban: Impossible to create a vendor bill
Steps to reproduce the bug:

- Let's consider a company C with l10n_ch installed
- Try to create a vendor bill

Bug:

A traceback was raised.

PS: Function _is_qr_iban has an ensure_one and when creating a vendor bill
the function _is_qr_iban by _compute_l10n_ch_isr_needs_fixing was called with no partner_bank

opw:2416809

closes odoo/odoo#63441

X-original-commit: 6e374e25943106be84711233f3960f2f3a4b9aa9
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-12-16 12:01:14 +00:00
Thanh Dodeur cdb469bce5 [FIX] mail: prevents traceback when clicking attachment unlink button
Before this commit, quickly clicking on the unlink button of an
attachment could result in a traceback if the click happened right
after the deletion of attachment but before the rendering of the DOM.

part of task-2363522

closes odoo/odoo#63447

X-original-commit: 1858184394342f24f5456728c4255f9980220c20
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-16 13:04:51 +00:00
Pierre Paridans fd0ff95f23 [IMP] test_lint: adjust ES version for supported browsers
This reverts commit d431f94c75 and even
upgrade the EcmaScript version further to ES10/2019.

The original commit mainly targeted the support of MS Edge
(pre-Chromium) and earlier versions of iOS 11.

As with the release of Odoo 14, we don't support either of those (MS
Edge only Chromium-based and iOS 12), the original restriction can be
lifted and again target EcmaScript 9/2018.

But furthermore, some features of ES10/2019 are already in use in Odoo
14+ (e.g. `Object.fromEntries()` used in SpreadSheet, PoS, WebEditor,
Website Sale...) and the only browser not supporting them is Safari on
iOS versions < 12.2.

As there is no drop of supported devices between iOS 11 and 12 and they
all have access to - at least - the latest revision of iOS 12 (cf.
12.5), it looks reasonable to target the latest revision only and not
the earlier ones. This policy also matches the "ever-green-browsers"
policy applied on desktop.

Note: please note that the tool (es-check) used for testing the
EcmaScript version targeted has for primary goal to catch unsupported
syntax and reserved keywords only, but not the actual APIs available for
a given EcmaScript version. (e.g. async/await keywords or string
literals are tested *but not* Object.fromEntries() or
Array.prototype.flatMap()).

References:
- https://kangax.github.io/compat-table/es2016plus/
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntries
- https://en.wikipedia.org/wiki/IOS_12

closes odoo/odoo#63430

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-12-16 11:46:14 +00:00
Achraf (abz) 182e513825 [FIX] lunch: Use extra toppings without problem
1) Extra Items

    Issue: Adding an extra to one menu item, automatically adds it to the other food items in the same order.

    Expected Behavior: When adding an extra, it should only be associated to
    the food item for which it was selected, and NOT applied to the other ordered items.
    For example, if I select a "Ranch" dressing for the "Chef Salad",
    the ranch should not appear as an extra for the "Cheeseburger" or "Cookie of the Day".

2) Unable to Submit Certain Orders

    Issue: Odoo prevents the user from submitting an order in the following case
    (better illustrated through an example). If you select a "Chef Salad", you will be prompted to select a "Dressing Choice",
    because the configuration is set to select one and only one extra.
    You cannot add the salad to the cart without selecting a dressing,
    nor can you proceed if you have more than one dressing selected;
    this is functioning as expected. The problem, however, comes when you
    select a dressing and add the salad to the cart, and now you try to add a
    dressing as its own order item (separate from any salad). Even though the
    salad has its own dressing selected, and the separate dressing is its own item,
    the error message: "You have to order one and only one Dressing choice" appears and
    prevents the order from being submitted. This issue may be a consequence of the behavior observed in the first issue.

    Expected Behavior: The user should be able to submit the order in
    this case because the salad had only one dressing associated with it,
    and the extra dressing is supposed to be its own item.
    This should not create a conflict with the "only one" extra logic.

Step to reproduce (edv)
Reproducible on runbot.
1) Extra Items
https://drive.google.com/file/d/1yos9coFqd55pq8qNbNs1OqGNMNSdgxDX/view

2) Unable to Submit Certain Orders
https://drive.google.com/file/d/1M0ZEElu-hYwU9bmCwEx_tqEZRAPG_UEt/view

opw-2391070

closes odoo/odoo#63435

X-original-commit: a8467765b97e429712b79d41f88492993f8620ea
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-12-16 11:27:18 +00:00
Antoine Guenet 61b0ac731b [FIX] web_editor: prevent traceback on reposition background image
closes odoo/odoo#63413

X-original-commit: 9cd778e683a5978c920bb0d367b3eb01ddf21c6f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-15 17:14:33 +00:00
Antoine Guenet c9d9b4cc2c [FIX] web_editor: prevent deadlock when removing child snippet of popup
closes odoo/odoo#63410

X-original-commit: b087f6a0c7b708ba45ad465310ac8064d3732591
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-15 15:40:34 +00:00
Sébastien Geelen (sge) 83b81cc44d [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
Another try at fixing the non-deterministic error in the `field_html_test > save` QUnit test which use the JW wysiwyg editor.

closes odoo/odoo#63409

X-original-commit: e3ff253e433397b05a809f1267083475b53c7fb5
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-15 15:40:06 +00:00
Antoine Guenet 4a4dfb8a40 [FIX] website: properly save popup id
closes odoo/odoo#63408

X-original-commit: 8ae2fee6e71fc8bde56a87ee6b21268e5b1d9bc9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-15 14:50:35 +00:00
Sébastien Theys bd7aeae189 [FIX] mail: prevent messaging menu from hiding home menu in mobile
task-2330277

closes odoo/odoo#63405

X-original-commit: db7f4437a644b93a5227f663fa19dda00817c13c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-15 14:33:23 +00:00
Nicolas Martinelli 9e1849d183 [FIX] stock_account: SVL for consumable
Stock Valuation Layers are used for the MRP Cost Analysis feature.
Therefore, they are useful for consumable.

opw-2412668

closes odoo/odoo#63404

X-original-commit: c68e572f7c6f5109f1bfc40f9a44fc051f315112
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-12-15 14:28:17 +00:00
Antoine Guenet e56e573dd9 [FIX] website: move sidebar out of theme
closes odoo/odoo#63399

X-original-commit: 3b604dcd7a74ff0c61d906b9e3db16176086486d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-15 13:58:46 +00:00
Yannick Vaucher cb8b6db391 [FIX] l10n_ch: check reference format with supplier QR-IBAN
closes odoo/odoo#63396

X-original-commit: 0d80dbf8a530209679a65a5c62808be1589c5cef
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-12-15 13:34:19 +00:00
Rémy Voet (ryv) 93ed6754a5 [FIX] stock: fix in_date default
coming from aa7061e9bcbf10fa9dbeac4402d704a260644b66

closes odoo/odoo#63387

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-12-15 12:17:22 +00:00
Julien Giannone 0286a46c96 [IMP] mail: Rename temporary to uploading in attachments related content
This commit renames "temporary" into "uploading" in attachments content

task-2337268

closes odoo/odoo#62526

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-15 12:48:21 +00:00
Gorash 1beea8c4f1 [FIX] web_editor: use withIntangibles to find ZoneNode
ZoneNodes are now intangible containers

closes odoo/odoo#63384

X-original-commit: b6164a683cdca4ebdbcd802166323a83be7c6fa8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-15 12:04:19 +00:00
David Monjoie 4b8cbea36c [IMP] web_editor: update Jabberwock library to commit a20492ea
Changelog:
[IMP] BundleOdooWebsiteEditor: share withIntangibles object for odoo
[FIX] *: use withIntangibles walker to find intangible ZoneNodes
[REF] Layout: ZoneNode is now intangible
[REF] Core: refactor allowEmpty
[FIX] DomHelpers, DomLayout: ensure mutation on correct vdom match
[IMP] core: move browse the arch methods into a walker object
[IMP] core: add support for not tangible container
[ADD] Small: handle <small>
[ADD] Test: some new space tests

X-original-commit: 19661cf0bb8b5ec1fb832c6a935f816da4730b20
2020-12-15 12:04:18 +00:00
Rémy Voet (ryv) 47069ef023 [FIX] stock: fix performance of forecasted when lot of locations
In the DB with a warehouse with a lot of stock location.
The forecasted widget return a traceback due to a memory error due
to the `_get_domain_locations_new`
(`_get_report_lines`->`read(['qty_available'])`->`_compute_quantities`
->`_compute_quantities_dict`->`_get_domain_locations`)
how returns a extremely long domain (one expression
by location in the context) to compute child location.
But the locations (put in the context) contain already
children locations because of
`('id', 'child_of', warehouse.view_location_id.id)`.

TO SOLVE
Instead of adding location in the context
(for fix 1aa6a323e04232d24175593718637c6dac295eb9),
add the warehouse in the context before
calling the `_get_report_lines` in the `_compute_forecast_information`.

closes #61666

closes odoo/odoo#63377

X-original-commit: f8861e6a63fcd85295affdea4b525af753234b14
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2020-12-15 10:57:04 +00:00
Sébastien Theys 4816c7bf03 [FIX] mail: fix display of chatter topbar in multiline
When the topbar goes to multiple line due to too much text content to fit its
currently available space (depending for example on length of text after
translations), it will look bad before this commit because the "send message"
and "log note" have a visual effect when they are open that requires them to be
directly above the composer to look good.

Part of task-2413814

closes odoo/odoo#63351

X-original-commit: 008def3f878b63cb49e0b5ef09a2cc22c784c0a9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-14 16:55:17 +00:00
William Henrotin 2794fee110 [IMP] stock: adds price on stock move
This commit adds some value on incoming stock moves created by the
`populate` generation. This makes transfers more realistic and allow
creating stock valuation if accounting is installed as well.

closes odoo/odoo#63139

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-12-10 10:57:47 +00:00
wan 1023479af2 [FIX] account: compute used on account.account
The field is exportable but always returns false

opw-2409324

closes odoo/odoo#63340

X-original-commit: f5c1ba1556c7db2a882740c6572127b28d064b57
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-12-14 14:34:06 +00:00
Rémy Voet (ryv) e50dbe096d [REF] stock: _gather use now the ORM
Remove the feature of `NULL` order of stock.quant and put
the `in_date` required because it is always set (and should).

task-2413099

closes odoo/odoo#63165

Related: odoo/upgrade#2019
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-12-11 10:38:16 +00:00
Thomas (det) d0efcd8538 [FIX] account: Negative fixed taxes on 100% discount
This commit fix a previous fix : https://github.com/odoo/odoo/pull/62244

opw-23789781~[FIX] account: Negative fixed taxes on 100% discount

closes odoo/odoo#63349

X-original-commit: da6b1667ab3566a88765f38f812df6a20c0abb03
Signed-off-by: tdetry (det-odoo) <tdetry@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-12-14 16:13:00 +00:00
oco-odoo addd40a09f [FIX] account: reconciliation models: fix auto-reconciliation result when the reconciliation doesn't cover the whole invoice
Before that, using an auto-validate reconciliation model to match an invoice with a statement line with a lesser amount resulted in the creation of an payment entry with which the invoice got fully reconciled, and the difference amount was fowarded to the suspsense account in an additional line. This wasn't correct, as we expect the invoice to be only partially paid in that case (with an amount equal to the statement line's).

closes odoo/odoo#63303

X-original-commit: 7393aa3ebcea7b80762b729315f1c890bc677efb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-12-14 10:16:22 +00:00
nie bbf860ae97 [FIX] sale_coupon: allow salespeople to use coupons
Steps:
- Have a demo user with "User: Own Documents Only" rights on Sales.
- Connect as admin
- Go to Sales > Products > Coupon Program
- Click one of the programs
- Generate a Coupon
- Reconnect as demo user
- Create a Sales Order
- Apply the generated coupon

Bug:
Access rights restriction on the coupon.

Sorry, you are not allowed to modify documents of type 'Sales Coupon' (sale.coupon). This operation is allowed for the groups:
	- Sales/Administrator - (Operation: write, User: 6)

Explanation:
When applying a coupon to the sales order, it tries to update the coupon's state and link it to the order. This needs to update the coupon record.
This commit also fixes confirming quotations and cancelling sales orders with coupons for salespeople.

opw:2409858

closes odoo/odoo#63239

X-original-commit: 873340ca98b9732132e056c1ca79c614c6255c1c
Signed-off-by: backspac <backspac@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-12-11 12:38:12 +00:00
Achraf (abz) 4cc7c2bf00 [FIX] web: Load odoo script after other scripts
What are the steps to reproduce your issue ?

    1. Install website
    2. Connect on the website
    3. Choose Customize > HTML/CSS/JS Editor
    4. Choose "Web layout" (in "XML (HTML)" )
    5. Modify the HTML code by adding any <script> before the existing <script> (console.log whatever)
    6. Save
    7. Refresh

What is currently happening ?

    Traceback: TypeError: Cannot read property 'user_context' of undefined

How to fix the bug ?

    Target the odoo script by id in the xpath.

opw-2375490

closes odoo/odoo#63360

X-original-commit: 0b7ba571431d694dea7db3ba1da4c7e86d1013e5
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-12-15 07:04:04 +00:00
Achraf (abz) ae3a0dca96 [FIX] web: Select subfields without removing filter text on export
What are the steps to reproduce your issue ?

    1. Install "contacts"
    2. Select list view and select one or more contacts
    3. Select "Export" actions

What is currently happening ?

    When filtering fields with text, the system only displays the corresponding
    fields, but when clicking on sub-field the text written just before
    is deleted, which prevents us to return to all fields without filter

What are you expecting to happen ?

    Filter fields and select sub-field without deleting the filter text

opw-2411928

closes odoo/odoo#63339

X-original-commit: d947ea609b458ddbccabd661c22652d6c86a8167
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-12-14 14:20:12 +00:00