diff --git a/setup/web_copy_confirm/odoo_addons/__init__.py b/setup/web_copy_confirm/odoo_addons/__init__.py new file mode 100644 index 000000000..de40ea7ca --- /dev/null +++ b/setup/web_copy_confirm/odoo_addons/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/web_copy_confirm/odoo_addons/web_copy_confirm b/setup/web_copy_confirm/odoo_addons/web_copy_confirm new file mode 120000 index 000000000..002248f80 --- /dev/null +++ b/setup/web_copy_confirm/odoo_addons/web_copy_confirm @@ -0,0 +1 @@ +../../../web_copy_confirm \ No newline at end of file diff --git a/setup/web_copy_confirm/setup.py b/setup/web_copy_confirm/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/web_copy_confirm/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/web_copy_confirm/__openerp__.py b/web_copy_confirm/__openerp__.py index 2e345a1e2..52e009b5e 100644 --- a/web_copy_confirm/__openerp__.py +++ b/web_copy_confirm/__openerp__.py @@ -1,4 +1,3 @@ -# coding: utf-8 # Copyright (C) 2018 DynApps # @author Stefan Rijnhart # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -10,7 +9,7 @@ "license": "AGPL-3", "category": "Tools", "depends": [ - 'web', + "web", ], "data": [ "views/assets.xml", diff --git a/web_copy_confirm/static/src/js/web_copy_confirm.js b/web_copy_confirm/static/src/js/web_copy_confirm.js index 3d7859fda..0c58051c2 100644 --- a/web_copy_confirm/static/src/js/web_copy_confirm.js +++ b/web_copy_confirm/static/src/js/web_copy_confirm.js @@ -1,15 +1,15 @@ // Copyright (C) 2018 DynApps // @author Stefan Rijnhart // License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -openerp.web_copy_confirm = function(instance) { +openerp.web_copy_confirm = function (instance) { instance.web.FormView.include({ - on_button_duplicate: function() { + on_button_duplicate: function () { var self = this; - this.has_been_loaded.done(function() { + this.has_been_loaded.done(function () { if (confirm(_t("Do you really want to copy this record?"))) { return self._super.apply(self, arguments); } }); - } + }, }); }; diff --git a/web_copy_confirm/views/assets.xml b/web_copy_confirm/views/assets.xml index af0fab4a8..0588a6106 100644 --- a/web_copy_confirm/views/assets.xml +++ b/web_copy_confirm/views/assets.xml @@ -1,9 +1,16 @@ - + -