Commit Graph
158599 Commits
Author SHA1 Message Date
william-andre e41f2f720d [REF] account: merge repartition lines m2o field
Part-of: odoo/odoo#110016
2023-02-17 19:30:39 +01:00
william-andre a4527062cb [FIX] l10n_tr: make chart template visible
The field seems to have been ignored when merging templates in
1b0fdb8471

Part-of: odoo/odoo#110016
2023-02-17 19:30:38 +01:00
william-andre 2fefea1eb0 [FIX] l10n_be: do not search for account when it already exists
Moreover, it was searching for a template and not an account, not really
useful...

Part-of: odoo/odoo#110016
2023-02-17 19:30:38 +01:00
william-andre 2d6719cdd8 [FIX] l10n_ro: remove parents from account groups
The parents are computed automatically.
This configuration causes a recursion error, during the computation of
the parent path, if we delay the automation of the parents computation.

Part-of: odoo/odoo#110016
2023-02-17 19:30:38 +01:00
william-andre 98a40889ea [FIX] l10n_{dk,dz,id,ie}: add default tax group
Part-of: odoo/odoo#110016
2023-02-17 19:30:38 +01:00
william-andre b46d2cd609 [IMP] l10n_{dz,ma,ph}: add demo company
Part-of: odoo/odoo#110016
2023-02-17 19:30:37 +01:00
william-andre 88de6c41ee [MOV] l10n_in{,_tcs_tds}: merge modules
Part-of: odoo/odoo#110016
2023-02-17 19:30:37 +01:00
Merel Geens (mege) b2e421bff2 [FIX] sale_loyalty: round real points for coupon
`_get_real_points_for_coupon` subtracts several floats which can result
in rounding errors when a comparison is made in `action_confirm` that
checks if the result is smaller than 0. If the result is something like
-1 * 10^-14, Odoo will tell the user the coupon is invalid, which is
false. To prevent this from happening, we round according to the
associated currency of the points.

opw-3120442

closes odoo/odoo#112995

X-original-commit: 59c43f5cc460f311388540558e0fb0731b02cbc2
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-02-17 16:45:15 +01:00
Florent de LabarreandJohn Laterre 50cf4a75ce [FIX] account: prevent wrong hash result
In case of the user have no access to all account.move, the hash result can be wrong.

Before this PR a user with limited access can print this report.

closes odoo/odoo#112970

X-original-commit: 8263b210ea980539941ce10f5c102c9056959b72
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Co-authored-by: John Laterre (jol) <jol@odoo.com>
2023-02-17 14:09:54 +01:00
niyasraphy e6c77e54d9 [FIX] stock: allow cancelling picking with no move lines
before this commit, trying to cancel a picking with no move lines, will not move the picking to the cancel state.

* create a new picking
* keep move lines empty
* click on the cancel button
* picking will remain in the draft state

after this commit, on cancelling a picking with empty lines, will move the picking to the cancel state.

closes odoo/odoo#112784

X-original-commit: fefd9402142e9a1f28a2b04b8df96d8fb73d441d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-02-17 14:09:51 +01:00
Anita (anko) e5c187ade8 [IMP] payment(_paypal): UX and payment flow improvements
UX was lacking comparing to other payment providers,
important fields were not always shown or were checkboxes
when they should be automatically true.

In order to make payment flow easier and more intitive, unnecessary fields
were removed, email is automatically filled. Now when user cancels transaction
on paypal before paying, it automatically cancels transaction on Odoo. Additionaly, quick
onboarding is only available if user already has paypal account and Stripe
no longer installs ond configures paypal if Stripe's onboarding get canceled.

task-2854184

closes odoo/odoo#104974

Related: odoo/upgrade#4025
Related: odoo/documentation#3063
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-02-17 14:09:43 +01:00
Julien Van Roy 5a5a00a352 [FIX] account_edi_ubl_cii: fix for NZ partners - GLN instead of vat
For the A-NZ UBL 1.0.8 format, when selecting NZ partners, the elements
in `/cac:Party/cbc:EndpointID` and
`/cac:Party/cac:PartyLegalEntity/cbc:CompanyID` should be the GLN: the
Global Location Number (the corresponding EAS is 0088). The GLN is the
`company_registry` for NZ partners.

Before this fix, the VAT was filled for both elements and it raised a
"GLN must have a valid format according to GS1 rules." error on Ecosio.

closes odoo/odoo#112983

X-original-commit: 2e2ff2813de8b5c1f272eb84319170e07d19154e
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-02-17 13:06:59 +01:00
Benoit Sociasandqsm-odoo 85c0f12c88 [FIX] web_editor: make empty we-select visible
When a `we-select` has no elements, it is drawn as a flat line.

This commit puts a "/" in its toggler content. This character is the
same one as the one that is displayed if the selected value is not one
of the available values.

Steps to reproduce:
- Delete all `website.snippet.filter`
- In debug mode, drop a "Dynamic Snippet" in a website page
- Select it
=> The "Filter" option was displayed as a flat line.

opw-3166634

closes odoo/odoo#112932

X-original-commit: dc6ff20386567abbabcb2d35388a3dc8995cab28
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-02-17 13:06:56 +01:00
Horacio Tellez 0f2de18849 [IMP] payment: only give access to tokens when required by the flow
Until this point the access to tokens was somehow arbitrary and
illogical.
After this commit we will uniformize the tokens access rule where by
default an user can only access its own tokens by default and in
function of the use case then relax the rules.

Task - 2832561

closes odoo/odoo#104808

Related: odoo/enterprise#33541
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-02-17 13:06:53 +01:00
Fernanda Hernández d75339f1d3 [FIX] payment_authorize: use name to send values when partner is a company
Currently, the name's fields to send to Authorize when the partner is a company are:

* firstName
* lastName

if we consider following name `Company Duck Inc`:

the code is sending:

* firstName: ''
* lastName: 'Duck'

Only it sends the `lastName` with the second word found in the name,
due to the new validations in Authorize.Net, this kind of transactions
are marked as suspicious and it's not confirming the transactions, leave them
as pending, this commit is sending the full name in `lastName`
instead of only second word to meet with the validation in Authorize.Net

Also, we are sending the fields `firstName` and  `lastName`, with the
maximum length allowed by Authorize.

closes odoo/odoo#112977

X-original-commit: 77d83b327fd99ed090194ec0d3a771c9afc47115
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-02-17 12:07:56 +01:00
Rémi Rahir (rar) 829329ab84 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/1b667256 [IMP] format: set decimal change on each cell of zone
https://github.com/odoo/o-spreadsheet/commit/f9766810 [FIX] Top_bar: topbar dropdown z-index
https://github.com/odoo/o-spreadsheet/commit/73819bd5 [IMP] Toolbar: make font size selector editable
https://github.com/odoo/o-spreadsheet/commit/db50da0d [FIX] scorecard: rendering issue while resizing
https://github.com/odoo/o-spreadsheet/commit/fdd0ca6c [FIX] topbar: colorPicker maximum height props
https://github.com/odoo/o-spreadsheet/commit/25fd9bbe [FIX] top_bar: auto selecting adjacent cells for filter
https://github.com/odoo/o-spreadsheet/commit/079bf8d5 [FIX] top_bar: respond menu upon scaling viewport
https://github.com/odoo/o-spreadsheet/commit/74b2b2eb [IMP] parser: improve parenthesis error messages
https://github.com/odoo/o-spreadsheet/commit/43dd7222 [REF] parser: rename unknown to empty AST node
https://github.com/odoo/o-spreadsheet/commit/b3895766 [REF] parse: remove binding power
https://github.com/odoo/o-spreadsheet/commit/42594be1 [FIX] bottom_bar_statistic: close context menu on change
https://github.com/odoo/o-spreadsheet/commit/ed572ee5 [FIX] chart: add dimensions to canvas
https://github.com/odoo/o-spreadsheet/commit/6609e980 [REF/IMP] tests: mount owl App in test mode and mount components in helper
https://github.com/odoo/o-spreadsheet/commit/80a0b53d [FIX] Edition: Reference loop should not alter sheetname of the reference
https://github.com/odoo/o-spreadsheet/commit/378af542 [FIX] FigureContainer: Do not update figure when not dragged

closes odoo/odoo#112972

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-02-17 12:07:53 +01:00
lejeune quentin ab57a7fef4 [FIX] hw_drivers: Certificate checked before start nginx
Currently we verify the SSL certificate of the iot after starting the nginx web server.

So for the Windows iot if a new certificate is downloaded it will only be loaded by nginx
on the next restart of the iot because the process that runs nginx is a child of the one that runs the iot

With this commit we restart the windows iot if a new certificate is uploaded

closes odoo/odoo#112945

X-original-commit: 880afb3006ece93ee6575c977233bfb61081bf3a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-02-17 12:07:48 +01:00
Yaroslav Soroko (yaso) fc9eb4691e [IMP] Added helpers to download and unzip files
This commit adds "download_from_url" and "unzip_file" functions to
helpers.py
These allow to downloaad files and unzip them from Python and let us
remove the bash scripts we were previously using for the same purpose.
More specifically this allows the same code to be used on Linux and
Windows IoT to download and unzip files

closes odoo/odoo#112942

X-original-commit: 01aad66d5bde13ced704dfc5226f271da185887a
Related: odoo/enterprise#37205
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-02-17 12:07:45 +01:00
lejeune quentin ac839d337e [ADD] hw_*: Add python modules for using Samba
For the use of driver using the Samba share file we need the modules
PySmbClient==0.1.5
cryptocode==0.1

closes odoo/odoo#112940

X-original-commit: 38f8cf92c05ebea2714d513f1916ef581b0d9c73
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-02-17 12:07:39 +01:00
Alexandre Kühn 9ee7bdaec5 [FIX] im_livechat: translate livechat button text per user language
Before this commit, the livechat button text was not considering
the language of the user for translation. The translation must
not be loaded at field initialization, but when the value is
accessed e.g. from a livechat visitor.

closes odoo/odoo#112936

X-original-commit: 48dbf94068e09d831e4bf262b70b11adaade4b57
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-02-17 12:07:34 +01:00
Bruno Boi 30950f83b9 [IMP] web, mass_mailing: introduce useThrottleForAnimation hook
Before this commit
Many of the usages of the "throttleForAnimation" util did not
cancel the call to the throttled function when the using
component is unmounted.

After this commit
A "useThrottleForAnimation" hook:
- is introduced
- is tested (as of the prior "useDebounced" hook which was not)
- replace the "throttleForAnimation" usages.

closes odoo/odoo#112913

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-17 12:07:25 +01:00
Bruno Boi 2eaedb4b8d [REF] web: sort by ASC order core/utils/timing
Part-of: odoo/odoo#112913
2023-02-17 12:07:25 +01:00
Bruno Boi db4ec2ba2f [REM] web, web_editor: remove throttle function
This function is deprecated as its behaviour is closer to "debounce".
Furthermore, it is not covered by any tests.

Only one usage has been found in the code base:
- the VideoSelector component from web_editor

This usage has been replaced by the "debounce" timing utility,
which is appropriate considering what the code tries to do.

Part-of: odoo/odoo#112913
2023-02-17 12:07:25 +01:00
Odoo's Mergebot 9169ba9e4b [IMP] web: add "crop" overlay in barcode scanner
The commit restores a similar crop overlay like in the Odoo Android Mobile App for the Barcode scanner.

This feature helps to scan the right barcode when the user scans a barcode surrounded by other barcode, which before this commit a barcode was scanned but in some cases not the good one. The commit solves the problem by returning only the values into the rectangle overlay.

Also in this PR we upgrade:
* the lib to the latest version 0.19
* improve the code readability by splitting big files
* add some missing return values in the ZXing wrapper

closes odoo/odoo#112855

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-02-17 12:07:21 +01:00
Romeo Fragomeli dabd469c68 [REF] web: avoid async Promise
The executor function can also be an async function. However, this is
usually a mistake, for a few reasons:
* If an async executor function throws an error, the error will be lost
 and won’t cause the newly-constructed Promise to reject. This could
 make it difficult to debug and handle some errors.
* If a Promise executor function is using await, this is usually a sign
 that it is not actually necessary to use the new Promise constructor,
 or the scope of the new Promise constructor can be reduced.

Ref:
https://eslint.org/docs/latest/rules/no-async-promise-executor

Part-of: odoo/odoo#112855
2023-02-17 12:07:21 +01:00
Romeo Fragomeli 3693b9431b [IMP] web: add support for crop area for ZXingBarcodeDetector
As the lib ZXing barcode don't support scanning multiples barcodes at
once we have to find another way to match only the barcode into the
rectangle overlay.

Note:
Actually the barcode scanner have two ways to filter the barcode in the
rectangle overlay:
* native BarcodeDetector API -> we filter the barcode results by
 filtering the coordinate of the detected barcode (boundingBox)
* ZXing (lib) wrapper -> the lib scans only the cropped area from the
 source image (Camera)

Refs:
https://github.com/zxing-js/library/issues/346
https://developer.mozilla.org/en-US/docs/Web/API/BarcodeDetector/detect#return_value

Part-of: odoo/odoo#112855
2023-02-17 12:07:20 +01:00
Romeo Fragomeli f9fd098f18 [IMP] web: add "crop" overlay in barcode scanner
The commit restores a similar crop overlay like in the Odoo Android
Mobile App for the Barcode scanner.

This feature helps to scan the right barcode when the user scans a
barcode surrounded by other barcode, which before this commit a barcode
was scanned but in some cases not the good one. The commit solves the
problem by returning only the values into the rectangle overlay.

Part-of: odoo/odoo#112855
2023-02-17 12:07:20 +01:00
Romeo Fragomeli 5d211327c1 [IMP] web: ZXingBarcodeDetector support corner points
Adds to the ZXingBarcodeDetector the missing data into the return values
of detect method.

Note: ZXingBarcodeDetector is a wrapper that implements the interface of
the native BarcodeDetector

> * boundingBox: A DOMRectReadOnly, which returns the dimensions of a
> rectangle representing the extent of a detected barcode, aligned with
> the image.
> * cornerPoints: The x and y co-ordinates of the four corner points of
> the detected barcode relative to the image, starting with the top left
> and working clockwise. This may not be square due to perspective
> distortions within the image.

Ref:
https://developer.mozilla.org/en-US/docs/Web/API/BarcodeDetector

Part-of: odoo/odoo#112855
2023-02-17 12:07:20 +01:00
Romeo Fragomeli 2cf9a8a479 [REF] web: extract ZXingBarcodeDetector into dedicated file
Part-of: odoo/odoo#112855
2023-02-17 12:07:20 +01:00
Romeo Fragomeli 79a87e854c [IMP] web: upgrade ZXing.js to version v0.19.2
Part-of: odoo/odoo#112855
2023-02-17 12:07:19 +01:00
Rémy Voet (ryv) ba565758c6 [REM] core: remove deprecated methods of models.py
closes odoo/odoo#112817

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2023-02-17 12:07:14 +01:00
Rémy Voet (ryv) 5c413c43e2 [REM] core: remove deprecated method of sql_db.py
Part-of: odoo/odoo#112817
2023-02-17 12:07:14 +01:00
pedrambiria b855cbfbab [FIX] point_of_sale: reset NumberBuffer after scanning a barcode
Before this commit: if you scan a barcode to add a product and then
change its quantity, it will use previos `NumberBuffer` that have
been used before.

The solution is to reset the `NumberBuffer` after scanning a barcode.

opw-3170518

closes odoo/odoo#112765

X-original-commit: 1100b518f54c0b8cf29a312e768c1494635059a6
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-02-17 12:07:10 +01:00
Rémy Voet (ryv) 529a363519 [REM] core: remove useless return value from Field.write.
According to the method documentation, `Field.write` should return
the subset of record actually write.
But it is not respected at every return, it is not used at all and it generated extra completixy for nothing.

Then remove every return values.

closes odoo/odoo#111108

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-02-17 12:07:08 +01:00
Rémy Voet (ryv) 90b6334aca [REM] core: simplify _update of _RelationalMulti
The `_update` of `_RelationalMulti` return a bool but the
others `_update` methods doesn't return anything.
It is actually not used. Also, the `_update` is always called with
a recordset as `value`, then the first part of the method is useless.

Part-of: odoo/odoo#111108
2023-02-17 12:07:07 +01:00
Rémy Voet (ryv) b998d9a5de [REM] base: remove useless _remove_inverses of Many2oneReference
The `_remove_inverses` method of `Many2oneReference` class
has been unused since its introduction. Remove it.

Part-of: odoo/odoo#111108
2023-02-17 12:07:07 +01:00
Rémy Voet (ryv) 79a46cffb8 [REM] core: remove small deadcode from Selection field
`convert_to_cache` of the `Selection` field type, check that the
column_type is 'int4'. But nowadays (since
a0e05e2ab9), a `Selection` field can
only be a Varchar type.

Part-of: odoo/odoo#111108
2023-02-17 12:07:07 +01:00
Rémy Voet (ryv) 22b0c88958 [REM] core: remove unused null method on Field class
This method was unused since 8bc7d8565c.

Part-of: odoo/odoo#111108
2023-02-17 12:07:06 +01:00
Guillaume (gdi) cf1a8f34b1 [IMP] web_editor: scroll to new element of we-list
This commit improves the ListUserValueWidget to scoll to the new element
when the user adds a new element.

task-2601533

closes odoo/odoo#81241

Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
2023-02-17 12:07:02 +01:00
Guillaume (gdi) 0263ec8cc8 [IMP] website, website_sale, web_editor: set step on numeric inputs
Changing numeric values using the keyboard arrows did not work on some
fields. This commit solves this problem by adding the necessary
attributes to the numeric (we-)inputs.

task-2601533

Part-of: odoo/odoo#81241
2023-02-17 12:07:01 +01:00
Guillaume (gdi) e40a91cd4c [IMP] web_editor: hide arrows for all input
This commit removes the arrows that are in the numeric inputs of the
editor.

task-2601533

Part-of: odoo/odoo#81241
2023-02-17 12:07:01 +01:00
Guillaume (gdi) 19eb708c78 [IMP] website: improve events on we-matrix
This commit improves the handling of events on the editor's we-matrix.
The fields that make up the list trigger a preview at each input and the
user can navigate through the matrix with the keyboard.

task-2601533

Part-of: odoo/odoo#81241
2023-02-17 12:07:01 +01:00
Guillaume (gdi) 9e9031a943 [IMP] web_editor, website: improve the behavior of we-list
This commit improves the handling of events on the editor's lists. The
fields that make up the list can trigger a preview and it is possible to
switch from one field to another using the keyboard. Note that the
social media we-list must render at each blur of one of its inputs, so
this we-list does not allow to switch from one input to another with the
keyboard.

As the we-list events changed, the social media block tests had to be
slightly modified to take these changes into account.

task-2601533

Part-of: odoo/odoo#81241
2023-02-17 12:07:00 +01:00
pedrambiria 60845c8d73 [FIX] microsoft_calendar: prevent spamming after syncing the 2nd user
Before this commit: If the Odoo database is shared amongst multiple
users, and another user wants to sync their Outlook calendar with Odoo
Calendar, Outlook will again pull the existing Odoo Calendar events
during the sync and treat them as new events, causing Outlook to send
email invitations to all event attendees.

Steps to reproduce the issue:
 1. Create two users in Odoo
 2. Create two outlook accounts
 3. Change the email of Odoo's users to the same as the outlook accounts
 4. Create some shared events with the second user on the first
    outlook calendar and vice versa
 5. Sync the first user's calendar with Outlook
 6. When the events are fetched to the Odoo, sync the second user
   => emails send to the attendees

The solution is to exclude synced events from the first synchronization.

opw-2929673

closes odoo/odoo#112931

X-original-commit: 86862f2527341247b75df155de16b09d44a7eee6
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-02-17 11:01:42 +01:00
Jordan D. (Joda)andFlorian Charlier 1d8691eb4a [FIX] survey: fix validation on conditional question
What are the steps to reproduce your issue?
1/ Setup
* Create a survey with single select multi choice question
* Create a 2nd question which is also a single-select multi-choice
 question, which appears based on the answer selected for 1st question.
* Create a 3rd question which is a text question which is visible based
 on the answer to question 2.
* All 3 questions are mandatory

2/ Take the survey
* Answer 1st question in a way the 2nd question appears
* Answer 2nd question in a way 3rd one appears
* Change the answer the 1st question in a way 2nd question should not
 appear.

3/ Submit the survey

What is the current behavior that you observe?
Odoo will not allow to submit the survey as it will require an answer
for the 2nd question, even though it should not appear.

What would be your expected behavior in this case?
to be able to submit the survey.

A test tour is added to enforce this logic.

opw-3087514
Task-2987929

closes odoo/odoo#112856

X-original-commit: edb0187ee1ec2c45b7059a2a009a1a361e8ae2cb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Florian Charlier <flch@odoo.com>
2023-02-17 09:50:53 +01:00
Mahamadasif Ansari 81bb575598 [IMP] website_event_booth_*: propagate fields and redirect the page to the cart
{sale, exhibitor, sale_exhibitor}

Specification:
- Currently, when a user books an event, it redirects to the checkout page;
  however, if the user already has some items in their cart, they will appear
  at the checkout; if they need to remove them, they must go to the cart page.
  It's better to redirect users to the cart page rather than the checkout page.
- When a user enters the booth registration value, it fills the fields name,
  email, phone, and mobile, but when the user enters the address of the
  order, the same fields are filled by the user, so it is preferred that the
  fields value entered in booth registration appears in the address of the
  order as well.

This commit done following changes:
- Redirect the review order instead of the checkout order when booking
  the event booth.
- By adding the partner to the order, it can propagate the values of the
  fields name, phone, and email.
- When a partner is created in the website event booth, the email address is
  stored in the name. This commit passes the name and email instead of the
  email address so that the partner can be stored with the name.
- If the contact does not have a name or phone number, it will set the
  sponsor's name or phone number as the contact.
- Adaptations to the tour to accommodate the above changes

task-3098295

closes odoo/odoo#112525

X-original-commit: ca2bac512000674d1ee55ed3151bbdace2311234
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-02-17 09:50:50 +01:00
tsm-odoo d6589641cf [FIX] bus: shared-worker failing to start on incognito
Before this PR, the bus service's `SharedWorker` sometimes failed
 to initialized with data url. This error only occurred on some devices,
 on chrome and in incognito mode.

 While the specifications specify that `SharedWorker` constructor should
 handle data url properly [1], there is no way to tell whether or not the
 user browser supports it.

 This commit solves this issue by introducing a fallback on simple `Worker`s
 since they seem to handle data url correctly in this case [2].

[1] https://html.spec.whatwg.org/multipage/workers.html#dom-worker
[2] https://chromium.googlesource.com/chromium/src.git/+/9801daec162285a1f2c6695682ace5d508ea9b7f

opw-3146671

closes odoo/odoo#112921

X-original-commit: 99ac9538d6ba49161be37318fca541c7e51603f9
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-02-17 08:12:26 +01:00
Nshimiyimana Séna d91070936d [FIX] account: remove references to session.company_currency_id
Currently, there are a few references to a variable called
`session.company_currency_id`. This variable used to be defined in the
`web_dashboard`, a module that no longer exists.

https://github.com/odoo/enterprise/blob/3d351aa3f8e4943df81bc09640ae16380e9a89f7/web_dashboard/models/ir_http.py#L14 (v15.3)

This commit removes all references to `session.company_currency_id` in
the `account` module.

opw-3033656

closes odoo/odoo#112941

X-original-commit: aa0db63ecf8e6903ef3e664d8b22b00bf51ca1f2
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-02-17 01:52:44 +01:00
Xavier BOL (xbo) 1c3448ba70 [FIX] mail: use the right component for kanban many2many_avatar_user
Before this commit, since the commit [1] changing the field registry,
the component used for the `kanban.many2many_avatar_user` widget is not
right one.

This commit fixes the issue by setting the right component for the
widget.

[1] 9f4622492c

closes odoo/odoo#112925

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-16 19:00:04 +01:00
Thomas Lefebvre (thle) e448962785 [FIX] resource: prevent week switch for default schedule
Steps to reproduce:
In Working Times, click on "SWITCH TO 2 WEEKS CALENDAR"
for the default calendar used by the company.

Issue:
A ValidationError appears: 'Attendances can't overlap.'

Cause:
To create a two-week schedule, by default,
we will use attendances provided for the company's default schedule.

When we want to switch from a one-week schedule to a two-week schedule,
we first delete the attendances from the schedule to be modified.
However, if this schedule is the company's default schedule,
it will no longer have the default attendances
that we must use to build the two-week schedule.

So we end up with the two "fictitious" attendances
that are used to delimit the two weeks.

With only these two attendances, the constraint of not having
two overlapping attendances is not respected
(because the two attendances created will be modified
to belong to the same week).

Solution:
Check that the calendar to be modified
is not the default calendar used by the company.

opw-3127337

closes odoo/odoo#112912

X-original-commit: 2f56ffbc2f1d3a2afbf51a859a5a5730af06fd6f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-02-16 17:57:23 +01:00