Commit Graph
160728 Commits
Author SHA1 Message Date
std-odoo abf487fcd7 [FIX] web: properties, close popover with 1 click instead of 2
Purpose
=======
When the focus is inside the label of the property, if we click
outside of the popover we need to click a second time to close the
popover.

Before that code was used to solve a bug where the definition popover
was closed when you select the text inside the property label. It
seems not necessary anymore, and it causes the issue above.

Task-3188915

Part-of: odoo/odoo#119811
2023-05-03 10:11:54 +02:00
std-odoo c706ae6e4f [IMP] web: use the and syntax instead of && for properties
Purpose
=======
Most of the template in web use the `and` syntax instead of `&&`,
use this syntax for consistency.

Task-3188915

Part-of: odoo/odoo#119811
2023-05-03 10:11:53 +02:00
std-odoo 1f80810e39 [IMP] web,crm,project: add an option to hide the "Add a Property" button
Purpose
=======
When this option is enabled, the button to create new properties
is invisible. We create a client action instead, and when the user
executes client action for the first time, the button becomes visible
until the user refreshes the page.

This is useful because most of the time, the user will create the
properties and then won't change them. So this button uses space
unnecessarily in the form view (for the most of the use cases).

Task-3188915

Part-of: odoo/odoo#119811
2023-05-03 10:11:53 +02:00
Marc Durepos c999f1ec14 [FIX] hr_attendance: prevent error caused by pre-fetching non-public employee fields
Fixes a situation where users who are part of the Attendances Officer (or Manager) group but
  without access to private employee data would see the following error when trying to book time
  off.

  `ValueError: Invalid field 'last_check_in' on model 'hr.employee.public'`

  Other instances of the same ValueError were observed by managers trying to approve employee leave
  and employee expenses.

  As per hr/models/hr_employee.py:22-26 fields not available on hr.employee.public should have
  groups='hr.group_hr_user' and this was not the case in hr_attendance.

closes odoo/odoo#120324

X-original-commit: ff4e7d6a414097d000e62825cf43425ea14bd77e
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-03 08:38:13 +02:00
Jonathan 07df81ebe9 [FIX] base_setup, calendar, point_of_sale, stock: update doc URLs
This commit updates the documentation URLs to the current URLs, although
there are already redirect rules in place as fallback.

Related odoo/documentation pull requests:

Calendar:
https://github.com/odoo/documentation/pull/4032
task-3217827

POS
https://github.com/odoo/documentation/pull/4226
task-3284514

Inventory
https://github.com/odoo/documentation/pull/2556

closes odoo/odoo#120345

Related: odoo/enterprise#40623
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2023-05-03 07:20:55 +02:00
Sébastien Theys f9ca72dca9 [REF] mail: move CallSettings code to discuss folder
Part of task-3265211

closes odoo/odoo#120314

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-02 22:26:44 +02:00
Sébastien Theys 197d9a7dc6 [REF] mail: move ChannelMemberList code to discuss folder
Part of task-3265211

Part-of: odoo/odoo#120314
2023-05-02 22:26:43 +02:00
Sébastien Theys a843eb776f [REF] mail: move ChannelInvitation code to discuss folder
Part of task-3265211

Part-of: odoo/odoo#120314
2023-05-02 22:26:43 +02:00
roen-odoo 546ba05e5b [FIX] loyalty: make sure demo user can open pos
Current behavior:
When you try to open the pos as a demo user, you get an error message.

Steps to reproduce:
- Install pos and loyalty modules
- Log in as demo user
- Try to open the pos
- You get an error message

opw-3297341

closes odoo/odoo#120334

X-original-commit: 5f6a1df7eda6909df302bc6cfa3ba02d8a2de3d7
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-05-02 20:01:41 +02:00
can-odoo 044a3cfdb3 [IMP] web_editor: set default values for repeat-pattern background size
Description of the issue/feature this PR addresses:
---

When a user chooses "Repeat Pattern" as the background image position,
nothing happens.

Current behavior before PR:
---

As the background size is set to auto, for background-position
`repeat-pattern` no effect[1] can be seen in the
background size.

[1]: https://bit.ly/3MM31Ac

Desired behavior after PR is merged:
---
Not a bug but can be considered an improvement in features by setting
some default[2] width or height for a repeat-pattern option for all
relevant snippets.

[2]: https://bit.ly/3GbGIBo

task- 2862510

closes odoo/odoo#102995

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-05-02 20:01:39 +02:00
Lucas Lefèvre 91f4b4a2e1 [FIX] spreadsheet_dashboard_account: count individual invoices
In the Invoicing dashboard, the "Average Invoice" scorecoard displays
the wrong amount of invoices. It displays the number of
"account.invoice.report" lines.

This commit fixes the issue by displaying the count_unique measure
of "move_id"

task 3180524

closes odoo/odoo#120322

X-original-commit: 6232896fe06640de6d461e645811673fe27481aa
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-02 19:07:09 +02:00
Adrien Widart (awt) d540767350 [FIX] mrp_account: avoid deleting a BoM in use
Deleting a kit BoM will lead to an error if the kit is in the middle
of a sale process

To reproduce the issue:
1. In Settings, enable UoM
2. Create a product category PC:
   - AVCO
   - Auto
3. Create three storable products P_kit, P_01, P_02
   - UoM of P_01: `m`
   - UoM of P_02: `kg`
4. Create a BoM:
   - Product: P_kit
   - Type: kit
   - Components:
     - 1 x P_01
     - 1 x P_02
5. Create and confirm a SO with 1 x P_kit
6. Force the delivery
7. Delete the BoM
8. Create and confirm the SO's invoice

Error: a traceback appears "ValueError: Expected singleton: uom.uom..."

Because of the configuration, when posting the invoice, we compute
the COGS. During that process, we need the average price of P_kit
https://github.com/odoo/odoo/blob/640907ec1852c4e477957c865549a87d3ae840dd/addons/sale_stock/models/account_move.py#L133
We give to that method the components' SMs. In
`_compute_average_price`, since we don't find a BoM, we will bypass
the mrp override
https://github.com/odoo/odoo/blob/419e42132d9526e9d98c2126158d4f88716d17c4/addons/mrp_account/models/product.py#L48-L50
As a result, it leads to
https://github.com/odoo/odoo/blob/640907ec1852c4e477957c865549a87d3ae840dd/addons/stock_account/models/product.py#L680-L684
Where we will have the candidates of all components (i.e., several
different products). But that method is not designed for such a
situation. This is the reason why, when calling `_consume_all`, it
will fail:
https://github.com/odoo/odoo/blob/858d24a611c4c8af0dcae82a6eb4077e391398ed/addons/stock_account/models/stock_valuation_layer.py#L85
We try to get the rounding of the product, but there are actually
two of them (the two components) -> singleton error

OPW-3218141

closes odoo/odoo#120321

X-original-commit: 980c8380cbd1cad514d96ea682074e3787f10c1a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-05-02 19:07:06 +02:00
Rémi Rahir (rar) afc9593204 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/77c8f5f1 [REL] 16.3.0-alpha.7
https://github.com/odoo/o-spreadsheet/commit/1a2c6bec [FIX] xlsx: force the use of formatAttributes
https://github.com/odoo/o-spreadsheet/commit/2ab92bfa [FIX] xlsx: export computed format
https://github.com/odoo/o-spreadsheet/commit/2e3bb1fb [FIX] xlsx: Always export value of unsupported formulas Task: 3276929
https://github.com/odoo/o-spreadsheet/commit/a5eab554 [REF] import: don't deepcopy imported data
https://github.com/odoo/o-spreadsheet/commit/f6e5d06a [REF] misc: faster zone conversion
https://github.com/odoo/o-spreadsheet/commit/31251cdb [REF] import: don't uselessly import borders
https://github.com/odoo/o-spreadsheet/commit/da4cf9e6 [REF] model: don't copy command payload twice
https://github.com/odoo/o-spreadsheet/commit/9f24f7a8 [REF] misc: avoid regex in `toCartesian`
https://github.com/odoo/o-spreadsheet/commit/2d9534a4 [REF] *: improve regex processing time
https://github.com/odoo/o-spreadsheet/commit/72bdba14 [REF] tokenizer: improve computation time
https://github.com/odoo/o-spreadsheet/commit/1b667755 [REF] helper coordinate: ref lettersToNumber
https://github.com/odoo/o-spreadsheet/commit/9aed9a49 [REF] helper date format: improve performances
https://github.com/odoo/o-spreadsheet/commit/7ad727c0 [FIX] tests: allow es2022
https://github.com/odoo/o-spreadsheet/commit/8181824f [FIX] tests: Use only faketimers in find&replace Task: 3293232
https://github.com/odoo/o-spreadsheet/commit/8fcf6068 [REL] 16.3.0-alpha.6
https://github.com/odoo/o-spreadsheet/commit/27ee983d [IMP] menus: add menu icons Task: 3145722
https://github.com/odoo/o-spreadsheet/commit/0a3e7829 [FIX] tests: Use only faketimers in autofill tests Task: 3293232
https://github.com/odoo/o-spreadsheet/commit/3f1c9b61 [FIX] chart: don't open side panel readonly when double clicking Task: 3293322
https://github.com/odoo/o-spreadsheet/commit/25f2ffc5 [IMP] tsconfig: allow es2022
https://github.com/odoo/o-spreadsheet/commit/7edf96b0 [REV] test: make test tsconfig work in vscode
https://github.com/odoo/o-spreadsheet/commit/752033ee [IMP] spreadsheet: add split to columns feature
https://github.com/odoo/o-spreadsheet/commit/82e0f699 [FIX] demo: fix topbar file menu
https://github.com/odoo/o-spreadsheet/commit/88eaeacc [FIX] components: add ActionButton props schema
https://github.com/odoo/o-spreadsheet/commit/ea19c8bc [IMP] XLSX: export text wrapping
https://github.com/odoo/o-spreadsheet/commit/9d38d1ed [IMP] XLSX: import text wrapping modes
https://github.com/odoo/o-spreadsheet/commit/691e0a47 [FIX] sheet: add allowDispatch on ADD_COLUMNS_ROWS Task: 3272589
https://github.com/odoo/o-spreadsheet/commit/db981f0b [FIX] core: Prevent dispatch of invalid command payloads Task: 3272589
https://github.com/odoo/o-spreadsheet/commit/b395a240 [IMP] tests: speed up menu items tests
https://github.com/odoo/o-spreadsheet/commit/94051d5f [IMP] XLSX: export text vertical alignment
https://github.com/odoo/o-spreadsheet/commit/bc319199 [IMP] Grid: add keyboard shortcuts
https://github.com/odoo/o-spreadsheet/commit/980448dc [FIX] menu: separator for last visible item Task: 3276939
https://github.com/odoo/o-spreadsheet/commit/d376bc5f [IMP] XLSX: import text vertical alignment Task: 3249030
https://github.com/odoo/o-spreadsheet/commit/9b650cd7 [REF] collaborative: move getters to plugins
https://github.com/odoo/o-spreadsheet/commit/07cfb8a6 [FIX] menu: dynamically update visible menu items
https://github.com/odoo/o-spreadsheet/commit/189b7db8 [FIX] header_overlay: select col when there is a single row
https://github.com/odoo/o-spreadsheet/commit/f18f137c [FIX] sheet: prevent deleting all visible columns/rows

closes odoo/odoo#120306

Related: odoo/enterprise#40604
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-02 19:06:57 +02:00
Victor Feyens e20cbfafa6 [CLN] sale_loyalty: python fields definition
* Indentation
* Explicit field attributes
* Double quoted strings for strings shown to users (single quoted ones for the rest)

closes odoo/odoo#120245

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-05-02 18:06:52 +02:00
Victor Feyens 3f51b29f6a [CLN] sale_loyalty: xml & files cleanup
* Files ordering
* Indentation
* Simplified xpath when possible
* Menus in specific file
* Clear file names

Part-of: odoo/odoo#120245
2023-05-02 18:06:52 +02:00
Christophe SimonisandAlvaro Fuentes 6c2a487ef9 [FIX] core: consider x.y.z upgrade scripts as majorless
Also warn about invalid version numbers in upgrade scripts.

closes odoo/odoo#118420

Related: odoo/enterprise#39698
Related: odoo/upgrade#4554
Signed-off-by: Christophe Simonis <chs@odoo.com>
Co-authored-by: Alvaro Fuentes <afu@odoo.com>
2023-05-02 18:06:44 +02:00
Christophe Simonis 653ec8cf60 [IMP] core: enforce format of module versions
As module versions can be single digit, an upgrade script for version
`x.y.z`, is currently parsed as an upgrade script for module
version `z` in Odoo `x.y`.
However 3-digits module versions are more common than single-digit ones
and developers may expect the `x.y.x` upgrade scripts to be major-less
scripts.
This ambiguity can lift off if we accept module versions to be **only**
2-digits or 3-digits. This however make the `x.y.z` upgrade script
major-less. This can be fixed by renaming the script to `x.y.z.0`.

Part-of: odoo/odoo#118420
2023-05-02 18:06:44 +02:00
remi-filament 56d87dc792 [CLA] corporate le-filament
closes odoo/odoo#120284

X-original-commit: 44458824c6a7f8df34074b19a3b8d6fef248863a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-02 15:59:23 +02:00
Asta f9d45393fd [CLA] signature for Qlasta
closes odoo/odoo#120283

X-original-commit: d32c551e386ea2ac5ba7efeca9b70ac7ea6b79a9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-02 15:59:21 +02:00
David Monnom (moda) bed0002f20 [FIX] pos_mercury: Wrong use of popup method
Fixed the popup call. The call was made with the old method showPopup.

The call is now made with the new .add method on the popup service.

closes odoo/odoo#120274

X-original-commit: d174e6cdacfdde6973e4ced931bb7572b6bd0511
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Monnom David (moda) <moda@odoo.com>
2023-05-02 15:59:18 +02:00
tsm-odoo 0c919774ea [FIX] mail: fix non-deterministic message test
Before this PR, the `Updating the parent message of a reply also
updates the visual of the reply` test was failing in a non-deterministic
fashion.

This PR fixes this issue by replacing the `nextTick` by a  specific
`waitUntil` in order to ensure the DOM is properly updated before
asserting.

Fixes 20829 runbot issue.

closes odoo/odoo#120273

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-02 15:59:13 +02:00
Fabien Pinckaers 6d102d4ee4 [IMP] base: better copywriting for 'neutralized'
closes odoo/odoo#120263

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-05-02 15:59:10 +02:00
Pulinckx Pierre (PIPU) 126da95642 [FIX] *: replace %d by %s when using sprintf
*: web, web_editor, payment
Before this commit, templates with %d was given to sprintf but it was not interpreted by the function
After the commit, %d are replaced by %s in templates for sprintf
Also this commit converts a last _.str.sprintf into sprintf

PR#120143

closes odoo/odoo#120143

Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-05-02 15:59:04 +02:00
damr f481475879 [FIX] stock: allow multi-picking validation w/show reception report
Steps to reproduce:
- activate `group_stock_reception_report` in settings
- activate `auto_show_reception_report` for the "Receipts" operation type
- create a receipt w/ any product + confirm
- create a return w/any product + confirm
- select both the receipt + return in the (Operations > Transfers) list
  view > action > Validate

Expected result: both pickings are validated
Actual result: stacktrace due to expected singleton ValueError

enterprise PR : https://github.com/odoo/enterprise/pull/37518
task-3204596

closes odoo/odoo#120190

X-original-commit: b2ac4b2f30e15c4b8a50628798b2fc39d7d43331
Related: odoo/enterprise#40570
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-02 14:47:39 +02:00
Thomas Lefebvre (thle) 6ff0506658 [FIX] website_sale, website_sale_stock: prevent out of stock
Steps to reproduce:
- create a product;
- disable the continue selling option for the out-of-stock;
- do not have a stock quantity for this product.
- go to ecommerce;
- without click on the product, add it in the cart with the cart icon (on the picture).

Issue:
It is possible to add the product to the cart.
If we repeat this several times, we will create quotations.

Solution:
Hide the button if the product is a storable product
and we don't want to sell it if we have no stock.
We also check the quantity available.

opw-3148069

closes odoo/odoo#120176

X-original-commit: bf4b5962c396101f242822058b5ddf815408e3f8
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-05-02 14:47:34 +02:00
Alexandre Kühn 9cfb6fe471 [FIX] mail: no scroll on small chatter
Before this commit, when chatter message list was lower
than 2500px, the message-list had scrollable of 2500px
of height.

This happens because the area detecting present time was
always 2500px. thus making the content have this value as
scrollheight.

This commit fixes the issue by making presence area not
go above the conversation height. So if message list is
250px of height, then presence area is 250px, not 2500px.

closes odoo/odoo#120173

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-02 14:47:31 +02:00
David MonjoieandJinjiu Liu d0e14f6064 [FIX] web_editor: fix ClipboardJS traceback in Firefox 109
Starting with Firefox 109, a widget element prototype that is put
inside an iframe will not be instanceof its original constructor.
See: https://github.com/webcompat/web-bugs/issues/118350

This is because a node that is adopted by an iframe will have its
prototype changed to match the constructor from within the iframe
instead of its original one. This has been the case for a long time.
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1470017

It largely went unnoticed because of another quirk of Firefox related
to the use of instanceof which was fixed in version 109.
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1360715

Since this bug was fixed it became apparent, in the form of a
traceback, that the wrong instance of ClipboardJS was being used
in the case of Firefox, due to the forced prototype change.

This commit could be reverted once Firefox is fixed.

Steps to reproduce the issue in Firefox > 109:
- Create a new mass mailing.
- Choose the third template with "Thank you for joining us!".
- Click on the "LOGIN" button link inside the email.
- Get a traceback about a paremeter not being the right type.

Task-3186513
OPW-3172914

closes odoo/odoo#120171

X-original-commit: c0da01c716716f9d35abe9d90dad27cce1452ebb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Jinjiu Liu <jili@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2023-05-02 14:47:28 +02:00
David Monnom (moda) 439a3b1683 [FIX] point_of_sale: wrong popup import
Fixed incorrect use of the popup add function. Since version saas-16.2,
the first parameter must be the chosen popup component and not the name
of the popup as a string.

closes odoo/odoo#120101

X-original-commit: cba91da208b30b5122af3d76c4e7731555d6e0c8
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-05-02 14:47:26 +02:00
Nicolas Lempereur 994ee129b7 [FIX] sale_management: quotation template+sequence=lessbug
Scenario:

- set a quotation template on a quotation that adds lines ordered with
  a sequence (eg. 3 lines with sequences 10, 11, 12)
- add lines in this quotation
- save

Issue:

The added lines have sequence 10 and the seen order changes.

This is caused by 6f11060d6afd9edce904dd34a2d415a2a2461108 that tries to
mitigate a more rare issue when there is more than one page of lines.

Solution:

Reverting the previous fix, and setting the sequence of the first line
to -99:

- when resequencing the first page, the sequence will be -99 to -60 =>
  records from the second page will not get in the first page

- new lines will be added at the end

Issues still present:

- when resequencing the second page, item from 3 pages get into it (it
  was already the case before 6f11060d6afd9edce904dd34a2d415a2a2461108)

- when adding a new line (without resequencing), it is added at the end
  and not at the beginning of the next page

But those are just behavior in any list view (as is the original issue
of 6f11060d6afd9edce904dd34a2d415a2a2461108, but since it was partially
fixed for a year, this patch try to give an in-between solution instead
of just reverting it).

opw-2833913

closes odoo/odoo#120047

X-original-commit: 621454fac58e6d079ec6dc52795548c3dadea0e5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-05-02 14:47:23 +02:00
qsm-odoo 8b9bd11e13 [FIX] website: restore wrongly upgraded countdown snippets
With the BS5 upgrade script of 16.0, countdowns' data-display may have
been converted to data-bs-display by mistake. This will fix the DOM at
page load for good measures, maybe even allowing to remove this code in
a few years as hopefully all current countdowns will have been removed
or edited (or when a proper upgrade script in a future version of Odoo
will be made, if necessary).

opw-3240041
opw-3240532
opw-3258751
opw-3272731

closes odoo/odoo#119767

X-original-commit: ce506f32e3471eea1785312d4140417eba0ce355
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-05-02 14:47:13 +02:00
Pablo Montenegro 4ff9458dc7 [FIX] l10n_latam_check: prevent selecting checks on payments belonging to other company
Task: 30336

Description of the issue/feature this PR addresses:
In a payment when selecting checks it is allowed to select checks belonging to different companies but it is necessary to allow only to select companies from the same company (the company of the payment).

Current behavior before PR:
In a payment when selecting checks it is allowed to select checks belonging to different companies.

Desired behavior after PR is merged:
In a payment not allow to select checks belonging to different companies

closes odoo/odoo#119755

X-original-commit: 6d6e385a37fa23597bc58a0e14cfcf08df13d57a
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-05-02 14:47:10 +02:00
william-andre 209e2ebb04 [FIX] account: compute of the name issue when no tax
When posting a move without any taxes, and hashing in version 3,
as in the test `test_account_move_hash_versioning_3`,
there was a case when the move could have its name changed after
posting, and so, after hashing.

The issue came from the order of computation of the name, as
we gave the name in the values when we shouldn't.

closes odoo/odoo#115222

Related: odoo/enterprise#38163
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-02 14:47:02 +02:00
gawa-odoo 15b2c690e1 [IMP] account, l10n_ar: do not put default product taxes on aml
If there are no default taxes on product or account, or
predictive guess, there should be no default taxes on a new aml.
So the `account_sale_tax_id` (and `account_purchase_tax_id`)
field only concern new products (as specified in the tooltip
of the field).

In Argentina, there is a constraint so all lines should have
a tax. So, we need to add default tax on their demo products.
We also add it to the products in account demo to have taxes
by default on demo invoices for all localizations.

task-3045026

Part-of: odoo/odoo#115222
2023-05-02 14:47:02 +02:00
PNO 7afd929433 [FIX] stock_account: _should_be_valued doesn't return bool
_should_be_valued should always return a bool.
Currently, when it's False, it returns False. However, when it's True, it returns self.company_id.
After this fix, it returns True instead of self.company_id.

closes odoo/odoo#120182

X-original-commit: 44430635936dd33b291d9d8514cef9b0013507e5
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-02 13:41:46 +02:00
FrancoisGe d0bb3554c1 [FIX] web: fix advanced search comparison test
This commit adds a patchDate to the "Several date filters and a comparison"
test. The patchDate will allow the date to be fixed and prevent the test
from being invalidated when the month changes in the real world.

closes odoo/odoo#120231

Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-05-02 11:22:17 +02:00
Moises Lopez - https://www.vauxoo.com/ d08043ea73 [FIX] requirements.txt: unpin pytz
On Debian based systems, the `tzdata` package is maintained to reflect changes
in timezones and there is no need to upgrade the `python3-tz` package.
On the other hand, for those who are using `pip` and thus our `requirements.txt`,
the package needs to be up to date. By unpinning it in the requirements.txt:

- new installations based on pip will be up to date
- older installations based on pip can easily upgrade
- debian based installations have to maintain the tzdata package
- mixed installs like on runbot will rely on Debian tzdata

closes odoo/odoo#117527

closes odoo/odoo#120155

closes odoo/odoo#120205

X-original-commit: bb0fe71388c04cf26884eba89d2e0d9d0c00a185
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-04-30 11:56:41 +02:00
Géry Debongnie 425f0fc115 [IMP] web: update owl from 2.1.2 to 2.1.3
Commits:

[FIX] components: properly differentiate t-call subcomponents
[REF] devtools: Better messages forwarding
[FIX] devtools: Fix app methods patching
[DOC] Fix a code bug in the example of slots

See https://github.com/odoo/owl/releases/tag/v2.1.3

closes odoo/odoo#120196

X-original-commit: c44d944192fb583aa3fdfa43a5b175c90907525d
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-29 14:10:08 +02:00
Xavier ALT 513df115b1 [FIX] website: consider menu active even if extra qs found in URL
Commit [1] made sure that to be considered active, the current page URL
should have the same query strings as the ones defined in the menu URL
(if any).
But it was not fully accurate as extra query strings on the page URL
would make the menu not active even if the menu URL query strings would
be found in the visited page URL.

With this commit, when trying to determine if a website.menu is active,
we only take into account the subset of menu's query arguments.

For ex, a menu with an url of `/my-page?country=BE` should be
considered active if the request url is:
`/my-page?country=BE&utm_source=marketing-campaign&utm_medium=email`

[1]: https://github.com/odoo/odoo/commit/065ca15

closes odoo/odoo#120188

X-original-commit: bc1f2c092122e171950348c3e32438e8b862f231
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-04-28 21:33:30 +02:00
Brice bib Bartoletti 24ce0949f4 [IMP] account: add activities views
This commit is adding the activity views and columns to a lot of the basic
accounting views.

closes odoo/odoo#120140

Task-id: none
Related: odoo/enterprise#40554
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-28 21:33:28 +02:00
Mathieu Walravens 1d87710fdc [FIX] http: rewind file upload on serialization failure
Before this commit:
When uploading a file, if the transaction fails due to a serialization
failure, Odoo will retry the request. However, if a file upload is read
during the transaction, the file pointer will be at the end of the file,
and calling `.read()` again returns an empty bytes object.

After this commit:
Upon retrying the request, rewind uploads to the beginning of the file,
if the file supports it.

opw-3228200

closes odoo/odoo#120180

X-original-commit: ac59ef0668122ad71dffbb5575250c767a0a56ec
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-04-28 20:29:55 +02:00
Hubert Van de Walle (huvw) a3a1043e22 [FIX] web: use the correct inputmode for fields
Steps to reproduce
==================

- Use an IOS device
- Open a view with a float field
- Try to edit it

The virtual keyboard displayed is missing a dot, so you can only input
integers

Cause of the issue
==================

For fields that should accept a float value, the inputmode attribute
should be decimal.
Also, specifically on IOS, even with the inputmode set to decimal, it
isn't possible to enter a negative value.

> decimal:
> Fractional numeric input keyboard containing the digits and decimal separator
> Devices may or may not show a minus key (-)

Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode

Solution
========

For IOS, remove the inputmode attribute so that the default keyboard
shows. For other devices, use the decimal/numeric value depending on
whether a float should be accepted.

opw-3269275

closes odoo/odoo#120129

X-original-commit: fb37550715034e7a1fbe751889cd8ea2bd6e4128
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-28 17:23:06 +02:00
Maryam Kia cd6f3e6373 [FIX] mail: sudo on message in link preview controller
closes odoo/odoo#120116

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-28 17:23:03 +02:00
Kevin Baptiste 2717c41eb4 [FIX] hr_holidays: check allocation status
opw-3289147

closes odoo/odoo#120082

X-original-commit: 3fb278caabfb5dc5f92d79e2fb3aee9433bf0d94
Related: odoo/enterprise#40508
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-28 17:22:58 +02:00
Ivan Yelizariev 9c81dfc491 [FIX] website_sale: clean RTL mess with Comparison Price feature
Odoo 16 has new feature *Comparison Price*. It allows to show striked price
after the main price. E.g. `$555 -$666-`.

It doesn't work well however on using RTL languages because of *Unicode
Bidirectional Algorithm*. For example, in Egyptian localizations it shows some
mess of striked and not striked characters: `LE -LE-666- 555`. The correct
display should be `-LE-666- LE 555`. (Examples are even more complicated with
symbol E£ that is currently used by default for EGP).

As a solution, use `<bdi>` element to isolate stiked value. Also we have to use attribute
`dir="inherit"` to avoid changing direction for currencies that use LTR
characters, otherwise the result would be `-666-LE- LE 555`.

STEPS:

- Go to settings > website: Activate *Comparison Price*
- Go to Sales > Pricelist: add extra pricelists with EGP currency and mark it
as **Selectable**
- Go to Setting > Languages: activate the Arabic language and add it to the website.
- Go to the product form: add **Compare to Price**
- Go to the website > products, select pricelist EGP

opw-3188129
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi

closes odoo/odoo#120102

X-original-commit: 26b2c5caa8c339ca6b341de317ae289b0d201b01
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-04-28 16:04:46 +02:00
svs-odoo e675a1e59f [FIX] mail: mail activity deterministic order
Adds `id` in the `mail.activity`'s order to force deterministic order in
case multiple activities have the same deadline.

Not having a deterministic order can cause issue when tests check
activities' values but don't ensure they are sorted also by id.

closes odoo/odoo#120034

X-original-commit: b0a99bde8efef287f3ed89afb9da2a67233d4bd8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-28 16:04:38 +02:00
Mathieu (mano) 3e683cc716 [IMP] web_editor, website: add minor design improvements to the editor
This commit gives a small refresh to the web_editor UI. To do so we
remove the borders from the buttons and inputs. We also increase the
border radius to 4px instead of 2px. The nested menus such as in Themes
tab now have the same  background color than the rest of the UI.

The box shadows on the `we-title`, `we-customize-block-options` and the
checkbox switch have been removed.

All the buttons and select components are now taking the full available
width. The inputs fields remain unchanged except their font which is now
set to sans-serif.

Finally a `<div>` have been added to the replace media snippet to make
it consistent with the other buttons having an icon. Maybe in the future
we'll need a better way to define those.

task-3265187

closes odoo/odoo#119697

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-28 16:04:35 +02:00
Benjamin Vray 33b86b26e3 [FIX] web_editor: fix resizing and padding options of snippets
Since this commit [1], the resizing and padding options of snippets are
not functioning properly in the website's edit mode.

For example, if a user wants to increase the width of a column to the
right, nothing happens. The user must first reduce the column by moving
to the left with the mouse before being able to increase it to the
right. The same problem occurs when attempting to adjust the padding
using the handle buttons.

This issue was caused by a numeric value ('key') being changed to a
string.

[1]: https://github.com/odoo/odoo/commit/800223ae7c5891bf700d45eb6d5f541093dc273c

task-3289164

closes odoo/odoo#119681

Signed-off-by: loco-odoo <loco@odoo.com>
2023-04-28 16:04:33 +02:00
Rémy Voet (ryv) 302c7baa87 [REM] core,*: remove name_get_uid parameter from _name_search.
`name_get_uid` is unused (at least since v14) and the
documentation about it, is wrong.

closes odoo/odoo#117819

Related: odoo/enterprise#39483
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-04-28 16:04:27 +02:00
Kartik Chavda 270c4732f4 [REF] {hr,sale}_timesheet: refactor timesheet form view
Before this commit timesheet community and enterprise form view
where different from each other because of that if we want to
change something in timesheet form we have to do change in both
view and sometimes it is hard to keep track of both view.

This commit use single form view in both community and enterprise
so it'll easier to change something in timesheet form view and
it'll remove some technical debt.

task-3255754

closes odoo/odoo#117748

Related: odoo/enterprise#39343
Related: odoo/upgrade#4520
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-28 16:04:22 +02:00
Julien Alardot (jual) 272a1b9a69 [IMP] l10n_se: Update taxes and accounts
- Switch the taxes and account names to english by default
- Changes the tax names to match new taxonomy
- Account changes following 2023 BAS update
   ° Add 2024 accounts
   ° Remove 2015 accounts
   ° Several changes in names as codes

Task-3052677
Task-3122530

closes odoo/odoo#117445

Related: odoo/enterprise#39186
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-04-28 16:04:16 +02:00