Commit Graph
151539 Commits
Author SHA1 Message Date
Audric Onockx (auon) da46de79bf [FIX] hr_attendance : stop polling when kiosk_mode
Steps :
- Attendances > Kiosk Mode
- Log in or out several times

Issue :
- Interface slows down

Cause :
- When a kiosk is destroyed, poll is started
- Yet each time a kiosk is started, the old kiosk is destroyed, which starts a new poll.

Fix :
- Given that the kiosk mode can't be escaped from the interface,
	it is not necessary to restart polling when destroying.

opw-2735324

closes odoo/odoo#83517

X-original-commit: b3e9b4b17a4b444372fe24f07ad3c947fba540fb
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-01-31 08:14:50 +00:00
Luis González 605c2de536 [IMP] base: do nothardcode user fields that trigger cache invalidation
Whenever a user is modified, if at least one of a predefinet-field list
is being touched (e.g. companies or groups), cache is automatically
invalidated. However, that field list is harcoded, which prevents it
from being inherited and extended.

This commit moves such fields to a separate method, which makes
possible to inherit such method and extend the list.

closes odoo/odoo#79986

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-01-31 07:24:11 +00:00
Ibrahima Gueye 342776b621 [CLA] Update optesis CCLA
closes odoo/odoo#83625

X-original-commit: ac4dd82913e7d985951c00affe5ec2b0a5605652
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-01-30 11:07:53 +00:00
Nassim AIT-ALI f4dcfe1762 [CLA] aitalinassim
closes odoo/odoo#83622

X-original-commit: ff9d90573f3aaffffbaa9fdba22d967a4c494c72
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-01-30 10:19:38 +00:00
Raphael Collet 95d176c4df [FIX] base: do not put mockup class in future registries
Followup of #82838 and #82844

By default, every subclass of BaseModel is registered in a mapping for
the automatic discovery of model classes by registries.  Prevent
registration of the mockup class used for rendering the database manager
templates.

closes odoo/odoo#83626

X-original-commit: 3bce74b20f8c15befee453382e3ab4697bee6960
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-28 21:51:43 +00:00
jbw 0f4cc6dcce [IMP] account_fr_fec: fix SQL Memory error when FEC too big
Set fec_data to attachment True to avoid storing data in DB and generating memory alloc errors.

closes odoo/odoo#83620

Task: 2453453
X-original-commit: e2d4a6bd03361188f7454015574896b52aa797ef
Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-28 18:58:47 +00:00
Jacky (trj) 0e8e71aa9e [FIX] coupon: allow overridden method to be called
Due to some changes in the ORM, the previous implementation doesn't allow the override of a method to be called.

closes odoo/odoo#83595

X-original-commit: b1af44bad3a87a92f8726ed69eadffdbe4ac7c0b
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-01-28 18:58:44 +00:00
Ricardo Gomes Rodrigues (rigr) 993acf8761 [FIX] mail: ensures that rtc cards have the right aspect ratio
Before this commit, the call participant cards in the sidebar of the
call viewer didn't respect the 16:9 aspect ratio on some browsers like
chrome. This commit fixes the issue.

task-2738622

closes odoo/odoo#83406

X-original-commit: 1f9ea3a1ef3832ed339337063f321c1bc2eacaf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-28 18:08:07 +00:00
yhu-odoo e08d8a343d [FIX] mrp: skip cancelled WOs in _start_nextworkorder
When start_nextworkorder, if the WO is already cancelled, we
should try to check next one the this WO.

Task-2678388

closes odoo/odoo#83566

X-original-commit: 30fcfcc6c6ebb6fe9620d29475e1a7b6f1a46923
Related: odoo/enterprise#23819
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2022-01-28 16:09:30 +00:00
Alexandre Kühn cbe1bc8095 [IMP] mail, website_livechat: introduce Discuss View
Task-2694206

closes odoo/odoo#83246

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-28 16:09:26 +00:00
Paul Morelle 0b22f4deee [FIX] base: keep cache when regenerating assets
When the assets are regenerated, the previous attachments are deleted.
This may happen during the execution of t-call-assets directives in a
qweb view.

However, some properties that have been accessed with a sudo() were
accessible in the cache. Clearing the cache during the view rendering
could lead to access errors, which wouldn't be present without this
directive.

This commit works around this problem by removing these attachments with
a SQL query, without relying on the classic unlink, so that the cache is
preserved in this case.

By the way, sanitize the filename when marking it for deletion.

closes odoo/odoo#83570

X-original-commit: 627d508edfb62449067a05b0e3c1a0004f0af32c
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Olivier Dony <odo@odoo.com>
Signed-off-by: Paul Morelle <pmo@odoo.com>
2022-01-28 14:10:15 +00:00
Alexandre Kühn 48700416c1 [IMP] mail: clean dialog modelling of discuss
Properly define relational fields as owner/owning/content.
For instance, with viewing attachment in a dialog, the modelling
looked roughly like this before the commit:

```
attachment_viewer -----> dialog
```
- where attachment viewer owns dialog

This commit changes it to:

```
attachment (image/card) ------> dialog -------> attachment_viewer
```
- where attachment (image/card) owns the dialog, and dialog has
  attachment viewer as content

These changes should make modelling of dialog feels more natural.

Task-2738648

closes odoo/odoo#83519

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-28 14:10:07 +00:00
Raphael Collet 75e6b645ac [IMP] core: install PG extension "pg_trgm" only if necessary
Task 2742526

closes odoo/odoo#83274

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-28 14:10:02 +00:00
Raphael Collet a1904aa6f6 [IMP] core: field index names
The possible index names have been renamed "btree", "btree_not_null"
(instead of "not null") and "trigram" (instead of "gin").

Task 2742526

Part-of: odoo/odoo#83274
2022-01-28 14:10:01 +00:00
Rémy Voet (ryv) 5a573c6f18 [IMP] base: don't prefetch translate field by default
Issue
-----
Via the field prefetch mechanism, when we need a value of one field
(not in cache of course), the ORM will prefetch all fields
(which has the attribute to `prefetch=True`, the default value of this
attribute is `True`) for all record ids in `_prefetch_ids`.
Then, for each translate fields (where translate is not a callable)
the ORM need to make a `LEFT JOIN` on the `ir_translation` to fetch the
translated value. For big model, it leads to a simple `SELECT` with
several `LEFT JOIN` on ir_translation but each LEFT JOIN have a cost
in the planner time (a small cost in the execution time) of PostgreSQL.

By example, for `product.template` (stock/sale/purchase installed),
there are 6 LEFT JOIN to get all translated fields (5 of this
fields are rarely used).

Proposed solution
-----------------
Deactivate the prefetch by default for all translate fields expect if
this field is the `_rec_name` of the model (which is more likely to
be used).

In the example on the `product.template`:
Without prefetching the translated fields, there is only one LEFT JOIN
(the name, which is translated but is the `_rec_name` of the model).
With the 6 translated fields to fetch, the
query takes 5 ms to plan and 2 ms to execute VS with 1 translate field,
it 1 ms to plan and 1.5 ms to execute.

Side change note
----------------
- All translate of fields of `website.seo.metadata` should be prefetch
to avoid lot of website errors (it is because, website put in cache data
in sudo before reading it without sudo)
- `description` (`mail.message.subtype`), `subject` (`mail.template`),
`body_html` (`mail.template`) should be prefetch to avoid lot of extra
query from mail module.
- `vat_label` (`res.country`) should be prefetch to avoid a extra query
for each website page.
- Increase some queryCount (when it is legit, due to `subtitle` of
`blog_post` or `description` of `event.type.ticket`, etc)

task-2738029

closes odoo/odoo#82896

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-28 14:09:56 +00:00
Rémy Voet (ryv) 1187bb798a [REM] base: remove unused method from ir_rule
Remove unused methods from ir_rule.py:
- unused _eval_context_for_combinations
- Depreciated and unused domain_get method

Depreciate duplicate method IrRule.clear_cache()

closes odoo/odoo#79073

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-28 14:09:50 +00:00
Rémy Voet (ryv) 27e194f86b [IMP] base: add company name for record rule error
In debug mode, when a company ir.rule raise a exception
for one or multiple records, a feedback message is
display with limited records information.
Add company name to these information to help the user to change
his current company to the correct one directly.

task-2628865

Part-of: odoo/odoo#79073
2022-01-28 14:09:49 +00:00
Didier (did) 55d5fbc73e [IMP] mail: compute the messageViewList scroll position inside the model
task-2579306

closes odoo/odoo#83042

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-28 13:13:38 +00:00
Aurélien (avd) e9d9058b64 [FIX] product: name_get performances
Currently, product.name_get goes through
each product in the record set
before calling _get_combination_name
on its attribute values.

This can lead to some slowdowns when the recordset
starts to grow (> 100 products). The reason for
that is that _get_combination_name
filters the recordset twice.

This commit speed-up _get_combination_name
by "resetting" prefetch_ids to self._prefetch_ids,
i.e. the prefetch_ids of the whole recordset.

opw-2624261

closes odoo/odoo#83563

X-original-commit: 2065c53a6e0c3f1c363f5b2bea401782a1f4b31b
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-28 12:21:51 +00:00
Benjamin Vray 93f7a7e95c [IMP] website_sale: improve UX for ribbons edition
Before this commit, you had to click on a "validate" button to
validate the modification/creation of a ribbon. Now this is done
automatically with every modification while editing.

task-2501515

closes odoo/odoo#74206

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-01-28 12:21:47 +00:00
Benjamin Vray aca85f9f19 [IMP] website_sale: improve the design of the product block options
task-2501515

Part-of: odoo/odoo#74206
2022-01-28 12:21:47 +00:00
Martin Trigaux ea3608ef46 [FIX] website_sale_digital: translate help message
closes odoo/odoo#83556

X-original-commit: 02321b861a3ea3670bf49de586c1bf304a56a670
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-01-28 11:27:42 +00:00
Benjamin Vray 368cd051eb [FIX] web_editor: add a space between the video option's switches
Since the redesign of the switches made at [1], there was no space
between the switches anymore.

[1]: https://github.com/odoo/odoo/commit/e717ccd353fbf03fb0640dee446cb72dcc58b125

task-2723819

closes odoo/odoo#83532

X-original-commit: 677d07e0529cd4087bd1e3c2bac8ea5c1133ca89
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-01-28 09:52:57 +00:00
Xavier-Do 94bba79a2e [FIX] models: forbid model changes on xmlid
Before this commit, changing the model on an existing xml-id may lead to
strange results.

create any record in xml, ie: id=my_xid, model=new_model
=> Odoo will create a new external_id, pointing to (new_model, id=1)

change only the model in the xml, ie: id=my_xid, model=ir.cron
=> Odoo will use the id of the existing external_id with the new model
 and points now to (ir.cron, id=1)
AND REPLACE the ir.cron id=1 (autovacuum_job) with the data of the xml.

This commit simply prevent that by raising when trying to recycle the
same xmlid for another model. An explicit upgrade script to remove the
existing xmlid and corresponding records should be write.

closes odoo/odoo#83422

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-28 09:52:53 +00:00
Touati Djamel (otd) e46d5cfad4 [FIX] product: prevent user to select a pricelist from another company
Steps to reproduce the bug:
- Have company A and B
- Create a pricelist A with company A and pricelist B with company B
- Select company A as current company and B as allowed company
- Create contact A without linked company

Problem:
You can select pricelist B while the current company is A, this causes an access error if you save and only select company A in the selector.
It also causes an error when you open a new POS session.

This contact is not linked to a company, so it should be accessible from all companies.

Solution:
Add a domain to allow the user to only select the pricelist linked to the current company or a pricelist that are not linked to a company

opw-2745267

closes odoo/odoo#83537

X-original-commit: 9f79c62fa56a1bb92ea3fc79fd82431bf9041d5c
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-01-28 08:54:38 +00:00
Florian Damhaut 100dfe5b09 [FIX] project: create task from assigned task
Step to reproduce:
- Go to ‘my profile’
- Action "assigned tasks"
- Create task

Current Behaviour:
- Traceback because default assignee is not correclty set up

Behaviour after PR:
- Correct default assignee
- No traceback

opw-2742199

closes odoo/odoo#83539

X-original-commit: a80bb0c0312e07d233d01f9196ee040e07cffc83
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-28 07:46:46 +00:00
Joseph CaburnayandJacky 8fb53c53c3 [REF] point_of_sale,*pos*: remove Backbone.js, single loading request
This commit accomplishes multiple objectives:

1. Loading of model data for the POS UI is now done in single
request (with some exemptions).
2. Backbone.js is removed and is replaced by reactivity.js
authored by the js framework team.
3. Better organization of assets in the `__manifest__.py`

Data Loading
------------

One request per model -- that's always been how the data is loaded
in POS UI. Now, we move the aggregation of data to the backend which
simplified the data loading. In the frontend, data loading is
initiated in `load_server_data` which makes the single rpc call
to the `load_pos_data` defined in `pos.session` model.

There remains some rpc calls during loading but the number is
greatly reduced.

This change result to faster loading of the POS UI. However,
there is no more progress bar during the loading.

Notable entry points:

- .js: `PosGlobalState.load_server_data`
- .py: `pos.session.load_pos_data`

It is possible to make customizations in the loading, but is done in
several steps:

1. Override `_pos_ui_models_to_load` to include the new model to load.
2. Define `_loader_params_<model_name>` to define the `search_params` and
optional `context`.
3. Define `_get_pos_ui_<model_name>` to return the data that will be
included in the full `loaded_data`. Perform the organization in this method
whenever necessary.
4. Override `_pos_data_process` for further post processing. The final
form of `loaded_data` in this method will be sent to the frontend.

Removal of Backbone.js
----------------------

POS is no longer dependent from `Backbone.js`, but it's replaced by a
new dependency -- `reactivity.js`. It's invented by the js framework
team which will be available in owl v2.

The consequences of this change are the following:

1. The old `PosModel` is renamed to `PosGlobalState`.
2. The name of the other models are kept (except Paymentline which
is renamed to Payment).
3. The name `PosModel` is now used as the base model of the data models.
This is symmetric to our use of `PosComponent`.
4. The instance of `PosGlobalState` is made reactive in `Chrome` (the
root component). As a result, whatever mutation made in that instance,
`Chrome` will rerender. But rendering is batched so multiple mutations
in a single sychronous function call will only result to a single
render call.
5. `PosModel`s can be extended in the `Registries` the same way as we
extend the `PosComponent`s.
```js
// E.g.
Registries.Component.extend(Chrome, PosResChrome);
Registries.Model.extend(Order, PosResOrder);
```

Reorganization of assets declaration
------------------------------------

This is a simple change that replaced the explicit enumeration
of loaded .js and .xml files. Also, we now have regions in the
manifest separating:

1. Augmentations of dependencies
2. Assets for `point_of_sale.index`
3. Assets for the qunit test (soon will be improved)

Other notable changes
---------------------

- Automatic call to `Order.save_to_db` is batched.
- Instances of `devices.DeviceProxy` (`proxy`), `devices.JobQueue`
(`proxy_queue`) and `BarcodeReader` (`barcode_reader`) are moved
to `point_of_sale.env`. Together with `posbus` and `posMutex`
(previously `flush_mutex`).
- `ActivePrograms` is now passed a props.
- `cashier` is no longer saved to `localStorage`.
- `pos_cache` is overhauled.
- `cache` is taken out from `PosDB` to prevent infinite rendering
loop whenever `cache` is mutated. It's now called `CACHE` in
the `db.js` file.
- reactive version of `posmodel` is exposed globally when in debug mode.
This means that calling when calling a mutator, the UI will react.
- Added control buttons in the `ProductScreen` is sorted during `Chrome`
setup. As a result, we don't need to worry on the loading order of the
control buttons components.
- Model can be simply instantiated using `BaseModel.create(obj)`. This
takes into account the extensions.
- `pos_coupon`: rewards are now updated whenever set_order is called.
- Component unit tests were removed. It wasn't useful and it just blocks
the development. We'll be introducing better unit testing later.

closes odoo/odoo#82461

Related: odoo/enterprise#23344
Signed-off-by: Masereel Pierre <pim@odoo.com>
Co-authored-by: Jacky (trj) <trj@odoo.com>
2022-01-27 21:50:25 +00:00
Benoit Socias daf5963845 [FIX] web, website: rely on hotkey_service for hotkeys in website
Since [1] when web's owl services were made available to the frontend,
the navigation mixin does conflict with the hotkey service.
E.g.: navigation mixin consumes the 'alt' keyup event, which prevents
the hotkey service from cleaning up the hotkey overlay.

After this commit the old mixin is neutralized and hotkeys in website's
pseudo-backend layer are handled by the general hotkey service.
Also since [2] the menu items are inside `<div>` instead of `<li>`,
adapted the scss to take this into account.
Also added a CSS rule to neutralize the outline on website's menu
dropdowns which are `<a>` instead of the already handled `<button>` in
web.

[1]: https://github.com/odoo/odoo/commit/db7b485d984e50fae5a52308634166460e5fc908
[2]: https://github.com/odoo/odoo/commit/84715436d87bb05b421bc9ccaacda67d07571690

task-2738578

closes odoo/odoo#83529

X-original-commit: 88438fa9b363530aa4e5dec5599c1568fb7ccea0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-01-27 18:51:49 +00:00
Alexandre Kühn f2fc9a6fd3 [IMP] mail: load mail failures in another RPC
Task-2746116

closes odoo/odoo#83523

X-original-commit: 8e9cbf94f3e5e928f66dca78c278d555162278e6
Related: odoo/enterprise#23799
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-27 18:03:43 +00:00
Odoo's Mergebot d0edbd10ec [MERGE][IMP] mail: rename discuss legacy dialog components
In preparation to using dialog modelling.

Task-2738648

closes odoo/odoo#83522

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-27 19:03:37 +01:00
Alexandre Kühn 51c0dff6d5 [IMP] mail: rename discuss legacy dialog component in code
Code part of renaming discuss legacy dialog.
In preparation to using dialog modelling.

Task-2738648

Part-of: odoo/odoo#83522
2022-01-27 18:03:36 +00:00
Alexandre Kühn d35946e845 [IMP] mail: rename discuss legacy dialog component files
File part of renaming discuss legacy dialog.
In preparation to using dialog modelling.

Task-2738648

Part-of: odoo/odoo#83522
2022-01-27 18:03:35 +00:00
Antoine Vandevenne (anv)andLucie Van Nieuwenhuyze 00259dc44a [IMP] payment_*: improve handling of webhook notifications
Notification handling in some acquirers presents a subset of the
following issues:
1. The signature of synchronous notifications (redirect payloads) is not
   checked. (Alipay, Authorize, Buckaroo, Mollie, PayU money, PayULatam)
2. When the signature check fails, we raise a ValidationError which
   counts as an HTTP 200 for some providers (it's not the case if they
   expect a specific string). (Adyen, Paypal,  Sips, Stripe)
3. If a ValidationError is raised when processing the feedback data, it
   is allowed to bubble up to the provider. (Alipay, Ogone)

The issues are respectively addressed as follows:
1. If the acquirer implements payments with redirection, make sure that
   if either makes a request to the provider to validate the data or
   that it verifies the signature. Verifying the origin of the request
   is not enough: the payload must be checked too.
2. Instead of raising ValidationError's, raise an HTTP 403 FORBIDDEN
   error if the signature check fails.
3. Wrap the call to `_handle_feedback_data` of the webhook method inside
   a try/except clause to catch any ValidationError, log a warning, and
   acknowledge the notification to avoid having the provider disable the
   webhook because of too many failures.

task-2688139
task-2693293

closes odoo/odoo#81607

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Lucie Van Nieuwenhuyze <luvn@odoo.com>
2022-01-27 17:11:52 +00:00
Antoine Vandevenne (anv) ced94b7863 [IMP] payment: add helper methods for testing HTTP requests
Part-of: odoo/odoo#81607
2022-01-27 17:11:51 +00:00
Benjamin Vray 2de0ad7259 [FIX] web_editor: fix popup options displayed after removing a block
Before this commit, after removing a snippet followed by a popup in the
DOM, the popup options were displayed while the popup was closed.
Indeed, selecting the next snippet after one's removal is a feature that
was introduced by [1] but did not consider that the next snippet could
be an invisible one (like a popup).

[1]: https://github.com/odoo/odoo/commit/2cdd95f140b6ec5f3b95ee19bde2f281de21f337

task-2735551

closes odoo/odoo#83512

X-original-commit: cc802d33885700543c753558dc40cc07d971f87f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-01-27 16:17:32 +00:00
Ravi Singhandqsm-odoo ddb2c06be4 [IMP] website: make sharers use the updated URL (like product variants)
Before this commit, when we selected a variant of a product and then
clicked on a share button, the changed variants attributes in the shared
URL were not considered.

This commit also takes the opportunity to convert the whole file to new
Odoo modules and stopped using jQuery. The code actually had to be
refreshed following the merge of [1] so it was a good occasion to do it.

[1]: https://github.com/odoo/odoo/commit/8f7c6997e8ab381563a9fa8d06feef4e89fff4aa

task-2122733

closes odoo/odoo#83503

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-01-27 16:17:28 +00:00
tranngocson1996 42b0799ed3 [FIX] web: fix avatar ratio
In the calendar UI, the avatars ratio has been edited differently with
the original

closes odoo/odoo#83494

X-original-commit: 81875cf0d0b2db5e2b2e0e70178d5ea04bdd509b
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-01-27 16:17:24 +00:00
Yannick Tivisse 8927f28bd6 [FIX] hr_contract: Exclude gaps on first contract date computation
Purpose
=======

This field is used for several things, like the simple holiday pay recovery.

Normally, we expect the HR officers to create a new employee, instead of
unarchiving the old one, but this could happen.

If someone leaves the company, and come back, take the new entry date as
first contract date instead of the original one.

closes odoo/odoo#83493

Taskid: 2745947
X-original-commit: a17c601fffca149a5c4d7be2924fb581ae408299
Related: odoo/enterprise#23790
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-27 16:17:17 +00:00
wan 7008c40a5a [IMP] l10n_au: tax report headings
- Remove "subtotal" amounts from headings.
- Pull GST only and G20 in under purchasing header.
- Remove tag from comparison heading, as it should have no links to audit.
- Add summary section, to make G9 and G20 transfer to 1A / 1B as per ATO
suggested formatting, and to make those figures easier to find on the
report.

closes odoo/odoo#83380

X-original-commit: 1c184391d545298b9b38d4935a6e457ba7674f43
Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-27 16:17:10 +00:00
Didier (did) e0560d3266 [IMP] mail: AttachmentBoxView should own the attachmentList
Before this PR, AttachmentBoxView required a Chatter to have an
AttachmentList. This model is wrong since the attachmentBoxView can direcly own
the AttachmentList.

task-2740183

closes odoo/odoo#83337

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-27 16:17:06 +00:00
Mathieu Duckerts-Antoine 795ccdf923 [IMP] web: remove component ref
OWL-2 is in preparation and will be soon merged. One of the changes it
will bring is that it will be no longer possible to use the directive
t-ref on a tag component. Here we refactor the code in order to remove
two uses of such t-refs.

closes odoo/odoo#81984

Related: odoo/enterprise#23464
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-27 16:16:57 +00:00
Mathieu Duckerts-Antoine afb4959c3e [REF] web: action service: historyBack
OWL-2 is in preparation and will be soon merged. One of the changes it
will bring is that it will be no longer possible to use the directive
t-on on a tag component. Here we refactor the code in order to remove
one use of it in the action service.

Part-of: odoo/odoo#81984
2022-01-27 16:16:56 +00:00
baa 48749bfa0a [IMP] base: with arabic/english invoicing mandatory in UAE and KSA, a font that contains arabic characters is needed
closes odoo/odoo#79664

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-27 16:16:51 +00:00
Adrien Widart fddcfeb3ae [FIX] pos_restaurant: remove useless cleaning
[1] has changed the summary structure of an order. To avoid any issues
during the deployment, we added some instructions to remove the old
summaries. Now, these instructions can be removed.

[1] 911a178c99fe56c5f644083a0bb5e992a11f34ed

closes odoo/odoo#83481

X-original-commit: 1638b3490d8fb44a6b57d6168e5e74e567f0fd50
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-01-27 15:26:51 +00:00
Vincent Larcin 690ac6bfb5 [FIX] resource: use admin timezone for the default working calendar
When creating a new working calendar, its timezone is set to the one of the user creating the record.

However, when first installing the resource app, the timezone of the default working calendar is always UTC regardless of the timezone of the users.

To fix this, this commit sets the timezone of the default working calendar to the timezone of the admin instead.

Task 2744201

closes odoo/odoo#83480

X-original-commit: 2ddddd0253db402542ab6359026888acd61c2464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-01-27 13:04:04 +00:00
stefanorigano (SRI) 3c8576e221 [REF] mail: o_ActivityBox review and simplify scss
Simplify SCSS and use direction-relative margins to handle RTL layouts.
Part of the overall v16 SCSS optimization/restyle (task-2704984).

task-2731819

closes odoo/odoo#83036

Related: odoo/enterprise#23605
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-27 11:07:21 +00:00
stefanorigano (SRI) c1e5fd3acf [IMP] web: .badge, review design
This commit defines an arbitrary `min-width` aiming to achieve a
perfect(ish) circle when a badge contains only one character.
The badge extends as usual when more characters are rendered.

This commit addresses also an issue caused by margins defined globally,
while necessary to handle m2m field only.  

Part of the overall v16 SCSS optimization/restyle (task-2704984).

task-2731819

Part-of: odoo/odoo#83036
2022-01-27 11:07:21 +00:00
Ivan Yelizariev d8262e9051 [IMP] core: commit each populating batch
This prevents memory issues on creating massive amount of records.
For example, on populating `account.move` table,
the process takes 10 time less memory, while execution time per batch is almost the same: ~1 minute.

closes odoo/odoo#82875

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-27 11:07:12 +00:00
xO-Tx 1e4ba0f49a [IMP] web_editor: allow shapes option on gifs
To apply shapes on images, we need to store them (in base64) inside the
shape SVG, but before that, we need to use 'applyModifications()' to get
the dataURL that contains the image with applied filters and size
options...(see ImageOptimize > _writeShape). But since we can't handle
GIFs on applyModifications(), we get a single frame of the animation as
a result...

The goal of this commit is to skip the updates from 'applyModification()'
(when the target is a .GIF) and only apply the shape.

This way, other "data-attributes" options should be disabled for GIFs
and only shapes option is allowed.

task-2679905

closes odoo/odoo#79330

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-01-27 11:07:09 +00:00
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