diff --git a/product_warranty/README.rst b/product_warranty/README.rst index a07914af..21cd7854 100644 --- a/product_warranty/README.rst +++ b/product_warranty/README.rst @@ -1,51 +1,21 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 +**This file is going to be generated by oca-gen-addon-readme.** -Product Warranty -================ +*Manual changes will be overwritten.* -Extends the product warranty management with warranty details on product / -supplier relation: +Please provide content in the ``readme`` directory: -* Supplier warranty duration -* Set default return address for company (if different from standard one) -* Whether to return product to company, supplier, other +* **DESCRIPTION.rst** (required) +* INSTALL.rst (optional) +* CONFIGURE.rst (optional) +* **USAGE.rst** (optional, highly recommended) +* DEVELOP.rst (optional) +* ROADMAP.rst (optional) +* HISTORY.rst (optional, recommended) +* **CONTRIBUTORS.rst** (optional, highly recommended) +* CREDITS.rst (optional) -Usage -===== +Content of this README will also be drawn from the addon manifest, +from keys such as name, authors, maintainers, development_status, +and license. -The new information is not explicitly used by the system until you install -another module that makes use of it, e.g. RMA Claim (Product Return -Management). - -Credits -======= - -Contributors ------------- - -* Emmanuel Samyn -* Paulius Sladkevičius -* Benoît Guillot -* David Beal -* Maxime Chambreuil -* Joël Grand-Guillaume -* Ondřej Kuzník -* Yanina Aular -* Cyril Gaudin -* Bima Jati Wijaya - -Maintainer ----------- - -.. image:: https://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: https://odoo-community.org - -This module is maintained by the OCA. - -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. +A good, one sentence summary in the manifest is also highly recommended. diff --git a/product_warranty/__init__.py b/product_warranty/__init__.py index 0d135c28..466cdd81 100644 --- a/product_warranty/__init__.py +++ b/product_warranty/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Cyril Gaudin (Camptocamp) # © 2009-2011 Akretion, Emmanuel Samyn # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/product_warranty/__manifest__.py b/product_warranty/__manifest__.py index e2b6badb..563ab9ca 100644 --- a/product_warranty/__manifest__.py +++ b/product_warranty/__manifest__.py @@ -1,44 +1,31 @@ -# -*- coding: utf-8 -*- -######################################################################### -# # -# # -######################################################################### -# # -# Copyright (C) 2009-2011 Akretion, Emmanuel Samyn # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU 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 General Public License # -# along with this program. If not, see . # -######################################################################### +# Copyright (C) 2009-2011 Akretion, Emmanuel Samyn +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { - 'name': 'Product warranty', - 'version': '10.0.1.0.0', + 'name': 'Product Warranty', + 'version': '11.0.1.0.0', 'category': 'Generic Modules/Product', - 'author': "Akretion,Odoo Community Association (OCA),Vauxoo", - 'website': 'http://akretion.com', + 'author': 'Akretion, Vauxoo, Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/rma', 'license': 'AGPL-3', - 'depends': ['product', 'sale'], + 'depends': [ + 'product', + 'sale', + ], 'data': [ 'security/ir.model.access.csv', 'views/res_company.xml', 'views/product_warranty.xml', + 'views/product_template.xml' ], 'demo': [ 'demo/product_warranty.xml', 'demo/res_company.xml', ], - 'test': [], - 'installable': True, - 'active': False, 'images': ['images/product_warranty.png'], + 'development_status': 'Production/Stable', + 'maintainers': [ + 'osi-scampbell', + 'max3903', + ] } diff --git a/product_warranty/models/__init__.py b/product_warranty/models/__init__.py index b29d709f..22635978 100644 --- a/product_warranty/models/__init__.py +++ b/product_warranty/models/__init__.py @@ -1,8 +1,10 @@ -# -*- coding: utf-8 -*- # © 2016 Cyril Gaudin (Camptocamp) # © 2009-2011 Akretion, Emmanuel Samyn # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from . import return_instruction -from . import product_supplierinfo -from . import res_company +from . import ( + return_instruction, + product_supplierinfo, + res_company, + product_template +) diff --git a/product_warranty/models/product_supplierinfo.py b/product_warranty/models/product_supplierinfo.py index 7bf4c88a..ec8ea4d2 100644 --- a/product_warranty/models/product_supplierinfo.py +++ b/product_warranty/models/product_supplierinfo.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Cyril Gaudin (Camptocamp) # © 2015 Vauxoo # © 2009-2011 Akretion, Emmanuel Samyn, Benoît Guillot @@ -8,7 +7,6 @@ from odoo import api, fields, models class ProductSupplierInfo(models.Model): - _inherit = "product.supplierinfo" @api.model diff --git a/product_warranty/models/product_template.py b/product_warranty/models/product_template.py new file mode 100644 index 00000000..bc985aa2 --- /dev/null +++ b/product_warranty/models/product_template.py @@ -0,0 +1,16 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + warranty = fields.Integer(string='Warranty Duration') + warranty_type = fields.Selection([('day', 'Day(s)'), + ('week', 'Week(s)'), + ('month', 'Month(s)'), + ('year', 'Year(s)')], + string='Warranty Type', + required=True, default='day') diff --git a/product_warranty/models/res_company.py b/product_warranty/models/res_company.py index 30009796..9c917fd0 100644 --- a/product_warranty/models/res_company.py +++ b/product_warranty/models/res_company.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Joel Grand-Guillaume, Cyril Gaudin (Camptocamp) # © 2009-2013 Akretion, Emmanuel Samyn, Raphaël Valyi, Sébastien Beau # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -7,7 +6,6 @@ from odoo import fields, models class ResCompany(models.Model): - _inherit = "res.company" crm_return_address_id = fields.Many2one( diff --git a/product_warranty/models/return_instruction.py b/product_warranty/models/return_instruction.py index b1798a6e..c0649214 100644 --- a/product_warranty/models/return_instruction.py +++ b/product_warranty/models/return_instruction.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Cyril Gaudin (Camptocamp) # © 2015 Vauxoo # © 2009-2011 Akretion, Emmanuel Samyn, Benoît Guillot @@ -8,7 +7,6 @@ from odoo import fields, models class ReturnInstruction(models.Model): - _name = "return.instruction" _description = "Instructions for product return" diff --git a/product_warranty/readme/CONTRIBUTORS.rst b/product_warranty/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..d810a2eb --- /dev/null +++ b/product_warranty/readme/CONTRIBUTORS.rst @@ -0,0 +1,10 @@ +* Emmanuel Samyn +* Paulius Sladkevičius +* Benoît Guillot +* David Beal +* Maxime Chambreuil +* Joël Grand-Guillaume +* Ondřej Kuzník +* Yanina Aular +* Cyril Gaudin +* Bima Jati Wijaya diff --git a/product_warranty/readme/CREDITS.rst b/product_warranty/readme/CREDITS.rst new file mode 100644 index 00000000..b6f1055f --- /dev/null +++ b/product_warranty/readme/CREDITS.rst @@ -0,0 +1,10 @@ +This module has been financially supported by: + +* Inovera +* Akretion Brazil +* Akretion +* Savoir-faire Linux +* Credativ +* Vauxoo +* Camp 2 Camp +* Open Source Integrators diff --git a/product_warranty/readme/DESCRIPTION.rst b/product_warranty/readme/DESCRIPTION.rst new file mode 100644 index 00000000..da2b8af9 --- /dev/null +++ b/product_warranty/readme/DESCRIPTION.rst @@ -0,0 +1,6 @@ +Extends the product warranty management with warranty details on product / +supplier relation: + +* Supplier warranty duration +* Set default return address for company (if different from standard one) +* Whether to return product to company, supplier, other diff --git a/product_warranty/readme/USAGE.rst b/product_warranty/readme/USAGE.rst new file mode 100644 index 00000000..af453434 --- /dev/null +++ b/product_warranty/readme/USAGE.rst @@ -0,0 +1,3 @@ +The new information is not explicitly used by the system until you install +another module that makes use of it, e.g. RMA Claim (Product Return +Management). diff --git a/product_warranty/tests/__init__.py b/product_warranty/tests/__init__.py index 07376694..1d0ff0c3 100644 --- a/product_warranty/tests/__init__.py +++ b/product_warranty/tests/__init__.py @@ -1,22 +1,5 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Yanina Aular -# Copyright 2015 Vauxoo -# -# 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 . -# -############################################################################## +# Author: Yanina Aular +# Copyright 2015 Vauxoo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_product_warranty diff --git a/product_warranty/tests/test_product_warranty.py b/product_warranty/tests/test_product_warranty.py index 38a68707..7ddca775 100644 --- a/product_warranty/tests/test_product_warranty.py +++ b/product_warranty/tests/test_product_warranty.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Cyril Gaudin (Camptocamp) # © 2015 Vauxoo, Yanina Aular # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/product_warranty/views/product_template.xml b/product_warranty/views/product_template.xml new file mode 100644 index 00000000..868a7a3c --- /dev/null +++ b/product_warranty/views/product_template.xml @@ -0,0 +1,24 @@ + + + + + product.template + + + + + + + + + + + + + diff --git a/product_warranty/views/res_company.xml b/product_warranty/views/res_company.xml index 51317c05..88c76b06 100644 --- a/product_warranty/views/res_company.xml +++ b/product_warranty/views/res_company.xml @@ -9,7 +9,7 @@ - +