Commit Graph
147940 Commits
Author SHA1 Message Date
Florent de Labarre 1bfa35d831 [IMP] web: show technical name in export view
Like in debug mode on optional field on tree view, show technical name on export view.

closes odoo/odoo#73898

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-27 11:07:04 +00:00
Andro Gvivradze cbe1cf5b10 [FIX] Send partner_bank_id at the end of PoS session for swiss QR_Bill
Users with Swiss localization have a possibility to create QR_Bills from their invoices, however, PoS currently does not send information about partner_bank_id to the generated invoice, so users can not create
QR_Bill from the invoice that was created by PoS. After this commit, function _get_partner_bank_id will get partner_bank_id in case customer didn't pay for the order fully, and this information will be added to
the invoice, thus, giving user an ability to create a QR-Bill from said invoice.
In case user will try to create a QR-Bill from the invoice that has been fully paid, they will get an error saying that QR-Bill can not be generated on paid invoices. If the user tries to generate QR-Bill from
the invoice that has empty partner_bank_id, they will also get an error notifying them that they should check Recipient Bank field on the invoice.

OPW-2695969

closes odoo/odoo#83456

X-original-commit: 634f90a728cba9ff45c17e471f2b160e939bbd3d
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-01-27 10:09:43 +00:00
roen-odoo 4fdbee4582 [FIX] pos_gift_card : Setting customer reset price
Current behavior:
When creating a gift card in a PoS the price was reset to 0 when modifying the customer

Steps to reproduce:
- Set PoS gift card mode in Generate a new barcode and set a price
- Modify the current customer
- The price of the gift card is reset to 0

opw-2666917

closes odoo/odoo#83452

X-original-commit: ffc2e11e92a5b528fa2cda855ecdf1d83a54f4bb
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-01-27 10:09:39 +00:00
qmo-odoo 04e86613c8 [ADD] {google,fetchmail}_gmail: OAuth for gmail servers
Purpose
=======
Less secured apps are no longer supported by google, therefore, we need
to transition to the OAuth2 authentication system.

Specifications
==============
1. User will need to fill their Gmail API credentials in the main
   settings page
2. Then, in the incoming / outgoing mail server form view, they will
   need to tick the Gmail support checkbox
3. A link will be available to be redirected to Gmail and accept the
   permission
4. The user can now copy / paste the authorization code in Odoo, set
   his email as "login" and then send / receive emails with Gmail

Task-2170676

closes odoo/odoo#83424

X-original-commit: ff223afc5300b2421b8ce935bb468f503c938c5d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-27 09:12:50 +00:00
Florent de Labarre eb0c5f2566 [FIX] auth_totp: "Disable TOTP" only available in list view
The action server is only available on view list. It is hard to find this.

closes odoo/odoo#83455

X-original-commit: 2fa29557d048e43bc9ed0a9fc9047de203b0c4f0
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-01-27 07:03:03 +00:00
Julien Mougenot 0dc347370f [FIX] web: Allow XML template attachments
Before this commit: static XML templates could only be defined on the
file system, and called by manifest assets or ir.asset records.
Attachments were not taken into account when evaluating static
templates.

Now, if a given path does not match a file on the system, an
additional check is run on ir.attachment records instead of failing
directly.

Task 2715333

closes odoo/odoo#83438

X-original-commit: e022c4bfafa77f1a3433c3b980631510af696ade
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-01-26 19:22:57 +00:00
Nicolas Bayet 51e6b349e3 [FIX] web_editor: open the linktool when clicking an element inlide link
Whenever we clicked on a link that contained another element
(eg. span, bold, ...), the LinkTool did not open.

Task-2667989

closes odoo/odoo#83437

X-original-commit: d69d26a2dd8830aca8c5922d3548e5ff59c688fc
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-26 18:23:56 +00:00
Yannick Tivisse 02b356cf82 [FW][FIX] hr_holidays: Improve error messages
closes odoo/odoo#83410

Forward-port-of: #83278
X-original-commit: db203ae7a6eee715fbc32939c5e38457cee7762a
Related: odoo/enterprise#23755
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-26 15:59:03 +00:00
Romain Derie 0dc683f033 [FIX] website: restore the language install steps in tour
Those steps were removed with [1] to avoid a indeterminist timeout, but by
doing so that part of the feature was not tested anymore.
Sadly, it was broken by [2] without being noticed for a long period of time.

The error was discovered by fixing multiple lang issues in the website
configurator in master.

Note that by creating a new lang instead of using an existing one will avoid
the timout error that lead to the removal of those steps with [1]. Indeed, as
no .po files will be found for that lang, it won't spend time on processing
those files.

[1]: https://github.com/odoo/odoo/commit/a15c7099a36a3a5b4dca9375b233cbe3fe2a280f
[2]: https://github.com/odoo/odoo/commit/745ef9de97544d5c1a97e03be67e903feca40c2a

closes odoo/odoo#83420

X-original-commit: 0b43f52116fd9a58fb0a123db576d822fd541043
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-26 15:05:03 +00:00
Romain Derie 83896d7b89 [FIX] website: restore the redirect after lang install
Since [1] the redirection supposed to happen after a lang install from the
frontend was broken.
Indeed, the 'url_return' was moved and used before it is actually set.

[1]: https://github.com/odoo/odoo/commit/745ef9de97544d5c1a97e03be67e903feca40c2a

Cheers to @jke-be which did the same fix in another branch in parallel.

X-original-commit: 74a594bb2e68662b22477fcce24d9620b2dd0b2a
Part-of: odoo/odoo#83420
2022-01-26 15:05:03 +00:00
Xavier-Do b1efacf417 [FIX] web: fix tests for runbot
On runbot database can be create concurently by other builds, meaning
that the teardown may fail randomly if a database is create between
setup and teardown. Filtering on the dbfilter in all case may miss some
errors but will be enough in this case.

closes odoo/odoo#83414

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-01-26 14:09:06 +00:00
Touati Djamel (otd) 2de9342a11 [FIX] product: fix contained quantity decimal precision
Steps to reproduce the bug:
- Activate packaging in inventory configurations
- set the product UOM digits to more than 2 decimals
- Create a storable product:
    - Go to inventory tab > Packaging > Add a line
    - Change the contained quantity to a value with more than 2 decimal places

Problem:
It will round it to 2 decimal places regardless of the set digits.
Because the formatFloat function does not receive the digits in parameter, so it uses 2 as default value

Problem:

opw-2723068

closes odoo/odoo#83411

X-original-commit: 144761f07c9de53aaeb7e1468e017eee17cbacd2
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-01-26 14:09:02 +00:00
roen-odoo 923c015267 [FIX] pos_gift_card : Cannot use PoS gift card in eCommerce
Current behavior:
When creating a gift card in PoS you are not able to use it in the eCommerce website

Steps to reproduce:
- Activate gift card in PoS, in Generate barcode mode
- Create a gift card in the PoS
- Try to use this gift card in the eCommerce website
- You get an error "expired or not valid"

opw-2727404

closes odoo/odoo#83354

X-original-commit: 26112a57cd2ce1726af1b10f24305595d3f4d0be
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-26 14:08:55 +00:00
roen-odoo ec9a734b57 [FIX] account : No cash journal
Current behavior:
When changing the type of a payment journal used in a cash payment method you couldn't close a PoS that used this payment method

Steps to reproduce:
- Point of Sale > Configuration > Payment Methods
- Select 'Cash' payment method, go to journal 'Cash', edit the type to 'Bank'
- Go to a Pos session, then try to close it.

opw-2732933

closes odoo/odoo#83343

X-original-commit: 43b64a78888d5b79d87491caf1401964228809fc
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-26 14:08:51 +00:00
Nicolas Bayet f0923a29b6 [FIX] website: wait for rpc promise to finish
In order to anticipate an anomaly in the network to prevent
a save, wait for an rpc to finish.

task-2742008

closes odoo/odoo#83103

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-26 14:08:48 +00:00
Nicolas Bayet 84df34daa2 [FIX] web_editor: resolve ajax request of cleanForSave
Upon save in website or in mass_mailing, if a `cleanForSave` of a
`SnippetEditor` or a `SnippetOption` wait for the end of an
`this._rpc()` request AND the `SnippetEditor` or the `SnippetEditor`
of the `SnippetOption` has a `SnippetEditor` ancestor, the
`cleanForSave` will never resolve.

Here is the scenario:

- **SnippetEditor B** has **SnippetEditor A** as its odoo widget parent

In `SnippetMenu` `_destroyEditors`:
- **SnippetEditor A** and **all its SnippetOption** call `cleanForSave`.
- **SnippetEditor B** and **all its SnippetOption** call `cleanForSave`.
  One of the promise of **SnippetEditor B** includes the result of
  `rpc()` in `ajax_service.js`.

- **SnippetEditor A** and **all its SnippetOption**
  `cleanForSave promises` resolve (but not **SnippetEditor B**).
- **SnippetEditor A** get's destroyed (`snippetEditor.destroy()`). As
**SnippetEditor B** is a `Widget` child of **SnippetEditor A**:
- **SnippetEditor B** get's destroyed (here is where the problem start).

... in the mean time ...

The ajax request of a promise of **SnippetEditor B** ends. The promise
of the `rpc()` will never finish because **SnippetEditor B** is
destroyed and the condition in `rpc()` is:
```js
if (!target.isDestroyed()) {
    resolve(result);
}
```

Because the promise will never finish for `_destroyEditors`, the save
action will never fully complete.

Task-2742008

Part-of: odoo/odoo#83103
2022-01-26 14:08:47 +00:00
Arthur Gossuin (goa) 04bee306bb [IMP] delivery: picking/order ref in DeliveryPackage
Before this commit, to aaccess some values of the DeliveryPackage
objects, we needed to take the value from the related picking. for
example, for the `payment country code` linked to the package, we need
to retrieve the value from the related picking or order.

To avoid passing too much data to the request objects, it is convenient
to be able to access to the order/picking related to the package
directly from the package.

Because these objects are not children of odoo.models.Model, I do not
need to follow the convention for the names, however, calling the
picking > picking_id in the DeliveryPackage suggests that the picking is
actually a odoo.models.Model child, which should be the case if it
exists.

reference-branch= https://github.com/odoo-dev/enterprise/tree/master-dhl_add_commercial_invoice-goa

closes odoo/odoo#83404

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-26 13:11:21 +00:00
Nicolas Bayet 595cfa7ca2 [FIX] website_sale: prevent editor to make dirty elements
Whenever the layout of the shop when editing the /shop page,
all the elements mutated from _onApplyShopLayoutChange
became dirty but shouldn't have as there is no intention to
save those mutations.

Task-2676809

closes odoo/odoo#83398

X-original-commit: aca32bc0ab670221ea885cf8c17e7449255f1458
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-26 13:11:17 +00:00
Nicolas Bayet 013f0da147 [FIX] web_editor: properly save history step when pasting text
Before this commit, when trying to paste an url, the editor was
properly creating a link but did not create a step in the history.
So when the user hit enter just after the paste, the last link
insertion was reverted.

Task-2720366

closes odoo/odoo#83396

X-original-commit: 0e37742d3caba1c6544e5b466503f155626375eb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-26 13:11:14 +00:00
qsm-odoo e4e69d54fb [FIX] website, web_editor: prevent traceback on popup removal
Before this commit, a traceback occured when trying to remove a popup
snippet, only if content inside was clicked on before (base case but
that last part was not covered by our main test which drags and drops +
removes all snippets).

The problem is complex and annoying to solve in stable. The cause is the
combination of [1] and [2]. Indeed, with [2] we solved the snippet
activation flow to ensure the onFocus and onBlur methods are called when
needed... but that new correct implementation relies on the fact that
the number of snippet editor instances does not change for the whole
async operation of activating a snippet. That should naturally be the
case but is not because of [1]: when we remove a snippet we first
trigger a snippet activation then destroy the snippet (and its editor
instance)... but the snippet activation is not awaited at the moment.
Thus making the snippet editor instance be destroyed *during* the
snippet activation flow. Of course a better solution than this commit
must be found but this fixes the traceback with a very minimal change
for the 15.0 stable version while waiting for that miraculous solution.

[1]: https://github.com/odoo/odoo/commit/ae219ec06baf0280c76ae09b1453cc1481eece30
[2]: https://github.com/odoo/odoo/commit/0acc5e784b15d9c963660da3781763448503f33e

task-2735663

closes odoo/odoo#83378

X-original-commit: da7c1b5757a7780897c5736ddecc014a7fb50bdb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-26 13:11:10 +00:00
Hubert Van de Walle (huvw) 5033198414 [FIX] survey: print all pages from the survey results
Steps to follow

  - Use an odoo instance without the planning app
  - Go to the survey app > feedback form
  - Click on "See results"
  - Print the document with your browser
  -> The output only contains the first page

Cause of the issue

  A height of 100% is set to the html element
  It works with the planning module because this css is present
  https://github.com/odoo/enterprise/blob/ead53fcca721aaa06619b4113707cae3fe086731/planning/static/src/scss/planning_calendar_report.scss#L57-L60

Solution

  Unset the html height property in the survey layout

opw-2724319

closes odoo/odoo#83370

X-original-commit: 2c2f9a13a8251791ea24e93927f9a45e8dda2c14
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-01-26 13:11:06 +00:00
Adrien Widart 7e950abc6c [FIX] mrp: unbuild a decimal quantity
It is sometimes impossible to unbuild a product because of decimal
values.

To reproduce the issue:
(Enable debug mode)
1. In Settings, enable "Units of Measure"
2. Set the decimal accuracy of "Product Unit of Measure" to 4
3. Set the rounding precision of "Units" to 0.001
4. Create two products P1, P2
5. Create a BoM:
    - Product: P1
    - Quantity: 3
    - Type: Manufacture
    - Components: 5 x P2
6. Process a MO with 3 x P1
7. Create an unbuild order UO:
    - Manufacturing Order: MO
    - Quantity: 1
8. Unbuild

Error: An error message is displayed "The quantity done for the product
"P2" doesn't respect the rounding precision[...]"

At some point, for each SM associated to the UO, the modules uses the
value of `product_uom_qty` to write the done quantity of the SM. The
rounding of `product_uom_qty` is based on "Product Unit of Measure" so
the component's SM has its quantity equal to `1.6667`. Moreover, writing
the done quantity trigger the creation of the associated SML. As a
result, the SML has its done quantity equal to `1.6667` while the
rounding of the associated UoM is `0.001`. When calling `_action_done`
on such a SML, it will raise an error because the value doesn't respect
the rounding.

Side note: the error message is incorrectly written, the indents in the
file are displayed on the front-end.

OPW-2710038

closes odoo/odoo#83369

X-original-commit: c11d772f39179c5dec5eb431b6f4bc02c680643a
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-26 13:11:00 +00:00
stefanorigano (SRI) 8bf5c66616 [REF] mail: AttachmentList, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2731819

closes odoo/odoo#83092

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-26 13:10:56 +00:00
Yolann Sabaux 6ae34e53b2 [FIX] account: accrual orders lines filter
Steps to repdroduce:
- install Purchase - Accounting
- Create a new Purchase Order
- Add a product
- Add a section or a note
- in Actions select Accrued Expense Entry
-> traceback rounding error

OPW-2728854

closes odoo/odoo#83057

X-original-commit: 582be68bb5e4d441548a987fda3ff6450faa24ca
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: yosa-odoo <yosa@odoo.com>
2022-01-26 13:10:52 +00:00
Brice bib Bartoletti f5033dce60 [FW][IMP]l10n_dk: Add danish tax report
This commit is a forward port of the 2 following commits:

[IMP]l10n_dk: Add support for danish tax reporting
commit: d48433589a403754e9853b5242ec42abfafbfdea

This commit creates the basis for the danish tax report.
It creates the report and link the tags to the related taxes.

[IMP]l10n_dk: tax report and taxes impl. rework
commit: 7e4017c43a72314a5ba6da40903896f2dce4e2d5

This commit aims to:
    - implements formula in the tax report
    - shorten tag names and add context comments to the tax report
    - correct the tax implementation
    - add some fiscal position for some taxes and reorder them
    - delete a tax that doesn't make any sense

closes odoo/odoo#83376

Community-pr: https://github.com/odoo/odoo/pull/80823
Task: #2666277
X-original-commit: f8c1015841020244bae16715b0112f41b91ec72b
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
2022-01-26 11:46:15 +00:00
Achraf (abz) 5cd61fc810 [FIX] web_studio: add background image in the cache hashes
When changing the background image with studio the image does not update.
It works in debug=assets mode.
This is due to the fact that the caching system is not aware of the presence of a possible background image

opw-2696786

closes odoo/odoo#83374

X-original-commit: 184029e3e1e8907e25dd712dd87afd65885695bb
Related: odoo/enterprise#23744
Signed-off-by: Achraf <abz@odoo.com>
2022-01-26 10:15:59 +00:00
Aaron Bohy ca28cff17d [FIX] web,mail: fix wrong assertions in tests
This is not a big deal, but by passing a widget instance or a DOM
node as message to a QUnit.assert function, QUnit keeps a reference
to that instance or DOM element, and it can never be garbage
collected (nor its bound handlers in the case of a DOM element).

For the mail case, this was a bit more critical as we didn't check
what the author of the test actually wanted to check.

closes odoo/odoo#83384

X-original-commit: 692fd6ecee602f7ceaae093b855aff65d50ca797
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-26 08:49:09 +00:00
Laurent Smet 4fd62d2639 [FIX] l10n_fr_pos_cert: Fix bad xpath making everything editable
When installing 'l10n_fr_pos_cert', some fields become always editables on the bank statement form even the state is not in 'open'.
This allows the user to introduce a lot of unconsistencies regarding the bank statement balances.

closes odoo/odoo#83348

X-original-commit: cb49944f3c980fa22131713fd96cf7bcbdc757be
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-26 08:48:59 +00:00
Tiffany Chang (tic) 4bb27c2313 [FIX] stock: correct unassigning moves in reception report
Fixes a couple of things;

1. Backorder use case when unassigning a move in reception report.
To reproduce:

- Create a Delivery w/ Demand = 8 of a stored product not in stock
- Create a Receipt w/ Demand = 10 of the product
- Assign 8 of product to delivery (don't forget to activate Reception
  Report in settings
- Mark 4 of product as done > mark as done > create a backorder
- Open reception report in backorder (shows 6 instead of 4, this is a
  known limitation of reception report) + unassign + close report
- Reopen report + assign 4
- Finish the backorder

Expected result: Delivery has 2 moves totaling a demand and reserved
  amount of 8
Actual result: Delivery has 2 moves where 1 is fully reserved but the
  other isn't and cannot be reserved (even though product in stock).

Issue was due to move split during unassign not taking into account that
the amount being unassigned could be greater than the amount still
assigned (due to backorder amount > demand qty since it doesn't know how
much was done in the original receipt). This would lead to the move
linked to the original receipt's move expecting a greater quantity from
the original move (and therefore not reserving any more quantities.)

2. Trying to unassign from an already done move. (i.e. backordered move
from above unassigned after the delivery is already done) isn't allowed,
so in case of unassigning from a done move, we don't do a split.

3. In case of failure of unassigning, fail gracefully (i.e. don't switch
button status since this is misleading).

Discovered during task: 2662730

closes odoo/odoo#83338

X-original-commit: 3c0c780032ed07da7ec14bdad8df2ff48fc5f4ef
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-01-26 08:48:55 +00:00
Florian Charlier de1cba13e3 [IMP] calendar: populate calendar alarms
Task-2728093
See odoo/enterprise#23707

closes odoo/odoo#83265

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-26 08:48:52 +00:00
Xavier Morel 722f0f9b65 [IMP] core: deduplicate @locked and @synchronized, use in Registry
It's not entirely clear whether `@synchronized` is even useful, but
keep it for now. `locked` is just the default instance of
`@synchronised`.

- rewrite `@synchronized` using `decorator`, don't fold everything
  into a single call as there's a potential for parametric conflict
- remove the independent `locked` in `sql_db.py`
- convert `lru` to `locked`
- move `Registry` over to `locked` where applicable

closes odoo/odoo#82718

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-26 08:48:43 +00:00
Guillaume (guva) beaae97201 [FIX] account: reversal_date accrued_orders wizard
Before this commit, the field reversal_date was not stored, which lead to inconsistent behaviour when creating entries, as the reversal date was always recompute with the default value.

opw-2722435

closes odoo/odoo#82445

Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-26 08:48:39 +00:00
Benoit Socias c313c100d5 [FIX] website_form: verify that both input and textarea select form
When Jabberwock was introduced in [1], forms were not selected anymore
by clicking on the form fields.
That behavior got fixed when Jabberwock was removed in [2] but this
commit introducing a test about it was not attached to a task - and did
not get merged at the time.

Before this commit there was no test to verify if the form became
selected when clicking on one of its input field or textarea.

After this commit there is a test that makes sure that the form is
selected when the user clicks on either an input field or a textarea.
Also added the renaming of a field label followed by a blur to ensure
it triggers all UI events.

[1] https://github.com/odoo/odoo/commit/347f4413d1b1a2b1a6a9ecd6d9c20cf7f3ec5ff3
[2] https://github.com/odoo/odoo/commit/e5572c317a7775a58675ed73efc89b5c9f6c0c39

task-2729643

closes odoo/odoo#83379

X-original-commit: fe4000cd521b5e1426b9093f7671fa457ef45eb8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2022-01-26 07:55:57 +00:00
Sébastien Theys e0913197ac [IMP] mail: batch and avoid duplicate chatter data rpc
task-2742754

closes odoo/odoo#83189

Related: odoo/enterprise#23666
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-25 20:39:19 +00:00
Nicolas (vin) 008ef45e91 [IMP] l10n_mx: set tags on suspense and outstanding accounts
Set a default tag on the bank suspense account, outstanding accounts
and transfer accounts so that they are found and used by the trial
balance and COA reports.

TAsk id #2612900

closes odoo/odoo#82532

Related: odoo/enterprise#23383
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-01-25 19:07:03 +00:00
Nicolas (vin) b96640785d [IMP] l10n_lt: Update account types
Update the type of some accounts to better represent their use in the
financial reports.

Task id #2612900

closes odoo/odoo#82531

Related: odoo/enterprise#23381
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-01-25 19:06:59 +00:00
Pouya Malekinejad (poma) 94f79a4adf [IMP] l10n_tr: Improve Turkish COA
[IMP] Added CoA options 7/A and 7/B
[IMP] add notes to CoA
[RFR] New structure and naming convention(wan)
[IMP] add the suspended and outstanding accounts after bank ones

closes odoo/odoo#82716

Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-25 18:14:59 +00:00
Fabien Pinckaers 5b72f01766 [IMP] cleanup of base_address_city & base_address_extension
Rely on country.address_view_id instead of hacking the view on the fly. The
address layout (street VS street_name street_number street_number2) depends now
on the country of the user, not on the installed localisation. (it's now
configurable per country)

Unified street format to "Chaussee de Namur 40 - Appt 12"; the
configurable ones where actually wrong by country.

Allow street split without base_address_extended; all EDIs can now be
used with or without base_address_extended.

Merged base_address_city into base_address_extension, to avoid creating bridge
modules for no reason. Uses city_id instead of city if the country of the user
defines it AND if enforce_cities is set on this country.

Improved post_init script for large databases.

Split of street removed on res.company. (not required by any l10n)

[IMP] l10n_cn_city,l10n_nl,l10n_cl,l10n_co,l10n_pe: base_address_extended improvements

l10n_cn_city defined cities but did not provide a means to edit the city_id, so enforce_cities
l10n_nl only requires street names and numbers and thus does not need to depend on base_address_extended
l10n_cl should not depend on base_address_extended as none of the features are used
l10n_pe improve the view
l10n_co remove base_address_city dependency - move to l10n_co_edi

closes odoo/odoo#81710

Related: odoo/enterprise#23108
Related: odoo/upgrade#3129
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-25 17:21:04 +00:00
Alexandre Kühn 0b7ff0bafe [FIX] mail: no infinite loop with useXToModel hooks
Before this commit, implementation of `useXToModel` performed
essentially 2 updates in succession, even when ref or component
hasn't changed.

This is a problem, especially when 2 components in hierarchy make
use of `useXToComponents`, as this could lead to infinite loops.

closes odoo/odoo#83344

X-original-commit: 95cb2648484f8529947e2bed14d86a20e6ad37b6
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-25 15:41:21 +00:00
Ricardo Gomes Rodrigues (rigr) 4c3530b7d6 [IMP] l10n_pt: add financial reports menu for Portugal
The reports are in the following PR: https://github.com/odoo/enterprise/pull/22559

closes odoo/odoo#83292

X-original-commit: 5cb6632c128f2766e53523a8f9be458d43fe8c31
Related: odoo/enterprise#23721
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: rigr-odoo <rigr@odoo.com>
2022-01-25 15:41:17 +00:00
Romain Derie 2d080ca835 [FIX] website: make animation works when cookies bar opened
Before this commit, since [1], when the cookies bar is opened, the pages'
animations would not work at all.
Animated images would not even be shown, remaining invisible.

This is because the s_popup when not using the layout 'popup' is still using
the modal/popup snippet structure but is not really a modal anymore.

As BS provide a built-in way to know if there is an open modal, which works
well with the cookies bar, use it instead.

[1]: https://github.com/odoo/design-themes/commit/e025296ccf5b8d8ea19bd354d9fbd52a12fc4d94

opw-2712755 (detected during migration)

closes odoo/odoo#83291

X-original-commit: 48bb9efee99d3bee2b4b60eec0f59ed2cb13a096
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-25 15:41:07 +00:00
Florian Charlier 5dd9610145 [IMP] calendar: add "Organizer" field to .ics data
If enough information is available on the meeting, this commit will prevent
undesirable "Unknown Organizer" notices from .ics imports.

Task-2743866

closes odoo/odoo#83232

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-25 15:41:03 +00:00
roen-odoo 646a5f9d35 [FIX] pos_gift_card : Can sell the same gift card multiple times
Current behavior:
When creating a gift card in the backend you were able to sell it multiple times in a PoS

Steps to reproduce:
- Create a gift card in the backend
- Open PoS with gift card mode in "Scan a barcode and set the price" or "Scan an existing barcode with an existing price"
- You can sell this same card multiple times

opw-2666917

closes odoo/odoo#83332

X-original-commit: e1bab4cff762ae42e986f1b2a26d8106be6fb906
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-25 14:48:26 +00:00
Umesh Gupta 8bba5f2bba [FIX] survey: display clock icon properly in survey kanban view
Currently, clock icon to schedule activities is not showing properly in
kanban view of survey for medium to large screens. If the there is not
enough room for buttons to fit within a single row, the buttons overlap
the clock icon (which is placed in the absolutely positioned footer).

This commit fixes the issue by adding the bottom padding on the button
container for large screens and thus making sure that the buttons never
overlap the clock icon.

TaskID-2726272

closes odoo/odoo#83330

X-original-commit: e693b52497b971e3d46a8eb56a899dbff7cf350f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-25 14:48:23 +00:00
Antoine Vandevenne (anv) 8a9f3ac812 [FIX] payment_paypal: prevent creating new session for returning users
Before this commit, users returning from PayPal to Odoo after payment
could see their session renewed, depending on their browser's
implementation of the `SameSite` cookie attribute. This prevented Odoo
from retrieving the transaction from the users' session.

This commit flags the return route of PayPal with `save_session=False`,
hence allowing all users to immediately post-process their transactions
when they return to Odoo.

closes odoo/odoo#83327

X-original-commit: 33ae5e491609c580a3aeb83568c74cd1acaae336
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-01-25 14:48:19 +00:00
Audric Onockx (auon) c811fdc585 [FIX] hr_holidays : allow user to take time off allocated in the future
Steps:
- Install Time Off
- Create Time Off Type T
- Create Time Off Allocation :
	- Time Off Type : T
	- Validity Period : in the future
	- Employee : Demo
- As Demo, create Time Off Request

Issue :
- As a Time Off Type, T is not displayed

Cause :
- This dropdown list calls _compute_leaves, which calls
get_employees_days with no date.
- As a result, this method search Time Off Allocations available today.
- Yet, T doesn't satisfy this condition.

Fix :
- Append date conditions to domain search only when a date is given s
param.

opw-2730416

closes odoo/odoo#83326

X-original-commit: 8db810a7d9039fc3ef870056c1b158981e590cea
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-01-25 14:48:15 +00:00
std-odoo 7d26eadaa7 [IMP] base: allow a full email address in "mail.default.from"
Purpose
=======
Allow a full email address in the system parameter "mail.default.from".

This is useful if we want to send the emails with a domain different
from the domain used to receive them. E.G. a user on our SaaS can
configure an outgoing mail server for Outlook, use his email address as
the default one (so all emails will be encapsulated into his email
address) but keep our default configuration to receive the emails
(so the catchall domain still remains "mycompany.odoo.com").

Task-2738816

closes odoo/odoo#83325

X-original-commit: 21f685d1f58690e1c9c1c6198461652b108e1e18
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-25 13:52:43 +00:00
Merlin (megu) 1b8e3e4ec0 [FIX] account: use same date for paired internal transfer
The paired payment generated when doing an internal transfer didn't have the correct date

Steps to reproduce:
1. Install Accounting
2. Go to Accounting -> Configuration -> Accounting -> Journals and duplicate the 'Bank' journal
3. Go to the Accounting Dashboard
4. Create a new internal transfer in Bank (go to the three dots on the top left corner of Bank and select New -> Internal Transfer)
5. Select 'Bank (copy)' as destination journal and select a date in the past
6. Save and confirm the internal transfer
7. Go to the paired internal transfer (link in the log notes)
8. The date of the transfer is the date of creation, it should be the same as the other transfer

Solution:
Use the date of the posted internal transfer to create the paired one

OPW-2710356
OPW-2730529

closes odoo/odoo#83316

X-original-commit: ce4b81e6abc49268623bad1fcb85e963eb8990c0
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-01-25 13:52:39 +00:00
stefanorigano (SRI) f389f59547 [ADD] web: inline-margin utility classes
Define "Bootstrap v5 ready" utility-classes to handle inline margins.
These classes definitions can be safely removed after migrating to v5.

task-2731819

closes odoo/odoo#83260

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-25 13:52:35 +00:00
Nicolas (vin) 68f4534aa5 [IMP] account_*, l10n_*: allows the same bank account on multiple partners
Some use cases require the use of the same account number on multiple
partners. This will relax the constraints to allows such use cases, and
adapt to avoid setting the partner or bank when we cannot be sure of the
one we should take (on bank statement line, and during reconciliation)

Task id #2692025

closes odoo/odoo#81362

Related: odoo/enterprise#22881
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-25 13:52:29 +00:00