Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c7e8db6
[ADD] web_ir_actions_act_window_message
hbrunn Mar 17, 2015
60341b1
[IMP] better readme, manifest
hbrunn Mar 18, 2015
99971f8
Add bug tracker link on README.rst
yvaucher May 22, 2015
decdbea
add OCA to author
Jun 4, 2015
5f56564
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
9f844b0
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
371a592
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
3eebf2e
allow to pass a list of buttons
hbrunn Mar 3, 2016
d3580f2
implement close_button_title
hbrunn Mar 3, 2016
c9dc5e2
OCA Transbot updated translations from Transifex
oca-transbot Nov 24, 2015
e7173c9
web_ir_actions_act_window_message: Migration to V9
zakmak88 Apr 25, 2017
e9d652f
web_ir_actions_act_window_message: always refresh view after action
zakmak88 May 7, 2017
62ce149
Reformat the code to have coherent coding style
zakmak88 May 16, 2017
25e8742
s/oe_link_class/classes s/oe_highlight/btn-default and add it to read…
zakmak88 May 16, 2017
eee1c26
wrap line breaks of the action message
zakmak88 May 16, 2017
3502f98
[MIG] web_ir_actions_act_window_message: Migration to 10. Also added …
benwillig May 23, 2017
a58493a
OCA Transbot updated translations from Transifex
oca-transbot Jun 3, 2017
8d9fa71
[UPD] Update web_ir_actions_act_window_message.pot
oca-travis Jun 24, 2018
049d215
[12.0][MIG] web_ir_actions_act_window_message: Migration to 12.0
Nov 21, 2019
9ca46bc
[UPD] Update web_ir_actions_act_window_message.pot
oca-travis Nov 26, 2019
66fcf92
[UPD] README.rst
OCA-git-bot Nov 26, 2019
f39612a
Update translation files
oca-transbot Nov 26, 2019
0cabc96
Update translation files
oca-transbot Dec 4, 2019
a7031c8
[UPD] README.rst
OCA-git-bot Mar 29, 2020
14f4457
[IMP] web_ir_actions_act_window_message: Remove utf-8 comment
pedrobaeza Apr 23, 2020
28532a9
[FIX] web_ir_actions_act_window_message: Proper trailing line in XML
pedrobaeza Apr 23, 2020
76f6b7f
[MIG] web_ir_actions_act_window_message
ThomasBinsfeld Jun 15, 2020
222feb7
[UPD] Update web_ir_actions_act_window_message.pot
oca-travis Jun 29, 2020
1e36507
[UPD] README.rst
OCA-git-bot Jun 29, 2020
bf3165d
[UPD] README.rst
OCA-git-bot Jul 13, 2020
98a569e
[UPD] README.rst
OCA-git-bot Jul 13, 2020
0e3f608
Update translation files
oca-transbot Jul 13, 2020
c0fdf29
[MIG] web_ir_actions_act_window_message: Migration to 14.0
koenloodts Dec 7, 2020
3506e32
[UPD] Update web_ir_actions_act_window_message.pot
oca-travis Dec 6, 2021
74cce99
[UPD] README.rst
OCA-git-bot Dec 6, 2021
9d7358e
[MIG] web_ir_actions_act_window_message: Migration to 15.0
JasminSForgeFlow Jul 22, 2022
a4e5fb7
[UPD] Update web_ir_actions_act_window_message.pot
Aug 26, 2022
33518f6
[UPD] README.rst
OCA-git-bot Aug 26, 2022
4f8a98d
[IMP] web_ir_actions_act_window_message: pre-commit stuff
johnnypiguave Nov 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
web_ir_actions_act_window_message: Migration to V9
* Update the module version to 9.0.
* Align file header to the OCA Guidelines.
* Migrate Javascript file to the V9 API.
* Refresh the view before closing the dialog when clicking
on close button
  • Loading branch information
zakmak88 authored and johnnypiguave committed Nov 11, 2022
commit e7173c9fe119017d677203da499b334362564a67
1 change: 1 addition & 0 deletions web_ir_actions_act_window_message/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Contributors
------------

* Holger Brunn <[email protected]>
* Zakaria Makrelouf (ACSONE SA/NV) <[email protected]>

Maintainer
----------
Expand Down
20 changes: 0 additions & 20 deletions web_ir_actions_act_window_message/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2015 Therp BV <http://therp.nl>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
30 changes: 4 additions & 26 deletions web_ir_actions_act_window_message/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2015 Therp BV <http://therp.nl>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# Copyright 2017 Therp BV, ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Client side message boxes",
"version": "8.0.1.0.0",
"version": "9.0.1.0.0",
"author": "Therp BV, "
"ACSONE SA/NV, "
"Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Hidden/Dependency",
Expand All @@ -35,10 +19,4 @@
"qweb": [
'static/src/xml/web_ir_actions_act_window_message.xml',
],
"auto_install": False,
'installable': False,
"application": False,
"external_dependencies": {
'python': [],
},
}
Original file line number Diff line number Diff line change
@@ -1,59 +1,51 @@
//-*- coding: utf-8 -*-
//############################################################################
//
// OpenERP, Open Source Management Solution
// This module copyright (C) 2015 Therp BV <http://therp.nl>.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//############################################################################
/* Copyright 2017 Therp BV, ACSONE SA/NV
* * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */

odoo.define('web.web_ir_actions_act_window_message', function (require) {
"use strict";

var ActionManager = require('web.ActionManager'),
core = require('web.core'),
_ = require('_'),
Model = require('web.Model'),
Dialog = require('web.Dialog');

var _t = core._t;

ActionManager.include({
ir_actions_act_window_message: function(action, options){

openerp.web_ir_actions_act_window_message = function(instance)
{
instance.web.ActionManager.include({
ir_actions_act_window_message: function(action, options)
{
var self = this,
buttons = [];

if(action.close_button_title !== false)
{
buttons.push({
text: action.close_button_title ||
instance.web._t('Close'),
click: function() { dialog.close() },
text: action.close_button_title || _t('Close'),
click: function() {
// refresh the view before closing the dialog
self.inner_widget.active_view
.controller.recursive_reload();
dialog.close()
},
oe_link_class: 'oe_highlight',
})
}

var dialog = new instance.web.Dialog(
var dialog = new Dialog(
this,
{
_.extend({
size: 'medium',
title: action.title,
$content: $('<div>', {
text: action.message,
}),
buttons: buttons.concat(
this.ir_actions_act_window_message_get_buttons(
action, function() { dialog.close() })
),
},
jQuery(instance.web.qweb.render(
'web_ir_actions_act_window_message',
{
'this': this,
'action': action,
}))
)
}, options)
);
return dialog.open();
},
ir_actions_act_window_message_get_buttons: function(action, close_func)
Expand All @@ -67,9 +59,8 @@ openerp.web_ir_actions_act_window_message = function(instance)
oe_link_class: button_definition.oe_link_class ||
'oe_highlight',
click: function() {
if(button_definition.type == 'method')
{
(new instance.web.Model(button_definition.model))
if(button_definition.type == 'method'){
(new Model(button_definition.model))
.call(
button_definition.method,
button_definition.args,
Expand All @@ -94,14 +85,13 @@ openerp.web_ir_actions_act_window_message = function(instance)
}
});
}
else
{
else{
self.do_action(button_definition);
}
close_func();
},
}
}
});
},
}
});
}
});
23 changes: 13 additions & 10 deletions web_ir_actions_act_window_message/views/templates.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<template id="assets_backend" name="web_ir_actions_act_window_message assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js"></script>
</xpath>
</template>
</data>
</openerp>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 Therp BV, ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->

<odoo>

<template id="assets_backend" name="web_ir_actions_act_window_message assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js"></script>
</xpath>
</template>

</odoo>