diff --git a/web_remove_duplicate/__init__.py b/web_remove_duplicate/__init__.py deleted file mode 100644 index 1a5e9b22..00000000 --- a/web_remove_duplicate/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2016 Acsone SA (). -# -# 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 . -# -############################################################################## diff --git a/web_remove_duplicate/__openerp__.py b/web_remove_duplicate/__openerp__.py deleted file mode 100644 index 088dff54..00000000 --- a/web_remove_duplicate/__openerp__.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2016 Acsone SA (). -# -# 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 . -# -############################################################################## -{ - "name": "Remove Duplicate Action", - "version": "1.0", - "author": "Acsone SA,Odoo Community Association (OCA)", - "license": "AGPL-3", - "complexity": "normal", - "description": """ -Introduction -============ - -This addon provide a form option to allow to hide 'Duplicate' action -on objects - -Usage -===== - -Simply depend on web_remove_duplicate and add the attribute 'remove_dependency' - on the form view - """, - "category": "Dependency", - "depends": [ - 'web', - ], - "data": [ - ], - "js": [ - 'static/src/js/web_remove_duplicate.js' - ], - "css": [ - ], - "qweb": [ - ], - "test": [ - ], - "auto_install": False, - "installable": True, - "application": False, - "external_dependencies": { - 'python': [], - }, -} diff --git a/web_remove_duplicate/static/src/js/web_remove_duplicate.js b/web_remove_duplicate/static/src/js/web_remove_duplicate.js deleted file mode 100644 index 1f281adb..00000000 --- a/web_remove_duplicate/static/src/js/web_remove_duplicate.js +++ /dev/null @@ -1,41 +0,0 @@ -/* Web Remove Duplicate - @author: Denis Roussel - Inspired by the module web_eradicate_duplicate of Alexis Delattre -*/ - -openerp.web_remove_duplicate = function (instance) { - var _t = instance.web._t; - - instance.web.FormView.include({ - load_form: function(data) { - this._super(data); - // Remove More > Duplicate button except admin - // if the form has the attribute 'remove_duplicate' - if ( - this.sidebar && - this.sidebar.items && - this.sidebar.items.other && - this.session.uid != 1 && - this.fields_view.arch.attrs.remove_duplicate) { - var new_items_other = _.reject(this.sidebar.items.other, function (item) { - return item.label === _t('Duplicate'); - }); - this.sidebar.items.other = new_items_other; - } - } - }); -}; - -/* -EXAMPLE : enable duplicate on account.move : - - remove_duplicate.account_move_form - account.move - - - - True - - - -*/ \ No newline at end of file