Skip to Content
Menu
v 17.0 Third Party 1391
Download for v 17.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 109
Technical Name web_no_auto_save
LicenseLGPL-3
Websitehttp://www.bizzappdev.com
Versions 16.0 17.0 18.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 109
Technical Name web_no_auto_save
LicenseLGPL-3
Websitehttp://www.bizzappdev.com
Versions 16.0 17.0 18.0
No Auto Save

Contact With Us

contact@bizzappdev.com
Contact Us for the smart Personalized Modules.
This module allows to Not auto save for any changes in the Tree as well as Form view for any module and ask for the Do you want to save changes Automatically? on the previous click.
Increase the visibility of Save and Discard button

When changes in the record and go previous without save than it will open the Confirmation Dialogue(Message)

On click of OK button click the record changes save


On click of Cancel button record doesn't have any changes


Increase the visibility of Save and Discard button for Enterprise

When changes in the record and go previous without save than it will open the Confirmation Dialogue(Message) for Enterprise

On click of OK button click the record changes save for Enterprise


On click of Cancel button record doesn't have any changes for Enterprise


Need Any Help ?

Contact With Us

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
using deepSeek I modified it .It is working well except when clicking menu item it saves automatically
by
Sedik Leaning
on 6/2/25, 1:31 AM



by
Sedik Leaning
on 6/2/25, 1:37 AM

/** @odoo-module **/ import { FormController } from "@web/views/form/form_controller"; import { ListController } from "@web/views/list/list_controller"; import { ViewButton } from "@web/views/view_button/view_button"; import { useRef } from "@odoo/owl"; import { useSetupView } from "@web/views/view_hook"; import { useService } from "@web/core/utils/hooks"; import { _t } from "@web/core/l10n/translation"; import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; // Helper function for new stay-on-record dialog async function showStayDialog(dialog) { return new Promise((resolve) => { dialog.add(ConfirmationDialog, { body: _t("There are unsaved changes. Please save them first."), confirmLabel: _t("OK"), cancel: null, // Remove cancel button confirm: resolve.bind(null, false), // Always return false to stay }); }); } const oldSetup = FormController.prototype.setup; const oldonPagerUpdated = FormController.prototype.onPagerUpdate; const Formsetup = function () { this.dialog = useService("dialog"); this.rootRef = useRef("root"); useSetupView({ beforeLeave: async () => { if (this.model.root.dirty) { await showStayDialog(this.dialog); return false; // Prevent leaving } }, }); const result = oldSetup.apply(this, arguments); return result; }; FormController.prototype.setup = Formsetup; const onPagerUpdate = async function () { const dirty = await this.model.root.isDirty(); if (dirty) { await showStayDialog(this.dialog); return false; // Prevent pager update } return oldonPagerUpdated.apply(this, arguments); }; FormController.prototype.onPagerUpdate = onPagerUpdate; const oldCreate = FormController.prototype.create; FormController.prototype.create = async function () { if (this.model.root.dirty) { await showStayDialog(this.dialog); return false; // Prevent create } return oldCreate.apply(this, arguments); }; const oldshouldExecuteAction = FormController.prototype.shouldExecuteAction; FormController.prototype.shouldExecuteAction = async function () { if (this.model.root.dirty) { await showStayDialog(this.dialog); return false; // Prevent action execution } return oldshouldExecuteAction.apply(this, arguments); }; const ListSuper = ListController.prototype.setup; const Listsetup = function () { this.dialog = useService("dialog"); useSetupView({ rootRef: this.rootRef, beforeLeave: async () => { const list = this.model.root; const editedRecord = list.editedRecord; if (editedRecord && editedRecord.isDirty) { await showStayDialog(this.dialog); return false; // Prevent leaving } }, }); const result = ListSuper.apply(this, arguments); return result; }; ListController.prototype.setup = Listsetup; const oldonClick = ViewButton.prototype.onClick; ViewButton.prototype.onClick = async function () { if (this.props.record.dirty) { await showStayDialog(this.dialog); return false; // Prevent button action } return oldonClick.apply(this, arguments); };