From 9340a59d4b17e9a2d973be66689fb38100b83047 Mon Sep 17 00:00:00 2001 From: Damien Crier Date: Wed, 1 Jun 2016 17:17:20 +0200 Subject: [PATCH 1/3] [MIG] migration to v9 --- base_report_auto_create_qweb/__openerp__.py | 4 +- .../views/report_xml_view.xml | 41 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/base_report_auto_create_qweb/__openerp__.py b/base_report_auto_create_qweb/__openerp__.py index feb29908b..bba794fc5 100644 --- a/base_report_auto_create_qweb/__openerp__.py +++ b/base_report_auto_create_qweb/__openerp__.py @@ -18,7 +18,7 @@ { "name": "Report qweb auto generation", - "version": "8.0.1.0.0", + "version": "9.0.1.0.0", "depends": [ "report", ], @@ -43,5 +43,5 @@ "wizard/report_duplicate_view.xml", "views/report_xml_view.xml", ], - 'installable': False, + 'installable': True, } diff --git a/base_report_auto_create_qweb/views/report_xml_view.xml b/base_report_auto_create_qweb/views/report_xml_view.xml index 70ed53585..e80f54402 100644 --- a/base_report_auto_create_qweb/views/report_xml_view.xml +++ b/base_report_auto_create_qweb/views/report_xml_view.xml @@ -1,24 +1,23 @@ - - - ir.actions.report.xml.form - ir.actions.report.xml - - - - -
-
-
- -
-
-
+ + + ir.actions.report.xml.form + ir.actions.report.xml + + + + + + + + +
From 1ab28a2fd1f9da37056cee67329e9992adb2cb40 Mon Sep 17 00:00:00 2001 From: Damien Crier Date: Thu, 2 Jun 2016 09:21:53 +0200 Subject: [PATCH 2/3] [FIX] beta pylint + templates from oca --- base_report_auto_create_qweb/README.rst | 29 +++++++++++--- base_report_auto_create_qweb/__init__.py | 8 ++-- base_report_auto_create_qweb/__openerp__.py | 21 ++-------- .../models/__init__.py | 8 ++-- .../models/report_xml.py | 10 ++--- .../views/report_xml_view.xml | 38 +++++++++---------- .../wizard/__init__.py | 8 ++-- .../wizard/report_duplicate.py | 11 +++--- 8 files changed, 69 insertions(+), 64 deletions(-) diff --git a/base_report_auto_create_qweb/README.rst b/base_report_auto_create_qweb/README.rst index a8864216e..b9c0860b1 100644 --- a/base_report_auto_create_qweb/README.rst +++ b/base_report_auto_create_qweb/README.rst @@ -1,6 +1,8 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +=========================== Report qweb auto generation =========================== @@ -16,17 +18,32 @@ system is used this will add 'copy' as suffix. Be careful with this option as it can create many unnecessary Qweb views because it duplicates all the related files to the report you are copying. +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/{repo_id}/{branch} + +.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt +.. branch is "8.0" for example + Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback -`here `_. +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. Credits ======= +Images +------ + +* Odoo Community Association: `Icon `_. + Contributors ------------ * Oihane Crucelaegui @@ -47,4 +64,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit http://odoo-community.org. +To contribute to this module, please visit https://odoo-community.org. diff --git a/base_report_auto_create_qweb/__init__.py b/base_report_auto_create_qweb/__init__.py index 3fc79a2d7..3fc665703 100644 --- a/base_report_auto_create_qweb/__init__.py +++ b/base_report_auto_create_qweb/__init__.py @@ -1,7 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## +# -*- coding: utf-8 -*- +# Authors: See README.RST +# Copyright 2016 See README.rst for Authors +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models from . import wizard diff --git a/base_report_auto_create_qweb/__openerp__.py b/base_report_auto_create_qweb/__openerp__.py index bba794fc5..15b47759c 100644 --- a/base_report_auto_create_qweb/__openerp__.py +++ b/base_report_auto_create_qweb/__openerp__.py @@ -1,20 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# 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 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/. -# -############################################################################## +# -*- coding: utf-8 -*- +# Authors: See README.RST +# Copyright 2016 See README.rst for Authors +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Report qweb auto generation", diff --git a/base_report_auto_create_qweb/models/__init__.py b/base_report_auto_create_qweb/models/__init__.py index 40a047607..b55a207b3 100644 --- a/base_report_auto_create_qweb/models/__init__.py +++ b/base_report_auto_create_qweb/models/__init__.py @@ -1,6 +1,6 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## +# -*- coding: utf-8 -*- +# Authors: See README.RST +# Copyright 2016 See README.rst for Authors +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import report_xml diff --git a/base_report_auto_create_qweb/models/report_xml.py b/base_report_auto_create_qweb/models/report_xml.py index 7ef02178a..229aba9d6 100644 --- a/base_report_auto_create_qweb/models/report_xml.py +++ b/base_report_auto_create_qweb/models/report_xml.py @@ -1,7 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## +# -*- coding: utf-8 -*- +# Authors: See README.RST +# Copyright 2016 See README.rst for Authors +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, api, exceptions, _ import logging @@ -92,7 +92,7 @@ class IrActionsReport(models.Model): report_xml._create_qweb(name, report_name, module, model, arch) return report_xml - @api.one + @api.multi def copy(self, default=None): if not self.env.context.get('enable_duplication', False): return super(IrActionsReport, self).copy(default=default) diff --git a/base_report_auto_create_qweb/views/report_xml_view.xml b/base_report_auto_create_qweb/views/report_xml_view.xml index e80f54402..103384356 100644 --- a/base_report_auto_create_qweb/views/report_xml_view.xml +++ b/base_report_auto_create_qweb/views/report_xml_view.xml @@ -1,23 +1,23 @@ - - - ir.actions.report.xml.form - ir.actions.report.xml - - - - - + + + ir.actions.report.xml.form + ir.actions.report.xml + + + + + - - - + + + diff --git a/base_report_auto_create_qweb/wizard/__init__.py b/base_report_auto_create_qweb/wizard/__init__.py index 1d0ac90ff..362e523a1 100644 --- a/base_report_auto_create_qweb/wizard/__init__.py +++ b/base_report_auto_create_qweb/wizard/__init__.py @@ -1,6 +1,6 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## +# -*- coding: utf-8 -*- +# Authors: See README.RST +# Copyright 2016 See README.rst for Authors +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import report_duplicate diff --git a/base_report_auto_create_qweb/wizard/report_duplicate.py b/base_report_auto_create_qweb/wizard/report_duplicate.py index b461f1f99..2295b566d 100644 --- a/base_report_auto_create_qweb/wizard/report_duplicate.py +++ b/base_report_auto_create_qweb/wizard/report_duplicate.py @@ -1,7 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## +# -*- coding: utf-8 -*- +# Authors: See README.RST +# Copyright 2016 See README.rst for Authors +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, fields, models @@ -12,8 +12,9 @@ class IrActionsReportDuplicate(models.TransientModel): suffix = fields.Char( string='Suffix', help='This suffix will be added to the report') - @api.one + @api.multi def duplicate_report(self): + self.ensure_one() active_id = self.env.context.get('active_id') model = self.env.context.get('active_model') if model: From 3b546e79df5cc092d65868e06e1eaf99ec4d77e5 Mon Sep 17 00:00:00 2001 From: Damien Crier Date: Thu, 2 Jun 2016 11:29:39 +0200 Subject: [PATCH 3/3] [FIX] year and copyright --- base_report_auto_create_qweb/__init__.py | 3 --- base_report_auto_create_qweb/__openerp__.py | 4 ++-- base_report_auto_create_qweb/models/__init__.py | 3 --- base_report_auto_create_qweb/models/report_xml.py | 4 ++-- base_report_auto_create_qweb/wizard/__init__.py | 3 --- base_report_auto_create_qweb/wizard/report_duplicate.py | 4 ++-- 6 files changed, 6 insertions(+), 15 deletions(-) diff --git a/base_report_auto_create_qweb/__init__.py b/base_report_auto_create_qweb/__init__.py index 3fc665703..35e7c9600 100644 --- a/base_report_auto_create_qweb/__init__.py +++ b/base_report_auto_create_qweb/__init__.py @@ -1,7 +1,4 @@ # -*- coding: utf-8 -*- -# Authors: See README.RST -# Copyright 2016 See README.rst for Authors -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models from . import wizard diff --git a/base_report_auto_create_qweb/__openerp__.py b/base_report_auto_create_qweb/__openerp__.py index 15b47759c..1b8c756e5 100644 --- a/base_report_auto_create_qweb/__openerp__.py +++ b/base_report_auto_create_qweb/__openerp__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Authors: See README.RST -# Copyright 2016 See README.rst for Authors +# Authors: See README.RST for Contributors +# Copyright 2015-2016 See __openerp__.py for Authors # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { diff --git a/base_report_auto_create_qweb/models/__init__.py b/base_report_auto_create_qweb/models/__init__.py index b55a207b3..d71e31fc4 100644 --- a/base_report_auto_create_qweb/models/__init__.py +++ b/base_report_auto_create_qweb/models/__init__.py @@ -1,6 +1,3 @@ # -*- coding: utf-8 -*- -# Authors: See README.RST -# Copyright 2016 See README.rst for Authors -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import report_xml diff --git a/base_report_auto_create_qweb/models/report_xml.py b/base_report_auto_create_qweb/models/report_xml.py index 229aba9d6..326abfa58 100644 --- a/base_report_auto_create_qweb/models/report_xml.py +++ b/base_report_auto_create_qweb/models/report_xml.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Authors: See README.RST -# Copyright 2016 See README.rst for Authors +# Authors: See README.RST for Contributors +# Copyright 2015-2016 See __openerp__.py for Authors # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, api, exceptions, _ diff --git a/base_report_auto_create_qweb/wizard/__init__.py b/base_report_auto_create_qweb/wizard/__init__.py index 362e523a1..2d928518e 100644 --- a/base_report_auto_create_qweb/wizard/__init__.py +++ b/base_report_auto_create_qweb/wizard/__init__.py @@ -1,6 +1,3 @@ # -*- coding: utf-8 -*- -# Authors: See README.RST -# Copyright 2016 See README.rst for Authors -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import report_duplicate diff --git a/base_report_auto_create_qweb/wizard/report_duplicate.py b/base_report_auto_create_qweb/wizard/report_duplicate.py index 2295b566d..06b59873a 100644 --- a/base_report_auto_create_qweb/wizard/report_duplicate.py +++ b/base_report_auto_create_qweb/wizard/report_duplicate.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Authors: See README.RST -# Copyright 2016 See README.rst for Authors +# Authors: See README.RST for Contributors +# Copyright 2015-2016 See __openerp__.py for Authors # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, fields, models