mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[MIG] Migrate product_warranty to 11.0
This commit is contained in:
committed by
Maxime Chambreuil
parent
c3a6e672d0
commit
5668f90d65
@@ -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 <esamyn@gmail.com>
|
||||
* Paulius Sladkevičius <paulius@inovera.lt>
|
||||
* Benoît Guillot <benoit.guillot@akretion.com.br>
|
||||
* David Beal <david.beal@akretion.com>
|
||||
* Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com>
|
||||
* Joël Grand-Guillaume <joel.grandguillaume@gmail.com>
|
||||
* Ondřej Kuzník <ondrej.kuznik@credativ.co.uk>
|
||||
* Yanina Aular <yanina.aular@vauxoo.com>
|
||||
* Cyril Gaudin <cyril.gaudin@camptocamp.com>
|
||||
* Bima Jati Wijaya <bimajatiwijaya@gmail.com>
|
||||
|
||||
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.
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>. #
|
||||
#########################################################################
|
||||
# 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',
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
16
product_warranty/models/product_template.py
Normal file
16
product_warranty/models/product_template.py
Normal file
@@ -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')
|
||||
@@ -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(
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
10
product_warranty/readme/CONTRIBUTORS.rst
Normal file
10
product_warranty/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,10 @@
|
||||
* Emmanuel Samyn <esamyn@gmail.com>
|
||||
* Paulius Sladkevičius <paulius@inovera.lt>
|
||||
* Benoît Guillot <benoit.guillot@akretion.com.br>
|
||||
* David Beal <david.beal@akretion.com>
|
||||
* Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com>
|
||||
* Joël Grand-Guillaume <joel.grandguillaume@gmail.com>
|
||||
* Ondřej Kuzník <ondrej.kuznik@credativ.co.uk>
|
||||
* Yanina Aular <yanina.aular@vauxoo.com>
|
||||
* Cyril Gaudin <cyril.gaudin@camptocamp.com>
|
||||
* Bima Jati Wijaya <bimajatiwijaya@gmail.com>
|
||||
10
product_warranty/readme/CREDITS.rst
Normal file
10
product_warranty/readme/CREDITS.rst
Normal file
@@ -0,0 +1,10 @@
|
||||
This module has been financially supported by:
|
||||
|
||||
* Inovera <https://www.inovera.lt>
|
||||
* Akretion Brazil <https://www.akretion.com.br>
|
||||
* Akretion <https://www.akretion.com>
|
||||
* Savoir-faire Linux <https://www.savoirfairelinux.com>
|
||||
* Credativ <https://www.credativ.co.uk>
|
||||
* Vauxoo <https://www.vauxoo.com>
|
||||
* Camp 2 Camp <https://camptocamp.com>
|
||||
* Open Source Integrators <https://www.opensourceintegrators.com>
|
||||
6
product_warranty/readme/DESCRIPTION.rst
Normal file
6
product_warranty/readme/DESCRIPTION.rst
Normal file
@@ -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
|
||||
3
product_warranty/readme/USAGE.rst
Normal file
3
product_warranty/readme/USAGE.rst
Normal file
@@ -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).
|
||||
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
# Author: Yanina Aular
|
||||
# Copyright 2015 Vauxoo
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import test_product_warranty
|
||||
|
||||
@@ -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).
|
||||
|
||||
24
product_warranty/views/product_template.xml
Normal file
24
product_warranty/views/product_template.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="product_template_extend_warranty" model="ir.ui.view">
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id"
|
||||
ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="sales" position="inside">
|
||||
<group>
|
||||
<group id="warranty-left">
|
||||
<label for="warranty"/>
|
||||
<div>
|
||||
<field name="warranty" class="oe_inline"/>
|
||||
<field name="warranty_type" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<group id="warranty-right"/>
|
||||
</group>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -9,7 +9,7 @@
|
||||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='company_registry']/ancestor::group" position="after">
|
||||
<separator string="Crm product return address"/>
|
||||
<separator string="CRM Product Return Address"/>
|
||||
<group>
|
||||
<field name="crm_return_address_id"/>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user