Commit Graph
142776 Commits
Author SHA1 Message Date
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
std-odoo 1b8c4d98d3 [REV] mail: fix a traceback when sending a message in a "email channel"
Bug
===
Since 4da64b3f3c , if multiple users of
different companies are in the same channel, and if the type of the
channel is "email", a traceback is raised when sending a message.

Technical
=========
"with_user" drop the SU flag and is not enough to bypass the multi
company ACLs. Moreover, we do not want to send a "channel_seen" bus
notifications and we can mark the message as seen on the JS side
directly.

Changes
=======
So now, the traceback is not raised anymore in that case, and the
message is marked as seen if the receiver has the web client open.

But, if the receiver has not the web client open, when he will login,
the message will not be marked as seen. This can be improved but at the
moment we just want to revert the fix that cause the traceback and fix
the issue in most cases.

Task 2427790

closes odoo/odoo#71320

X-original-commit: 8b5de95bea0087c48d17f40847750eb31fe97caf
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-27 09:26:10 +00:00
jbw edd058c195 [FIX] account: set default_partner_id to bank_partner_id for partner_bank_id
Change “default_partner_id” from “commercial_partner_id” to “bank_partner_id”
for “partner_bank_id” field in from view. If not, on an invoice, a newly created
partner bank (via “Recipient Bank” field) would be created for the partner
instead of the current company.

closes odoo/odoo#71312

Task: 2524441
X-original-commit: e18e256137e4593aee0cb6f1d0fcc4168dff79c1
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
2021-05-27 08:37:52 +00:00
Robin Heinz 340cbe3cde [FIX] point_of_sale: Fix down/up rounding
While using the cash rounding, there were issues when rounding up and down.
The pre filled amount was correct but the rest of the transaction was wrong. (Wrong due, wrong change,...)
This commit re calculate the rounding applied when using up or down payment.

closes odoo/odoo#71298

X-original-commit: bfccdf07adba35a5838a35a7bba98a1d71c67d2f
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-26 17:52:30 +00:00
Robin Heinz 0042439be9 [FIX] point_of_sale: Load all existing Payment Method but displayed linked ones
Before, when using the manage order, if a payment method was used and then removed from the pos.config,
we couldn't load the old order anymore because of unknow reference.
To fix this, we load all methods at the opening of the pos but when we display the payment methods we only show those in the pos.config.

closes odoo/odoo#71292

Task-id: 2541708
X-original-commit: e44219b1cdb80d37b557ff74767f5f3e5aca5072
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-05-26 17:11:13 +00:00
Jigar Vaghela 83222bee07 [FIX] l10n_in: decrease a value of B2CS and HSN in case of refund
Before this commit:

  B2CS is not decreased in case of refund but it's shown in CDNUR but CDNUR has a condition that only shows a refund of B2CL.
  HSN value is not decreased in case of refund

After this commit:

  Refund is decreased from B2CS and not show that in CDNUR
  HSN value is decreased in case of refund

B2CS = Business to Consumers Small
B2CL = Business to Consumers Large (invoice value is more than Rs.2.5 lakhs)
CDNUR = Credit/Debit Notes for Unregistered
HSN = Harmonized System of Nomenclature(hsn code per product)

closes odoo/odoo#71225

Opw: 2446769
X-original-commit: 9f6b5b889b9402a391a1215c44ce2c5501e1b5de
Related: odoo/enterprise#18497
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Jigar Vaghela <jva-odoo@users.noreply.github.com>
2021-05-27 06:52:51 +00:00
Julien CHEVREAU (JCU) acb8bcdf3d [FIX] account: Batch Payment available to Invoicing App
Beforehand, when installing the SEPA DD module, the Accounting App
was also installed, because of a dependency between the batch payment
feature and the account_accountant module.

Now, a bridge module breaks this dependency, and SEPA DD can be used with
the Invoicing App. This means that Batch Payment, being a dependency of
SEPA DD, is available to the Invoicing App.

task-2375697

closes odoo/odoo#65634

Related: odoo/enterprise#16161
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-05-14 12:15:52 +00:00
Younn Olivier 8be18ae0a0 [FIX] website: override footer company name in a separate template
The footer company name override from the website is done in a separate
template from website.layout in order to avoid duplicating it when
edited.

Related to https://github.com/odoo/odoo/pull/69943
task-2468472

closes odoo/odoo#71307

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-27 06:39:09 +00:00
nie 395ee66ab8 [FIX] base: remove non-fictional number from demo data
Steps:
- Install Website
- 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#71303

X-original-commit: 5a047574dde6b207697244c866749d3cd439922c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-05-26 18:48:39 +00:00
Fabien Meghazi 24b8a6178d [FIX] server: prevent inotify watches leak
Before this commit the PyInotify filesystem watcher used by the code
autoreload feature (`--dev=reload`) would not get a chance to free
it's inotify watches before the reexec, hence at each reexec triggered
by a code reload the inotify watches where accumulated until potentially
reaching the kernel limit `fs.inotify.max_user_watches`.

This patch ensures that inotify properly closes it's file descriptor
before we reexec:
https://github.com/dsoprea/PyInotify/blob/f77596a/inotify/adapters.py#L79

closes odoo/odoo#71302

X-original-commit: 8703ff1e3d9be6f2f5fce2e8c4e62589b05133fb
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-05-26 18:30:16 +00:00
Younn Olivier c72bc01b36 [FIX] portal: fix copyright color on the portal
Before this commit, for default colors, the text-muted class color was
set as !important from the portal and could not be overriden by the
website, leading to inconsistent display between the website and the
portal for the copyright.

As a fix for stable, we do not change the text-muted color from the
portal when using default colors.

task-2468472

closes odoo/odoo#71300

X-original-commit: d2e934631d4de02a7933434a1252dab994fed4b7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-26 17:54:55 +00:00