Browse Source

Jun 15: [FIX] Bug Fixed 'edit_save_button'

pull/320/head
RisvanaCybro 11 months ago
parent
commit
ec8ad56bfe
  1. 2
      edit_save_button/__manifest__.py
  2. 6
      edit_save_button/doc/RELEASE_NOTES.md
  3. 12
      edit_save_button/static/src/views/form/form_controller.js

2
edit_save_button/__manifest__.py

@ -22,7 +22,7 @@
{
'name': 'Edit Button In Odoo16',
'version': '16.0.1.0.4',
'version': '16.0.1.0.5',
'summary': 'Edit Button Odoo16',
'description': 'Edit Button in Odoo16',
'author': 'Cybrosys Techno Solutions',

6
edit_save_button/doc/RELEASE_NOTES.md

@ -21,3 +21,9 @@
#### Fix
- Bug fixed
#### 15.06.2024
#### Version 16.0.1.0.5
#### Fix
- Save button failure in email templates form view fixed.
- Switching to readonly mode while data evaluation failed is fixed.

12
edit_save_button/static/src/views/form/form_controller.js

@ -24,20 +24,22 @@ patch(FormController.prototype, "save",{
},
async edit(){
this._super();
await this._super();
await this.model.root.switchMode("edit");
},
async saveButtonClicked(params = {}){
this._super();
let saved = await this._super();
if (saved) {
if (!this.env.inDialog) {
await this.model.root.switchMode("readonly");
} else {
await this.model.actionService.doAction({ type: 'ir.actions.act_window_close' });
}
else {
this.model.actionService.doAction({type: 'ir.actions.act_window_close'});
}
return saved;
},
async discard(){
this._super();
await this._super();
if (!this.env.inDialog){
await this.model.root.switchMode("readonly");
}

Loading…
Cancel
Save