odoo/odoo#192399

Created by fw-bot
Merged at 00c33d6f39c67b3a46f92a2a9f29ed89849529cb

Statuses:

label
odoo-dev:master-17.0-opw-4244961-warning_when_quotation_template_set_as_default-soty-D2du-fw
head
c1fc904c17cf928bb009c8af1ac98aeff2bc534d
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