mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[IMP] Port product_warranty
This commit is contained in:
committed by
Maxime Chambreuil
parent
45c3addeac
commit
69a2a4b95b
48
product_warranty/README.rst
Normal file
48
product_warranty/README.rst
Normal file
@@ -0,0 +1,48 @@
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:alt: License: AGPL-3
|
||||
|
||||
Product Warranty
|
||||
================
|
||||
|
||||
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
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
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>
|
||||
|
||||
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.
|
||||
21
product_warranty/__init__.py
Normal file
21
product_warranty/__init__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- 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 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
from . import product_warranty
|
||||
from . import res_company
|
||||
38
product_warranty/__openerp__.py
Normal file
38
product_warranty/__openerp__.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# -*- 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 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
'name': 'Product warranty',
|
||||
'version': '1.0',
|
||||
'category': 'Generic Modules/Product',
|
||||
'author': "Akretion,Odoo Community Association (OCA)",
|
||||
'website': 'http://akretion.com',
|
||||
'license': 'AGPL-3',
|
||||
'depends': ['product'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'res_company_view.xml',
|
||||
'product_warranty_view.xml',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': [],
|
||||
'installable': True,
|
||||
'images': ['images/product_warranty.png'],
|
||||
}
|
||||
161
product_warranty/i18n/es.po
Normal file
161
product_warranty/i18n/es.po
Normal file
@@ -0,0 +1,161 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * product_warranty
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: product_warranty.es\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2013-11-21 15:06+0000\n"
|
||||
"PO-Revision-Date: 2014-01-22 19:43+0000\n"
|
||||
"Last-Translator: Pedro Manuel Baeza <pedro.baeza@gmail.com>\n"
|
||||
"Language-Team: Domatix Technologies\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2014-05-24 06:50+0000\n"
|
||||
"X-Generator: Launchpad (build 17017)\n"
|
||||
"Language: es_ES\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_return_address
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_return_other_address_id
|
||||
#: field:product.supplierinfo,warranty_return_address:0
|
||||
#: field:product.supplierinfo,warranty_return_other_address_id:0
|
||||
msgid "Return address"
|
||||
msgstr "Dirección de devolución"
|
||||
|
||||
#. module: product_warranty
|
||||
#: view:product.supplierinfo:0
|
||||
msgid "Warranty informations"
|
||||
msgstr "Información de garantía"
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_return_partner:0
|
||||
msgid ""
|
||||
"Who is in charge of the warranty return treatment toward the end customer. "
|
||||
"Company will use the current company delivery or default address and so on "
|
||||
"for supplier and brand manufacturer. Doesn't necessarily mean that the "
|
||||
"warranty to be applied is the one of the return partner (i.e. can be returned "
|
||||
"to the company and be under the brand warranty"
|
||||
msgstr ""
|
||||
"Especifica quién es el responsable del tratamiento de la devolución de "
|
||||
"garantía para el cliente final. La compañía utilizará la dirección por "
|
||||
"defecto o la dirección de envío de la compañía, y así sucesivamente por "
|
||||
"proveedor y marca del fabricante. No significa necesariamente que la "
|
||||
"garantía que se aplica es el de la empresa que hace la devolución (es decir: "
|
||||
"se puede devolver a la empresa y estar bajo la garantía de la marca)"
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_return_other_address_id:0
|
||||
msgid ""
|
||||
"Where the customer has to send back the product(s) if warranty return is "
|
||||
"set to 'other'."
|
||||
msgstr ""
|
||||
"Dónde debe enviar el cliente de vuelta el/los producto/s si la garantía de "
|
||||
"devolución se establece a 'otra'."
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_duration:0
|
||||
msgid ""
|
||||
"Warranty in month for this product/supplier relation. Only for "
|
||||
"company/supplier relation (purchase order) ; the customer/company relation "
|
||||
"(sale order) always use the product main warranty field"
|
||||
msgstr ""
|
||||
"Garantía en meses para este producto/proveedor. Únicamente para relaciones "
|
||||
"empresa/proveedor (Orden de compra); la relación cliente/proveedor (Orden de "
|
||||
"venta) usa siempre el campo garantía de la ficha de producto."
|
||||
|
||||
#. module: product_warranty
|
||||
#: view:res.company:0
|
||||
msgid "Crm product return address"
|
||||
msgstr "Dirección de devolución del producto"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model,name:product_warranty.model_return_instruction
|
||||
#: help:product.supplierinfo,return_instructions:0
|
||||
#: help:return.instruction,instructions:0
|
||||
msgid "Instructions for product return"
|
||||
msgstr "Instrucciones para la devolución del producto"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_duration
|
||||
#: field:product.supplierinfo,warranty_duration:0
|
||||
msgid "Period"
|
||||
msgstr "Periodo"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_return_instruction_name
|
||||
#: field:return.instruction,name:0
|
||||
msgid "Title"
|
||||
msgstr "Título"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model,name:product_warranty.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Compañías"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_active_supplier
|
||||
#: field:product.supplierinfo,active_supplier:0
|
||||
msgid "Active supplier"
|
||||
msgstr "Proveedor activo"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_return_instruction_is_default
|
||||
#: field:return.instruction,is_default:0
|
||||
msgid "Is default"
|
||||
msgstr "Por defecto"
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_return_address:0
|
||||
msgid ""
|
||||
"Where the goods should be returned (computed field based on other infos.)"
|
||||
msgstr ""
|
||||
"Dónde se devolverán los bienes (campo calculado basado en otra información)."
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:return.instruction,is_default:0
|
||||
msgid ""
|
||||
"If is default, will be use to set the default value in supplier infos. Be "
|
||||
"careful to have only one default"
|
||||
msgstr ""
|
||||
"Si es por defecto, se usará para establecer el valor por defecto en la "
|
||||
"información del proveedor. Tenga cuidado de tener sólo un por defecto."
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.actions.act_window,name:product_warranty.product_return_instructions_action
|
||||
#: model:ir.ui.menu,name:product_warranty.menu_product_return_instructions_action
|
||||
msgid "Products return instructions"
|
||||
msgstr "Instrucciones de devolución de los productos"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model,name:product_warranty.model_product_supplierinfo
|
||||
msgid "Information about a product supplier"
|
||||
msgstr "Información sobre un proveedor de producto"
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,active_supplier:0
|
||||
msgid "Is this supplier still active, only for information"
|
||||
msgstr "Indica si el proveedor todavía está activo. Sólo para información."
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_return_partner
|
||||
#: field:product.supplierinfo,warranty_return_partner:0
|
||||
msgid "Return type"
|
||||
msgstr "Tipo de devolución"
|
||||
|
||||
#. module: product_warranty
|
||||
#: view:return.instruction:0
|
||||
msgid "Return instructions"
|
||||
msgstr "Instrucciones de devolución"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_return_instructions
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_return_instruction_instructions
|
||||
#: field:product.supplierinfo,return_instructions:0
|
||||
#: view:return.instruction:0
|
||||
#: field:return.instruction,instructions:0
|
||||
msgid "Instructions"
|
||||
msgstr "Instrucciones"
|
||||
155
product_warranty/i18n/fr.po
Normal file
155
product_warranty/i18n/fr.po
Normal file
@@ -0,0 +1,155 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * product_warranty
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0.2\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2013-11-21 15:06+0000\n"
|
||||
"PO-Revision-Date: 2014-01-22 19:17+0000\n"
|
||||
"Last-Translator: Joël Grand-Guillaume @ camptocamp "
|
||||
"<joel.grandguillaume@camptocamp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2014-05-24 06:50+0000\n"
|
||||
"X-Generator: Launchpad (build 17017)\n"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_return_address
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_return_other_address_id
|
||||
#: field:product.supplierinfo,warranty_return_address:0
|
||||
#: field:product.supplierinfo,warranty_return_other_address_id:0
|
||||
msgid "Return address"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: view:product.supplierinfo:0
|
||||
msgid "Warranty informations"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_return_partner:0
|
||||
msgid ""
|
||||
"Who is in charge of the warranty return treatment toward the end customer. "
|
||||
"Company will use the current company delivery or default address and so on "
|
||||
"for supplier and brand manufacturer. Doesn't necessarily mean that the "
|
||||
"warranty to be applied is the one of the return partner (i.e. can be returned "
|
||||
"to the company and be under the brand warranty"
|
||||
msgstr ""
|
||||
"Indique qui est en charge du traitement du retour garantie envers le client "
|
||||
"final. L'entreprise utilise l'adresse de livraison, et sinon l'adresse par "
|
||||
"défaut. Il en va de même pour les options fournisseur ou fabricant. Ce champ "
|
||||
"n'implique pas forcément que la garantie qui va s'appliquer est celle de "
|
||||
"celui qui gère le retour."
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_return_other_address_id:0
|
||||
msgid ""
|
||||
"Where the customer has to send back the product(s) if warranty return is "
|
||||
"set to 'other'."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_duration:0
|
||||
msgid ""
|
||||
"Warranty in month for this product/supplier relation. Only for "
|
||||
"company/supplier relation (purchase order) ; the customer/company relation "
|
||||
"(sale order) always use the product main warranty field"
|
||||
msgstr ""
|
||||
"Garantie en nombre de mois pour ce fournisseur. Uniquement pour la relation "
|
||||
"entreprise/fournisseur (commandes d'achat) ; La relation entreprise/client "
|
||||
"(commandes de vente) utilise toujours le champ de garantie de la fiche "
|
||||
"produit"
|
||||
|
||||
#. module: product_warranty
|
||||
#: view:res.company:0
|
||||
msgid "Crm product return address"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model,name:product_warranty.model_return_instruction
|
||||
#: help:product.supplierinfo,return_instructions:0
|
||||
#: help:return.instruction,instructions:0
|
||||
msgid "Instructions for product return"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_duration
|
||||
#: field:product.supplierinfo,warranty_duration:0
|
||||
msgid "Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_return_instruction_name
|
||||
#: field:return.instruction,name:0
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model,name:product_warranty.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_active_supplier
|
||||
#: field:product.supplierinfo,active_supplier:0
|
||||
msgid "Active supplier"
|
||||
msgstr "Fournisseur actif"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_return_instruction_is_default
|
||||
#: field:return.instruction,is_default:0
|
||||
msgid "Is default"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_return_address:0
|
||||
msgid ""
|
||||
"Where the goods should be returned (computed field based on other infos.)"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:return.instruction,is_default:0
|
||||
msgid ""
|
||||
"If is default, will be use to set the default value in supplier infos. Be "
|
||||
"careful to have only one default"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.actions.act_window,name:product_warranty.product_return_instructions_action
|
||||
#: model:ir.ui.menu,name:product_warranty.menu_product_return_instructions_action
|
||||
msgid "Products return instructions"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model,name:product_warranty.model_product_supplierinfo
|
||||
msgid "Information about a product supplier"
|
||||
msgstr "Information sur le fournisseur du produit"
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,active_supplier:0
|
||||
msgid "Is this supplier still active, only for information"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_return_partner
|
||||
#: field:product.supplierinfo,warranty_return_partner:0
|
||||
msgid "Return type"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: view:return.instruction:0
|
||||
msgid "Return instructions"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_return_instructions
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_return_instruction_instructions
|
||||
#: field:product.supplierinfo,return_instructions:0
|
||||
#: view:return.instruction:0
|
||||
#: field:return.instruction,instructions:0
|
||||
msgid "Instructions"
|
||||
msgstr ""
|
||||
131
product_warranty/i18n/product_warranty.pot
Normal file
131
product_warranty/i18n/product_warranty.pot
Normal file
@@ -0,0 +1,131 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * product_warranty
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 7.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-11-21 15:06+0000\n"
|
||||
"PO-Revision-Date: 2013-11-21 15:06+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_return_address
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_return_other_address_id
|
||||
#: field:product.supplierinfo,warranty_return_address:0
|
||||
#: field:product.supplierinfo,warranty_return_other_address_id:0
|
||||
msgid "Return address"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: view:product.supplierinfo:0
|
||||
msgid "Warranty informations"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_return_partner:0
|
||||
msgid "Who is in charge of the warranty return treatment toward the end customer. Company will use the current company delivery or default address and so on for supplier and brand manufacturer. Doesn't necessarily mean that the warranty to be applied is the one of the return partner (i.e. can be returned to the company and be under the brand warranty"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_return_other_address_id:0
|
||||
msgid "Where the customer has to send back the product(s) if warranty return is set to 'other'."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_duration:0
|
||||
msgid "Warranty in month for this product/supplier relation. Only for company/supplier relation (purchase order) ; the customer/company relation (sale order) always use the product main warranty field"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: view:res.company:0
|
||||
msgid "Crm product return address"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model,name:product_warranty.model_return_instruction
|
||||
#: help:product.supplierinfo,return_instructions:0
|
||||
#: help:return.instruction,instructions:0
|
||||
msgid "Instructions for product return"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_duration
|
||||
#: field:product.supplierinfo,warranty_duration:0
|
||||
msgid "Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_return_instruction_name
|
||||
#: field:return.instruction,name:0
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model,name:product_warranty.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_active_supplier
|
||||
#: field:product.supplierinfo,active_supplier:0
|
||||
msgid "Active supplier"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_return_instruction_is_default
|
||||
#: field:return.instruction,is_default:0
|
||||
msgid "Is default"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,warranty_return_address:0
|
||||
msgid "Where the goods should be returned (computed field based on other infos.)"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:return.instruction,is_default:0
|
||||
msgid "If is default, will be use to set the default value in supplier infos. Be careful to have only one default"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.actions.act_window,name:product_warranty.product_return_instructions_action
|
||||
#: model:ir.ui.menu,name:product_warranty.menu_product_return_instructions_action
|
||||
msgid "Products return instructions"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model,name:product_warranty.model_product_supplierinfo
|
||||
msgid "Information about a product supplier"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: help:product.supplierinfo,active_supplier:0
|
||||
msgid "Is this supplier still active, only for information"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_warranty_return_partner
|
||||
#: field:product.supplierinfo,warranty_return_partner:0
|
||||
msgid "Return type"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: view:return.instruction:0
|
||||
msgid "Return instructions"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_warranty
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_product_supplierinfo_return_instructions
|
||||
#: model:ir.model.fields,field_description:product_warranty.field_return_instruction_instructions
|
||||
#: field:product.supplierinfo,return_instructions:0
|
||||
#: view:return.instruction:0
|
||||
#: field:return.instruction,instructions:0
|
||||
msgid "Instructions"
|
||||
msgstr ""
|
||||
BIN
product_warranty/images/product_warranty.png
Normal file
BIN
product_warranty/images/product_warranty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 83 KiB |
128
product_warranty/product_warranty.py
Normal file
128
product_warranty/product_warranty.py
Normal file
@@ -0,0 +1,128 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2009-2011 Akretion, Emmanuel Samyn, Benoît Guillot
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import orm, fields
|
||||
|
||||
|
||||
class return_instruction(orm.Model):
|
||||
_name = "return.instruction"
|
||||
_description = "Instructions for product return"
|
||||
_columns = {
|
||||
'name': fields.char('Title', required=True),
|
||||
'instructions': fields.text(
|
||||
'Instructions',
|
||||
help="Instructions for product return"),
|
||||
'is_default': fields.boolean(
|
||||
'Is default',
|
||||
help="If is default, will be use to set the default value in "
|
||||
"supplier infos. Be careful to have only one default"),
|
||||
}
|
||||
|
||||
|
||||
class product_supplierinfo(orm.Model):
|
||||
_inherit = "product.supplierinfo"
|
||||
|
||||
def get_warranty_return_partner(self, cr, uid, context=None):
|
||||
result = [('company', 'Company'),
|
||||
('supplier', 'Supplier'),
|
||||
('other', 'Other'),
|
||||
]
|
||||
return result
|
||||
|
||||
def _get_default_instructions(self, cr, uid, context=None):
|
||||
""" Get selected lines to add to exchange """
|
||||
instr_obj = self.pool.get('return.instruction')
|
||||
instruction_ids = instr_obj.search(cr, uid,
|
||||
[('is_default', '=', True)],
|
||||
context=context)
|
||||
if instruction_ids:
|
||||
return instruction_ids[0]
|
||||
return False
|
||||
|
||||
def _get_warranty_return_address(self, cr, uid, ids, field_names, arg,
|
||||
context=None):
|
||||
""" Method to return the partner delivery address or if none, the
|
||||
default address
|
||||
|
||||
dedicated_delivery_address stand for the case a new type of
|
||||
address more particularly dedicated to return delivery would be
|
||||
implemented.
|
||||
|
||||
"""
|
||||
result = {}
|
||||
for supplier_info in self.browse(cr, uid, ids, context=context):
|
||||
result[supplier_info.id] = False
|
||||
return_partner = supplier_info.warranty_return_partner
|
||||
partner_id = supplier_info.company_id.partner_id.id
|
||||
if return_partner:
|
||||
if return_partner == 'supplier':
|
||||
partner_id = supplier_info.name.id
|
||||
elif return_partner == 'company':
|
||||
if supplier_info.company_id.crm_return_address_id:
|
||||
partner_id = supplier_info.company_id.\
|
||||
crm_return_address_id.id
|
||||
elif return_partner == 'other':
|
||||
if supplier_info.warranty_return_other_address_id:
|
||||
partner_id = supplier_info.\
|
||||
warranty_return_other_address_id.id
|
||||
result[supplier_info.id] = partner_id
|
||||
return result
|
||||
|
||||
_columns = {
|
||||
"warranty_duration": fields.float(
|
||||
'Period',
|
||||
help="Warranty in month for this product/supplier relation. "
|
||||
"Only for company/supplier relation (purchase order) ; "
|
||||
"the customer/company relation (sale order) always use "
|
||||
"the product main warranty field"),
|
||||
"warranty_return_partner": fields.selection(
|
||||
get_warranty_return_partner,
|
||||
'Return type',
|
||||
required=True,
|
||||
help="Who is in charge of the warranty return treatment toward "
|
||||
"the end customer. Company will use the current company "
|
||||
"delivery or default address and so on for supplier and "
|
||||
"brand manufacturer. Doesn't necessarily mean that "
|
||||
"the warranty to be applied is the one of the return partner "
|
||||
"(i.e. can be returned to the company and be under the brand "
|
||||
"warranty"),
|
||||
'return_instructions': fields.many2one(
|
||||
'return.instruction',
|
||||
'Instructions',
|
||||
help="Instructions for product return"),
|
||||
'active_supplier': fields.boolean(
|
||||
'Active supplier',
|
||||
help="Is this supplier still active, only for information"),
|
||||
'warranty_return_address': fields.function(
|
||||
_get_warranty_return_address,
|
||||
type='many2one', relation='res.partner', string="Return address",
|
||||
help="Where the goods should be returned "
|
||||
"(computed field based on other infos.)"),
|
||||
"warranty_return_other_address_id": fields.many2one(
|
||||
'res.partner',
|
||||
'Return address',
|
||||
help="Where the customer has to send back the product(s) "
|
||||
"if warranty return is set to 'other'."),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'warranty_return_partner': 'company',
|
||||
'return_instructions': _get_default_instructions,
|
||||
}
|
||||
113
product_warranty/product_warranty_view.xml
Normal file
113
product_warranty/product_warranty_view.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
##############################################################################
|
||||
#
|
||||
# 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 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
-->
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- return instructions -->
|
||||
<!-- supplier info tree view -->
|
||||
<record model="ir.ui.view" id="product_return_instructions_tree_view">
|
||||
<field name="name">product.return.instructions.tree</field>
|
||||
<field name="model">return.instruction</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Return instructions">
|
||||
<field name="name"/>
|
||||
<field name="instructions"/>
|
||||
<field name="is_default"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- supplier info form view -->
|
||||
<record model="ir.ui.view" id="product_return_instructions_form_view">
|
||||
<field name="name">product.return.instructions.form</field>
|
||||
<field name="model">return.instruction</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Return instructions">
|
||||
<group col='4'>
|
||||
<field name="name"/>
|
||||
<field name="is_default"/>
|
||||
</group>
|
||||
<separator string="Instructions" colspan="4"/>
|
||||
<field name="instructions" nolabel="1" colspan="4"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_return_instructions_action" model="ir.actions.act_window">
|
||||
<field name="name">Products return instructions</field>
|
||||
<field name="res_model">return.instruction</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="product_return_instructions_tree_view"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="product_return_instructions_action"
|
||||
groups="base.group_no_one"
|
||||
id="menu_product_return_instructions_action"
|
||||
parent="product.prod_config_main" sequence="3"/>
|
||||
<!-- supplier info -->
|
||||
<!-- supplier info tree view -->
|
||||
<record model="ir.ui.view" id="product_supplierinfo_warranty_tree_view">
|
||||
<field name="name">product.supplierinfo.warranty.tree</field>
|
||||
<field name="model">product.supplierinfo</field>
|
||||
<field name="inherit_id" ref="product.product_supplierinfo_tree_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field position="after" name="delay">
|
||||
<field name="warranty_duration"/>
|
||||
<field name="warranty_return_partner"/>
|
||||
<field name="warranty_return_address"/>
|
||||
<field name="active_supplier"/>
|
||||
<field name="return_instructions"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- supplier info form view -->
|
||||
<record model="ir.ui.view" id="product_supplierinfo_warranty_form_view">
|
||||
<field name="name">product.supplierinfo.warranty.form</field>
|
||||
<field name="model">product.supplierinfo</field>
|
||||
<field name="inherit_id" ref="product.product_supplierinfo_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field position="after" name="company_id" groups="base.group_multi_company" widget="selection">
|
||||
<group string="Warranty informations" colspan="4">
|
||||
<field name="active_supplier"/>
|
||||
<field name="warranty_duration"/>
|
||||
<field name="return_instructions"/>
|
||||
<group colspan="4" col="6">
|
||||
<group>
|
||||
<field name="warranty_return_partner"/>
|
||||
</group>
|
||||
<group>
|
||||
<div>
|
||||
<label for="warranty_return_other_address_id"/>
|
||||
<field name="warranty_return_other_address_id" attrs="{'invisible':[('warranty_return_partner', '!=', 'other')], 'required':[('warranty_return_partner', '=', 'other')]}" class="oe_inline"/>
|
||||
<field name="warranty_return_address" attrs="{'invisible':[('warranty_return_partner', '=', 'other')]}" class="oe_inline" />
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
38
product_warranty/res_company.py
Normal file
38
product_warranty/res_company.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright 2013 Camptocamp
|
||||
# Copyright 2009-2013 Akretion,
|
||||
# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau,
|
||||
# Joel Grand-Guillaume
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import fields, orm
|
||||
|
||||
|
||||
class res_company(orm.Model):
|
||||
|
||||
_inherit = "res.company"
|
||||
|
||||
_columns = {
|
||||
'crm_return_address_id': fields.many2one(
|
||||
'res.partner',
|
||||
'Return address',
|
||||
help="Default address where the customers has to send back the "
|
||||
"returned product. If empty, the address is the "
|
||||
"company address"),
|
||||
}
|
||||
23
product_warranty/res_company_view.xml
Normal file
23
product_warranty/res_company_view.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- INHERITED VIEW FOR THE OBJECT : res_company -->
|
||||
|
||||
<record id="company_form" model="ir.ui.view">
|
||||
<field name="name">crm_claim_rma.company_form</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="inherit_id" ref="base.view_company_form" />
|
||||
<field eval="16" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="company_registry" position="after">
|
||||
<separator string="Crm product return address" colspan="4"/>
|
||||
<field name="crm_return_address_id"/>
|
||||
</field>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
4
product_warranty/security/ir.model.access.csv
Normal file
4
product_warranty/security/ir.model.access.csv
Normal file
@@ -0,0 +1,4 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_return_instruction_user","return.instruction.user","model_return_instruction","base.group_user","True","False","False","False"
|
||||
"access_return_instruction_manager","return.instruction.manager","model_return_instruction","base.group_sale_manager","True","True","True","True"
|
||||
"access_return_instruction_salesman","return.instruction.salesman","model_return_instruction","base.group_sale_salesman","True","True","True","True"
|
||||
|
Reference in New Issue
Block a user