-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* easy_debug_backend * easy_debug_frontend Those two modules constantly provide 'debug mode'
- Loading branch information
Jonathan Nemry
committed
Oct 24, 2014
1 parent
86b134c
commit 5945efb
Showing
10 changed files
with
218 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Authors: Nemry Jonathan | ||
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) | ||
# All Rights Reserved | ||
# | ||
# WARNING: This program as such is intended to be used by professional | ||
# programmers who take the whole responsibility of assessing all potential | ||
# consequences resulting from its eventual inadequacies and bugs. | ||
# End users who are looking for a ready-to-use solution with commercial | ||
# guarantees and support are strongly advised to contact a Free Software | ||
# Service Company. | ||
# | ||
# 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/>. | ||
# | ||
############################################################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Authors: Nemry Jonathan | ||
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) | ||
# All Rights Reserved | ||
# | ||
# WARNING: This program as such is intended to be used by professional | ||
# programmers who take the whole responsibility of assessing all potential | ||
# consequences resulting from its eventual inadequacies and bugs. | ||
# End users who are looking for a ready-to-use solution with commercial | ||
# guarantees and support are strongly advised to contact a Free Software | ||
# Service Company. | ||
# | ||
# 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/>. | ||
# | ||
############################################################################## | ||
{ | ||
'name': 'Easy Debug Backend', | ||
'version': '1.0', | ||
'author': 'ACSONE SA/NV', | ||
'maintainer': 'ACSONE SA/NV', | ||
'website': 'http://www.acsone.eu', | ||
'category': 'Other', | ||
'depends': [ | ||
'base', | ||
], | ||
'description': """ | ||
Easy Debug Backend | ||
================== | ||
Constantly apply 'debug mode' for backend | ||
""", | ||
'data': [ | ||
'views/easy_debug_backend.xml', | ||
], | ||
'installable': True, | ||
'auto_install': False, | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
openerp.easy_debug_backend = function(instance) { | ||
|
||
instance.web.ActionManager.include({ | ||
init : function() { | ||
this._super.apply(this, arguments); | ||
}, | ||
do_action : function(action, options) { | ||
if (window.location.href.indexOf('debug') == -1) { | ||
window.location = $.param.querystring(window.location.href, | ||
'debug'); | ||
} | ||
return this._super.apply(this, arguments); | ||
} | ||
}); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version='1.0' encoding='UTF-8' ?> | ||
<openerp> | ||
<data noupdate="0"> | ||
|
||
<!-- BACKEND --> | ||
<template id="assets_backend" | ||
name="website.assets_backend (easy_debug_backend)" | ||
inherit_id="web.assets_backend"> | ||
<xpath expr="." position="inside"> | ||
<script type="text/javascript" | ||
src="/easy_debug_backend/static/src/js/easy_debug_backend.js"></script> | ||
</xpath> | ||
</template> | ||
|
||
</data> | ||
</openerp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Authors: Nemry Jonathan | ||
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) | ||
# All Rights Reserved | ||
# | ||
# WARNING: This program as such is intended to be used by professional | ||
# programmers who take the whole responsibility of assessing all potential | ||
# consequences resulting from its eventual inadequacies and bugs. | ||
# End users who are looking for a ready-to-use solution with commercial | ||
# guarantees and support are strongly advised to contact a Free Software | ||
# Service Company. | ||
# | ||
# 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/>. | ||
# | ||
############################################################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Authors: Nemry Jonathan | ||
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) | ||
# All Rights Reserved | ||
# | ||
# WARNING: This program as such is intended to be used by professional | ||
# programmers who take the whole responsibility of assessing all potential | ||
# consequences resulting from its eventual inadequacies and bugs. | ||
# End users who are looking for a ready-to-use solution with commercial | ||
# guarantees and support are strongly advised to contact a Free Software | ||
# Service Company. | ||
# | ||
# 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/>. | ||
# | ||
############################################################################## | ||
{ | ||
'name': 'Easy Debug Frontend', | ||
'version': '1.0', | ||
'author': 'ACSONE SA/NV', | ||
'maintainer': 'ACSONE SA/NV', | ||
'website': 'http://www.acsone.eu', | ||
'category': 'Other', | ||
'depends': [ | ||
'easy_debug_backend', | ||
'website', | ||
], | ||
'description': """ | ||
Easy Debug Frontend | ||
=================== | ||
Constantly apply 'debug mode' for frontend | ||
""", | ||
'data': [ | ||
'views/easy_debug_frontend.xml', | ||
], | ||
'installable': True, | ||
'auto_install': False, | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
var website = openerp.website; | ||
var _t = openerp._t; | ||
var _super_website_ready = website.ready; | ||
|
||
website.ready = function(options) { | ||
if (window.location.href.indexOf('debug') == -1) { | ||
window.location = $.param | ||
.querystring(window.location.href, 'debug'); | ||
} | ||
return _super_website_ready(); | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version='1.0' encoding='UTF-8' ?> | ||
<openerp> | ||
<data noupdate="0"> | ||
|
||
<!-- FRONTEND --> | ||
<template id="assets_frontend" | ||
name="website.assets_frontend (easy_debug_frontend)" | ||
inherit_id="website.assets_frontend"> | ||
<xpath expr="." position="inside"> | ||
<script type="text/javascript" | ||
src="/easy_debug_frontend/static/src/js/easy_debug_frontend.js"></script> | ||
</xpath> | ||
</template> | ||
|
||
</data> | ||
</openerp> |