Commit Graph
165391 Commits
Author SHA1 Message Date
Hugo Carlier (Huca) 260577dde0 [IMP] website_blog: improve help center
This commit adapts website_blog tests to change in website_helpdesk. The
method _compute_visible of model website.menu is modified to display
help team menus to backend user, even if they are unpublished. This
potentially add extra requests when rendering a website page. Therefore,
the performance tests are adapted accordingly.

task-3186564

closes odoo/odoo#134976

Related: odoo/enterprise#45115
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-25 09:38:29 +00:00
roen-odoo 7e01385ed4 [FIX] point_of_sale: make sure FP is not applied twice on refund
current behavior:
When a product with tax included is sold with a fiscal position that
match the tax to a tax of 0%, then when you refund this order the
fiscal is applied a second time. This result in the 15% tax removed 2
times and the price of the product is incorrect.

steps to reproduce:
- Create a product with 15% tax included
- Create a fiscal position that match the tax to a tax of 0%
- Create a POS with this fiscal position
- Open PoS, and make an order with the product
- Applyy the fiscal position
- Refund the order
- The price of the product is not the same as the one of the original
  order.

opw-3371028

closes odoo/odoo#136348

X-original-commit: 58406515233234ac0ed342d81a5c55886c3b5712
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-25 07:54:01 +00:00
Loukas Wets (lowe) 0c99b74ca1 [IMP] point_of_sale: custom combo choices order
Prior to this commit the combo choices were displayed in their ID order. This
commit add a sequence field that allows the user to choose the order of
the combo choices.

closes odoo/odoo#136331

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-25 07:53:59 +00:00
Mathieu Duckerts-Antoine 1995f21d42 [FIX] web: field service: protect async methods
The async methods of field service were not declared in its key async.
This would allow destroyed components to process the results of those
methods (despite an initial call to useService). We fix that.

closes odoo/odoo#135950

X-original-commit: 7955def19c7d4a8c49be472413423bbf3beec2e5
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-09-25 07:53:58 +00:00
jorv 16179c9399 [FIX] core: assert _get_func_code code argument
closes odoo/odoo#33682

Signed-off-by: bve-odoo <bve@odoo.com>
2023-08-28 15:15:19 +00:00
Anita (anko) 4d1a1f1c99 [IMP] payment, *: verify and reroute payment flows
This commit changes the way transactions linked to a document (sales
order, invoice...) are created in a payment flow. Rather than receiving
and trusting the transaction values from the controller, they are now
read from the linked document, and the payment flow is rerouted to use
the document's module's controllers instead of that of `payment`.

This ensures that no unexpected value can be passed to the `create`
method of a transaction, and simplifies the implementation of the
payment flows of linked documents.

task-3136240

closes odoo/odoo#126425

Related: odoo/enterprise#43212
Related: odoo/upgrade#5124
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-09-23 21:08:01 +00:00
Martin Trigaux 07fd6277f9 [FIX] module: use file_path
The method get_resource_path is redundant with file_path but without
all the checks.
The method will be deprecated in master but make it use file_path in
stable.

closes odoo/odoo#136272

X-original-commit: 64ab4a6914dadd741cfe61d9bd1959ae4509a1ca
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-09-23 14:24:13 +00:00
jbw-odoo b6b7af6e62 [FIX] sale: fix ventilate rounding error on downpayment
This previous commit : https://github.com/odoo/odoo/commit/d197efa60cf7c00168847ce7afcfa1741410aee1 aimed at ventilating rounding error corrections on multiple lines. But this would introduce errors or unbalanced moves if the rounding amount/lines quantity was smaller than the rounding of the currency. E.g. à 0.01€ error divided on 3 lines would add 0.00333 on each line, and when the amount is rounded, it would vanish.

closes odoo/odoo#136366

X-original-commit: 0627b4609e8b1b3d15651d6cde0ff4cfdc85c5d6
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-09-23 12:11:06 +00:00
Sébastien Theys 7a90938a70 [REF] mail, *: tests: simplify text option of contains
* = bus, calendar, im_livechat, hr, project_todo, sms, snailmail,
    test_mail, web, website_livechat

The current implementation often led to tests relying on DOM structure
to properly target the correct element with the text.

It is now easier to simply check if a parent contains some text.

closes odoo/odoo#136295

Related: odoo/enterprise#47770
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-23 10:33:04 +00:00
Thibault Delavallée eb228ac373 [FIX] test_mail: prepare and fixup tests for alias domains
Some tests are updated to lessen diff in future tests, especially about
aliases. Some tests are fixed as they are somehow incorrect (notably
in gateway testing) but currently passing as mail gateway is quite
permissive.

Add some tests preparing MC / alias domains configuration notably about
company / alias synchronization, which is currently only based on config
parameters.

Also update some tests by using fstrings which are generally more readable.

Finally move some tests to their right file / main testing class to keep
them ordered by main topic.

Prepares Task-36879 (Mail: Support MultiCompany Aliases)

closes odoo/odoo#136318

X-original-commit: odoo/odoo@c18300e225
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-22 18:40:25 +00:00
Thibault Delavallée 8012722543 [IMP] (test_)mail: improve some testing tools and helpers for notifications
Cleanup some code bits in common classes, add some docstrings. Improve
notifications related helpers, notably to ease checking content of mail.mail
or outgoing emails when posting messages.

Update 'test_message_post' with those new helpers, to ease inclusion of
additional specific values test with alias domains in mind in next commits.

Prepares Task-36879 (Mail: Support MultiCompany Aliases)

X-original-commit: odoo/odoo@513fb74f5c
Part-of: odoo/odoo#136318
2023-09-22 18:40:25 +00:00
Anita (anko) 428a2cda67 [IMP] payment_adyen: replace API URLs with an account-specific URL prefix
Before this commit, users were required to compute the API URLs, which is
specific to each Adyen account, themselves. After this commit, users
will be able to copy their account prefix from Adyen to automatically
generate the API URLs.

task-3338126

closes odoo/odoo#126831

Related: odoo/upgrade#4876
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-09-22 17:35:47 +00:00
Damien Bouvy bad4eea5d3 [FIX] web: list selection checkbox alignment
If a list view row switches to more than one line (e.g. because of some
field which overflows), the record selection checkbox need to respect
the same alignment as other 'blocky' widget like statuses, priorities,
etc. and be middle-aligned.

Task-3515864

closes odoo/odoo#136222

X-original-commit: 77252ff7201625f25667f64f07cee627d3c47b99
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-09-22 16:33:31 +00:00
Adrien Widart (awt) 4d429a10f2 [FIX] mrp: edit to-consume qty on confirmed MO
When adding a new raw SM to a confirmed and locked MO, it should still
be possible for the user to define the to-consume quantity (else, he
would have to unlock the MO and only then to edit the new line)

OPW-3253204

closes odoo/odoo#136009

X-original-commit: b78c468317079ac415d7b1fdbd4d4d081ff3976b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-09-22 16:33:31 +00:00
Pedram (PEBR) d2e771b1fb [FIX] point_of_sale: use correct amount for pos order reversal
When you are using a different currency in a PoS config, invoicing
a POS order that was created in a previous session, causes an
unbalanced entry error. Because the amount_currency and balance of
the payment moves are incorrect.

Steps to reproduce:

- Create POS config with currency other than company currency
- Create order in a session
- Close the session
- Open a new session
- Load paid orders
- Try to invoice the created order

opw-3479292

closes odoo/odoo#136294

X-original-commit: 17a8b70594d97a04c2389f9fb6f0cf370c6074c5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-09-22 15:06:10 +00:00
Antoine (ande)andRémy Voet 2c377f4cb8 [FIX] base: external identifier traceback
Current behaviour:
Traceback when trying to create
a new external identifier

Steps to reproduce:
1. Activate the developer mode
2. Go to settings
3. Technical > External Identifiers
4. Click on "New"
5. Traceback

Cause of the issue:
Introduced by https://github.com/odoo/odoo/commit/3c62ca1eb96d571b2b686b5caee370324c589ab4
When computing display_name, the model
can be false, and not be in self.env

opw-3489581

closes odoo/odoo#136279

X-original-commit: 2462df26977acc9e3ccafd57863703aacd2f059e
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Co-authored-by: Rémy Voet <ryv@odoo.com>
2023-09-22 15:06:09 +00:00
Loukas Wets (lowe) 80a0ca239a [FIX] point_of_sale: missing product cross order
Prior to this commit if an order was sent to another pos with the cross
order, if the product was missing in the target pos, the product will be
missing in the order. This commit loads the products that are missing for
the cross orders.

Task-3504316

closes odoo/odoo#136263

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-09-22 15:06:07 +00:00
Aaron Bohy 4fdff785c6 [IMP] web: keep supporting old cids syntax in url
Commit [1] changed the separator of cids in the url to make it
better looking, by using a character that doesn't need to be
encoded (namely, "-" instead of ","). However, by doing so, urls
still using the former separator couldn't be correctly parsed
anymore. This commit adds a small backward compatibility layer,
s.t. links in emails for instance keep working as before.

[1] abae4d4a5c

closes odoo/odoo#136247

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-09-22 15:06:07 +00:00
Florian CharlierandVivek Pathak e41b32f40b [FIX] survey: compute matrix answers display_name too
We here fix the `SurveyQuestionAnswer._compute_display_name`
method introduced in 55fa52be.

`survey.question.answers` used as matrix rows and columns
require different treatment as they are not used in triggers
but are both shown on the `survey.user.input.line` views,
where the display shouldn't change (nor cause a crash).

It also doesn't make much sense to create answers outside the
context of a question, so we remove the button that already
wasn't shown on the tree view.

As users may not fully upgrade their views or may wish to customize,
we add a fallback question title in `_compute_display_name`too.

Task-3495142

closes odoo/odoo#135853

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Vivek Pathak <vivp@odoo.com>
2023-09-22 15:06:04 +00:00
jbw-odoo 282fbee342 [FIX] sale: ventilate downpayent rounding correction on multiple Lines
When a user creates a downpayent with a fixed amount, the amount is tax included. This can generate rounding issues as sometimes the amount is impossible to be reached by any base amount / tax combination. (fixed amount = 100€, tax is 21% -> 100/1.21 = 82.64 -> 82.64 * 1.21 = 99.99). This can lead to up to 1 rounding error per downpaylent line.
Until now the total amount delta was added/removed on one tax line, one receivable line and one product line. While the total amount was correctly corrected, the amount on the individual lines would be off.
On a SO with :
    base  |  tax      | tax incl
    1000€ | tax_21%_a | 1210€
    1000€ | tax_21%_b | 1210€
Generate 1 DP for fixed amount 200€
Invoice lines :
BEFORE:
    tax       | balance | price_total
    base lines ----------------------
    tax_21%_a | -82.64  | 100.01        <-- 0.02 correction
    tax_21%_b | -82.64  | 99.99
    tax lines -----------------------
              | -17.37  | 0.0           <-- 0.02 correction
              | -17.35  | 0.0
    receivable line -----------------
              | 200.0   | 0             <-- 0.02 correction

AFTER:
    tax       | balance | price_total
    base lines ----------------------
    tax_21%_a | -82.64  | 100.0         <-- 0.01 correction
    tax_21%_b | -82.64  | 100.0         <-- 0.01 correction
    tax lines -----------------------
              | -17.36  | 0.0           <-- 0.01 correction
              | -17.36  | 0.0           <-- 0.01 correction
    receivable line -----------------
              | 200.0   | 0             <-- 0.02 correction

closes odoo/odoo#135698

X-original-commit: d197efa60cf7c00168847ce7afcfa1741410aee1
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-09-22 15:06:03 +00:00
jbw-odoo 68d43d2d05 [FIX] sale: final invoice with downpayment amount fix
Downpayment might have been determined by a fixed amount set by the user.
This amount is tax included. This can lead to rounding issues.
E.g. a user wants a 100€ DP on a product with 21% tax.
100 / 1.21 = 82.64, 82.64 * 1,21 = 99.99
This is already corrected by adding/removing the missing cents on the DP invoice
but it would still be wrong when creating the final invoice (as it is based on the actual base amount + tax of the SO DP's)

opw-3466409

X-original-commit: 0a6e2d47107727040664176740535707286a1355
Part-of: odoo/odoo#135698
2023-09-22 15:06:03 +00:00
abd-msyukyu-odoo 576afb3f27 [FIX] web_editor: reset MoveNodePlugin when switching record
How to reproduce:
- open a record with an html_field (i.e. todo or a Knowledge article)
- switch back and forth with the pager or the knowledge sidebar between 2
  records

Current behavior:
- traceback `this._elementHookMap.get(element)` is undefined

Expected behavior:
- no traceback

Technical explanation:

When changing the editable content (i.e. `resetContent` when changing record),
there is no guarantee that `_intersectionObserverCallback`
(intersectionObserver) won't be called before `_updateHooks` (mouseMove/resize
after a mutation occured).

This is an issue because `this._elementHookMap` may not yet have a hook element
related to the editable element which stops intersecting the document.
If such a case occurs, the next `_updateHooks` should be called when the
mutationObserver flags `_resetHooksNextMouseMove` to `true` and then after the
next `mouseMove`  (or after the next resize).

Ignore the hook style update if there is currently no hook for an element which
stops intersecting.

Remove a redundant check in `_getMovableElements`

task-3506666

closes odoo/odoo#135464

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-22 15:06:02 +00:00
Bastien PIERRE 3192051806 [IMP] web: Add duplicate action on view list
Include the 'duplicate' action in the action menu in list view. The copy_batch
method will call the copy method with a loop to keep any existing override.

closes odoo/odoo#133977

Task-id: 3456679
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-22 15:06:01 +00:00
Damien Bouvy 264ec1c4dd [IMP] web: support explicit mobile view mode on window actions
Up until this commit, which view was displayed by default on mobile was
somewhat of a lottery.

Initially, only kanban views were considered as 'more adapted to mobile
devices' and used as a main fallback to display records who had a kanban
view in the window action definition.

The the concept of 'mobile-friendly view' was extended to map and grid
so that these views could take precedence over the kanban view in
specific circumstances (indsutry_fsm and timesheet_grid, both of which
are enterprise edition apps) - basically they were marked as
mobile-friendly not because they *are*, but because it was the only way
to override the kanban override.

But this comes with its lot of problems and limitations, namely that the
mobile friendly view will be found based on the order of view modes for
a window action, so if you have a window action with the view modes
`kanban,map,tree,form`, you will never be able to have e.g. the kanban
view shown on desktop by default and the map view on mobile.

This commit introduces the notion of a 'default mobile view' on window
actions so that one may decide on an *arbitrary* view mode to use on
mobile for an action - without impacting the ordering of views on other
models, etc.

Task-3460374

closes odoo/odoo#133608

Related: odoo/enterprise#46562
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-22 15:06:00 +00:00
7e012dd544 [IMP] payment, *: replace providers with payment methods in payment forms
Before this commit, the payment providers (e.g., Stripe, Adyen...)
available for payment were displayed on the payment forms. The customer
had to select one to process their payment. After that, the customer had
to select their preferred payment method (e.g., Credit Card,
Bancontact...) from a list of payment methods supported by the selected
provider over which the website administrator had close to no control.
This was making the payment forms confusing because the payment methods
were displayed sometimes more than once, if at all, in a non-controlled
order, and behind the selection of a payment provider that customers
should not have to deal with.

As the payment method was selected in an iframe or directly on the
provider's website, the information on the selection payment method was
not available in Odoo. This posed many problems, among which were the
impossibility of assessing whether a specific feature (e.g.,
tokenization, refunds, manual capture...) was available, not being able
to easily identify payment tokens through the payment method logo,
listing available payment methods on the website, sorting and
fine-grained configuration of the available payment method, subpar
payment method-specific display on the payment form (e.g., PayPal that
requires displaying a "Pay with PayPal" button), etc.

In this commit, the payment providers are thus replaced by the payment
methods on the payment forms. All contextually available (depending on
the country, currency, requested feature...) payment methods are
displayed one after the other on a single-level list and in the order
configured by the website administrator. Each payment method is
"powered by" (i.e., linked) to a single payment provider: the first one,
by model order, to support it. This allows, for example, offering the
PayPal payment method through Mollie, which charges low processing fees,
while also offering Klarna through Stripe, which supports more payment
methods but charges higher processing fees.

While doing so, the two different payment forms, "Checkout" and
"Manage", are also merged together in a new, configurable case-by-case,
payment form that is entirely redesigned to offer a better user
experience.

After payment, the information on the selected payment method is saved
on the transaction and eventual payment record and updated with the
information received from the provider.

task-2882677

closes odoo/odoo#120446

Related: odoo/upgrade#5103
Related: odoo/documentation#5717
Related: odoo/enterprise#40666
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Anita (anko) <anko@odoo.com>
Co-authored-by: Brieuc-brd <brd@odoo.com>
Co-authored-by: Valeriya (vchu) <vchu@odoo.com>
2023-09-22 13:32:53 +00:00
Antoine Vandevenne (anv) ec1d70617f [REM] payment: remove unused payment method icons and SCSS rules
task-2882677

Part-of: odoo/odoo#120446
2023-09-22 13:32:53 +00:00
Antoine Vandevenne (anv) 22ea3519d7 [FIX] payment(_*): make a proper usage of async and promises
Several functions were:
- called with `await` while there are synchronous;
- declared as synchronous while they should have been asynchronous;
- declared as synchronous but their overrides were async;
- explicitly encapsulating their return values in a `Promise` when it
  was unnecessary.

This commit also cleans up a few mistakes in comments and docstrings.

task-2882677

Part-of: odoo/odoo#120446
2023-09-22 13:32:53 +00:00
Antoine Vandevenne (anv) 5b5f69352c [CLN] payment(_*): correct code styling inconsistencies
This commit mainly removes the extra indent level left over after commit
odoo/odoo@8ec2e8cf. It also cleans up purely cosmetic code styling
inconsistencies.

task-2882677

Part-of: odoo/odoo#120446
2023-09-22 13:32:53 +00:00
roen-odoo f022fffc3a [FIX] point_of_sale: ship later with multiple expense account
Current behavior:
If you had 2 products with different expense account and using real-time
inventory valuation, there was an error when validating the picking.
This was happening because move_vals we were trying to assign multiple
moves to one pos_order here https://github.com/odoo/odoo/blob/95cec6ea3daebce6491cc2a8a69d9688322989ba/addons/point_of_sale/models/stock_picking.py#L155

The account move is actually reserved for the invoicing of the order.
So we just need to remove that line.

Steps to reproduce:
- Create a product with expense account A
- Create a product with expense account B
- Make sure both products are set to real-time inventory valuation
- Activate ship later in the PoS
- Open the PoS and add both products to the order
- Validate the order with ship later and no invoice
- Close the PoS and try to validate the picking of the order.

opw-3428033

closes odoo/odoo#136254

X-original-commit: a2c8ea0adbd93cb9d178977f73e93492e84dfec3
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-22 11:56:05 +00:00
Lucas Lefèvre (lul) f60be08753 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/0b7527d5 [REL] 16.5.0-alpha.8
https://github.com/odoo/o-spreadsheet/commit/f8de9ab6 [IMP] Formulas: Add new statistics formulas
https://github.com/odoo/o-spreadsheet/commit/1a685a08 [IMP] data: add the trim whitespace feature Task: 3356367
https://github.com/odoo/o-spreadsheet/commit/1f5bb485 [REM] spreadsheet_edition: remove dead edit text
https://github.com/odoo/o-spreadsheet/commit/7956f571 [REF] drag&drop: stop using CUT/PASTE commands Task: 3502194
https://github.com/odoo/o-spreadsheet/commit/e26eee16 [FIX] GridOverlay: Hovering over a figure should not open popovers Task: 3475001
https://github.com/odoo/o-spreadsheet/commit/33b04fb0 [FIX] deepEquals: fix simple type comparison Task: 3479451
https://github.com/odoo/o-spreadsheet/commit/f7e58774 [FIX] clipboard: copy/paste of CF in another sheet Task: 3479451
https://github.com/odoo/o-spreadsheet/commit/be185413 [IMP] demo: disable HTML quirks mode Task: 3506565
https://github.com/odoo/o-spreadsheet/commit/a529d61b [IMP] export: do not export defaulf style values Task: /
https://github.com/odoo/o-spreadsheet/commit/4fe9e1a6 [IMP] build: add banner
https://github.com/odoo/o-spreadsheet/commit/dd52c9b0 [FIX] build: restore commit hash
https://github.com/odoo/o-spreadsheet/commit/c2640de1 [FIX] ErrorToolTip: fix error tooltip long text Task: 3328557

closes odoo/odoo#136242

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-09-22 11:56:04 +00:00
Juan José Scarafia bfedd5e4ec [FIX] l10n_ar: fix consistency of l10n_ar_currency_rate
Use the same method and date used to compute the rate on aml field currency_rate

closes odoo/odoo#136230

X-original-commit: adae60fc532cf6a853815f840cb49e93eb008cb7
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-09-22 11:56:02 +00:00
Hubert Van de Walle (huvw) 97caeab30d [FIX] purchase,sale: Packaging Quantity field missing on mobile
Steps to reproduce
==================

- Use a mobile viewport
- Create a quotation
- Add an order line
- Set a packaging
-> The Packaging Quantity field is missing

The same happens on purchase orders

---

opw-3504829

closes odoo/odoo#136213

X-original-commit: c5d665cc2b43a0040c3f5644265e74048c3d5ded
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-09-22 11:56:00 +00:00
Sébastien Theys cc9e2c147c [REF] web, mail, *: tests: remove legacy file utils
* = mrp

closes odoo/odoo#136141

Related: odoo/enterprise#47716
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-22 11:55:58 +00:00
Walid 929bf923c6 [FIX] stock: forecast button color
adress both use cases in :
https://github.com/odoo/odoo/commit/ed2849a55c1463689cbc201a782b0200207bfd37
and
https://github.com/odoo/odoo/commit/4248aac2d224363a6ac4a59881bdb7c321623e4b

button should be red if there's no qty in stock but still be green if
the qty was reserved for the move

closes odoo/odoo#136078

X-original-commit: 92f3c53c2c29e3820b39a93d8745af794b0d58a9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-22 11:55:56 +00:00
FrancoisGe d682871a8b [FIX] *: Wrong usage of onWillUpdateProps in Field
Since the new model (PR: odoo/odoo#114024), updating a record no longer
triggers a deep render and therefore no longer triggers the onWillUpdateProps
for Field components.

The goal of this commit is to adapt the usage of onWillUpdateProps
in Field composents in order to fix the bugs introduced by the RelationalModel

closes odoo/odoo#135842

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-22 11:55:55 +00:00
Pierre-Yves Dufays 8e1bbf526e [FIX] mail: fix activity view pager
This solves the following problem:
- Add 150 records with 2 activities each (ex. A call and a to do)
- Go to the activity view (ex.: event through the systray) and clear filter
- Only 50 of the 150 records are displayed (instead of 100)
- Going to the next page, only 2 are displayed (instead of ~50) (will depends
on the data already present)

Technical notes:
Not all activities were displayed because the search limit was applied on the
activity search instead of searching all activity related to the records.

The method fetchActivityData was doing half of the job because it was not
assigning the activity data fetch on the server to the instance variable
activityData, which was causing strange behavior when clicking on next page. To
simplify and correct the code, that logic has been moved to that method instead
of relying on the caller to do that assignation.

Task-3508744

closes odoo/odoo#135651

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-22 11:55:54 +00:00
Pierre-Yves Dufays b81e7b3288 [IMP] {test_}mail: improve activity view pager test
The activity view pager test is improved to use the actual get_activity_data
mock rather than checking that it is called with the right parameters. Thanks
to that, we also check that the activities are displayed. To ensure that the
pager influence only the records displayed and not the related activities, we
set up test records with 2 activities each and check that there are 2 times
more activities displayed than the number of records.

Task-3508744

Part-of: odoo/odoo#135651
2023-09-22 11:55:54 +00:00
Valentin Vallaeys (vava) 30994723e9 [IMP] product,website_sale(_product_configurator): allow extra-options
[A previous
commit](https://github.com/odoo/odoo/commit/5ca1da8ab33d4dd6a9ed0b6737e5d19f1a3ac9d2)
introduces a new attribute `display_type`, `multi`, which allows users
to define extra-options to products. But this option was only available
in Sales.

This commit allows eCommerce users to use this new attribute in the
online shop.

task-3497046

closes odoo/odoo#135174

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-22 11:55:53 +00:00
Odoo's Mergebot d191e69726 [IMP] google_calendar: add single event synchronization
Purpose
=======
Add the possibility to only synchronize one specific event of a user calendar instead of syncing the whole calendar.

See sub commits for more details.

Task-3285601

closes odoo/odoo#133921

Related: odoo/enterprise#46688
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-22 11:55:51 +00:00
amdi-odoo c2f337779b [IMP] google_calendar: add google sync helper
Add a helper method to know when the user calendar
is fully synced to Google Calendar, meaning when
API calls can correctly be performed.
The user calendar is considered fully synced if the
Google API is correctly configured in the settings
(Client ID / Secret) and the user has synced its
calendar with its Google Account.

Task-3285601

Part-of: odoo/odoo#133921
2023-09-22 11:55:51 +00:00
amdi-odoo ec073feeb4 [IMP] google_calendar: add google meet videocall url
Add a 'google_meet' value for the event videocall location
to make the difference between a custom videocall link and
a google meet one.

Task-3285601

Part-of: odoo/odoo#133921
2023-09-22 11:55:51 +00:00
amdi-odoo a3eed99161 [IMP] google_calendar: add single event synchronization
Purpose
=======
Add the possibility to only synchronize one specific event of
a user calendar instead of syncing the whole calendar.

Specification
=============
In certain cases, we do not want to synchronize the whole user
calendar with all the events and recurrences but only a specific
event. For example, in appointment, to retrieve the generated
google meet url of a specified event.

To perform the single event synchronization a synchronization
token is needed, meaning we cannot do a single event
synchronization prior to a full calendar synchronization as it
is the full sync which generates the temporary sync token.

To prevent the need of doing a full sync before a single event sync,
the permanent synchronization token is been used instead of
the temporary one when performing a single event synchronization.

Task-3285601

Part-of: odoo/odoo#133921
2023-09-22 11:55:51 +00:00
Jitendra Prajapat af0d1b565c [IMP] purchase: added discount field in Vendor Pricelist
In this commit
==============

- Added the discount fields to the vendor pricelist and PO line models,
  making them optional and hidden.
- Implemented automatic filling of the discount field on the PO line when
  the unit price is sourced from the vendor pricelist.
- Implemented a mechanism to automatically populate the discount field on the
  PO line when the unit price is fetched from the vendor pricelist.
- Modified the pricing logic to ensure the discount is applied to the
  tax-excluded price.
- PO confirmation process to check if a pricelist already
  exists for the vendor. If not, a new pricelist line is created, including the
  discount if it is present.

task - 3380306

closes odoo/odoo#126804

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-22 11:55:50 +00:00
vie-odooandKuldeep Singh 9dc0777d0f [IMP] hr_contract: rename 'Advantage' to 'Benefit'
In this commit, I have made changes from 'Advantage' to 'Benefit' because I made
modifications in the 'hr_contract_module'. This group is being utilized in
'hr_contract', so I updated the file accordingly.

task-3374616

closes odoo/odoo#127207

Related: odoo/upgrade#4852
Related: odoo/enterprise#43262
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Co-authored-by: Kuldeep Singh<kusi@odoo.com>
2023-09-22 11:55:47 +00:00
Hardik Suthar f75165ac96 [CLA] signature for sutharhardik
closes odoo/odoo#136223

X-original-commit: b3075c5c69919b763d7df2ec78621d852a88ce2c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-09-22 10:23:43 +00:00
ericqdev 6a166f8837 [CLA] Odoo ericqdev
closes odoo/odoo#136214

X-original-commit: 38058e5d531ebead617cc8677b0f7ce34aadff2b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-09-22 06:33:43 +00:00
Thomas Lefebvre (thle) b365ea4e1f [FIX] hr_holidays: manage refused leave in the report
Steps to reproduce:
-------------------
- add an allocation for an employee;
- add a leave with this allocation;
- validate the leave;
- refuse the leave;
- in action menu, click on "Time off Analysis by Employee and Time Off Type".

Issue:
------
The report does not take into account refused allocations and leaves.

Solution:
---------
Add a condition to take a number of days equal to zero
if the allocation or leave is in a refused state.

Handled the case where no record is found for leave
(with `COALESCE` because `value - NULL = NULL`).

opw-3503617

closes odoo/odoo#136217

X-original-commit: 4c73d4a7d5cec388177e2703ac9b0a42de8c12c8
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-09-22 04:10:06 +00:00
Andrew Gavgavian d5c62fc80f [FIX] sale_product_configurator: error when editing configurable lines
PR #134787 was introduced to fix an error with product template
attribute values. However, when moving `ptavId.concat` into the if
statement, it missed the fact that the function returns a copy rather
than editing in place.

This means that the line achieved nothing.

opw-3513820

closes odoo/odoo#136216

X-original-commit: 3b823f0ba76b53d59cd6702836bef40ab3f484cb
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Andrew Gavgavian (andg) <andg@odoo.com>
2023-09-21 23:54:33 +00:00
moerradi f5b4e61314 [FIX] l10n_latam_check: Prevent Multiple Uses of Same Third-Party Check
there is a loophole that allows the same third-party check to be used
for multiple outbound payments. This issue causes data inconsistencies
and disrupts the expected behavior of the financial workflow, thereby
undermining the integrity of the accounting processes.

In order to address it a  constraint was introduced on the
l10n_latam_check_id field. This constraint is triggered whenever
a payment transaction involves the use of 'out_third_party_checks' as
the payment method. The system now conducts a search to identify any
pre-existing payments that might be using the same third-party check.
If a duplicate use of a check is detected, a ValidationError is promptly
raised, effectively blocking the transaction.

Task-3503556

closes odoo/odoo#136202

X-original-commit: 462614774e0134b805a87e45c7327f7359736bee
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-09-21 23:54:32 +00:00
moerradi c7a664b810 [IMP] account: Exclude Off Balance Accounts from tax repartition lines
This commit excludes off-balance accounts from appearing in tax
repartition lines.
Previously, off-balance accounts were included in the selection, which
was causing confusion and unnecessary clutter in the interface.

The need for this change was raised due to the observation
that off-balance accounts are never actually used in tax repartition
scenarios.
Including them only complicates the account selection process without
adding any functional value

closes odoo/odoo#136196

X-original-commit: 77871dd434a912fab41e6cec674c272fe37bcf1d
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-09-21 23:54:31 +00:00