diff --git a/product_warranty/README.rst b/product_warranty/README.rst index 9cdd668b..4224e525 100644 --- a/product_warranty/README.rst +++ b/product_warranty/README.rst @@ -14,13 +14,13 @@ Product Warranty :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frma-lightgray.png?logo=github - :target: https://github.com/OCA/rma/tree/11.0/product_warranty + :target: https://github.com/OCA/rma/tree/12.0/product_warranty :alt: OCA/rma .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/rma-11-0/rma-11-0-product_warranty + :target: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-product_warranty :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/145/11.0 + :target: https://runbot.odoo-community.org/runbot/145/12.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -50,7 +50,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -76,6 +76,7 @@ Contributors * Yanina Aular * Cyril Gaudin * Bima Jati Wijaya +* Serpent Consulting Services Pvt. Ltd. Other credits ~~~~~~~~~~~~~ @@ -115,6 +116,6 @@ Current `maintainers `__: |maintainer-osi-scampbell| |maintainer-max3903| -This module is part of the `OCA/rma `_ project on GitHub. +This module is part of the `OCA/rma `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_warranty/__init__.py b/product_warranty/__init__.py index 466cdd81..83e553ac 100644 --- a/product_warranty/__init__.py +++ b/product_warranty/__init__.py @@ -1,5 +1,3 @@ -# © 2016 Cyril Gaudin (Camptocamp) -# © 2009-2011 Akretion, Emmanuel Samyn # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models diff --git a/product_warranty/__manifest__.py b/product_warranty/__manifest__.py index 563ab9ca..b025a7a7 100644 --- a/product_warranty/__manifest__.py +++ b/product_warranty/__manifest__.py @@ -3,14 +3,13 @@ { 'name': 'Product Warranty', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Generic Modules/Product', 'author': 'Akretion, Vauxoo, Odoo Community Association (OCA)', 'website': 'https://github.com/OCA/rma', 'license': 'AGPL-3', 'depends': [ - 'product', - 'sale', + 'sale_management', ], 'data': [ 'security/ir.model.access.csv', diff --git a/product_warranty/demo/product_warranty.xml b/product_warranty/demo/product_warranty.xml index 570568cf..dfd44456 100644 --- a/product_warranty/demo/product_warranty.xml +++ b/product_warranty/demo/product_warranty.xml @@ -1,64 +1,81 @@ - - - + + - - Default Instruction - To return a product purchased through our platform vendor Marketplace access our online Returns Center and click Return products to begin the application process for the return. -Select the product you want to return and the reason for the return. You will need you to provide detailed information to enable the seller to handle your request. Once the seller has reviewed your application, it will respond by e-mail within 3 working days. - 1 - + + Default Instruction + To return a product purchased through our + platform vendor Marketplace access our online Returns Center and + click Return products to begin the application process for the + return. + Select the product you want to return and the reason for the + return. You will need you to provide detailed information to enable + the seller to handle your request. Once the seller has reviewed + your application, it will respond by e-mail within 3 working days. + + 1 + - - Provisional Instruction - Under the provisions of these Conditions of Sale, you may return the products received once you have contacted our customer service department adidas Mexico and the request is authorized. If you choose to return your order, we will refund: the full purchase price, as long as we have previously returned the products you order in perfect condition: (i) new product unused, (ii) with packaging, original box and tags (iii) be in the period of 30 calendar days after receiving the product. If you do not return the products to fulfill the above conditions, we are entitled to charge the products or the costs of recovery. - + + Provisional Instruction + Under the provisions of these Conditions of + Sale, you may return the products received once you have contacted + our customer service department adidas Mexico and the request is + authorized. If you choose to return your order, we will refund: the + full purchase price, as long as we have previously returned the + products you order in perfect condition: (i) new product unused, + (ii) with packaging, original box and tags (iii) be in the period + of 30 calendar days after receiving the product. If you do not + return the products to fulfill the above conditions, we are + entitled to charge the products or the costs of recovery. + + - + + + 5 + - - 5 - + + + other + + 8 + + + 5 + 1 + - - - other - - 8 - - - 5 - 1 - + + + supplier + 12 + + + 5 + 1 + - - - supplier - 12 - - - 5 - 1 - + + + 5 + - + + + supplier + 10 + - - 5 - + + + supplier + 6 + - - - supplier - 10 - - - - - supplier - 6 - - - diff --git a/product_warranty/demo/res_company.xml b/product_warranty/demo/res_company.xml index 43f0a72f..d7382859 100644 --- a/product_warranty/demo/res_company.xml +++ b/product_warranty/demo/res_company.xml @@ -1,10 +1,8 @@ - - - + + - - - + + + - diff --git a/product_warranty/models/__init__.py b/product_warranty/models/__init__.py index 22635978..2f4c9e98 100644 --- a/product_warranty/models/__init__.py +++ b/product_warranty/models/__init__.py @@ -1,5 +1,3 @@ -# © 2016 Cyril Gaudin (Camptocamp) -# © 2009-2011 Akretion, Emmanuel Samyn # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import ( diff --git a/product_warranty/models/product_supplierinfo.py b/product_warranty/models/product_supplierinfo.py index ec8ea4d2..0dc7c547 100644 --- a/product_warranty/models/product_supplierinfo.py +++ b/product_warranty/models/product_supplierinfo.py @@ -12,9 +12,8 @@ class ProductSupplierInfo(models.Model): @api.model def _get_default_instructions(self): """ Get selected lines to add to exchange """ - instruction_ids = self.env['return.instruction']\ + return self.env['return.instruction']\ .search([('is_default', '=', True)], limit=1) - return instruction_ids @api.depends('warranty_return_partner') def _compute_warranty_return_address(self): @@ -24,15 +23,14 @@ class ProductSupplierInfo(models.Model): for record in self: return_partner = record.warranty_return_partner partner_id = record.company_id.partner_id.id - if return_partner: - if return_partner == 'supplier': - partner_id = record.name.id - elif return_partner == 'company': - if record.company_id.crm_return_address_id: - partner_id = record.company_id.crm_return_address_id.id - elif return_partner == 'other': - if record.warranty_return_other_address: - partner_id = record.warranty_return_other_address.id + if return_partner and return_partner == 'supplier': + partner_id = record.name.id + elif return_partner and return_partner == 'company' and \ + record.company_id.crm_return_address_id: + partner_id = record.company_id.crm_return_address_id.id + elif return_partner and return_partner == 'other' and \ + record.warranty_return_other_address: + partner_id = record.warranty_return_other_address.id record.warranty_return_address = partner_id warranty_duration = fields.Float( @@ -40,40 +38,32 @@ class ProductSupplierInfo(models.Model): 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" - ) + "product main warranty field.") warranty_return_partner = fields.Selection( [('company', 'Company'), ('supplier', 'Supplier'), ('other', 'Other')], - string='Return type', - required=True, - default='company', - help="Who is in charge of the warranty return treatment toward the" - " end customer. Company will use the current compagny " - " delivery or default address and so on for supplier and " - "brand manufacturer. Doesn't necessarly mean that the " - "warranty to be applied is the one of the return partner " - "(ie: can be returned to the company and be under the " - "brand warranty)" - ) + string='Return type', required=True, default='company', + 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 " + "(ie: can be returned to the company and be under the " + "brand warranty).") return_instructions = fields.Many2one( 'return.instruction', 'Instructions', default=_get_default_instructions, - help="Instructions for product return" - ) + help="Instructions for product return.") active_supplier = fields.Boolean( - help="Is this supplier still active, only for information" - ) + help="Is this supplier still active, only for information.") warranty_return_address = fields.Many2one( 'res.partner', compute='_compute_warranty_return_address', string="Return address", help="Where the goods should be returned " - "(computed field based on other infos.)" - ) + "(computed field based on other infos.)") warranty_return_other_address = fields.Many2one( 'res.partner', - string='Return address', + string='Return other address', help="Where the customer has to send back the product(s) " - "if warranty return is set to 'other'." - ) + "if warranty return is set to 'other'.") diff --git a/product_warranty/models/res_company.py b/product_warranty/models/res_company.py index 9c917fd0..ec64c51a 100644 --- a/product_warranty/models/res_company.py +++ b/product_warranty/models/res_company.py @@ -13,4 +13,4 @@ class ResCompany(models.Model): string='Return address', help="Default address where the customers has to send back the " "returned product. If empty, the address is the " - "company address") + "company address.") diff --git a/product_warranty/models/return_instruction.py b/product_warranty/models/return_instruction.py index c0649214..e9e1ca3a 100644 --- a/product_warranty/models/return_instruction.py +++ b/product_warranty/models/return_instruction.py @@ -13,9 +13,9 @@ class ReturnInstruction(models.Model): name = fields.Char('Title', required=True) instructions = fields.Text( 'Instructions', - help="Instructions for product return") + 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") + "supplier info's. Be careful to " + "have only one default.") diff --git a/product_warranty/readme/CONTRIBUTORS.rst b/product_warranty/readme/CONTRIBUTORS.rst index d810a2eb..48dad312 100644 --- a/product_warranty/readme/CONTRIBUTORS.rst +++ b/product_warranty/readme/CONTRIBUTORS.rst @@ -8,3 +8,4 @@ * Yanina Aular * Cyril Gaudin * Bima Jati Wijaya +* Serpent Consulting Services Pvt. Ltd. diff --git a/product_warranty/static/description/index.html b/product_warranty/static/description/index.html index ab918723..c7ed0462 100644 --- a/product_warranty/static/description/index.html +++ b/product_warranty/static/description/index.html @@ -3,7 +3,7 @@ - + Product Warranty