odoo/odoo#192383

Created by fw-bot
Merged at 5471d98962c45ea54f7bd0b02375f84099e10afd

Statuses:

label
odoo-dev:saas-18.1-17.0-opw-4244961-warning_when_quotation_template_set_as_default-soty-8ycG-fw
head
ebd985c5a8986bd1c05202c7f8b9b194c7e96afe
merged
5 months ago by Soukaina Tyes (soty)
odoo/odoo
17.0 #184713
saas-17.2 #192248
saas-17.4 #192259
18.0 #192267
saas-18.1 #192383
saas-18.2
saas-18.3
master #192399

[FW][FIX] sale: prevent warning on quotation template

Issue:

A warning popup appears incorrectly when a user-defined default is set for the "Quotation Template (Sales Order)" field. This warning is only relevant when the company is changed while creating a quotation.

Steps to reproduce the issue:

1- Navigate to Settings > Technical > Actions > User-defined Defaults.
2- Create a new User-defined Default for the field "Quotation Template (Sales Order)" with a default value (in JSON format) of 1 .
3- Go to the Sales module.
4- Create a new quotation.

A warning with the title "Warning for the change of your quotation's company" is displayed (see screenshot attached), despite the company not being changed.
The onchange('company_id') method is triggered by the user-defined default for the quotation template.

<img src="https://github.com/user-attachments/assets/5f046310-05b7-48ab-9781-1ba4a36f2beb" width=400 />

opw-4244961


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

Forward-Port-Of: #192267
Forward-Port-Of: #184713