Commit Graph
170170 Commits
Author SHA1 Message Date
Odoo's Mergebot ad79c34ba6 [FW][IMP] digest: milkify the digest email template
This PR contains a revamp of the digest email in the new "Milk" style replacing
the old purple with the new one. This has been adapted in all digest data too.

The images of the digest email's tips have been replaced by "milkified"
versions of them, already available on odoo cdn by the way.

Task-3338467

closes odoo/odoo#158351

Forward-port-of: odoo/odoo#157896
Forward-port-of: odoo/odoo#125432
Related: odoo/enterprise#58992
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-03-20 19:56:42 +00:00
Elisabeth Dickinson 60bc3d50f6 [IMP] *: milkify digest tips GIFs and PNGs
*: crm, digest, hr_expense, im_livechat, mrp, purchase, sale_management,
website

The images in the digest email are updated to have the look of the new
"Milk" Ui. We want to keep names unique, as they target different
versions. That way we can keep a v15 oriented gif for people using tips
in v15 for example.

The mobile phone image is hosted on odoo.com.

task-3338467

X-original-commit: odoo/odoo@3711d2b61b
Part-of: odoo/odoo#158351
2024-03-20 19:56:42 +00:00
Elisabeth Dickinson 42563aecea [IMP] digest, *: milkify the digest email template
A revamp of the digest email in the new "Milk" style.

task-3338467

X-original-commit: odoo/odoo@33c5a6c4ae
Part-of: odoo/odoo#158351
2024-03-20 19:56:42 +00:00
William Henrotin 8b3812eb38 [FIX] stock_account: reinforce search domain in test
The account move search was not enough specific to retreive only one
account move. The following `assert` sometimes failed because of this.

This commit reinforce to search to get only one account move

closes odoo/odoo#158327

Opw: runbot error 60338
X-original-commit: 78518f5dbf26680f678c6bbd950d60bb96eeedfe
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2024-03-20 19:56:41 +00:00
Raphael Collet 268d8b830e [FIX] base: don't check access rules on new records
This fixes an issue where access rules are checked on a new record: the
rule domains are evaluated with method filtered_domain(), and one rule
uses the operator 'child_of', which is implemented with a call to
search().  When used with a new record, filtered_domain() returns an
empty recordset instead of the record itself.

By design, the ORM doesn't check security on new records.  A base
automation of type 'onchange' will run some server action on a new
record.  The server action may still check access rights on the model,
but should not check access rules.

closes odoo/odoo#158309

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2024-03-20 19:56:40 +00:00
AllePilli 43d150902f [IMP] account: Show accounting date on some posted invoices
In some edge cases the invoice date will differ from the accounting date. This commit makes sure that when this is the case the accounting date is shown on a posted invoice or credit note. This way it stays clear that the accounting date differs from the invoice date.

closes odoo/odoo#156315

Task: 3774329
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2024-03-20 19:56:39 +00:00
lase@odoo.com adb2cd2b05 [FIX] purchase_requisition: compute taxes for alternative PO creation
Steps to reproduce:

- Create a request for quotation for a product with set vendor Taxes
- Create an alternative purchase order from that RFQ with Copy Product

Current Behavior:

The purchase order line of the PO associated with the created
alternative does not compute the taxes.

Expected behavior:

The taxes should be computed in the same way as if the PO was created
manually and then linked to the alternatives.

Cause of the issue:

When creating a PO manually, the taxes of each purchase order line
are computed when the product is set during the call of the
`onchange_product_id` onchange method:
https://github.com/odoo/odoo/blob/64c13193ae0fe23eb1b426f5bbcd8531e9a40967/addons/purchase/models/purchase.py#L1221
https://github.com/odoo/odoo/blob/7ed0a773b6e0711b127f236ce665c35202d973bc/addons/purchase/models/purchase.py#L1055-L1061
By contrast, PO created from the `action_create_alternative`
generate each `purchase.order.line` using `Command.create`. Therefore
these lines will not trigger the onchange method and their taxes
will not be computed.

Fix:

To KISS, we compute the taxes of each line just after the creation of
the record using the `_compute_tax_id` method.

opw-3750719

closes odoo/odoo#158300

X-original-commit: 15799594bda41bdb4b65387aa5f0d46482cb91c1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2024-03-20 18:29:28 +00:00
jugj-odoo 4b62df70fc [FIX] hr_attendance : Include Jquery
The barcode service using jquery for chrome on mobile is not working properly without jquery included, we include it here
task-3817495

closes odoo/odoo#158275

Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2024-03-20 18:29:25 +00:00
Pierre-Yves Dufays a3d2336b17 [FIX] calendar: fix duplicate feedback in the chatter activity done note
How to reproduce:
- install crm
- open a lead
- create an activity call or meeting (and schedule it in the calendar)
- mark it as done with a feedback

The activity log in the chatter contains the feedback twice and shouldn't.

The problem was caused by the synchronization of the event description with the
related activities. When marking an activity as done, the event description is
updated with the feedback which in turn update the activity note with the
feedback. When logging the activity done in the chatter, the note and the
feedback are logged leading to a duplicate feedback. We solve this by first
logging the activity done in the chatter before updating the event description.

Task-3653088

closes odoo/odoo#158268

X-original-commit: 0156204e465bc7f86643152cfff4d1aa33fd6935
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-03-20 18:29:24 +00:00
Laurent Stukkens 12c327ad94 [FIX] web_editor: ensure correct fonts are used
Since commit [1], the new tiktok icon is added to odoo but the
conversion of the css class into an image is not supported.

This commit ensures that the conversion is correctly handled.

Steps to reproduce:
- Open the mail marketing app
- Create a new mass mailing
- Insert an icon in the template, for instance type /image in the text
  and select the "Pictogram" tab
- Search for tiktok icon and insert it
- Send the mass mailing
- The icon will not be found in the mail

[1]: https://github.com/odoo/odoo/commit/515915b9

closes odoo/odoo#158266

X-original-commit: 0fa2ce8212077facace67a0072aa4ddebc9b55f0
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2024-03-20 18:29:23 +00:00
Hadi (alha) 1a54ee3c91 [FIX] hr_holidays: fix on get on leave ids query
Issue addressed by this commit:
An ambiguous column error occurs in the hr_holidays model when the auth_signup module is installed alongside it, due to both modules having a state field. This ambiguity arises within the _get_on_leave_ids method, affecting the execution of a SQL query designed to identify users on leave.

How to reproduce the issue:

Install both hr_holidays and auth_signup modules.
Attempt to execute the _get_on_leave_ids method to identify users on leave.
Behaviour before this commit:

An "ambiguous column error" is raised due to the SQL query not specifying which state field to use, leading to confusion between the state fields in the hr_leave and res_users tables.
Expected behaviour:

The SQL query should clearly reference the state field from the hr_leave table, avoiding ambiguity and accurately identifying users on leave without errors.
Solution:

The SQL query within the _get_on_leave_ids method has been updated to use hr_leave.state = 'validate' for clear distinction, resolving the ambiguous column error.
opw-3770758

closes odoo/odoo#158261

X-original-commit: 0f6597e02c25993c85482febcbd000cfe3143d69
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2024-03-20 18:29:22 +00:00
tsm-odoo 9a37126ad2 [FIX] mail: ptt extension race condition
The push-to-talk extension service sends a message to the extension
when starting to check if it is enabled. If the response is received
before the RTC service is started, the answer is ignored, and the
service acts as if the extension were not available. This PR fixes
this issue.

closes odoo/odoo#158252

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-03-20 18:29:22 +00:00
Anita (anko) a629230fec [FIX] payment_paypal: change access_token parameter name
PayPal refuses to take access_token name parameter and throws an error
to user that they need to log again. Since the Access Token is neeeded to
cancel transaction, it is renamed to return_access_tkn.

opw-3810686

closes odoo/odoo#158249

X-original-commit: e1ed847912b60bf09e13087963fad87afbed875c
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: anko-odoo <anko@odoo.com>
2024-03-20 17:11:47 +00:00
Antoine Boonen e353da27d4 [FIX] account_edi_*: Fix EDI addresses
* = facturx, ubl, ubl_bis3, ubl_cii

Problem
---------
Currently, the EDI use the commercial partner to craft the XML document.
However, this causes issues when users add, for example, an invoice
address to a partner. Indeed, the address of the main partner will be
used and not the invoice address. This caused issue; see the relevant
OPW-3624205.

Objective
---------
Make sure that the correct address is used when generating the XML.

Solution
---------
Make sure the commercial partner // partner value is used at the correct
spot.
- `partner` should be used for addresses
- `commercial_partner` for everything else.

OPW-3624205
task-3636315

closes odoo/odoo#158219

X-original-commit: 95d3a5ac16c341acc4b680f19e404a9f2334b582
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: Antoine Boonen (aboo) <aboo@odoo.com>
2024-03-20 17:11:44 +00:00
Benjamin Vray 618fbc1a54 [FIX] web, web_editor: fix text muted within a dropdown menu
Steps to reproduce the bug:

- Install the "Blogs" app and go to the "/blog" page.
- Click on "Edit" to enter edit mode.
- Go to the "Theme" tab.
- Select the 4th color from the theme colors and choose "black".
- Save the page to exit edit mode.
- Perform a search in the search bar input that yields no results, for
example: "zzz".
- Bug: The message "No results found. Please try another search." is not
visible because it is displayed in white on the white background of the
dropdown.

A previous commit [1] had already addressed the issue for the "Search"
snippet that can be dropped into a page, but this fix wasn't sufficient
to solve the problem everywhere. Indeed, the text-muted in a dropdown
should be adjusted in all cases and not just for snippets; it's a
Bootstrap issue. The text-muted color should be adapted to the
background color of the dropdown.

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

task-3662985

closes odoo/odoo#158203

X-original-commit: 46fcb3712f0ba68144b03ed23f52157d4dfc789a
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2024-03-20 13:52:31 +00:00
Vivek Pathak 361e63b880 [FIX] mass_mailing: fix mail body layout
Before this commit:
The snippet menu in the Mail Body appeared on the top of the form,
causing misalignment.

Technical details:
- This problem was observed in the `view_mail_mass_mailing_form` form and all
  other views inheriting from it.
- The fix involves adding the `o_mass_mailing_iframe` class using the
  `iframeHtmlClass` attribute on the body_arch field.

After this commit:
The layout is now aligned.

Task-3603623

closes odoo/odoo#158201

X-original-commit: 5b1d901014294274548765216ca4693501649ee9
Signed-off-by: Vivek Pathak (vivp) <vivp@odoo.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2024-03-20 13:52:30 +00:00
Arthur Pierrot (arpi) 065ec4e2bb [FIX] hr: correct number of employees
This will fix the number of employees in the partner view and redirect to a kanban view of the employees.

The smart button on the partner view for the number of employees related to this partner now gives the correct number depending on the companies selected.

If multiple employees are related, the action shows a kanban view of those employees.

closes odoo/odoo#158146

Task: 3693173
X-original-commit: c1e979203ec82de2300ad2f8b10478e1504b1c7c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-03-20 13:52:28 +00:00
Louis (loco) 75d12453c4 [FIX] website: apply custom font size on buttons inside the header
Steps to reproduce:
- Enter in edit mode.
- Select the 'Header' menu.
- Switch the default template to 'Rounded box menu'.
- Select again the 'Header' menu and on the 'Navbar' details, update the
format value (i.e: 10px) and save.

-> Problem: some buttons are not affected by the change of the format
value.

The problem is that since [1], those buttons have the `rounded-circle`
class so their font size is not the custom one (but it is the value of
`$font-size-base` instead). To solve the problem, the css rule has been
adapted in order to force the font size of the buttons inside the header
to the custom value if it exists.

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

opw-3810794

closes odoo/odoo#158135

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2024-03-20 13:52:27 +00:00
kcv-odoo 553fc002d7 [FIX] sale: re-compute downpayment related sol name
Before this commit sol name was not reflacting invoice
status when it moved to posted it only reflect draft
and cancel state.

This commit re-compute downpayment related sol name
when invoice related to that sol get posted this
way it'll update sol name to proper name instead of
keeping always Draft string in it.

opw-3768323

closes odoo/odoo#158094

X-original-commit: 40830f7e30ca8d84802088af17ade57f7b79998a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Kartik Chavda (kcv) <kcv@odoo.com>
2024-03-20 13:52:25 +00:00
Adnan Saiyed eff58a91ca [FIX] web_editor: events not getting caught in website
Current behaviour before commit:

When trying to crop image in website, 'mousedown' and
'keydown' events are not getting caught. Due to this
- Crop is not getting closed when clicking on document
- Cropped image is not getting saved when pressing
   enter

Desired behaviour after commit:

Now, events are added to the owner document of the
crop widget. As result,
- Crop gets closed when clicking anywhere in document
- Image gets saved when pressing enter.

task-3570524

closes odoo/odoo#158093

X-original-commit: afeba0d17a91d41ba2628524ccc03249835884b1
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: Adnan Saiyed (adsa) <adsa@odoo.com>
2024-03-20 13:52:24 +00:00
Julien Carion (juca) f66eaebc70 [IMP] web: pivot: keep horizontal scrollbar inside viewport
This commit simply removes the table-responsive class from the pivot
view in desktop mode so that its eventual horizontal scrollbar will
remain inside the viewport instead of being positioned at the very
bottom of the page. Also hides the scrollbar in sample data mode so that
the user cannot scroll horizontally in this case which introduces weird
display.

closes odoo/odoo#158083

Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2024-03-20 13:52:23 +00:00
charliedao 59fefc0a02 [IMP] website_sale: add hook to _get_checkout_steps for easier override
`_get_checkout_steps` didn't provide a friendly way to add steps in the
checkout flow. Developers had to reimplement part of the parent logic in 
their overrides.

This commit introduces `get_checkout_step_list`. This method will allow
an easier override of the checkout steps while keeping the logic to 
return a single step in the parent method.

closes odoo/odoo#158026

Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2024-03-20 13:52:22 +00:00
Benoit Socias 51701be864 [FIX] website: not create editors for form field parts
Since [1] when the "Padding (Y, X)" option was added, form elements are
recognized as columns because they match the `.row > div` selector of
that new option.

This commit excludes those form elements from this option's selector.

Steps to reproduce:
- Drop a website form.
- Click on field's input.

=> An empty "Column" editor appeared in the side panel, and an error
occurred when trying to delete it.

[1]: https://github.com/odoo/odoo/commit/11418cc6f0afcc8e14869f4f38ae0d6d462ac712

task-3748574

closes odoo/odoo#157572

Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2024-03-20 13:52:20 +00:00
Julien Banken ca76366bac [FIX] web_editor: enable embedding unlisted vimeo videos
When the user inserts a video with the `/video` command and provides a
link of an unlisted vimeo video, the system generates a new url based
on the options selected but omits the hash parameter granting access to
the given video. As a result, the video can not be loaded and the vimeo
`iframe` indicates that the video does not exist.

To fix the issue, we will copy the hash parameter from the original link
to the newly generated url. That way, the video will be loaded properly
and the user will be able to embed unlisted vimeo videos.

Steps to reproduce the issue:
1. Install the website app
2. Open the website builder
3. Drag and drop a text block
4. In the text block, type the `/video` command to insert a video
5. In the modal, paste the link of an unlisted video
6. The `iframe` indicates that the video does not exist

=> The system should extract the hash parameter from the provided url
and set it on the generated url. The video should then be loaded properly.

task-3697764

closes odoo/odoo#157279

X-original-commit: f72b873e58348374f3ce0e91ec5e87ed42215e55
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-03-20 13:52:19 +00:00
hupo-odoo c029167cca [FIX] account: default account type on journal
This commit cleans the domain that defines the default account that can be set on a journal. It first removes the domain that excludes the receivable and payable accounts from the default account, and we restore the default accounts that could be set on sale, purchase, bank, and cash journals. The domain was broken since this commit: https://github.com/odoo/odoo/commit/3312657294947b1cc8670a0ed3557e12ee6969c8

The following journals must have the following possible default account types:
- bank: asset_cash,
- cash: asset_cash,
- sale: income, income_other,
- purchase: expense, expense_depreciation, expense_direct_cost,
- general: all account types are possible,

The object of the task was mainly to allow misc journals to allow receivable or payable default account type for the following use case:
Suppose a user creates a Miscellaneous Journal to manage the details of the credit card statements.

Most journal entries will consist of journal items impacting the Payable Account, as this will reclassify the debt towards various vendors and address this debit to the credit card company.

It would in that case be necessary that the liquidity_payable accounts can be the default account on the miscellaneous journal. Otherwise, the user will have to fill in manually the account for each line of its credit card statement, and considering there can be a lot, this could become cumbersome.

task-3393017

closes odoo/odoo#157188

Signed-off-by: William André (wan) <wan@odoo.com>
2024-03-20 13:52:18 +00:00
jorv 5d469f67f1 [FIX] mass_mailing: precompute email_from based on alias domain
With 17.0 the `mail.alias.domain` was introduced, allowing the
configuration of the bounce, catchall and default from email addresses
at the company level (`res_company`).

For this purpose, the `_compute_email_from` method was introduced to correctly
compute the `email_from` in various email contexts.

But, the `email_from` field in mass_mailing was using an obsolete combination
of `default=` and a compute method.
This meant that when one created a new `mailing.mailing` record, it was
always defaulting to `self.env.user.email_formatted`.
The compute was only triggered when the `mail_server_id` field manually
updated.

This is corrected with this fix and a unit test was added to test three
different use cases.
An invisible `create_uid` was added to the base mailing From view xml
to have the compute method trigger correctly in some unit tests.

How to reproduce bug:
See related github issue https://github.com/odoo/odoo/issues/151310

Behavior after this fix:
If `mail.alias.domain` is setup for the company and a default `ir.mail_server`
is configured for Email Marketing, `_compute_email_from` will select
the expected `email_from` at record creation for `mailing.mailing`.

opw-3704715
Fixes #151310

commit 4b5453d87498d32b0ec3e3e7d64d35f903ac2193
Author: jorv <jorv@odoo.com>
Date:   Mon Mar 18 15:30:06 2024 +0100

[FIX] mass_mailing: precompute email_from based on alias domain

With 17.0 the `mail.alias.domain` was introduced, allowing the
configuration of the bounce, catchall and default from email addresses
at the company level (`res_company`).

For this purpose, the `_compute_email_from` method was introduced to correctly
compute the `email_from` in various email contexts.

But, the `email_from` field in mass_mailing was using an obsolete combination
of `default=` and a compute method.
This meant that when one created a new `mailing.mailing` record, it was
always defaulting to `self.env.user.email_formatted`.
The compute was only triggered when the `mail_server_id` field manually
updated.

This is corrected with this fix and a unit test was added to test three
different use cases.
An invisible `create_uid` was added to the base mailing From view xml
to have the compute method trigger correctly in some unit tests.

How to reproduce bug:
See related github issue https://github.com/odoo/odoo/issues/151310

Behavior after this fix:
If `mail.alias.domain` is setup for the company and a default `ir.mail_server`
is configured for Email Marketing, `_compute_email_from` will select
the expected `email_from` at record creation for `mailing.mailing`.

opw-3704715
Fixes #151310

closes odoo/odoo#152655

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-03-20 13:52:17 +00:00
Claire Bretton (clbr) 4088111533 [PERF] account: Send & Print - reduce time complexity
Better generation of the dict with moves by partner.

closes odoo/odoo#158035

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-03-20 11:19:42 +00:00
Claire Bretton (clbr) 83e28e9b4c [FIX] account: Send & Print cron - break if no lock
The process should not be triggered if a lock can't be acquired on
moves.
Also improve the error catching to be more readable.

Part-of: odoo/odoo#158035
2024-03-20 11:19:42 +00:00
Ryan Cen d11d4081bc [FIX] account: correctly use job count on cron
The cron "send invoices automatically" was not properly using the
job_count parameter because the to_process invoices were now pulled from
a read_group. The limit parameter on read_group only limits the number
of groups and it was being grouped by company. This meant if there was
less than job_count number of companies this was not doing anything. And
if one company had a large amount of invoices this would time out and
repeat the same invoices the next time it was attempted because no
progress is saved until the batch is over.

Changing the read_group to a search.

opw-3765192

Part-of: odoo/odoo#158035
2024-03-20 11:19:42 +00:00
Claire Bretton (clbr) 6efbcae063 [FIX] account,snailmail_account: fix methods depends on env
Some methods were using the `self.env` to decide users/partners while
those methods can also be called from Cron, thus the user would end up to
be OdooBot instead of the partner that initiated the async sending.

closes odoo/odoo#157991

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-03-20 09:13:27 +00:00
Jeremy Kersten 3932c46f91 [FIX] website_slides: remove old code + fix xml and key error tb
Before this commit, the aria-current was the name of the search_X
instead of value 'page'.
Code was strange since `'page' and X`  == `X`, while we expect 'page' as
value.

In case of unknown 'search_slide_category' value, use '-' instead to
raise a KeyError Exception.
We still have some links that point to old url with slide category of
type 'presentation' that doesn't exist anymore since the v16.

Remove outdate code following the comment:
 > I swear though, don't be afraid, remove it!

From this way, the wrong slide_type of type 'presentation' will be
ignored in all case and link from google will show the slide instead
of an error 500.

closes odoo/odoo#158002

Signed-off-by: Jérémy Kersten <jke@odoo.com>
2024-03-19 14:00:58 +00:00
Mehdi Outagant (MOU) fc3e1b2df5 [FIX] website: fix the extra menu editing test
Starting from The "unbreakable menu fix" on `16.0` (see: [1]), the state
of the website extra menu was stored before every "resize" adaptation,
so it can be possible to reopen it if it was already opened.

On `17.0`, the same behaviour was fixed using the `odooEditor` >
`withoutRollback()` mechanism (see: [2]), and a step was added to the
`edit_menus` test (`clickOnExtraMenuItem`) to open the extra menu after
the "edit mode resize" [3].

The forward port of [1], on `17.0` was adapted to keep the main fix from
[2], and removed the tour step since the extra menu will be
automatically opened if it was already open before the "resize".

Now, if we have a menu with no overflowing items before the resize, and
after switching to "edit" mode an extra menu was added, this menu will
be closed by default which makes the test fail without the step in [3].

The goal of this commit is to fix this behaviour by simply restoring the
`clickOnExtraMenuItem` step with a simple tweak: We don't click if the
extra menu is already opened to prevent closing it again.

Remark: the test failed on `17.0` but the commit is targeting `16.0` to
prevent any test failure linked to the "extra menu auto open" feature.

[1]: https://github.com/odoo/odoo/commit/2598cc9ef7fe89a0ce5e375bca6f6a781f6ffdf7
[2]: https://github.com/odoo/odoo/commit/cbed990924887eb529056d89a042a92ba27b825b

Related to opw-3484742
Related to task-3439226

closes odoo/odoo#157290

X-original-commit: 42bcc3ef284ca355e2323641176573b53e7d2e28
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2024-03-19 14:00:57 +00:00
Anh Thao Pham (pta) 03d1b23a8d [FIX] sale: hide amount_to_invoice in quotation list view
In the Quotations list view, it is possible to show "amount_to_invoice" field.
However, this field is empty for quotations and therefore useless.
It should be set as invisible for quotations.
An inherited view was already taking care of it, but was using "invisible"
attribute instead of "column_invisible" attribute.

opw-3722037

closes odoo/odoo#158043

Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2024-03-19 11:14:10 +00:00
Mélanie f368884b00 [FIX] hr_homeworking : fix work location domain
With this commit, the domain of work location domain is reintroduced.
It was a mistake introduced by this PR : odoo/odoo#129308

closes odoo/odoo#157580

X-original-commit: 94de3445f507c9c1801157c9526244ab91ceff0d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-03-19 11:14:06 +00:00
Antoine Guenet c7580486cb [ADD] web_editor: add "correct" button to the AI Copywriter
This adds a button to the AI Copywriter that allows the user to correct
the selected text without altering it otherwise.

task-3776377

closes odoo/odoo#156067

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2024-03-19 11:14:04 +00:00
Victor Feyens 9e029c6710 [FIX] website_sale: product autocomplete with tags
Steps to reproduce:

* Create a product tag (available on ecommerce)
* Select that filter on the /shop page
* Enter a search string

-> Traceback

The selected tag is given as a string to the
autocomplete route, and not a list of ids,
which fails when converted to an 'in' domain leaf.

`[('product_variant_ids.all_product_tag_ids', 'in', tags)]`

This commit makes sure to convert the given ids to a
list, correctly handled by the orm.

Fixes #155327

closes odoo/odoo#155430

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2024-03-19 11:14:03 +00:00
aamo-odoo 49bec71d12 [FIX] stock_account: prevent error if warehouse location not found.
An error occurs when the user attempts to access a forecast report for the
replenishment product but does not receive the warehouse location ID
(archive/delete).

Steps to reproduce: (without demo data)
- Install "stock_account"  module
- Inventory -> Operation -> Procurement -> Replenishment
- Create a new Replenishment product
- Configuration -> warehouse -> Archive warehouse records
- Go to a product made in the replenishment and click on forecast report

Traceback : "IndexError
list index out of range"

This commit will help to open a forecast report if the warehouse location is not
found.

sentry-4998176742

closes odoo/odoo#158017

Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2024-03-19 09:24:21 +00:00
Aaron Bohy 2176cadebd [FIX] web: multi level grouped list: correct pager inside groups
Have a list view with multiple groupbys and a lot of records to
have pagers displayed. Open a group (first level). The pager of the
group uses the number of records instead of number of (inner)
groups as total.

This commit fixes the issue. The pager now correctly allows to
navigate through inner groups.

closes odoo/odoo#157995

Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2024-03-19 09:24:20 +00:00
Stéphane Bidoul 9d2b18f047 [FIX] core: don't fail on bad version for uninstallable addons
When an addon has an invalid version but is not installable,
there is no need to error out. This situation typically happens
when unmigrated modules are present in the addons path.

closes odoo/odoo#157657

Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
2024-03-19 09:24:19 +00:00
adsh-odoo 34346323b5 [FIX] portal: fix portal alignment issue
The pager was not getting the margin from the bottom. This commit fixes the
issue by providing the appropriate margin to the pager.

Task-3792586

closes odoo/odoo#157005

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-03-19 09:24:18 +00:00
Antoine (ande) 49d4f20242 [FIX] mass_mailing: mobile preview error
Current behaviour:
When trying to preview a mailing template
with the debug mode enabled, there is an error:
Invalid props for component

Steps to reproduce:
1. Enable debug mode with assets
2. Go to Email Marketing
3. Create a new Mailing
4. Select a template
5. In the Editor, click on the mobile icon
6. ... 'preview' is not a function

Cause of the issue:
Caused by https://github.com/odoo/odoo/commit/13b3f8af4b55d32912b698ae1672be9e144cb775

opw-3702901

closes odoo/odoo#153176

Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
2024-03-18 17:44:53 +00:00
jobl 327d35f66c [FIX] sale: show payment term note on customer portal preview
Description:
There is a discrepancy between the printed sale order report and the
customer preview when it comes to displaying the Payment Terms. On the
SO report, Odoo prints the 'note' field, whereas on the preview, Odoo
only displays the 'name' field.

Desired behavior after PR is merged:
Customer preview now matches the printed report by displaying the
payment_term.note field as well

opw-3790997

closes odoo/odoo#157926

X-original-commit: b25a119e8e3d4719a33bfbe69870f6f995488e6c
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
Signed-off-by: Joel Bluemel (jobl) <jobl@odoo.com>
2024-03-18 16:22:40 +00:00
Sarah Bellefroid 9dde5a64e9 [FIX] project, hr_timesheet: use correct analytic plan setting
Currently, the `plan_id` used to create analytic accounts is not the one set in the settings.

Steps to reproduce:
-------------------
* Go to the **Settings**
* Enable developper mode
* Select **User & Companies** > **Groups**
* Select `Technical/Analytic Accounting`
* Add user
* Go to the **Project** app
* Select **Configuration** > **Settings**
* Under **Time Management**, enable Timesheets
* Under **Analytics** > **Analytic Plan**, select Projects
* Create a new project
* Go into the settings of the project
* Under the **Settings** tab, select the internal link for the **Analytic Account**
  > **Observation**: The Plan is set to Projects
* Go to **Conffiguration** > **Settings**
* Under **Analytics** > **Analytic Plan**, change Projects to Departments
* Create a new project
* Go into the settings of the project
* Under the **Settings** tab, select the internal link for the **Analytic Account**
  > **Observation**: The Plan is still set to Projects

Why the fix:
------------
When creating, an analytic account, the plan is computed with `_get_all_plans()`.
https://github.com/odoo/odoo/blob/e365e22485dc45f1cbe87ae93395b022a4724a3c/addons/project/models/project_project.py#L894-L903

Inside `__get_all_plans()` the plan is computed as follows:
https://github.com/odoo/odoo/blob/e365e22485dc45f1cbe87ae93395b022a4724a3c/addons/analytic/models/analytic_plan.py#L106-L07

However, the setting that the user changes in the frontend corresponds to `analytic.analytic_plan_projects`.
https://github.com/odoo/odoo/blob/e365e22485dc45f1cbe87ae93395b022a4724a3c/addons/project/models/res_config_settings.py#L18-L22

This seeting is not company-related. It can be used on projects even if they have a `company_id` set to false. We fallback on `_get_all_plans()` if the user did not specifically choose a plan in the settings.

opw-3751661

closes odoo/odoo#157247

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-03-18 16:22:38 +00:00
Claire Bretton (clbr) a39ffcaf5f [FIX] l10n_cz: change position of VAT/DIČ in Czech localization
In Czech republic, the standard is to first render Company ID (IČO), and then to render VAT ID (DIČ).
- Changing the position to before (not after), so company ID renders before VAT ID.
- Changed label from "ID" to "Company ID" (so it is obvious in what ID it is).

Original fixes by @cunivca: odoo/odoo#149339, odoo/odoo#149340, merged into one.

closes odoo/odoo#157993

Related: https://github.com/odoo/odoo/commit/d0704a19de31e0251d343081ae6b3da9991a248e
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2024-03-18 14:55:52 +00:00
kpt-odoo 8d07544a04 [FIX] sale_timesheet: fix billable message positioning
Versions:
---------
- 17.0

Issue:
------
Message for flag timesheet from project as billable/non-billable
is misplaced.

Cause:
------
Xpath given for Message placed in sale_timsheet is not very specific.

Solution:
---------
Give accurate xpath for message div.

task-3630449

closes odoo/odoo#148880

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-03-18 14:55:48 +00:00
Joseph Caburnay 06e0a005a3 [FIX] pos_restaurant: US tipping should not be set by default
In SaaS, the DB is pre-prepared with the generic chart of accounts before the
new user finishes the form. Since the default country of the generic chart of
accounts is the US, then `set_tip_after_payment` option in the pre-created
pos.config is set to True. Now, when the form is submitted, the country is
identified but the said option remains to be True. This is a problem because not
all customers are creating an odoo instance for a US company. So customers from
other countries will have the option activated by default which is not a good
default for them.

We introduced this behavior in aa1c5b53bf131c6df96ad621e00bd2ee3d44c6c0 and in
this commit we won't set the option by default anymore.

closes odoo/odoo#149542

Task-id: 3635635
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2024-03-18 13:28:05 +00:00
Hari Prasath A ac32d43a69 [CLA] signature for hari1119
closes odoo/odoo#156234

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2024-03-18 10:23:56 +00:00
Odoo's Mergebot c1f3005448 [IMP] event: allow to send registrations emails asynchronously
This PR introduces a new configuration parameter 'event.event_mail_async'
forcing registrations-based communication to be asynchronous. Instead of
directly sending communication it triggers the cron to be run as soon as
possible.

When having large volume of registrations, and especially concurrent
registrations it saves a DB to avoid generating tickets and preparing emails
synchronously to the registration creation.

Task-3764894: Event: Allow using cron triggers for communication
Part of Task-3084943: Event: Improve communication scheduler scalability

closes odoo/odoo#155777

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-03-18 10:23:55 +00:00
Thibault DelavalléeandStéphane Debauche b7cf6bb564 [FIX] event: limit on subscription communication to new registrations
Currently, if we create a new event mail "after each registration" to be send
directly, the next time we confirm a registration it tries to send the
communication to all registrations that are not yet contacted. Indeed
the first new registration triggers the scheduler which runs on all
pending registrations. This may potentially break the transaction or
at least make it extra slow.

Now, we send the mail only to the new registrations (created after the
event mail). Old registrations will be contacted via the CRON instead.

Task-3084943: Event: Improve communication scheduler scalability

Part-of: odoo/odoo#155777
Co-authored-by: Stéphane Debauche <std@odoo.com>
2024-03-18 10:23:55 +00:00
Thibault Delavallée c36f9c184d [FIX] event_sale: avoid multiple update of registration state
Various registration side updates depends on its state: notably communication
schedulers and lead rules management.

However event_sale changes the 'state' field from a classic selection field
to a computed one, introducing links with sale order and sale order lines
as well as payment state computation.

Currently code leads to a double update of state when creating a new
registration, which causes communication scheduler to be called twice and
create additional queries. This commit tries to avoid this by updating value
of state only once, instead of setting everything to draft then updating to
another value afterwards. This avoids notably schedulers to be triggered
or called twice in the same transaction.

Task-3764894: Event: Allow using cron triggers for communication
Part of Task-3084943: Event: Improve communication scheduler scalability

Part-of: odoo/odoo#155777
2024-03-18 10:23:55 +00:00