From 5310ea882e02e4f784221a06e57beeb45bbe0d19 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 20 Oct 2011 19:02:44 +0200 Subject: [PATCH] [ADD] product return_instruction to product_warranty --- product_warranty/product_warranty.py | 13 ++++++ product_warranty/product_warranty_view.xml | 46 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/product_warranty/product_warranty.py b/product_warranty/product_warranty.py index f7132704..d6470e16 100644 --- a/product_warranty/product_warranty.py +++ b/product_warranty/product_warranty.py @@ -22,6 +22,18 @@ from osv import fields, osv +#===== +class return_instruction(osv.osv): + _name = "return.instruction" + _description = "Instructions for product return" + _columns = { + 'name': fields.char('Title', size=128, 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"), + } +return_instruction() + +#===== class product_supplierinfo(osv.osv): _inherit = "product.supplierinfo" @@ -41,6 +53,7 @@ class product_supplierinfo(osv.osv): _columns = { "warranty_duration" : fields.float('Warranty', 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, 'Warrantee return', size=128, 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"), + 'return_instructions': fields.many2one('return.instruction', 'Instructions',help="Instructions for product return"), 'active_supplier' : fields.boolean('Active supplier', help=""), } _defaults = { diff --git a/product_warranty/product_warranty_view.xml b/product_warranty/product_warranty_view.xml index 3069ea1f..80c15889 100644 --- a/product_warranty/product_warranty_view.xml +++ b/product_warranty/product_warranty_view.xml @@ -21,6 +21,50 @@ + + + + product.return.instructions.tree + return.instruction + tree + + + + + + + + + + + + product.return.instructions.form + return.instruction + form + +
+ + + + + + +
+ + + Products return instructions + ir.actions.act_window + return.instruction + form + tree,form + + + + + product.supplierinfo.warranty.tree @@ -32,6 +76,7 @@ + @@ -47,6 +92,7 @@ +