Commit Graph
143436 Commits
Author SHA1 Message Date
Younn Olivier c911d5ba5e [FIX] website_mass_mailing: remove social links duplicates
Socials links were added twice on the s_mail_block_header_social
snippet, as they were already defined in the module mass_mailing.

task-2469516
Part of https://github.com/odoo/odoo/pull/69766

closes odoo/odoo#69766

Related: odoo/upgrade#2436
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-31 07:52:51 +00:00
std-odoo d27fb9c952 [IMP] (crm_)mail_plugin: support translations for the Gmail addon
Purpose
=======
This commit allow the users to translate their Gmail Addon.

The language of the addon will be the language the user set on his
preference, on his Odoo database.

The translations will be downloaded from Odoo and stored in the cache,
so translator can use the existing system to translate the addon.

Task 2502261
See odoo/mail-client-extensions/pull/8
See odoo/odoo/pull/69288
See odoo/enterprise/pull/17711

closes odoo/odoo#69288

Related: odoo/enterprise#17711
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-31 07:26:31 +00:00
Pierre Masereel 29f6078cb3 [FIX] point_of_sale: cash rounding on invoice
When an invoice is created from pos having a cash rounding method, the
value of the rounding can depend on the payment methods.

When no rounding has been applied because of the order has been
partially paid by cash and bank, the rounding line should be deleted
from the invoice. We should also adapt the terms lines.

closes odoo/odoo#71410

X-original-commit: 846c63b6e5414d2b4620f389817379506a419573
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-28 13:11:42 +00:00
Joseph Caburnay eca6e539a6 [FIX] point_of_sale: double dipping in COGS and stock delivered accounts
To reproduce:

1. Sell an anglo product (inventory valuation = automated) in the pos app.
2. Go back to the backend, find the pos.order and invoice it.
3. Close the session.
4. Open the journal items related to the session (click the Journal Items
button in the session form).
5. You will see COGS (Expenses) Account and Stock Interim (Delivered) are
debited in two journal entries - one from the invoice and one from the
created picking after the closing of session.

This is because we are not properly skipping the invoiced order when
generating the global picking for the session. This commit fixes the
described issue.

closes odoo/odoo#71404

X-original-commit: 4320794da1129c7fffdebd9d0469dd81dd1f212b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-28 12:42:11 +00:00
fw-bot 5a5fdcebd6 [CLA] signature for janikvonrotz
closes odoo/odoo#71434

X-original-commit: 2b4ae68892bf963f5170651e4ca4a9983ea18af9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-28 15:58:58 +00:00
Demesmaeker 4d340a3304 [IMP]payment_adyen : improve the handling of result codes
By explaining why a payment was refused or had an error,
we can understand easily what has to be done to get the payment done,
instead of just knowing it was refused/had an error.

task-2501723

closes odoo/odoo#69929

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-28 13:59:32 +00:00
Aurélien Warnon 4f2443b058 [IMP] mail: make mail.template name translatable
This commit simply makes the mail.template name field translatable.

It had not been done yet since the model is quite technical but it's still
displayed for the end users within the composer so it's better to have it
translated if need be.

Task-2543495

closes odoo/odoo#71408

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-28 12:56:32 +00:00
Victor Feyens 060df1a363 [IMP] sale: improve test coverage
Some flows of the core `sale` code (sale_order & sale_order_line) 
weren't covered at all by tests.

This commit adds some tests to cover those flows, reducing the risks of 
broken features/flows with future sale tasks.

closes odoo/odoo#71402

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-28 12:05:48 +00:00
fw-bot 05446fcc99 Cherry pick of 3c8bdde81d508fdee301f13bcbc6e4eefc9fb02c failed
stdout:

stderr:
17:49:30.703303 git.c:344               trace: built-in: git cherry-pick 3c8bdde81d508fdee301f13bcbc6e4eefc9fb02c
error: Cherry-picking is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: cherry-pick failed
----------
status:

closes odoo/odoo#71390

X-original-commit: 7033f4aa7d1c65ad13dcd19e66378b101b56238b
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-28 13:12:42 +00:00
Jacky (trj) 359f517c0d [FIX] point_of_sale: random failure when reprint receipt
Because the `receiptHtml` was taken from a component which was mounted outside of the DOM, it was hardly ever destroyed for some unknown reasons and the `el.outerHTML` could not be taken to create the receipt.

closes odoo/odoo#71399

X-original-commit: a54d54c9c479aaee3bafe6e241d89d557a1e0b56
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-28 11:52:25 +00:00
Luis González e852a10aa6 [FIX] link_tracker: Filter by tracked URL code is not working
When trying to filter links by a tracked URL code, the following warning
is shown:

    WARNING dbname odoo.models: Cannot execute name_search, no _rec_name
	defined on link.tracker.code

and the applied filter gives all records.

closes odoo/odoo#71398

X-original-commit: 3687dabbc373e57e24ca4596c18ef1dacfde8273
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-05-28 11:30:45 +00:00
Habib (ayh) abdd0bc257 [IMP] account: enable visibility of cancelled journal items
The default tree view action (debug mode) of account.move.line currently hides lines in the cancelled state. This commit modifies the default domain on the action.
Users can now filter and group all lines

part 3 of task (2486685)[https://www.odoo.com/web#id=2486685&model=project.task]

closes odoo/odoo#71392

Signed-off-by: William André (wan) <wan@odoo.com>
2021-05-25 21:26:42 +00:00
Habib (ayh) 95a6ee4afc [IMP] account: improve bank statement line search view
Enable searching for a bank statement line by amount and journal entry

part 1 of task [2486685](https://www.odoo.com/web#id=2486685&model=project.task)
2021-05-25 21:25:03 +00:00
Yannick Tivisse f6a77867df [IMP] hr: Remove M2O references to archived employees
Purpose
=======

When you archive an employee, if he's the manager/coach of someone else, the link is not removed.

closes odoo/odoo#71368

Taskid: 2536219
Related: odoo/enterprise#18588
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-05-28 08:04:40 +00:00
Mohammed Shekha b988fcdf06 [IMP] web: clear no_create enabled m2o field on focusout
Before this commit: if many2one field has no_create=True and user write
something to many2one field which does not exist and focusout of many2one
field then the text remain there on many2one input field, it creates
consution, it looks new record is created and set, so to avoid this
many2one field should be cleared if there is unmatch string and it has
no_create=True.

After this commit: if many2one has no_create=True and user types string
which does not have any match then on focusout many2one input element
will be cleared.

task-2517593

closes odoo/odoo#70173

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-28 10:39:32 +00:00
Romain Derie 50cb0f3276 [IMP] web_editor: remove the img overlay replace and delete
As replace and delete are already in the right panel, this is kind of a
duplicate. Related to f3ccc91d42

Also, add border around selected image so the used knows what image is selected

task-2502679
Closes #69340

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-26 09:55:16 +00:00
Romain Derie 6c895f8920 [IMP] web_editor: use brand-primary color for replace btn
task-2502679
Closes #69340
2021-05-26 09:52:01 +00:00
Romain Derie d585b0e560 [IMP] web_editor: remove quality optimization warning
It creates confusion for no good reason

task-2502679
Closes #69340
2021-05-26 09:52:01 +00:00
Anjali a99d882c02 [IMP] crm,*_crm: better merge leads side documents
Purpose of this commit is to ensure side documents are redirected to the
master opportunity when merging leads. Those side documents include

  * communication history (mail.message);
  * attachments (ir.attachment);
  * visitors (website.visitor);

However some documents are currently not specifically handled :

  * meetings (calendar.event);
  * activities (mail.activity);
  * sale orders (sale.order);
  * attendees (event.registration);

In this commit we ensure all are attached to the final master opportunity.
That way we prevent loosing access to those documents and ensure we keep
the complete history of all merged leads.

Also tests are added to ensure the merging of leads and its contents.

A new field is added to have the o2m field between leads and calendar events.
In order to clarify naming, ``meeting_count`` is renamed to
``calendar_event_count`` to match naming.

Task Id-2457941
COM PR odoo/odoo#68884
UPG PR odoo/odoo#2494

Related: odoo/upgrade#2494
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-28 12:12:51 +00:00
Thibault Delavallée 962d8a443b [FIX] crm: set lost leads as last when sorting by confidence level
When sorting by confidence level, put lost (inactive) leads last. This should
not happen when using the merge tool that filter out inactive leads but may
happen in case of manual merge.

Task Id-2457941
COM PR odoo/odoo#68884
2021-05-28 11:49:02 +00:00
dosipchuk 24154294b2 [CLA] Dmytro Osipchuk
closes odoo/odoo#71389

X-original-commit: 68182733f8a625a13e44c6be2708a98ece20d80a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-28 10:58:10 +00:00
Adrien Widart 23790f6fc4 [FIX] survey: Unescape characters in mail subject
To reproduce the error:
Create a survey (title must contain ") and send it

Error:
The mail subject is incorrect: the character " is replaced with &#34;

OPW-2536206

closes odoo/odoo#71388

X-original-commit: 37cea376cc2069388b07b91f50caa6044fa6c932
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-05-28 10:56:40 +00:00
yhu-odoo 2915ac1226 [IMP](stock,mrp)_account: use location valuation account
Previous fix f056254d1c5153467b10d9581214ff6d1348be76 didn't take the
situation when production location has its own valuation accounts into
consideration. Fix it in this commit.

opw-2476417

closes odoo/odoo#71064

X-original-commit: 60e83f03b871605b7aa281503269f66ac3ea940b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Yuchen Huang <yhu-odoo@users.noreply.github.com>
2021-05-19 17:01:08 +00:00
Odoo's Mergebot 3556615c3f [MERGE] crm_iap_lead_mining: improve industries and states management
This merge commit adds some minor improvements to crm.iap.lead.mining.requests
to ease the usage of leads generation tools.

This is done by:
- Merging and removing some of the "industries", to present the user with the
  most relevant ones ;
- Allowing to order the industries with a sequence, again in order to give
  relevant industries as top choices ;
- Disabling "states" selection for various countries, based on the available
  results in the reveal database.

More details about those changes can be found in underlying commits.

UPG PR odoo/upgrade#2288
Task-2471703

closes odoo/odoo#68128

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-28 14:02:13 +02:00
Antoine Guenet 5c3de22f76 [FIX] website: properly align the checkmark of checklists
The style of website requires that the checkmarks of checklists be
offseted a little bit differently in website that in field html. This
acknowledges that difference so that they're properly centered in both
cases.

closes odoo/odoo#71348

X-original-commit: 91133da51697f77951d925141ae5cff012230b63
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-05-27 14:56:39 +00:00
Antoine Guenet 7e46a7ee42 [FIX] web_editor: properly indent checklist items
Indenting a checklist item duplicated its checkbox. This properly copies
the css from the editor that was lost in translation.

X-original-commit: 14efea8ac944eba483f7300d6ba6e51592f26b80
2021-05-27 14:56:38 +00:00
Morgane DemesmaekerandValentin Chevalier 41b13d530f [IMP] payment, sale: add an acquirer dropdown when generating payment link
Actually, salesmen have to add manually the acquirer_id to the link, and it isn't user-friendly. The dropdown will show the possibility to add the acquirer_id.

Task #2504225

closes odoo/odoo#69334

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
2021-05-28 09:24:57 +00:00
Ivan Yelizariev 69976584d8 [FIX] hr_maintenance: fix typo in compute attribute
It was introduced in https://github.com/odoo/odoo/commit/3bd345597fa932abdaf780f72bacf331690f549b

closes odoo/odoo#71360

X-original-commit: c76d1a0f0210565768c88271625212359720632e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-05-27 16:50:27 +00:00
Aurélien Warnon 9d9403c56f [IMP] crm_iap_lead: add a whitelisted countries mechanism for states in iap search
States for some specific countries should not be offered as filtering options
for crm.iap.lead.mining.request because they drastically reduce the amount of
IAP reveal results.

For example, in Belgium, only 11% of companies have a defined state within the
reveal service while the rest of them have no state defined at all.

Meaning specifying states for that country will yield a lot less results than
what you could expect, which is not the desired behavior.
Obviously all companies are active within a state, it's just a lack of data in
the reveal service side.

To help users create meaningful iap searches, we only keep the states filtering
for several whitelisted countries (based on their country code).

The complete list and reasons for this change can be found on the task.

Task-2471703
2021-05-27 13:54:32 +00:00
Aurélien Warnon 2bb534d7c6 [IMP] crm_iap_lead: allow ordering crm.iap.lead.industry with a sequence
This commit simply adds a sequence field to the crm.iap.lead.industry model and
re-orders the records imported in the CSV file.

This re-ordering is performed to show preferred records to the user, having
some diversified industry choices at the top that provide interesting results.

Nothing should change functionally.

UPG PR odoo/upgrade#2288
Task-2471703
2021-05-27 13:54:31 +00:00
Aurélien Warnon edf729c09e [IMP] crm_iap_lead: allow industries to match several reveal ids
Reveal industries were naively implemented to match a single ID on the reveal
service side.

While this is very convenient from a technical point of view, it does not
really work on the user end, since various industries are very similar and some
of them could be merged to ease usability.

This commit allows the crm.iap.lead.industry to have several reveal_ids.
Since we don't want to make this too complicated, we simply stored them as a
Char and separate them with a ",".

They are split right before being sent to IAP and all reveal ids are merged
back into a single list, making it work the same way as before on the IAP side.

We also took this opportunity to completely remove some of the listed
industries, since after some research they appear to give absolutely no result.

UPG PR odoo/upgrade#2288
Task-2471703
2021-05-27 13:54:30 +00:00
Aurélien Warnon 06e77d3550 [MOV] crm_iap_lead: move crm.iap.lead.industry into its own file
Preparation commit where we simply move the crm.iap.lead.industry model into
its own file.

As we are about to make some changes to the industry, we use that opportunity
to do a bit of cleaning.

Task-2471703
2021-05-27 13:54:30 +00:00
Joseph Caburnay f2af220d38 [FIX] point_of_sale: number popup test timeout error
A fix was made in https://github.com/odoo/odoo/pull/66466 to consider
the situation where pin of employee is scanned using barcode. This
results to a change in behaviour in the NumberPopup where it no longer
accepts empty string as payload when it is confirmed. There are multiple
ways to solve this issue, and the simplest is just to adapt the test
following the behavior change. In this fix, we modify the starting
value of the popup so that when confirmed, the popup successfully
resolves.

closes odoo/odoo#70292

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-04 07:36:15 +00:00
xO-Tx 4a7c562471 [FIX] website, web_editor: fix colorpicker preview
Issue:

> Set bg color combination for a snippet... > Save
> Edit mode > Select the snippet
> Open color palette in bg option
> Hover a color option
> When a color button is left, the preview is cancelled
  but the color combination class is not applied anymore.

In '_computeWidgetState' (for 'selectStyle' method), the right
value ('o_cci') is not returned because we get empty "colorNames"
(the "colorPalette" is not rendered on start).

The goal of this commit is to fix this behaviour by rendering the
colorPalette in start for snippet options, this way, the new code
won't affect the speed fix added in [1] for 'OPTIONS' tab.

[1]: https://github.com/odoo/odoo/pull/65223/commits/ce54c3f21293513673cb1fc6073ada5f0a2b5641

task-2538326

closes odoo/odoo#71365

X-original-commit: fd31c9a10f97c92a48d0589a8bbeaf13a641e891
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-27 17:35:40 +00:00
Guewen Baconnier f4fe98c92b [FIX] stock: fix check of package all in move lines
The `groupby` function is used to builds groups of(product, lot) keys
and their corresponding move lines / quants. `groupby` groups
*consecutive* keys, which is why the input is sorted by the keys.

`sorted` on recordsets keys will not sort as we would expect in this
particular situation, as the comparison operators on records act as
Set Comparison operators on the record ids, i.e. to compare the sets
superset/subset relationships:

```
>>> env["product.product"].browse(1) < env["product.product"].browse(2)
False
>>> env["product.product"].browse(1) < env["product.product"].browse([1, 2])
True
```

Example of sorted on stock.move.line records, where the product id 7313
is both in the slots 4 and 12 instead of being consecutive:

```
>>> [l.product_id.id for l in sorted(lines, key=itemgetter('product_id'))]
[7436, 7437, 7352, 7423, 7313, 7351, 7423, 7424, 7320, 7398, 7312, 7352, 7313, 7436, 7437, 7442, 7443, 7320, 7423, 7424, 7318, 7396, 7368, 7355, 7316]
```

Now when we group by id the 2 ids 7313 are correctly placed together in
slots 1 and 2:

```
>>> [l.product_id.id for l in sorted(lines, key=attrgetter('product_id.id'))]
[7312, 7313, 7313, 7316, 7318, 7320, 7320, 7351, 7352, 7352, 7355, 7368, 7396, 7398, 7423, 7423, 7423, 7424, 7424, 7436, 7436, 7437, 7437, 7442, 7443]
```

This commit aims to sort by "id" of the related records, to ensure the
same (product, lot) couples are consecutive.

closes odoo/odoo#71276

X-original-commit: d53d8bdf789e8f79ea4d531d944686abb59d6a26
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-26 15:34:16 +00:00
Nicolas (vin) d2d900d043 [IMP] l10n_ch: move a tax group to noupdate
One of the tax group in l10n_ch was not set as noupdate
like the others.
This will move it with the others to keep things consistent.

closes odoo/odoo#62833

Related: odoo/upgrade#2004
Related: odoo/enterprise#15140
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-05-26 10:51:29 +00:00
Nicolas (vin) adfb20537b [IMP] account: add country_id on tax groups
In order to not show unnecessary tax groups when configuring a tax,
we'll now filter them to only shows the tax groups that are either
linked to no country, or that are linked to the same country as the tax.

Task id #2206280
2021-05-26 10:51:29 +00:00
Barad Mahendra 95d0597fcc [IMP] hr_expense: expense product should not be sale or purchased
Purpose of the commit is to hide the expense product from sale and
purchase menu.

So in this commit, make the expense product as sale_ok and purchase_ok
False to make them invisible in sale or product.

closes odoo/odoo#71222

Taskid: 2491238
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-05-25 13:36:14 +00:00
Anh Thao Pham (pta) 39e93d8418 [FIX] stock_account: fix computation of anglo saxon price unit
- Create a product with Category configured with:
  * Costing Method: First In First Out (FIFO)
  * Inventory Valuation: Automated
- Create a PO to buy 2 units at $100 (PO1) and receive the products
- Create a SO to sell 2 units (SO1) and deliver the products
  => COGS of SO1 should be $200 ($100 * 2)
- Return 1 unit from previous delivery
  => COGS of SO1 should be $100
- Create a SO to sell 1 unit (SO2) and deliver product
  => COGS of SO2 is $100
- Create a PO to buy 1 unit at $200 (PO2) and receive the product
- Re-deliver the returned unit from SO1
  => COGS of SO1 should be $300 ($100 + $200)
- Create invoice for SO1 and post it
The journal items (account.move.line) corresponding to the COGS have an incorrect
value: $200 ($100 + $100), instead of $300 ($100 + $200)

The issue comes from the method computing the anglo saxon price unit.
It does not take into account quantities from stock moves that have been returned.

This commit computes the number of units that have been returned for each stock
moves used to compute the anglo saxon price unit and to take the result into account
during the computation (of the anglo saxon price unit).

opw-2501260

closes odoo/odoo#71346

X-original-commit: 83136c8e7569636d38e12fc45f297e4d6f22ad36
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-05-27 14:51:04 +00:00
Ivan Yelizariev 00a8f2457f [FIX] core: fix formatting issues for --test-tags docs
`./odoo-bin -h` prints unnecessary spaces between sentences.

---

task-2431630
Finetuning of #71130

closes odoo/odoo#71364

X-original-commit: fcc60e219fd024394f8642509a20755f964546b6
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-27 17:30:36 +00:00
Jacky (trj) b98e946aea [FIX] point_of_sale: added copy=False in uuid of pos_config
uuid should be unique even after copying

closes odoo/odoo#71247

X-original-commit: 5ea1d31df9041ca7b25fbea6178e798e62bebca0
Related: odoo/enterprise#18520
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-26 09:07:17 +00:00
Jacky (trj) e921a2f2ce [REF] point_of_sale + pos_restaurant: adjusted code for German POS localization
These changes have been made to be able to add some behaviors in some specific points of the flow when overridden.

X-original-commit: 455f49fe74611849ee1ff6addc875352d1b6c386
2021-05-26 09:07:17 +00:00
Alvaro FuentesandChristophe Simonis 0a96e7b90c [FIX] core: correct imports from odoo.addons.base.maintenance.migrations
This legacy package was supposed to be an alias to `odoo.upgrade`.
However, depending on how your import its sub-packages (and in which
order), we were ending with the module being loaded multiple times,
breaking the expectation of a singleton.

```python
In [1]: from odoo.addons.base.maintenance.migrations import util as m1

In [2]: import odoo.addons.base.maintenance.migrations.util as m2

In [3]: m1
Out[3]: <module 'odoo.upgrade.util' from '/Users/chs/devel/odoo/odoo/stable/odoo/addons/base/maintenance/migrations/util.py'>

In [4]: m2
Out[4]: <module 'odoo.addons.base.maintenance.migrations.util' from '/Users/chs/devel/odoo/odoo/stable/odoo/addons/base/maintenance/migrations/util.py'>

In [5]: from odoo.addons.base.maintenance.migrations import util as m3

In [6]: m3
Out[6]: <module 'odoo.addons.base.maintenance.migrations.util' from '/Users/chs/devel/odoo/odoo/stable/odoo/addons/base/maintenance/migrations/util.py'>

In [7]: m2 == m3
Out[7]: True

In [8]: m1 == m3
Out[8]: False

In [9]:
```

Now, with this import hook, we ensure that the modules imported from
`odoo.addons.base.maintenance.migrations` are aliases to ones imported
from `odoo.upgrade`.

```python
In [1]: import odoo.addons.base.maintenance.migrations.util as m2

In [2]: m2.__name__
Out[2]: 'odoo.upgrade.util'
```

closes odoo/odoo#71351

X-original-commit: 0d0458a0f370f872caacac26361f2c4730c2cbba
Signed-off-by: Christophe Simonis <chs@odoo.com>
Co-authored-by: Christophe Simonis <chs@odoo.com>
2021-05-27 15:41:24 +00:00
Sébastien Theys c6716847aa [IMP] web, *: clean up notification API
task-2476867

closes odoo/odoo#67009

Related: odoo/enterprise#16760
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-27 13:47:23 +00:00
nie 3b5bef08ad [FIX] website: remove non-fictional number from templates
Steps:
- Go to Website
- Click "Go to Website"

Bug:
The default phone number on the website is not fictional and may cause
unwanted spam.

Explanation:
In North America, only 555-0100 through 555-0199 are specifically
reserved for fictional use.
> The industry also reserved a block of 100 numbers as fictitious,
> non-working numbers (555-0100 through 0199) for use by the
> entertainment and advertising industries.

Source: https://www.nationalnanpa.com/pdf/NRUF/ATIS-0300115.pdf

opw:2530388

closes odoo/odoo#71341

X-original-commit: 37be09d7d73bd4942396f06f5b5cfa22cca78f56
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-05-27 13:25:20 +00:00
Adrien Widart 493fc880d1 [FIX] mrp: use work center's TZ to plan operations
When planning a Manufacturing Order, if an operation takes place in work
center with a different time zone, the computed date may be incorrect
(the start date may be outside the working hours)

To reproduce the error:
(Use demo data. Current timezone: Europe/Brussels)
1. In Settings, enable "Work Orders"
2. Open an existing Work Center
3. Click on "Standard 40 hours/week"
4. Set Timezone to "Asia/Bangkok"
    - Note that all slots are between 8:00-12:00 and 13:00-17:00
5. Create two storable products P_compo and P_finished
6. Create a Bill of Materials BM:
    - Product: P_finished
    - BoM Type: Manufacture this product
    - Components: 1 x P_compo
    - Operations: 3 x Operation with existing work centers
7. Create a Manufacturing Order:
    - Bill of Material: BM
    - Quantity: 100
8. Save, Confirm, Plan

Error: (it depends on the time the test is done) The 'Scheduled Start
Date' of the second operation is incorrect. Adding the time zone
difference gives a time that is outside the work center's timetable
(i.e., outside 8:00-12:00 and 13:00-17:00).

The computations do not consider the time zone of the work center.

OPW-2393330

closes odoo/odoo#71332

X-original-commit: dab24e497f095d0c7857f07d037e9cb16749e2ea
Related: odoo/enterprise#18572
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-05-27 12:23:37 +00:00
Sébastien Geelen (sge) eb1fa6d2a9 [FIX] web_editor : remove duplicate focus() declaration
closes odoo/odoo#71319

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-05-27 09:17:36 +00:00
Mohammed Shekha dff8d83027 [IMP] web: tabbing out of an empty m2o should not set a value
Before this commit, when the use focused a many2one field and then
pressed tab, the first item of the autocomplete dropdown was selected.

This is not what we want if the user didn't write anything in the input,
and if he didn't use the up/down keys to highlight a specific item of
the dropdown.

This commit ensures that we only select the highlighted item when the
user presses tab if he previously wrote something in the input (which
hasn't been emptied meanwhile) or if he used the up/down keys to select
a specific item.

task-2455781

closes odoo/odoo#66443

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-27 07:01:25 +00:00
Ivan Yelizariev 691fa54cc8 [IMP] core: clarify docs about config --test-tags
Technical name is not added to test_tags since https://github.com/odoo/odoo/commit/95b4f2ab4b5698ab3a28c9c35ac8da6fb6def983

at_install tag is added by default since introducing @tagged decorator: https://github.com/odoo/odoo/commit/b356b190338e3ee032b9e3a7f670f76468965006

Clarify how special tags at_install/post_install work.

Also, add dots for @tagged doc, because otherwise we have a mess in sphinx docs.

---

task-2431630

closes odoo/odoo#71329

X-original-commit: e4bf1e7dca2a9ef6dabf3f201d086ae77ff993d9
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-27 11:32:05 +00:00
Yannick Tivisse 7880185883 [FIX] l10n_be_hr_payroll: Lower SQL requests on payslip computation
closes odoo/odoo#71151

Related: odoo/enterprise#18431
Related: odoo/upgrade#2471
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-05-26 11:34:36 +00:00