Skip to content
Snippets Groups Projects
Commit 7d579ffe authored by Nasreddin (bon)'s avatar Nasreddin (bon)
Browse files

[FIX] web: Unable to create a new record with warning message

Issue

	- Install Sales
	- In Sales > Configuration > Settings -> Enable "Sale Warnings"
	- Go to Sales > Orders > Customers
	- Pick a customer/company
	- Go in Edit mode and go to "Internal Notes" tab
	- Switch "Warning on the Sales Order" from "No Message" to "Warning" and add any warning message then save
	- Press the "$ X Sales" smart button
	- Create a new Quotation
	- Validate the warning message
	- Go back to the previous menu (using the breadcrumb) or save the quotation
	- Create a new quotation

	The quotation form editor does not appear.

Cause

	If we use the breadcrumb (or save then create), it will call the `_reload` function
	(instead of `load` when the form view hasn't been opened yet).
	In this case, creating a new record, it will call `_makeDefaultRecord` without
	setting `allowWarning` param to true (like it is done in the ref. commit bellow).

Solution

	Set `allowWarning` param to true before calling `_makeDefaultRecord`.

related commit : https://github.com/odoo/odoo/commit/a41db9a2cf410bb233b021651a5633180eaddf18



opw-2374857

closes odoo/odoo#62204

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 20d55109
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment