Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from upstream 17 20241212 01 #1054

Open
wants to merge 71 commits into
base: 17.0
Choose a base branch
from

Conversation

royle-vietnam
Copy link
Collaborator

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

malb-odoo and others added 30 commits December 5, 2024 10:43
This commit will do multiple things:
- Change one tax type
- Change some account types

closes odoo#189350

Task: 4341375
Related: odoo/enterprise#75114
Signed-off-by: Wala Gauthier (gawa) <[email protected]>
Since [1], the `tel://` protocol was adopted instead of `tel:`. However,
URIs cannot contain space characters, which can lead to invalid URIs in
certain cases.

Steps to reproduce:

- Open the website editor.
- Attempt to edit the phone number in the header.
- The URI becomes invalid due to the presence of a space character.

This commit resolves the issue by removing space characters from the
URI, ensuring it remains valid.

[1]:
    odoo@6d4a3b3

opw-4354614

closes odoo#188964

Signed-off-by: Benjamin Vray (bvr) <[email protected]>
Versions
--------
- 16.0+

Steps
-----
1. Schedule the "Calendar: Event Reminder" to run once a day;
2. create an event that started 2 hours ago, and ended 1 hour ago;
3. run the event reminder cron.

Issue
-----
A reminder email is sent, event though the event has passed.

Cause
-----
The alarm manager doesn't check whether the reminders it sends are still
relevant.

Solution
--------
16.0:
- When looking querying events to send reminders for, ensure their `stop`
  date is before the current time.

17.0+:
- As past events may need to be queried to set up recurrence reminders,
  only filter them out when gathering attendees to send an immediate
  email.

opw-4191612

closes odoo#189479

X-original-commit: 115964a
Signed-off-by: Arnaud Joset (arj) <[email protected]>
Signed-off-by: Levi Siuzdak <[email protected]>
Steps to reproduce:
- Remove all Expenses access rights from the user "Marc Demo."
- Create a new expense and generate a report from it.
- Attempt to change the state to "reported" using an API, server action, or browser extension.

Issue:
You will be blocked to do so

Cause:
there must have been a confusion with the state available for `hr.expense` model
https://github.com/odoo/odoo/blob/063e224c17c0e0194e5ade6acbe82ff38a669b54/addons/hr_expense/models/hr_expense.py#L90-L95

and the `hr.expense.sheet` model
https://github.com/odoo/odoo/blob/063e224c17c0e0194e5ade6acbe82ff38a669b54/addons/hr_expense/models/hr_expense.py#L973-L979

=> 'submit' does not exist in hr.expense -> it is reported

opw-4278187

closes odoo#189478

X-original-commit: 07d25ef
Signed-off-by: Antoine Dupuis (andu) <[email protected]>
Signed-off-by: Yolann Sabaux (yosa) <[email protected]>
before this commit, when users applied a filter Invoice or Other in the
My Invoices portal and then changed the page number, the selected filter
was removed, resetting to the default view.

This commit resolves the issue by ensuring the  filterby parameter is
preserved in the pager's url_args, allowing the selected filter to persist
across pagination.

opw-4367525

closes odoo#188930

Signed-off-by: Florian Gilbert (flg) <[email protected]>
The tax report (KMD report) and annex to the tax report (KMD INF report)
for Estonia needed to be reworked to correct errors and fix rounding
issues.

In this commit, the 'balance_from_tags' label is added to the tax report,
allowing a better audit of the report lines. Furthermore, the tax tags
are edited to differentiate between tax and base tax lines.

These changes are necessary to improve auditing of the tax report lines.

task-3997203

closes odoo#180856

Related: odoo/enterprise#70371
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <[email protected]>
Currently, if trying to take a screenshot results in an error the
reporting is iffy: we end up with an uninformative and unexpected
traceback along the lines of

    concurrent.futures: exception calling callback for <Future at 0x7f212c073110 state=finished raised ChromeBrowserException>
    Traceback (most recent call last):
      File "concurrent/futures/_base.py", line 340, in _invoke_callbacks
        callback(self)
      File "odoo/odoo/tests/common.py", line 1532, in handler
        base_png = f.result(timeout=0)['data']
                   ^^^^^^^^^^^^^^^^^^^
      File "concurrent/futures/_base.py", line 449, in result
        return self.__get_result()
               ^^^^^^^^^^^^^^^^^^^
      File "concurrent/futures/_base.py", line 401, in __get_result
        raise self._exception
    odoo.tests.common.ChromeBrowserException: Internal error

As this is mostly unhelpful, handle the thing better, and lower the
concern to `RUNBOT`: giving prominence to the screenshot failure is
probably less relevant than the actual reason why we tried to take a
screenshot in the first place?

closes odoo#189679

X-original-commit: 699c3eb
Signed-off-by: Xavier Morel (xmo) <[email protected]>
…page

Version:
- 17.0

Steps to reproduce:
- Click on the Connect button, which redirects to the authentication wizard.
- On the authorization page, click on the Cancel button.

issue:
- Clicking on the Cancel button does not return an authorization code,
  causing a traceback error.

solution:
- Added a condition to handle the Cancel action. If the user clicks Cancel,
  redirect to the provider form view without causing an error.

opw-4377802

closes odoo#189526

Signed-off-by: Antoine Vandevenne (anv) <[email protected]>
runbot task: 107888 and 109252

closes odoo#189473

Signed-off-by: William Henrotin (whe) <[email protected]>
Steps to reproduce:
- Enable 'Reception Report' in Inventory Configuration
- Make an outgoing shipment for a storable product
- Make an incoming shipment for that same product
- Open the allocation report
- Reload the page

Issue:
The context is lost when reloading the page, meaning that we lose the
the `default_picking_ids`/`default_production_ids` in the context,
making it unable to open the report.

To avoid this, we add the key and values to the router (and thus the
URL) so it can be properly picked up when reloading the report.

opw-4321072

closes odoo#189694

X-original-commit: 8fd4187
Signed-off-by: Steve Van Essche <[email protected]>
Signed-off-by: Quentin Wolfs (quwo) <[email protected]>
This commit fixes the wrong use of the contenteditable attribute
inside the useSpellcheck implementation. Now, the isContentEditable
attribute is used to find the right element.

A test has been added too, using the contenteditable='true' attribute.

closes odoo#189728

Signed-off-by: Adrien Dieudonné (adr) <[email protected]>
Steps to reproduce:
- Go to a form view with a one2many with a handle widget
- Move a line in the one2many that make Odoo crash with the onchange

To generate a faulty view, create a form view with a one2many and add
an automation "On UI change" to make the resequence crash.

Current behaviour
-----------------
After the error being thrown, the user will not be able to
resequence this line again.

Expected Behaviour
------------------
After the error, the user will still be able to resequence
this line

closes odoo#159678

X-original-commit: ae6854e
Signed-off-by: Simon Genin (ges) <[email protected]>
Signed-off-by: Aaron Bohy (aab) <[email protected]>
Steps to reproduce:

- Create a product tracked by lot: Lot Product
- Create and Mark as todo a receipt with a move: 1 x Lot Product
- Click on the burger icon on the move and add a lot name LOT001
- Save > Save the picking > Validate the picking
- Unhide the Serial Numbers field
> While a lot with that lot name was created in DB and is used both
> by the move and its move line it i snot visible on the picking

Cause of the issue:

The field is smply invisible for lots (while it is not for SN):
https://github.com/odoo/odoo/blob/066834aafd7f904c4a9c0cf4a82b4bdfbb011f0b/addons/stock/views/stock_picking_views.xml#L319-L322

Fix:

The issue is not producible on 17.2+ because the view has been updated.

The issue is not reproducible on 17.2+ because the view has been updated.
We simply backport one line from 98f1992

opw-4338150

closes odoo#188283

Signed-off-by: Steve Van Essche <[email protected]>
### Contains the following commits:

odoo/o-spreadsheet@8344531b7 [REL] 17.0.43 Task: 0
odoo/o-spreadsheet@ad2ae1b37 [FIX] action button: use nextProps instead of this.props Task: 0
odoo/o-spreadsheet@b83792911 [IMP] functions: add VALUE function Task: 4373019

closes odoo#189719

Signed-off-by: Vincent Schippefilt (vsc) <[email protected]>
Co-authored-by: Anthony Hendrickx (anhe) <[email protected]>
Co-authored-by: Alexis Lacroix (laa) <[email protected]>
Co-authored-by: Lucas Lefèvre (lul) <[email protected]>
Co-authored-by: Dhrutik Patel (dhrp) <[email protected]>
Co-authored-by: Adrien Minne (adrm) <[email protected]>
Co-authored-by: Mehdi Rachico (mera) <[email protected]>
Co-authored-by: Rémi Rahir (rar) <[email protected]>
Co-authored-by: Pierre Rousseau (pro) <[email protected]>
Co-authored-by: Vincent Schippefilt (vsc) <[email protected]>
Steps to reproduce
==================

- In 18, install documents,project
- Open a project then a task
- Switch to a mobile view and refresh the page
- The lightning icon is smaller than the cog icon

Cause of the issue
==================

odoo#188986

An overflow was applied on the entire oe_stat_button

Solution
========

We can move the overflow to the `o_field_statinfo`
This is better than before as now the ellipsis is visible.

task-4377703

closes odoo#189780

Signed-off-by: Adrien Dieudonné (adr) <[email protected]>
Commit 1e0183d made sure that
child addresses where the commercial fields (vat, company name, ...)
are not displayed are considered valid since those fields will be
taken from the commercial partner (parent contact).

Nevertheless, the code in the argentinian localization doesn't handle
the cases where those values are not provided, which led to a
traceback being displayed to the customers, which shouldn't ever happen
in the ecommerce checkout:

> if afip_resp.code not in ['5', '9'] and id_type != cuit_id_type
'bool' object has no attribute 'code'

This commit skips the validation in case those fields are not given.
Either they are required and the main validation ensures they are
provided (and they'll be verified by the override), or they are
not provided and shouldn't be, in which case the validation can
be skipped here.

opw-4373610

closes odoo#189312

Signed-off-by: Victor Feyens (vfe) <[email protected]>
Before this commit, when a time off request based on extra hours
was set to draft, a new overtime record with negative duration
was created.

This commit makes sure that the record is only created when
the time off request is in the state confirm or validate.

task-4096548

closes odoo#189695

X-original-commit: 6c4c675
Signed-off-by: Yannick Tivisse (yti) <[email protected]>
The issue:
Starting with version 17.4, the Odoo banner displaying the invoice name on original bills is only added if the attached PDF uses US Letter paper size and is oriented vertically.

How to reproduce the issue:
-Upload any invoice with a non-standard format
-Print -> Original Bills

Explanation:
Since saas-16.0, the PyPDF2 library version was allowed compatibility from 1.26.0 to 2.12.1. In version 1.26.0, the canvas dimensions were automatically adjusted when merging with non-standard page sizes. However, in version 2.12.1, this behavior no longer occurs, resulting in the banner not appearing correctly on non-standard formats.

opw-4278031

closes odoo#189744

X-original-commit: afc80da
Signed-off-by: Xavier Morel (xmo) <[email protected]>
Steps to reproduce the bug (only on Safari):

- Drag and drop 4-5 "Text" blocks onto the page.
- Hide all of them in desktop view by clicking the "Hide on desktop"
button for each one. This should create a list of "Invisible Elements"
at the bottom of the right panel.
- Drag and drop a "Text - Image" block onto the page.
- Click the image in the "Text - Image" block.
- In the image options, click the "Shape" selector.
- Bug: The "Shape" selector is partially hidden behind the "Invisible
Elements" list, and it is not possible to scroll to the bottom of the
"shapes" list to access the last shapes.

After investigation, we found that the issue comes from the backdrop,
which is positioned as sticky behind the shape selector. Since the
backdrop isn't needed for the "shape selector" (it covers the entire
right panel), we simply disabled it for the "shape selector".

opw-4357397

closes odoo#189591

Signed-off-by: Serge Bayet (seba) <[email protected]>
Currently, a traceback occurs when the user changes the
SMS iap URL and tries to test SMS mailing.

To reproduce this issue:
1) Install `mass_mailing_sms`
2) Add 'B' in SMS `IAP` URL from the `settings/technical/iap`
3) Open any SMS marketing record and click on the `Test` button

Error:-
"ValueError: unsupported format character 'B' (0x42) at index 152"

When the user gives the 'B' in the URL string, it is converted to `%B%`
in the URL. and it leads to a traceback as `%s` is used to format two strings.

https://github.com/odoo/odoo/blob/a98a8859696f5a69afe2954a3f5493b611ee252b/addons/sms/tools/sms_api.py#L59

This error occurs when using the old-style string formatting (%s) within
an f-string. When using f-strings, we don't need to mix them
with the % formatting method.

We can replace the `%` formatting with format method

sentry-6072287605

closes odoo#187827

Signed-off-by: Warnon Aurélien (awa) <[email protected]>
**Current behavior:**
Having a manufactured product with components, all with
'average' costing, a series of receiptions for the components at
difference price points, followed by an MO, followed by another
reception at (again) a new price point will result in an
imbalanced "Cost of Production" journal if the aforementioned MO
is unbuilt.

**Expected behavior:**
The unbuild operation doesn't leave the journal imbalanced.

**Steps to reproduce:**
1. Create a stored product with average, real_time costing

2. Create a BoM for this product, with 2 stored components (also
with average, real_time costing)

3. Create a PO for the components (price is arbitrary), confirm
and receive the product

4. Create another PO for the components with a different price
from the previous PO, confirm and receive

5. Create an MO for the final product, confirm and
consume/produce all

6. Create a final PO for the components with prices different
from the previous two orders, confirm and receive

7. Create a second MO for the final product and
confirm/consume/produce-all

8. Unbuild the MO from step 5 -> in the "Cost of Production"
journal, observe that there is an outstanding balance

**Cause of the issue:**
When the unbuild operation happens, the current price of the
final product informs the SVL's `value` and `unit_price` fields-
which of course is not the same as when the MO was completed.

We end up with a `unit_price` on the SVL for the final product
which is not equal to the sum of the component SVLs'
`unit_price` which leads to the generation of account move lines
that won't be balanced.

**Fix:**
During an ubuild operation, stock moves for finished products
which may have this issue (i.e., have non-standard costing) with
linked SVL records will use that SVL's unit cost for the unbuild
SVL (and ensuing journal entries) as opposed to taking the
current cost.

opw-4062415

closes odoo#188016

Signed-off-by: William Henrotin (whe) <[email protected]>
Steps to reproduce:

- Enable Multi-Steps Routes in the settings
- Inventory > Configuration > Warehouse Management > Locations
- Pick any location
- With studio add the one2Many field `Store to sublocation`
  (`location_out_id` of `stock.putaway.rule`) > Close studio
- Try to add a line on the associated list
> Traceback

Cause of the issue:

Adding a line will trigger an onchange of the`stock.putaway.rule`
model in order to compute the default data of the new subrecord.
However, the code will crash during the `_search_count` of the
`_onchange_location_in` because of an invalid domain:
https://github.com/odoo/odoo/blob/29939aa5fb1455af89a37293d2f76541ff1645ef/addons/stock/models/product_strategy.py#L80-L88
THis crashed since in our case the `location_out_id` will be a new
record created during the onchange to represent the 'stock.location' and
from which we are looking at the form. As such, a NewId will be given
and treated as an integer in the domain leading to a traceback when the
db is served.

Fix:

Onchange method should be robust with respect to the usage of New
records and hence the records used here should be replace by their
origin if it even exists.

opw-4126731

closes odoo#189469

X-original-commit: da69101
Signed-off-by: William Henrotin (whe) <[email protected]>
Signed-off-by: Lancelot Semal (lase) <[email protected]>
Versions
--------
- 16.0+

Steps
-----
1. Activate a second language;
2. create a new quotation template;
3. add a note & save change;
4. add a translation for the note & save change;
5. create a new sales order;
6. select the created quotation template;
7. set customer to a partner using the second language.

Issue
-----
The note is still displayed in English.

Cause
-----
The translation is saved on the `sale.order.template.line` model, so it
has to get fetched from there. Currently there is no logic in place to
do this when changing the customer.

Solution
--------
Add an `onchange` method which reloads the template if no lines were
added or removed.

opw-4260006

closes odoo#189812

X-original-commit: 6c3c756
Signed-off-by: Levi Siuzdak <[email protected]>
This commit adds the E-invoicing app for Jordan.
The E-invoicing is mandatory for businesses in Jordan as the end of May 2024.
It is a backport of this PR: odoo#182983

task-3895493

closes odoo#176625

Signed-off-by: Josse Colpaert (jco) <[email protected]>
Before this commit, since the addition of the dual stream feature
in v17, starting the screen sharing while the blur was active or
swapping from blur to unblur and back would cause a black camera
screen.

This commit fixes this issue by:

1) Not closing streams when removing them from a RTC session when
those streams originate from the device (and not a remote session).
2) Removing the condition on the state, which was always false
when attempting to recover an old stream.

closes odoo#189799

Signed-off-by: Thanh Son Dodeur (tso) <[email protected]>
The `OpenMoveWidget` was usually called from
an `account.move.line`, since odoo/enterprise@6ec5597
it is called from `account.move`.
With this commit, by using `this.props.record.resModel`, we allow
the model to be either `account.move` or `account.move.line`, any other
models would raise an error as there is no `action_open_business_doc`
defined in other models.

Steps:

- Install 'Accounting`
- Create an asset with passed depreciation entries and confirm it
- Go to 'Depreciation Board' tab
- Click on a posted entry name
-> We land on an other move (in fact, move that have the line with the
   same id as the depreciation move) or an error (non existing record)

opw-4357468

closes odoo#189861

Signed-off-by: Habib Ayob (ayh) <[email protected]>
current behaviour:
when buggy server action is introduced, we don't handle it well, eg:
```
name = record.name
if name != record.partner_id:
    raise UserError("Datatype")
```
here, comparing `name` and `record.partner_id` doesn't make sense,
therefore our ORM default behaviour is to return false and rise
`AttributeError`, but the problem occurs when pypdf2 attempts to format
the warning message, which rises an error which isn't being handled:
```
  File "/home/odoo/.local/lib/python3.10/site-packages/PyPDF2/pdf.py", line 1069, in _showwarning
    file.write(formatWarning(message, category, filename, lineno, line))
  File "/home/odoo/.local/lib/python3.10/site-packages/PyPDF2/utils.py", line 69, in formatWarning
    file = filename.replace("/", "\\").rsplit("\\", 1)[1] # find the file name
IndexError: list index out of range
```
it is problematic since it is server action.

expected behaviour:
Even when buggy code is introduced, comparision should return False and
error should be handled well.

steps to reproduce:
1) Create new database from scratch and create server action with the
buggy code above, set model to `sale.orde` and add it to
`contextual action`
2) Go to any `sale.order` record and trigger the action.
3) it outputs the error.
4) please note that, if you restart the server, error doesn't happen,
because places where override happens doesn't get invoked.

task-4365106

closes odoo#189688

Signed-off-by: Xavier Morel (xmo) <[email protected]>
…email as electronic address for xrechnung

Steps to reproduce:
- Install Accounting and l10n_de
- Switch to a German company
- Configure the customer invoice journal to enable "XRechnung UBL (Germany)"
- Create a German contact:
  * with a complete address
  * with an email address
  * without a VAT number
- Create an invoice for the created contact
- Confirm the invoice
- Generate the electronic invoice
- Validate the generated XML on an online XRechnung ValidationError

Issue:
The XRechnung (UBL Invoice) is not valid because the buyer electronic
address is missing (cbc:EndpointID).

Cause:
<cbc:EndpointID> gets its value from contact's VAT, but the contact
has no VAT.

Solution:
Since XRechnung 3.0.1, the email address can be used as electronic
address with "EM" as schemeID.
So, fallback on email address if contact has no VAT.

Reference:
https://www.e-rechnung-bund.de/standard-xrechnung-3-0-1/
https://blog.seeburger.com/xrechnung-version-3-0-1-comes-into-force-on-february-1-2024/
https://erechnungsvalidator.service-bw.de/

opw-4261026

closes odoo#189717

X-original-commit: bff1fe0
Signed-off-by: Florian Gilbert (flg) <[email protected]>
Signed-off-by: Anh Thao Pham (pta) <[email protected]>
Versions
--------
- 16.0+

Steps (18.0+)
-------------
1. Enable credit limits via Accounting settings;
2. log in as a user with access to Sales but not Accounting;
3. create a Sales Order;
4. add a product.

Issue
-----
Access Error.

Cause
-----
Commit de302c2 changed the way company dependent fields are handled.
Instead of computing them via `_compute_company_dependent`, they are now
stored in the database.

Before this this change, any `groups` restriction added to a field wasn't
actually checked. After this change, it does get checked, leading to the
access error.

Solution
--------
1. Use `sudo` to access `partner_id.credit`.
2. When calling the `_build_credit_warning_message`, pass the sales
   order with `sudo`.

opw-4367393

closes odoo#189803

X-original-commit: b7de657
Signed-off-by: Levi Siuzdak <[email protected]>
Part-of: odoo#189843
Signed-off-by: Martin Trigaux (mat) <[email protected]>
alsh-odoo and others added 24 commits December 9, 2024 18:44
…ninstalled

A traceback error is currently occurring when the user uninstalls
the model that is used in the mail template referenced in the loyalty program.

To reproduce this issue:

1) Install sale, stock, and enable loyalty from settings
2)Create a new loyalty record from sale/product/discount & Loyalty
3) Set program type as loyalty cards and add mail template from communication
4) open the selected mail template and change the model to stock lot
5) Now uninstall stock module and open the loyalty record
6) From the `Loyalty Cards` stat button create a record with partner

Error:- "KeyError: False"

We used the stock lot in the mail template.
However, when the user uninstalls the stock module, the value of model_id
will be set to False in that mail template, which leads to the traceback
mentioned above in the code below.

https://github.com/odoo/odoo/blob/28815810d9835772aa2fbe72339360f0771634a9/addons/mail/models/mail_template.py#L574-L575

We can resolve this issue by applying indelete equals to `cascade` on model_id.
As the model is deleted, `mail template` and `loyalty mail` must also deleted

sentry-6088927895

closes odoo#189864

Signed-off-by: Morgane Demesmaeker <[email protected]>
**Issue:**
The discount column is not visible on Purchase Order PDF file.

**Expected:**
When a discount is configured, it should be displayed on the document.

**Steps to reproduce:**
- Activate Purchase app;
- Go to Purchase > Orders > Request for Quotations;
- Create a new RFQ with at least 1 product and a vendor;
- Setup a discount (display the column using the options on the right of the table);
- Confirm the order;
- Using the action button `Print` > `Purchase order`, generate the PDF.

**Cause:**
The field isn't displayed on the template https://github.com/odoo/odoo/blob/17.0/addons/purchase/report/purchase_order_templates.xml#L51-L58

**Fix:**
Backport the Odoo 18 fix (https://github.com/odoo/odoo/pull/160342/files) that adds the field to the document's XML.

opw-4288878

closes odoo#189477

Signed-off-by: Steve Van Essche <[email protected]>
steps:
- create an accrual plan with:
	- 21 days per year alloc
	- start immediate
	- 28 days cap
	- carryover with max 7 days
- create allocation for the current year (1/1/XXXX)
- take 15 days holidays -> 6 days left on the alloc
- check the leaves left for next year -> 28 days, should be 27 (21 + 6)

This happened because the carry-over calculation didn't take into account
the number of days left on the allocation and always carried over the cap.

Part-of: odoo#188621
Signed-off-by: Bertrand Dossogne (bedo) <[email protected]>
steps:
- set the carry over to "carry over with maximum"
- set a number of days to carry over and save
- set the carry over type back to "None"
-> You still carry over the amount of days you typed in instead of 0

closes odoo#188621

Signed-off-by: Bertrand Dossogne (bedo) <[email protected]>
* = [hr_expense, pos_loyalty, product, sale_loyalty , website_sale_loyalty]

Before this commit:
In the mobile and form view, when a checkbox field had a long label, the
checkbox would appear on top, with the label text displayed below.

Also, Long labels extend beyond the boundaries of the form view, appearing
outside of it.

After this commit:
Checkbox fields with long labels are now properly
aligned in the mobile and form views. The checkbox and its label text are
displayed correctly,

Task-4269578

closes odoo#187980

Related: odoo/enterprise#74561
Signed-off-by: Adrien Dieudonné (adr) <[email protected]>
When in preview mode (connected as a website editor) and a modal is open
in the preview, pressing escape hides both the modal and the top menu
bar. We want to prevent that.

Steps to reproduce:
1. Connect as Admin and go on the website homepage
2. Edit the page, add a popup and save
3. Make sure to be in preview mode
4. Wait for the popup to show.
5. Click on it (just to be sure it's focused)
6. Press escape

task-4351982

closes odoo#190066

X-original-commit: 18dfdad
Signed-off-by: Benjamin Vray (bvr) <[email protected]>
Signed-off-by: Robin Lejeune (role) <[email protected]>
This commit adds static props to redirect_field.

closes odoo#188927

Signed-off-by: William Braeckman (wbr) <[email protected]>
Issue:
    In 16.0 only, When sending a POS receipt by email, the receipt
    displays correctly in the preview within the POS app. However,
    the attached receipt in the email appears cropped, and the company
    logo is not centered.

Steps to reproduce:
    1. On runbot, go to the POS app.
    2. Start a sesion. add a product, a customer and pay.
    3. Click on send by email arrow button.
    4. check receipt on mailhog.

opw-4140950

closes odoo#189290

X-original-commit: 4c3b1b6
Signed-off-by: Adrien Guilliams (adgu) <[email protected]>
Signed-off-by: Kawtar Drissi El Bouzaidi (kdeb) <[email protected]>
**Problem**:
In the Marketing module, when adding an image and attempting to center it, the centering action does not work because the action is not applying any style to the image.

**Solution**:
Use the same actions as those implemented in `web_editor` to apply the appropriate styles for centering the image:
https://github.com/odoo/odoo/blob/175fdc14769e530424c3b0e364a4c3495aa499d3/addons/web_editor/views/snippets.xml#L600-L602

**Steps to reproduce**:
1. Go to *Email Marketing* and open any template.
2. Add an image and resize it.
3. Change the alignment of the image to center.
4. Observe that nothing happens and the image is not centered.

opw-4348923

closes odoo#190093

X-original-commit: 4fcd497
Signed-off-by: Damien Abeloos (abd) <[email protected]>
Signed-off-by: Walid Sahli (wasa) <[email protected]>
Currently a 'ParseError' is arising when the user installs the 'website_sale'
module after deleting the one shipping method from the 'sale' module.

Steps to reproduce:
- Install 'sale' and 'delivery' modules
- Open 'Shipping Methods' and delete one shipping method
- Now try to install the 'website_sale' module.
- The error appears in the log.

Traceback: ParseError
while parsing /home/odoo/src/odoo/18.0/addons/website_sale/data/data.xml:62, somewhere inside
<record id="delivery.free_delivery_carrier" model="delivery.carrier">
            <field name="is_published" eval="True"/>
        </record>

This commit solves the above issue by using 'forcecreate="False"' to bypass
record creation if it violates checks.

sentry-5731062091

closes odoo#189674

Signed-off-by: Valeriya Chuprina (vchu) <[email protected]>
Trapping the focus in modal dialogs and refocusing the last focused
element when closing the dialog are requirements from the WCAG. It was
not done up to now for popup snippets in the website.
As popups without backdrop aren't dialogs (they don't prevent
interacting with the rest of the page), we don't trap the focus in
these.

Steps to reproduce (Chrome/Firefox):
- Drop a popup and save
- Wait for the popup to appear
- Use tab / shift + tab to navigate around the page
=> Without the fix, you're able to focus elements outside of the popup.

task-4256274

closes odoo#190183

X-original-commit: 89e2513
Signed-off-by: Serge Bayet (seba) <[email protected]>
**Current behavior:**
Setting a global lead time may result in this time being counted
twice in the breakdown of the replenishment for some orderpoint.

**Expected behavior:**
The global lead time should be counted one time.

**Steps to reproduce:**
1. Create a product with a subcontracted BoM

2. Set the system parameter stock.visiblity_days = 365

3. Create a supplierinfo (vendor) on the subcontracted product
with 0 delay (lead time)

4. Create a sale order for the subcontracted product

5. In the replenishment report, create an orderpoint for the
product and click the (i) on the tree view line

6. See that global visibility days are double-counted

**Cause of the issue:**
`_get_lead_days()` is called twice here, the second time it ignores
vendor lead time but re-counts global visibility days.

**Fix:**
Ignore the global visibility in a similar manner via context the
second time.

opw-4370201

closes odoo#189857

Signed-off-by: Steve Van Essche <[email protected]>
Steps to reproduce:
- Install "l10n_hu_edi" and switch to a Hungarian company
- Create an invoice
- Click "Send & Print", uncheck "NAV 3.0" and send it
- Repeat step 3
- Error

Cause:
With l10n_hu_edi, Odoo is supposed to regenerate the invoices at each Send&Print. The way it was done is by overriding `_need_invoice_document` to not check anymore if `invoice.invoice_pdf_report_id` is empty.
As the function `_prepare_invoice_pdf_report` from `account` is called when `_need_invoice_document` returns True, it is always called. But this function checks again if `invoice.invoice_pdf_report_id` is empty (https://github.com/odoo/odoo/blob/17.0/addons/account/wizard/account_move_send.py#L394-L395). So `invoice_data` doesn't have the key 'pdf_attachment_values' and it crashes at this line:
`pdf_values = invoice_data.get('pdf_attachment_values') or invoice_data['proforma_pdf_attachment_values']` because it tries reading "proforma_pdf_attachment_values" but the key is not there either.

Solution:
Extend `_prepare_invoice_pdf_report` to remove `invoice.invoice_pdf_report_id`.

opw-4363559

closes odoo#189442

Signed-off-by: Antoine Dupuis (andu) <[email protected]>
Versions
--------
- 16.0+

Steps
-----
1. Run `test_reload_template_translations` without demo data.

Issue
-----
> AssertionError: sale_order_template_id was not found in the view

Cause
-----
The `sale_order_template_id` field requires the user to have the
`sale_management.group_sale_order_template` group, which they don't have
by default without demo data.

Solution
--------
Add the group to the current user before running the test.

opw-4260006

closes odoo#190199

X-original-commit: 086da10
Signed-off-by: Victor Feyens (vfe) <[email protected]>
The mail module override of `_invalidate_im_status` is calling
the wrong super method. This PR fixes the issue.

closes odoo#190238

Signed-off-by: Matthieu Stockbauer (tsm) <[email protected]>
Previously, the fields in the calendar popover were misaligned.
This fix ensures proper alignment of the fields.

Task-4315829

closes odoo#190234

X-original-commit: 2bcc305
Signed-off-by: Aaron Bohy (aab) <[email protected]>
Steps to reproduce:

1. Add a stored computed field on `res.users` that depends on `groups_id`
2. Add a constraint on `res.users` that depends on `groups_id`
3. Give the user a group
4. Modify the given group and add an implied group

Result:

- The computed field is not recomputed
- The constraint is not checked

The reason for this is that the users groups are updated with a raw SQL query,
and the ORM is not aware of the changes.

This is a regression since 5f12e24. This issue was partially detected and fixed
in 459e6dc, but only for a single constraint.

This commit makes sure that the ORM properly propagates the changes to computed
fields and all constraints, not just the one that was explicitly checked.

closes odoo#190236

X-original-commit: 7f52166
Signed-off-by: Raphael Collet <[email protected]>
…s members

**Issue:**
Survey's PDF certifications generation is only allowed to users having rights on the company of the user who answered the survey.

**Expected:**
Any user having generation rights to surveys should be able to generate the certification PDF.

**Steps to reproduce:**
- Activate Survey app and ensure there are, at least, 2 companies;
- Create a survey with certification and ensure `Require Login` is unchecked;
- Share the survey (copy the `Survey Link`);
- Navigate to Settings / Users & Companies / Users;
- Filter on `Inactive Users` and select `Public user`;
- Setup the user's `Default Company` on Company A;
- Setup an active user's `Default Company` on Company B and ensure its `Allowed Companies` don't contain Company A;
- In a private navigator (to ensure no login data are saved), answer the survey (using the copied link above);
- Log in as the active user and go to Surveys / Participations;
- Look for the record of your test (`Contact` field should be empty);
- Click the `Certifications` action button;

**Cause:**
The user is not allowed to retrieve the other company's data to fill needed texts to display on the certificate.

**Fix:**
Allow any user to retrieve the logo and name of the restricted company using a `sudo` on these fields.

opw-4266445

closes odoo#189368

Signed-off-by: Pierre Lamotte (pila) <[email protected]>
Steps to reproduce:
- Create a new mailing
- Add a link with "Link" widget
- Enter a link with the same domain (e.g. a link to an event)
- Insert the link

Issue:
The link is automatically converted to a relative link.
This may cause some issue in a multi-company environment where
each company has a website (i.e. has its own domain url) and
"web.base.url" is configured with the domain of the other
company.

Cause 1:
The "Autoconvert to relative link" checkbox is never displayed
and is always applied as it is checked by default.
The display toggle is done in "_onURLInput" function of "Link"
component, but it is never called by the override function in
"LinkDialog".

Cause 2:
Even if the "Autoconvert to relative link" checkbox is displayed,
the link will be stripped from its domain as soon as an URL is
inputted and save in "this.state.url".
When the checkbox is unchecked, "this.state.url" stays unchanged
because it is not possible to retrieve the stripped domain from
"this.state.url".

Solution 1:
Call the super function in "_onURLInput" function of "LinkDialog".

Solution 2:
Retrieve the URL from the input when the domain should not be
stripped and update "this.state.url" with it.

opw-4357095

closes odoo#189351

Signed-off-by: David Monjoie (dmo) <[email protected]>
Defines dataset directly on website elements such that it can be
overridden by other modules if necessary.
This was done due to the override in the `test_themes` module completely
overriding all attributes of the website_switcher's dropdown items.

Runbot Error 106501

closes odoo#190366

X-original-commit: dbd2f89
Related: odoo/design-themes#1025
Signed-off-by: William Braeckman (wbr) <[email protected]>
Problem: A loyalty rewards points member don't receive their points
for their confirmed order if they don't sign into their account
when signing their quotation online from a link they received
in their email. This bug only occurs if the quotation is set to
"online signature" only. The bug is not reproducible when the quotation
is set to both "online signature" and "online payment" or
if website_sale_loyalty is not installed.

Purpose: It is expected that customers should receive their
reward points for their order without needing to sign in
because they accessed the link to sign the quotation from
their email. It should be consistent with the behavior exhibited
from having "online payment" set for the quotation or without
website_sale_loyalty installed.

Steps to Reproduce on Runbot:
1. Install Sales app,  website_sale_loyalty, loyalty, sale_loyalty
2. Create a loyalty program that reward points based on orders
3. Create a quotation for a partner, set "online signature" in Other info,
and click "Send by email"
4. Access the email in Settings > Technical > Emails
5. Copy the "Accept & sign" link and paste into incognito window
6. Sign the quote as a public user
7. Observe that the loyalty card  for the partner did not update the points

opw-4205826

closes odoo#190287

X-original-commit: e4f68fc
Signed-off-by: Mylyna Hy (myhy) <[email protected]>
An error can occur when the email subject contains line breaks when the
audit trail is enabled.

For example, steps to reproduce using follow-up reports:
1. Add or modify the "Payment Reminder" mail template to add a line
    break in the subject, like {{ '\n' }
2. Install the 'account_audit_trail' module.
3. Enable audit trail in the settings
4. Attempt to send a follow-up report email to the partner
5. An error will occur: "You cannot remove parts of the audit trail.
    Archive the record instead."

The issue arises because the subject is considered different from the
original message, prompting Odoo to attempt an update.

New behavior:
We allow any subject whitespace modifications to be ignored when
checking for changes in the audit trail.

opw-4317844

closes odoo#187429

Signed-off-by: William André (wan) <[email protected]>
@viinbot
Copy link

viinbot commented Dec 12, 2024

@royle-vietnam Viindoo Test Suite has failed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.