Commit Graph
163215 Commits
Author SHA1 Message Date
Maximilien (malb) 221e8af75a [IMP] l10n_gt: invoice label translate
In the translation PR (odoo#110661), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:28 +02:00
Maximilien (malb) 2553bbb1fd [IMP] l10n_hn: invoice label translate
In the translation PR (odoo#110938), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:28 +02:00
Maximilien (malb) 16245f3f3a [IMP] l10n_ec: invoice label translate + taxonomy
In the translation PR (odoo#109147), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Also in this commit i've redone the taxonomy that has been overwritten by another
PR.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:28 +02:00
Maximilien (malb) 25c3f8ea96 [IMP] l10n_no: invoice label translate
In the translation PR (odoo#110986), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:27 +02:00
Maximilien (malb) 950c87cdab [IMP] l10n_cl: invoice label translate
In the translation PR (odoo#112160), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:27 +02:00
Maximilien (malb) fc3144eed4 [IMP] l10n_jp: invoice label translate
In the translation PR (odoo#111656), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:27 +02:00
Maximilien (malb) 3922148442 [IMP] l10n_cr: invoice label translate
In the translation PR (#110930), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:26 +02:00
Maximilien (malb) 6bd3e2bb31 [IMP] l10n_skr04: invoice label translate
In the translation PR (odoo#106324), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:26 +02:00
Maximilien (malb) aaae983296 [IMP] l10n_skr03: invoice label translate
In the translation PR (odoo#106324), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:26 +02:00
Maximilien (malb) 16a9483835 [IMP] l10n_uy: invoice label translate
In the translation PR (odoo#109504), we translated the tax group and invoice
label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:26 +02:00
Maximilien (malb) 1347abbe89 [IMP] l10n_fi: invoice label translate
In the translation PR (odoo#111107), we translated the tax group and invoice
label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:25 +02:00
Maximilien (malb) 11f8ba6160 [IMP] l10n_pa: invoice label translate
In the translation PR (#110656), we translated the tax group and invoice label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:25 +02:00
Maximilien (malb) 6ef8808d4d [IMP] l10n_mx: invoice label translate
In the translation PR (odoo#108725), we translated the tax group and invoice label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:25 +02:00
Maximilien (malb) 71db3ba8b9 [IMP] l10n_fr: invoice label translate
In the translation PR (odoo/enterprise#35296), we translated the tax group and invoice label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:24 +02:00
Maximilien (malb) 843b004ba4 [IMP] account: invoice label translate
This commit allow the invoice label to be translated

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:24 +02:00
Maximilien (malb) 5c1e4a325e [IMP] l10n_ar: invoice label translate
In the translation PR (#112803), we translated the tax group and invoice label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:24 +02:00
Maximilien (malb) dab9b3d349 [FIX] account: Error when installing module demo data
Before this commit, when trying to install the l10n_sa or l10n_ae localization,
we get an error in the chart template resulting in no demo data installed. In
fact, when doing a Command.update to link the account to the journal in the
files template_sa and template_ae. The "values" dict was always filled no matter
 the Command, this mistake had repercussion on the "deref" method.

 In the deref method we do a loop on values items, but in the case we are facing
 the last_part variable was filled with an integer.
 When doing the recursion in case command is a "create" or an "update", the new
 values is the last_part, so the loop on values items raised an error since we
 cannot do a .items() on an integer.

closes odoo/odoo#116643

Related: odoo/upgrade#4687
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-10 15:32:08 +02:00
det a5801a12b5 [IMP] l10n_hu, l10n_sa, account: delivery date + hu brush up
In this pr, we have improved the l10n_hu localization by adding a Tax rounding
(global) by default.

Also, a lot of localization will need a delivery date on invoices. We added a
field in account that can be overridden if needed. In this pr, we did an
override on l10n_sa and l10n_hu.

When creating a sale order and that the effective date is fill, we take this
value for the delivery date.

The delivery date field will always be displayed in the other info tab, and if
there is a delivery data, the field is also display in the header of the form
view. Exception for l10n_sa and l10n_hu where the delivery date is always
present.

Also for l10n_sa company there was a problem with the vat number, it was not in
the right format.

Task-id: 3191530
Part-of: odoo/odoo#116643
2023-07-10 15:32:07 +02:00
luvi a3b0e9a3c4 [IMP] web: use useAutoFocus hook in SelectMenu
This commit makes use of the useAutoFocus hook to focus the input
when the SelectMenu opens. This usage of the hook can replace the
manual focus that was applied when the dropdown opened.

The feature can hardly be tested with newer tests, since the behavior
is identical, and the focus on the input was already tested.

closes odoo/odoo#127864

Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
2023-07-10 14:08:39 +02:00
Deependra Solanki 6b09924147 [FIX] web_editor: change icon of table menu
Before this commit:

- The icon of table menu is fa-bars which looks like drag 'n' drop handle.
- Menu width is not 100%.

After this commit:

- Changed the icons to fa-ellipsis-h and fa-ellipsis-v.
- Made the menu 100% width so it's easier to intuit it's not a drag 'n'
  drop handle.

Task - 3297710

closes odoo/odoo#127843

X-original-commit: 479c0a87b0b676f5fa9252efdef3ede99f6d7ea7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-07-10 14:08:37 +02:00
Achraf 80246ab857 [FIX] l10n_eg_edi_eta, l10n_sa: Adapting barcode API to the new one
This commit change `/report/barcode/?type=` to  `/report/barcode/?barcode_type`

See https://github.com/odoo/odoo/commit/ee324e8374536cebca4d7302210b07e8f33d3852#diff-8f0bbb50491623995fba965c3d64585c6cbfdbbe519ec95473e472826d253826R1977-R1979

sentry-3965574308

closes odoo/odoo#127290

X-original-commit: 638b61114d8148557cdbcc30a1272e1b3da79880
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-10 11:48:57 +02:00
Arnaud Baes abbfd74436 [FIX] core: ensure werkzeug request/response json
closes odoo/odoo#33682

Signed-off-by: Pierre Masereel <pim@odoo.com>
2023-05-15 15:25:56 +02:00
Victor Piryns (pivi) 0b72568bc3 [FIX] project: add index on project.task state
Adds missing index on `project.task` `state`, this field is used in
a lot of searches as a search criteria like "open tasks".

task-3416393

closes odoo/odoo#127841

X-original-commit: 147446d86d7d33a83f83a8699c930fcdd3dbb99b
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-07-10 08:56:30 +02:00
Xavier ALT 4b2106298d [FIX] sale, account_payment: fix saleman payment transactions access error
Since odoo/odoo@2b1e2abda3 user need at least 'Account / Billing'
access to read payment.transaction, that not the case for most salesman.

So for user that don't have 'Account / Billing', this commit do:

- compute the 'amount_paid' as superuser
  (fixing "Generate Payment Link" wizard access errors)

- hide "Payment Transaction" smart-button on invoice

closes odoo/odoo#127835

X-original-commit: ad2c3a873a926ac8c94d014af24ed400b493493e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-07-10 08:56:27 +02:00
Victor Piryns (pivi) 92f030597b [FIX] sale_project: create task when confirm SO from template
Current behaviour:
When creating a new quotation from an FSM task, if we use a template
that adds a line that is a service that would have added a task on
SO confirmation, no new task is generated.

Expected behaviour:
A new task should be created, just like when we add manually the
line with service without using a quotation template.

Steps to reproduce:
- Install FSM
- Activate "Extra Quotations" from Settings
- Create a new service that generates a task on SO confirmations
- Create a new quotation template, add a line that uses the service
  we created.
- In a FSM task, click on "New Quotation"
- Add the template to the quotation and confirm it
- Observe there is no Task attached to the SO. No new task was created.

Reason for the problem:
When we create a new quotation view the action "New Quotation", we
add in the context a key `default_task_id` with the current task
that generated the quotation. When we add a template, an onchange is
triggered which creates the lines for the SO, and since we have a
`default_task_id` in the context, the related task of the new line
is set to the task we came from. This prevent subsequently the
creation of a task if the service was supposed to generate a new
task on SO confirmation.

Fix:
Add an override when generating the data used to create the lines
when the onchange is triggered, explicitly setting the `task_id` on
the line to `False` if the key is in the context and the service
would've generated a task.

Affected versions:
- 15.0
- saas-15.2
- 16.0
- saas-16.1
- saas-16.2
- saas-16.3
- master

opw-3360403

closes odoo/odoo#127811

X-original-commit: 06eeefc94f08cc01786c82b769d1c488e0e1c483
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-07-10 08:56:24 +02:00
Benoit Socias 8a750c4b44 [FIX] website: fix failing unsplash beacon test
The unsplash beacon public widget is started before the test assets JS
is loaded. Because of this, the approach in [1] fails sporadically.
If the result from the `/web_unsplash/get_app_id` RPC is obtained
before the test assets JS is loaded, the beacon patch is not applied
in time, and the test fails.

This commit applies the patch within the actual page HTML to avoid this
issue.

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

runbot-22610

closes odoo/odoo#127809

X-original-commit: 3f64135ff136addfad7c4c79e8c19cc33f8b19cf
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-07-10 08:56:22 +02:00
Christophe Monniez b94c99e3f6 [FIX] packaging: remove useless soft links
The Debian package is replacing some fonts by a soft link to the Debian
packaged ones.

The glyphicons-halfings were for bootstrap 3.x which is not used anymore
in Odoo, resulting in harmless broken links in the Debian package.

Closes odoo/docker#453

closes odoo/odoo#125840

X-original-commit: bcc681438ab3ed68a86ecbc4b38bd5384dda2b1d
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-07-10 08:56:19 +02:00
Saurabh Mishra 572a6a8257 [FIX] account: preview invoice if invoice_date not given
While creating an invoice if the user chooses a payment term with an early
discount, saves the invoice without adding invoice date and tries to
preview it or prints it, then the user will face the error.

steps to produce:
- Create an invoice without entering invoice date, with a payment term having
early discount through 'Invoicing > Customers > Invoices'.
eg: (Payment Term with early discount: 2/7 Net 30 )
- Now click on 'Preview' to preview the invoice or print the invoice report.

By following above steps you will be able to produce the error.

Error: A Traceback appears "TypeError: unsupported operand type(s) for +:
'bool' and 'relativedelta'"

sentry-4250888430

closes odoo/odoo#127791

X-original-commit: 9b20af823d3d2d8c3c70fd016d71448caa039958
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Saurabh Mishra (sami) <sami@odoo.com>
2023-07-10 07:40:49 +02:00
divy-odoo f645d28d0d [FIX] web_editor: prevent losing text-gradient class on gradient preview
Steps to reproduce:

- Drop a Title block in a webpage.
- Select text.
- Set the text color to a custom gradient. (Not the background color)
- Hover a gradient preset.
- Leave the gradient preset.
gradient color applied on the background.

In this commit,
1. Modified the condition which was blocking some mutations from being
   processed. Before this commit condition got executed successfully on an empty
   array(`excludedClasses`) too, which should not be.
2. Introduced new tests which were breaking before this commit to preventing
   them from breaking in the future.

task-3120090

closes odoo/odoo#127810

X-original-commit: 994fe756db8f1a45ef864cb7848644ea204539b7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Divyesh Vyas (divy) <divy@odoo.com>
2023-07-10 06:34:39 +02:00
Maruan Aguerdouh (magm) 66d022a4dc [FIX] web: avoid crash when deleting a property multiple times
Steps to reproduce the bug:
    - Go to Apps, and install the Knowledge App.
    - Go to Knowledge and create an article, and a child article.
    - Inside the child article, go to Properties tab and add a property.
    - Go to edit the property, and inside the popover,click on the
    delete button, atleast 2 times.
    - Now we got more than 1 popover to confirm the delete of the
    property, click delete on all of them.

Issue:
    Once the first popover is confirmed, we properly delete the property
    but now we are going to get an error because the property is already
    deleted and we won't be able to find the property to delete.

Solution:
    We need to check if we can find the property we want to delete
    before doing any further actions.

opw-3371753

closes odoo/odoo#127584

X-original-commit: 7f5aed12fb143928cc82eeeea712363cb79b1171
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2023-07-08 21:39:43 +02:00
Sven Fuehr e8dbf7a3d1 [FIX] account: fixes payment to self with early payment discount
This commit fixes a bug (corner case) concerning payments
to yourself where an early payment discount is applied.

Details / steps to reproduce the bug:
    1. Create an invoice
    2. Select your own (currently selected) company as customer
    3. Select some payment term with early payment discount (e.g. '2/7 Net 30')
    4. Confirm the invoice.
    5. Click "Register Payment" and keep the default values (i.e. "Mark as fully paid" should be selected)
    6. Click "Create Payment"
    7. A User Error like the following should appear (with different journal entry names):
       "Journal Entry Draft Entry PBNK1/2023/00001 (INV/2023/00005) is not valid. In order to proceed, the journal items must include one and only one receivable/payable account (with an exception of internal transfers)."

Why the bug happens:
The early payment discount adds some extra lines to the journal entry associated with the payment.
Currently those extra lines are classified as "counterpart lines" since the customer is our own company.
But there must be exactly 1 "counterpart line".

How the bug is fixed:
The condition that classifies the extra lines as "counterpart lines" was only intended for internal transfers.
Each company has a related "transfer account" that is used as an intermediary account for internal transfers.
Thus the old condition (c.f. commit diff) when checking whether a line is a "counterpart line"
can be replaced by checking whether the account associated with the line is the "transfer account" of our company.

task-3388294

closes odoo/odoo#127844

X-original-commit: b1536ecb6bc94a2bd5ff3bdf1b73289ca87a744d
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-07-08 16:53:21 +02:00
Alexandre Kühn 3ea1564ef9 [FIX] mail: improve follower menu vertical spacing
The "Add Followers" button felt too close to top of
menu, and the last item was to close to bottom of menu.

closes odoo/odoo#127857

X-original-commit: 1c28eab0142d5011d109955977ab99d5091f989b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-08 13:03:51 +02:00
Alexandre Kühn 6aeb89f544 [FIX] mail: proper alignment of chatter attachment button
Before this commit, the icon and label of the attachment button
in chatter topbar was not aligned.

closes odoo/odoo#127856

X-original-commit: 3842ef84b33e1282b4f7d4d7c92b13b3f4b81b51
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-08 13:03:48 +02:00
Rinngell-Rezs 7e2d9da08d [CLA] Signed CLA for Angel Rodriguez
closes odoo/odoo#127073

X-original-commit: 69a56abb28a7ec7b3043c85585dba4c0143e1bc3
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-07-08 09:45:03 +02:00
tsm-odoo d97ff6820e [FIX] mail: fix slow follower insertion
Before this commit, follower insertion checked if a follower
was already in the thread's follower list by using
`Array.prototype.includes`. Since this method must run through
every item in the array to tell whether or not a follower is
present, it is extremly slow with large arrays (especially
since it is called for each follower).

This would slow down the tab for threads having lots of follower
(issue starts appering at 5k+ followers).

This PR solves the issue by replacing thread follower lists by
sets. With this change, inserting even 15k+ follower is almost
instantaneous since the membership test is done in O(1) instead
of O(n).

closes odoo/odoo#127833

X-original-commit: 406c91c8cba32e01eaa8df4b7fb9d0e3ad821e9c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-07 23:48:43 +02:00
Louis Wicket (wil) ced4efa612 [FIX] mail: format date tracking values according to the locale
Prior to this commit, date tracking values in Chatter were always
formatted using the LL/dd/yyyy format.
After this commit, date tracking values will be formatted according to
the user's locale, so as not to cause discrepancies with other dates.

closes odoo/odoo#127834

X-original-commit: 865522e0925fbeae14f5f83d3a2d69a54b546b04
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-07 20:24:58 +02:00
Alexandre Kühn 0304df6dff [FIX] mail: message attachments ordered from older to newer
Before this commit, when posting a message with 3 attachments
`A B C`, the message displayed attachments in order `C B A`.

This happens because message format list attachments in order
of `message.attachment_ids`, which has no specific order.

This commit fixes the issue by ordering attachments in
`message_format` from the oldest to most recent, so that displayed
order in message matches the one from composer, which itself
matches the order of creation of attachments.

closes odoo/odoo#127830

X-original-commit: 53508effa66bca79aa872412333ca8578ca9b813
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-07 20:24:56 +02:00
Alexandre Kühn fa2489379a [FIX] mail: no flicker on showing jump present at specific threshold
Before this commit, when scrolling down on a long chatter,
there was a specific scroll position that indefinitely
shows & hides "Jump to present" with an infinite flicker.

This happens because visibility of "Jump to present" affects
`scrollHeight`, and the threshold to show/hide this bar was
exactly the same, at 2500px. So when at exactly 2500px,
the bar is shown, but then the distance to present becomes
less than 2500px (because the bar is sticky and pushes the
present down), therefore it must be hidden. But hiding it,
the present moves up, so distance is 2500px again, etc.

This commit fixes the issue by having a 200px tolerance:
- more than 2500px: show "jump to present"
- less than 2300px: do not show "jump to present"

As the "Jump to present" bar is less than 200px height,
there's no risk to indefinitely change its visibility.

closes odoo/odoo#127829

X-original-commit: b1205a90dccc44e6cc7d5fd869cab34a63a4db2c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-07 20:24:53 +02:00
Yolann Sabaux acc638f80a [FIX] hr_expense: enable change account for no-access users
Commit #2:
Splite the method `_compute_from_product_id_company_id` so each stored field has its own compute method to avoid invalidation issues.

opw-3336796

closes odoo/odoo#126529

closes odoo/odoo#127794

X-original-commit: b64a378aab79ae4b6682ad66902c43a98a6f776d
Signed-off-by: William André (wan) <wan@odoo.com>
2023-07-07 20:24:50 +02:00
Yolann Sabaux 033c446084 [FIX] hr_expense: enable change account for no-access users
Steps to reproduce:
- install Expense and Accounting
- create 3 separate Expense categories ( this will create a related product of 'service' type) with a different Expense account and Vendor tax on it.
- Configuring different Taxes are important to replicate the issue
- Create a 'test' user who has no access to apps
- login a 'test' user and create an expense for one of the categories and save it.
- Update the expense to a different category and click 'submit to Manager'

Issue:
The account_id of the expense is not updated

Reason:
Multiple fields are computed using the same method `_compute_from_product_id_company_id`. The field being read-only=False
https://github.com/odoo/odoo/blob/c38cf4c2038d15890d5d50ec05fd5cb4f9f379b1/addons/hr_expense/views/hr_expense_views.xml#L199
It is protected during the write; that is, considered as user input

Solution:
Duplicate the field is it will not be read-only and put it as invisible
Split the compute method

opw-3336796

X-original-commit: 6664ccba5230d7890964cfe372ca863314f2fad4
Part-of: odoo/odoo#127794
2023-07-07 20:24:50 +02:00
Julien (jula) 9bdcb596ce [IMP] tools: make arch diff viewer prettier
When investigating an issue on a customer database, the diff view modal
can be pretty useful. However it is not very good looking and therefore
poorly readable.

This PR improves the CSS styling of that modal so that it resemble more
the diff view of GitHub. This is done by:
- Increasing the width of the modal
- Aligning the text to the top of the table cell, that way there is no
text floating in the middle of two lines
- Lightly coloring the whole line when there is a change on it while the
actual change is on a darker background
- Putting in red all types of change on the left and in green on the
right (instead of mixing green, red and orange together)

This commit is improving the tool that was made at [`96d3fa4`](https://github.com/odoo/odoo/commit/96d3fa4e01bf8afc35dbf0b7301ce75c6bf3a5c7)

closes odoo/odoo#127765

X-original-commit: bf412f6920b10376a979c9f95c4508dedfec5d5f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-07 19:12:42 +02:00
Romeo Fragomeli 69ecba44cb [FIX] web: improve barcode scanner for iOS (Safari)
This commit forces the video element to take all the space available.

Steps to reproduce:
* Open the barcode APP (on iOS device)
* Click on "Tap to scan"
* On iOS the video element doesn't take all space => BUG

closes odoo/odoo#127763

X-original-commit: 29e677ed84c0b7324488cfebf2d44b9247716c54
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-07-07 17:58:03 +02:00
tsm-odoo aa2133a869 [FIX] mail: bad serialization error catching on message post
The `/mail/message/post` route wrongly prevent serialization
errors by suppressing any `OperationalError` when writing
on a canned response. This is wrong since the `write` method
does not issue any SQL.

In order to properly prevent serialization errors, the request
is now done with the `SKIP LOCKED` clause.

This is better since the error does not occur, hence:
- No rollback needed
- No need to mute the sql logger
- No need to suppress any exception

closes odoo/odoo#127761

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-07 17:58:00 +02:00
Demesmaeker 466ee8f5fe [FIX] sale: use partner language for terms and conditions
opw-3253362

closes odoo/odoo#127759

X-original-commit: 6ddd981734686a2ac8f5279b8f464738dec1f4ea
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-07-07 17:57:58 +02:00
Robin Lejeune (role) e200eb2813 [FIX] website_editor: use background image on the right element
Commit [1] addressed the following situation: when we have a parallax on
an element, it adds the background on a `<span>` child of said element
instead of applying it directly on the element. Retargeting the `<span>`
is needed to display all the options linked to the background image.

Following [1], building blocks whose children are allowed to have a
background image are also applied their 1st child's background when one
of their children's background is modified. This happens because, when
changing the background of a child item, `BackgroundOptimize` is called
both on the child and on the main snippet due to
`_onBackgroundChanged()` bubbling up and `_loadImageInfo()` targetting
any child in the tree with the class `.oe_img_bg`.

This commit prevents `_onBackgroundChanged()` from bubbling up and
modifies the behavior from [1] by making sure the element identified as
the target within `_loadImageInfo()` can only be either the original
target or the parallax element.

Steps to reproduce:
- Drop a carousel building block
- Change its style to bordered
- Change the background image of the 2nd slide
=> the background of the entire snippet is also changed. It is then
impossible to remove the image on the snippet.

[1]: https://github.com/odoo/odoo/commit/31ba906

task-3349669

closes odoo/odoo#127756

X-original-commit: ab0ae8dadf55baa258d733835acc3a12771932be
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-07-07 17:57:55 +02:00
Demesmaeker 1add434106 [FIX] website_sale_comparison: demo data with existing id
closes odoo/odoo#127726

Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-07-07 17:57:50 +02:00
Mathieu Duckerts-Antoine 34f68a5f19 [FIX] web: search bar: is (not) (not) set in facets
Before this fix, a condition like "Foo is not set" created via the domain
selector would be badly described in the facet as "Foo is set".
We fix that problem and add a test that covers that situation and similar
ones.

closes odoo/odoo#127447

X-original-commit: a6b7de5d62906e5508585e0b994bf95544d10476
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-07 17:57:45 +02:00
Robin Lejeune (role) e9096a3844 [FIX] web_editor: allow translations of hidden blocks
Steps to reproduce:
- Drop a block, hide it on desktop and save
- Add a second language and click on translate
=> This raises an error.

The bug happened after the forward-port of [1] to 16.3, because
`_updateInvisibleDOM` was called prior to `_loadSnippetsTemplates`: it
then tried to `_createSnippetEditor`, requiring `templateOptions` while
they were still undefined.

opw-3383659

[1]: https://github.com/odoo/odoo/commit/959ea3d361f

closes odoo/odoo#127139

X-original-commit: c92ea9f10cdd38b275157e1ba7e79b84e3e45cbb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-07 17:57:42 +02:00
Rémy Voet (ryv)andJulien00859 55c71cb224 [FIX] base: ir.property.search_multi with 'any'/'not any' operators
Install POS, go in the settings, add a new cash routing method.
Traceback, the field as no comodel.

The ir.property `search_multi` method wasn't compatible with the
'any'/'not any' operator.

opw-3375624

closes odoo/odoo#127750

X-original-commit: 7dd14eb0b0edb57150288361e72e407e05e67a73
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Co-authored-by: Julien00859 <juc@odoo.com>
2023-07-07 16:42:45 +02:00
Rémy Voet (ryv) 22a0c7f9ee [FIX] core: filtered_domain with 'any'/'not any'
`filtered_domain` didn't throw an exception when it is called with a
domain containing the new 'any' and 'not any' operators. Fix it.

X-original-commit: 05713a270bfad406daa9dbf739b80cf8c4d065c0
Part-of: odoo/odoo#127750
2023-07-07 16:42:45 +02:00