Commit Graph
163215 Commits
Author SHA1 Message Date
Mahdi Cheikh Rouhou (macr) 699ba2d782 [FIX] repair : send email to author when included
When we include the author in the recipients of the quotation email of a repair order he doesn't receive the email.

Steps to reproduce the error :
1- create a repiar order
2- add the author in the list of recipients
3- send the email

The origin of the problem is that mail_notify_author=False , se we need to add it as True when we have the author in the recipients.

Similar old fix : https://github.com/odoo/odoo/commit/f49dbf595c870b682f36c11443c9cf1a9a027474

opw-3295744

closes odoo/odoo#126986

X-original-commit: d4d48526867e93295d93d4504e824cfdc2b146a7
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-06-30 20:13:43 +02:00
Thomas Lefebvre (thle) bfbf92d4f5 [FIX] hr_holidays: correct iso format sent to the frontend
Steps to reproduce:
-------------------
- go to Time Off / Configuration / Public Holidays;
- create a public holiday (for one day):
	start = 00:00:00
	end = 23:59:59
- go to Time Off dashboard.

Issue:
------
The description of this public holiday is not correct.
The display shows that the public holiday is two days instead of one.

Cause:
------
When recording a public holiday, dates are saved in UTC.
Depending on the offset (UTC offset), this can change the day.

When we send the date in iso format to the frontend,
we modify the hours, but not the day.

Solution:
---------
Apply the employee's timezone to the datetime object
before sending it to the frontend.

Note:
-----
The correction is on the server side,
as we use the `combine` method of the datetime object
before sending the result to the frontend.
Indeed, we modify the times and lose the information
needed to apply the timezone afterwards.

opw-3381894

closes odoo/odoo#126983

X-original-commit: 1268502b813d9b9173edb3851faef965df6be6fe
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-06-30 20:13:40 +02:00
Akim Juillerat e6a688815f [FIX] product: Add missing api.depends to _compute_product_price_extra
Field `product.product.lst_price` is not recomputed after changing
`product.template.attribute.value.price_extra`.
Computation of `product.product.lst_price` is not triggered because
`product.product.price_extra` is not recomputed because of the missing
decorator.

closes odoo/odoo#126968

X-original-commit: c7034cb9973532da8011f5fc78d50d859b704500
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-30 15:41:52 +02:00
tsm-odoo 7e186375df [FIX] mail: correctly display unknown im status
Before this PR, the "unknown" im status was not properly
displayed. This commit ensures the question mark icon is displayed
when no im_status is available.

closes odoo/odoo#126958

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 15:41:49 +02:00
Nasreddin Boulif (bon) a382e64ac1 [FIX] im_livechat: display chatbot in website or user language
Steps to reproduce:

  - Install the module `crm_livechat`
  - Activate another language (e.g. fr_FR)
  - Open a new incognito window and go to the website
  - On website, switch to the activated language
  - Open contact page
  - Open the chatbot

Issue:

  The chatbot is displayed in `en_US`.

Cause:

  The chatbot is displayed in the current user language (not website
  language).
  Public user have by default `en_US` as language.

Solution:

  Retrieve the chatbot with the website activated language if set,
  otherwise, retrieve the chatbot in the user language.
  Fallback on `en_US`.

opw-3284807

closes odoo/odoo#126594

X-original-commit: cb9c003700d2d8eb3be326260bae5fa5e599b89c
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-06-30 14:25:19 +02:00
Bruno Boi 190c0cc215 [FIX] web: fix undeterministically failing test
Since [1], a test introduced in [2] was failing undeterministically.

**Explanation**
Commit [1] introduced a positioning recomputation when a load event
occur in the target's document.
The failing test in [2] loads an inline stylesheet inside of an iframe
without waiting for it to be loaded.

When the test failed it was because of the "load" event of the
aforementioned stylesheet that occured at an inappropriate moment.

Now the test awaits for this event.

Note that within the same conditions in the real world, we want to
make sure the popper is repositioned.
So this current fix is a bit cheating but the test is about testing
an unrelated behavior, so this is acceptable IMO.

Runbot error id: 22544

[1]: 532c4cfa4e60bc9531
[2]: 208a1277750d63eef3

closes odoo/odoo#126938

X-original-commit: 3ca170bf31ca6e6f12293f0dabe106d385773333
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-06-30 13:08:31 +02:00
tsm-odoo f027e10100 [IMP] im_livechat: rename search filter
This PR rename the search filter of the session history view
from "Attendees" to "Participant" as it makes more sense in
this context.

part of task-3332872

closes odoo/odoo#126937

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 13:08:28 +02:00
Didier (did) a2cd11c55b [FIX] mail: enable mentions when editing a message.
Before this commit, when editing a message, it was not possible
to add new mentions.

This commit adds the support to add new mentions when editing the
message.

Note that mentions added from editing message won't notify them:
it's only at creation of message that mentioned users are notified.

task-3329714

closes odoo/odoo#126888

X-original-commit: 1fe935d273142064784b9ecff2fff1c34e91064f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 13:08:26 +02:00
Julien Mougenot a540f0f53c [FIX] web: Allow TempusDominus to parse its own values
Before this commit, in other numbering systems than "latn", the time
pickers did not allow to select hours/minutes/seconds. This was because
the lib (TempusDominus) would use `parseInt` internally to retrieve the
selected value, which was not a latin number in other numbering systems.

This commit changes 2 things directly in the lib file:

- allow the internal `getMoment` function to accept a second 'format'
parameter;

- use that same `getMoment` function to parse the text of the selected
value, effectively using moment to both parse and format the values
displayed in the picker and ensuring consistency.

OPW-3258034

closes odoo/odoo#126711

X-original-commit: de6bc96afdc61b57493bcbde0b8f3479cc6ebd71
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-06-30 13:08:23 +02:00
tsm-odoo 3a661beb3a [IMP] im_livechat: improve rating views
This commit improves the tree/kanban rating view for livechat
channels:
- Open the channel in discuss if the member is a member of it.
Open the form view otherwise.

part of task-3332872

closes odoo/odoo#125902

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 13:08:20 +02:00
tsm-odoo 389f794ec5 [FIX] im_livechat: keep line breaks on feedback message
Before this commit, line breaks where removed from the
feedback message at the end of a livechat session.

This commit fixes this issue.

part of task-3332872

closes odoo/odoo#126925

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 11:58:06 +02:00
Arnold Moyaux c0ae4f59de [FIX] stock: import inventory adjustement
Traceback due to variable quant not instanciate during import.
It's due to commit a381b6fdd19d4f1a4512efe4f4877c50b5fd453e

closes odoo/odoo#126912

X-original-commit: 10e9e66b275649ef36880f4b7a6fbd4c3dc739d9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-30 10:42:25 +02:00
Victor Piryns (pivi) 786fc50629 [FIX] sale_project: sale_line_id shows SOs of child contacts
Current behaviour:
Sale Order Items on a task shows only SO related to the current
customer, or all SO if there is no customer on the task.

Expected behaviour:
If we have a customer on the task, show also SOs from child contact
of that customer (mirror the SO count in `Contacts` app)

Steps to reproduce:
- Install Contacts, Sales, Field Services
- Create 4 contacts, a company, with child contact A and B, a
  contact C who is child of A
- For each contact create an SO and confirm a field service product
- Now on any task, add the company as customer.
- In the Sale Order Item we can't select any of the SOs from the
  child contacts of the company.

Reason for the problem:
Since 41116c81cd where we wanted to
show all SOs when no `partner_id` was set on the task, we made use
of `=?` operator which is `True` when there is no `partner_id`, but
it matched only for `=` when it's not the case, not taking into
account `child_of` of said contact.

Fix:
Extend the domain with an `OR` to take child contacts if the
`partner_id` is not `False`.

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

opw-3374191

closes odoo/odoo#126898

X-original-commit: 027ba2e682ba046459fc60a76e59792fa6bbeda9
Related: odoo/enterprise#43395
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-06-30 10:42:22 +02:00
Victor Feyens 9c1e734846 [FIX] core: wrong docstring
closes odoo/odoo#126890

X-original-commit: cd6ed74ab9da0127dcb517177744b44ffcd8558a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-30 10:42:16 +02:00
tsm-odoo df9e855ee9 [FIX] bus: improve samesite support
This commit improves samesite support for embedded livechats by
allowing the bus service to open anonymous connections.

opw-3336222

closes odoo/odoo#126919

X-original-commit: 2fb6427992514e0254e40e8c7c012f0fc2332e85
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-06-30 09:27:49 +02:00
Prakash Prajapati fc444add27 [FIX] hr_recruitment: fix mail alias issue in recruitment app
Issue:
  If owner is set to job position, the owner does not receive an email
  when creating a new applicant so we remove the owner if the alias is active.

task-3354799

closes odoo/odoo#126911

X-original-commit: 637c390d49f01ef374a3d4fe1fe14cca540a93f3
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-30 08:11:51 +02:00
Raphael Collet 0a877ddfc7 [FIX] core: when flush() crashes while exiting a savepoint
When exiting a flushing savepoint, the method flush() is invoked before
closing the savepoint (which releases it):

    def _close(self, rollback):
        if not rollback:
            self._cr.flush()
        super()._close(rollback)

If method flush() crashes at that point, the savepoint is not closed at
all (because of the exception) and is therefore not even rolled back.
The expected behavior is that the savepoint rollbacks and the exception
bubbles up.

closes odoo/odoo#126866

X-original-commit: 5f9b4f5c998388625de27fbd8fe0f7a0524c04fd
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-06-30 07:06:44 +02:00
Gauthier Wala (gawa) f15134fa7d [FIX] account: tour had wrong taxes and was too fast
Added a saveForm to wait for the compute/onchange to proc on the save
Added a tax, to be independent of localizations
Changed the product, to have a product with an amount that won't be
impacted by difference of default decimal place from localizations.

Fixes runbot error 22093

closes odoo/odoo#126883

X-original-commit: 2678f490648f81488c8635f2ebc01591935a48f1
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-30 01:33:10 +02:00
Xavier Bol (xbo) 59cf3c9e7c [FIX] {sale_}project: make project billable if one of its tasks has partner
Before this commit, when the user installs `sale_project` and some
of his projects has no partner set but a partner is set on some
tasks of those projects then the user will no longer see the partner
field in those tasks because the project is not billable.

This commit checks if one of the tasks has a partner set to make the
project linked billable if it is not yet the case.

closes odoo/odoo#126880

X-original-commit: b0cb255577a7a0c49c2c764dbad715d3842b9508
Related: odoo/enterprise#43384
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-30 01:33:07 +02:00
Odoo a31fe2bb82 [FIX] discuss: channel name overflow
Before this commit:
The channel name used to overflow in the channel suggestion section.

After this commit:
The name will not overflow in the channnel suggestion section also
added limit on input character.

Task id: 3366608

closes odoo/odoo#126872

X-original-commit: 95c4b24a4fe8f2af1fce73e99684815d14a895be
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 01:33:03 +02:00
Pierre Masereel a746294b46 [FIX] model: correctly count groups
When you are sorting agregates of groups and you have more groups than
the limit, you get a traceback.

It is because you give the orderby to the private _read_group that is
not managed the same way when you pass it to the private _web_read_group
so it doesn't correctly build the query.

As we are calling _read_group to count the groups, we don't need to
order it. So we don't.

closes odoo/odoo#126862

X-original-commit: 6fdf86823088e0e413bef72dc0f20f926aa8f10a
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-06-30 01:33:00 +02:00
Julien Alardot (jual) 649b6d055d [FIX] hr_expense: fix currencies handling
Allow expenses reports to generate foreign currency
payments and use foreign currency accounts when all
expense lines are of the same currency.
If the report is multi-currency the company currency
is used instead (previous behaviour)

Task-3346458

closes odoo/odoo#126836

X-original-commit: 3d6d36ac5bab95af76776f07e55f286850f22ff9
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
2023-06-30 01:32:58 +02:00
std-odoo d305a78202 [FIX] web: fix the size of the avatar image for a relational property
Bug
===
The many2one properties to res.users and res.partner have an image
with the avatar. But the size was applied only for the res.users
model (and it was implemented in /mail and not in /web).

Remove the `width: auto` because it's redundant with `aspect-ratio: 1`.

Task-3377098

closes odoo/odoo#126835

X-original-commit: e05caa80120bd5bc7ba0b078c3237daddae995ed
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-06-30 01:32:55 +02:00
Leloup Loïc (lole) 65ae78b95d [FIX] website_slides_survey : fix certification badges display
Before this commit, when going to /profile/ranks_badges on the website,
an error 500 happened when it had to show certification badges.
This is because the certification badges use the "state" field of their linked
survey to check if it is still open.
This field has been removed in 15.0, where the active state of the survey is
used to know if it is still used instead of a state.  When archiving a
certification survey, their linked badge is automatically archived as well,
so there is no need for that line anymore.

opw-3373973

closes odoo/odoo#126834

X-original-commit: 6d99542da6bf7881043bdc204c409d64cf7672c1
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-06-30 01:32:52 +02:00
Gauthier Wala (gawa) 8fc62fbdb4 [FIX] l10n_ro: upgrade of tax report could break
The aggregation_formula were removed for no good reasons in https://github.com/odoo/odoo/commit/81941965aef29a23d6815cc26b42acf8b38f1922.
It causes issues with a second expression related to balance,
but with different ids.
We also re-add the sequence. They were removed in https://github.com/odoo/odoo/commit/a717e5b86d19be6555be5682b7ee8ff2f1483da4 but as it adds some report lines, we need to resequence all lines.

related to runbot error 17572

closes odoo/odoo#126819

X-original-commit: e37b795f1346e0d62ddf91f5e757f6e65d05c1b1
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-06-30 01:32:47 +02:00
Claire Bretton (clbr) 4a8099a1f9 [FIX] l10n_ch: Fix return tax type
The return tax should only be used through its parent tax,
we don't want it to be accessible directly on bills or invoices.

opw-3347425 (2nd issue)

closes odoo/odoo#126803

X-original-commit: a87bb033a3b02bf91f0958e8ee8a5202b297cd68
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-06-30 00:21:21 +02:00
Mahdi Cheikh Rouhou (macr) b98425b1d9 [FIX] website_sale_product_configurator : show correct available qty in product page
When you add items in the cart it always show the number of available left in stock of the previous state for example :
1- cart is empty it shows 20 items
2- add one into cart - it shows 20 items left in stock (should be 19)
3- add another one into cart - it show 19 items left in stock (should be 18)

Steps to reproduce the error :
1 - Go to one of the product and make sure that it has some available quantity
2 - Go to sale configuration on the product and remove "out-of-stock : continue selling" and add show available qty only if below 5000 for example
3 - Go the web page of the product and try to add some items into the cart you will see that the stock message is wrong

The origin of the problem is that when we have optional products activated , it will launch a product configurator modal. After posting the update in the database there is no call to the function that updates the stock message.

opw-3341377

closes odoo/odoo#126802

X-original-commit: cec84ac8f761b516aef61e2721b7d619834be730
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-06-30 00:21:19 +02:00
Alexandre Kühn ca64f6f5bb [FIX] mail: improved (fuzzy) search of emoji picker
Before this commit, search in emoji picker was case-sensitive
and had no scoring of items. For example:
- typing "ok" did not match with 🆗
- "ok" 1st suggestion was 😘 because of keyword "face blowing a kiss"
 and this is one of the 1st emoji having characters "o" and "k" in
 search terms.

After this commit, search is now fuzzy:
- typing "ok" shows 🆗
- "ok" 1st suggestions are 👌 & 🆗

Task-3175520

closes odoo/odoo#126801

X-original-commit: 4953172398719df829735f381f4e8939f17b1989
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 00:21:16 +02:00
Renaud Thiry 82e7f08afe [FIX] website_event: make falsy string id as False
Before [1] we used to consider '0' as False.
As this was not transfered in the refactoring, registering for
an event that does not have any ticket would give a traceback
saying the ticket is invalid.

This adds back the fallback to `False` for falsy values after they
have been converted from string to integer
as '0' is not Falsy in python.

[1]: 6b8daa880c

task-3381943

closes odoo/odoo#126783

X-original-commit: 5d61bc66b9e147d22175d15c8d39fc594f45b546
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Renaud Thiry (reth) <reth@odoo.com>
2023-06-30 00:21:14 +02:00
Enric Tobella e4538e393f [FIX] maintenance: Allow to see your created maintenances requests
closes odoo/odoo#126754

X-original-commit: 703f03e038cfa5301019f3c248fa85ebabeb2f20
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-30 00:21:03 +02:00
tsm-odoo 8c6ec25533 [FIX] mail: unpin thread should close chat window
Before this commit, unpinning a thread from the discuss app
would keep its related chat window opened. This PR solves
this issue.

Steps to reproduce (non channels):
- Open a chat window (e.g. sales channel)
- Go to the discuss app
- Leave the sales channel
- Get back to the home menu
- Chat window is now the "New message chat window" as the
thread has been removed but the chat window was not closed.

If those steps are reproduced with a channel (e.g. direct messages),
the chat window is kept as is as the channel is not removed.

task-3389554

closes odoo/odoo#126751

X-original-commit: ef14f50d9ab7e2f38d65ac569f4108a89abbb69a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 00:21:01 +02:00
Maitri Patel 229fe73517 [FIX] mail: handle error while click on follow button
When a user click on the 'Follow' button in the chatterbox of the project
Task form view without adding any data, then traceback will appear.

Steps to reproduce(i.e Project):

- Install project module.
- Go to Project >> Tasks >> My task(you can also choose the all task menu) .
- In the list view of project.task model, click on the new button.
- In-form view of project.task model, Click on Follow Button in the chatterbox.

Error: traceback appears: "psycopg2.errors.UndefinedFunction: operator does
not exist: integer = boolean"

sentry-4243265676

closes odoo/odoo#126749

X-original-commit: eeaee0d57effb50d3a0edad1672e17bffea11d0a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 00:20:58 +02:00
xO-Tx 79a3fc20c5 [FIX] web: restore HTML report CSS
Steps to reproduce:

- Open base runbot with no installations > Install Account > Check an
invoice preview.
- Install Website > Check invoice preview > It looks narrow and does
not fill the available width.

Starting from [1], the code that sets the `container-fluid` class on
HTML web reports was replaced with the Owl version on the `ReportAction`
[2] but since some reports are not using this system, the code was
restored in a separate JS module on 16.0.

Starting from `16.1` (exactly after [3]), the JS code in
`web.report_assets_common` bundle was removed completely from the report
template, and reports are only using CSS [4]. So instead of a separate
JS module, a temporary script was added to the template to maintain the
same legacy behavior when a report is in iframe until all reports are
fully converted.

[1]: https://github.com/odoo/odoo/commit/feef532b417828905ce09675043b55b2b3736e43
[2]: https://github.com/odoo/odoo/commit/feef532b417828905ce09675043b55b2b3736e43#diff-ed0708a6c1a18e945a7829b2f8b17df7a2fbe4ab83e27fe6140dba79465c2832R39-R43
[3]: https://github.com/odoo/odoo/pull/104794/commits/37f009772ccb6bc9ed5733374e104e39c1e11792#diff-d9b97c730b0213bde5b18ab515e1e94fdb0809b8f760440ef7ca70163263101fL29-L30
[4]: Even after completely removing the JS code from HTML reports, the
`web.report_assets_common` bundle still contains some unused legacy
report JS code on stock: https://github.com/odoo/odoo/blob/saas-16.1/addons/stock/__manifest__.py#L98-L100
Maybe this code should be removed if it is not used anymore.

opw-3209231

closes odoo/odoo#126716

X-original-commit: 98d14a0b657efcfd365a4e7a28bef91f57758e6b
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-06-30 00:20:50 +02:00
Benjamin Vray 7ee6d9ff2f [FIX] web, website, web_editor: fix popup scrollbar
Steps to reproduce the bug:

- Drag and drop several snippets onto a web page in edit mode to make
the vertical scrollbar appear.
- Drag and drop a popup onto the page.
- Drag and drop snippets into the popup so that the height of the popup
exceeds the height of the viewport.
- Try to scroll the popup downwards by clicking and dragging on the
scrollbar (not using the mouse wheel).
- Bug: the page is scrolled instead of the popup.

Note: This bug occurs in Chrome (not in Firefox).

This issue occurs because two scrollbars are present at the same
location (one for the page and one for the popup) and they overlap each
other. Normally, Bootstrap removes the scrollbar from the body when a
modal is opened, and this behavior was adapted for the #wrapwrap element
with this commit [1]. However, when transitioning to Bootstrap 5, the
code that overrides Bootstrap was removed instead of being adapted (this
was done in this commit [2]).

In later commits [3] and [4], we continued to remove code that updated
the scrollbar based on the opening of a modal because this code was
causing errors due to the fact that it was incomplete without the part
removed by commit [2].

This commit restores the original behavior (before the deletions made by
the aforementioned commits) by restoring the missing code and properly
adapting it to Bootstrap 5.

[1]: https://github.com/odoo/odoo/commit/9cf8b97fe40444b44ebb6e6fb992bc658a087d32
[2]: https://github.com/odoo/odoo/commit/0b94da214b7017e8580e671cbaa68ade6de2fbc7
[3]: https://github.com/odoo/odoo/commit/cb7cf77ed080e86f800af61c9a3dc4ad36ad6cfb
[4]: https://github.com/odoo/odoo/commit/51939d09f84579f61f1ff77aacd754beba036dc2

task-3102275

closes odoo/odoo#126709

X-original-commit: 0e75f1c01ca4fcc3eb483a7256bcf72b2bca39c3
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-30 00:20:47 +02:00
Joren Van Onder 5921343c2a [ADD] l10n_br_sales: localize customer-facing quotations for Brazil
Brazilians don't expect to see tax-related info on quotations. This
modifies the quotation PDF and online quotation views. Adding t-ifs
with position="attributes" was considered but doesn't play well with
other modules who would want to modify the same elements in some way.

Therefore a similar approach to account.report_invoice was
taken. Small functions on sale.order will determine what views will be
used. This allows l10n_br_sale to dynamically return its own
primary=True views when Brazilian records are shown.

task-3325740

closes odoo/odoo#122987

Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-06-30 00:20:45 +02:00
Hugo Carlier (Huca) 6875d23647 [REF] resource: improve filter_domain_leaf performances
In some methods, like group expand methods, it is not uncommon to
transform a domain designed for model A to search records from another
model B. In general this transformation requires two operations:
- Rename some fields in the domain
- Remove leaves from the domain that relate to fields not existing in
  model B
The current function filter_domain_leaf allows to realize this second
operation. It currently relies on a recursive implementation with a
complexity of order O(n²).

This commit introduces a re-writing of the function filter_domain_leaf
that:
1. Changes the recursion based implementation to an explicit stack
   implementation
2. Introduces a field mapping dictionary as argument

The explicit stack implementation allows to avoid stack overflow when
working with long domains. The complexity order is also improved to O(n)
instead of O(n²) which leads to performance gain. For a domain length of
~100 elements, the gain (timewise) is reaching 50%. It is >95% for
domain length over 10 000 elements.

The field mapping dictionary allows to avoid pre-filtering of domains
when using filter_domain_leaf. In cases where it is used, the domain
then just has to be browsed once in the filter_domain_leaf function.

task-3299357

closes odoo/odoo#120834

Related: odoo/enterprise#40847
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-29 22:38:49 +02:00
Zelong Lin a0aa45ce00 [IMP] mail: chat window dropdown actions from avatar & name
Before this commit, chat window actions were all placed in
the right part of header. It was showing the main action (call),
close action, and all other actions in dropdown menu from
the "..." (more) button.

This commit now replaces the "..." (more) button by clicking
on avatar/name of conversation. The "..." (more) button has been
replaced to "_" (minimize/fold) button, as clicking on header to
open/fold chat window can become hard due to avatar + name being
clickable to show most chat window actions.

This commit also adds the following actions in chat window:
- Open (Employee) Profile
- Rename (conversation)

Task-3336752

closes odoo/odoo#124592

Related: odoo/enterprise#42480
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-29 19:54:38 +02:00
niyasraphy 5e322ec5b2 [IMP] point_of_sale: add product to order search view
before this commit, in the pos order search view the
product field is not added, and hence user may have
to use the custom filter, in order to filter the pos
order having a product.

after this commit, the product will be added to the
search view, so the end user's can easily filter the
pos orders containing a product.

closes odoo/odoo#121865

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-29 19:54:28 +02:00
Adrien Minne (adrm) c31032f415 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/7d15d3c7 [REL] 16.4.0-alpha.6
https://github.com/odoo/o-spreadsheet/commit/56f3b593 [IMP] spreadsheet: add locale handling Task: 3222401
https://github.com/odoo/o-spreadsheet/commit/5aec70d4 [IMP] cell: store date string as value + format Task: 3222401
https://github.com/odoo/o-spreadsheet/commit/eeaf0083 [IMP] icons: add display header icon
https://github.com/odoo/o-spreadsheet/commit/3f1e970c [FIX] SelectionInput: fix position of exclamation mark icon Task: 3355063
https://github.com/odoo/o-spreadsheet/commit/a46bf04e [FIX] LineBarPieConfigPanel: charts data series invalid input Task: 3355063

closes odoo/odoo#126679

Related: odoo/enterprise#43291
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-06-29 18:20:37 +02:00
Radhika Shyara f852e66e44 [FIX] base: error handling of automated actions
If Automation Actions's configuration is done wrong it will
cause Error at runtime which will be caught in sentry and
causes unnecessary traffic.

So, we stop catching exceptions from Automated Actions.

sentry-4200700020

closes odoo/odoo#126658

X-original-commit: 3479d998417b60807c288c047a1f469329dee59c
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-06-29 18:20:35 +02:00
Adrien Widart (awt) 08613dc3ae [FIX] purchase_stock,stock_account: refund price difference
If a bill has a price difference with the PO, and if the user
refunds it, it will create some errors in the inventory valuation and
the accounting entries

To reproduce the issue:
(Need account_accountant)
1. Create a product category PC
   - Costing method: FIFO
   - Inventory valuation: Automated
2. Create a product P
   - Type: Storable
   - Category: PC
3. Confirm a PO with 1 x P at $10
4. Receive P
5. Bill it at $15
   - It should create a price diff SVL, see inventory valuation
6. Refund

Errors: The inventory valuation is not impacted, it is still valued
at $15. Because of the refund, it should be $10 (i.e., the price
difference should be cancelled). Then, suppose the user creates a
new bill at $20, it won't do anything (the stock valuation will not
be impacted).

Long story short: the price difference feature, which is supposed to
impact inventory valuation/account entries, does not work if there
is a (partial/full) refund in the flow.

Now, let's think about a more complicated use case:
- Receive 12 products in several times
- Bill in several times (with different quantities than the receipts)

It could give something like (where `x` are products):
```
       SVL01        SVL02           SVL03
/---------------\/---------\/------------------\
  x   x   x   x   x   x   x   x   x   x   x   x
\-----------/\-----/\--/\---------------/\------/
     B01       B02   B03       B04          B05
('B' means Bill)
```
We observe that
- a bill could impact several layers
- a layers could be impacted by several bills

And here is the issue: currently in the code, we don't have a relevant
link between layers, account move lines and the quantity that links
both. The only thing we have is a link between the price difference SVL
and the account move line that has generated that SVL (see field
`account_move_line_id` on `stock.valuation.layer`). But this is
clearly not enough and is really problematic: if I refund BILL04, how
should it impact SVL02 ? Then, what if I return a part of the third
delivery before refunding BILL04 ? What if I deliver a part of the
received products before refunding several bills ? What if I refund
B02, B05, then I bill 4 products ?

-> You get the idea: we definitly need a clear link between account
move lines and stock valuation layers and that link has to give a
quantity.

Moreover, it is difficult to create an order between bills. We have
their name, their ID, but the posted time is actually a date. So, if
we mix reset & repost, a draft bill and a draft partial refund, and
so on, and if this mix happens the same day, it is very difficult to
define a clear order. But, considering the above schema, we see that
the order does matter (switch BILL02 and BILL03, the remaining
values of SVL01 and SVL02 will not be the same)

-> So, we also need a way to order the links between account move lines
and stock valuation layers.

Now, about the solution.

First, a **disclaimer**: We are in stable, we are limited by the stable
policy, and we can't let the above use cases unresolved. So, we took
some decisions to fix them and to repesct all the constraints we had.
**This is clearly a (big) patch, it should be considered as such and
will be replaced by a cleaner/better solution on master as soon as
possible**.

About the link between SVL and AML, we had the possibility to create
a new model in a new module. But this would have decreased the
impact of the fix deployment, would have created some
complications for support (different behaviours depending on whether
the module is installed or not) and would have make testing more
complicated (again, different behaviours depending on whether the
module is installed or not).

This is the reason why we decided to "replay the receipts and the
bills". That way, we know which layer is impacted by which invoices,
and vice versa. And, to set the order between all of them:
- For the layers, we use their `create_date`
- For the bills, we use a hack: each time an account move is posted,
  because its state is tracked, a tracking value is posted on the
  chatter, and this tracking value has a `create_date` (remind the
  constraints explained above and the disclaimer...)

OPW-3217215

closes odoo/odoo#126536

X-original-commit: b5e0e1057b81f7333e73ef06e88e8943709119cc
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-06-29 18:20:27 +02:00
tsm-odoo 9beb4668ca [IMP] im_livechat: improve feedback messages
This PR improve feedback messages:
- Visitor has left the conversation: as note
- Rating message: as note
- Rating message: Use same emojis as for customer
- Rating reason in same message as the emoji, without writing "reason"
- Feedback done in 1 rpc instead of 3

part of task-3332872

closes odoo/odoo#125925

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-29 18:20:25 +02:00
Jurgen (jugj) 5da9a87a82 [IMP] hr_recruitment : Add the possibility to mass sms applicants
task-3354904

closes odoo/odoo#125787

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-29 18:20:22 +02:00
Didier (did) 3d2342cde8 [IMP] mail: display email addresses when sending a message from chatter
Task-3358505

closes odoo/odoo#125580

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-29 18:20:19 +02:00
std-odoo 2ccce7ff1e [IMP] base: allow to set a list of domain / email in the from_filter
Purpose
=======
Some SMTP configuration can be used for many domains names. E.G.,
our own SMTP configuration can be used for both "mail.odoo.com" and
"odoo.com". So we want to be able to set a list of allowed domains
name, separated by a comma, instead of a single domain.

Task-3332488

closes odoo/odoo#122234

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-06-29 15:27:27 +02:00
Louis Wicket (wil) d0710323b9 [REM] mail: remove dead code
closes odoo/odoo#126641

Related: odoo/upgrade#4866
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-06-29 14:08:47 +02:00
Benoit Socias b6b4db5fb5 [FIX] *: adapt front-end HTML field sanitization
*: account, event_booth, gamification, hr, project,
   website_event_track, website_hr_recruitment, website_slides

HTML fields that appear in the front-end can be modified using the
website editor. Some of them are sanitized in a way that breaks the
behavior of snippets that can be dropped within them.

This commit adapts the sanitization of those HTML fields so that the
snippets behave as expected.

opw-3267589

closes odoo/odoo#126708

X-original-commit: 7fd28afaf3e45cafbef80b69aa45c58b31fb3de6
Related: odoo/enterprise#43311
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-29 11:59:46 +02:00
Julien Carion (juca) bfc6c71402 [FIX] account: fix account tax groups tour
This commit simply makes the account tax groups tour compatible with
odoo enterprise even without the accounting app installed.

closes odoo/odoo#126738

X-original-commit: 450c26a866a58f0441db83376066d606ec429bc2
Related: odoo/enterprise#43323
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
2023-06-29 09:10:59 +02:00
Valentin Vallaeys (vava) b5b617f978 [FIX] website_sale_{loyalty,mondialrelay}: signature change to override
This commit* changed the signature of `_handleCarrierUpdateResult` from
website_sale_delivery, but did not apply the change to the overrides in
with loyalty and mondialrelay.

*https://github.com/odoo/odoo/commit/0967efaa24db47619b850bd4edcd8d196ad2ae5f

Fixes #126491

closes odoo/odoo#126731

X-original-commit: fe6fbe4ef53ba1c4aefdc4ae88c52fd646f237b7
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-06-29 09:10:54 +02:00
dasz 6f07c8c2d8 [IMP] hr: remove record from demo data
task 3366281

closes odoo/odoo#124964

Related: odoo/upgrade#4773
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-29 09:10:46 +02:00