mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[FIX] product_waranty : fix syntax error
This commit is contained in:
committed by
SilvioC2C
parent
c0037373c4
commit
da35e6e8b2
@@ -23,13 +23,13 @@
|
|||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
|
|
||||||
#=====
|
#=====
|
||||||
class return_instruction(osv.osv):
|
class return_instruction(osv.osv):
|
||||||
_name = "return.instruction"
|
_name = "return.instruction"
|
||||||
_description = "Instructions for product return"
|
_description = "Instructions for product return"
|
||||||
_columns = {
|
_columns = {
|
||||||
'name': fields.char('Title', size=128, required=True),
|
'name': fields.char('Title', size=128, required=True),
|
||||||
'instructions' : fields.text('Instructions', help="Instructions for product return"),
|
'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"),
|
'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()
|
return_instruction()
|
||||||
@@ -64,10 +64,10 @@ class product_supplierinfo(osv.osv):
|
|||||||
result[supplier_info.id] = {}
|
result[supplier_info.id] = {}
|
||||||
address_id = False
|
address_id = False
|
||||||
return_partner = supplier_info.warranty_return_partner
|
return_partner = supplier_info.warranty_return_partner
|
||||||
if return_partner:
|
if return_partner:
|
||||||
if return_partner == 'supplier':
|
if return_partner == 'supplier':
|
||||||
partner_id = supplier_info.name.id
|
partner_id = supplier_info.name.id
|
||||||
elif sreturn_partner == 'brand':
|
elif return_partner == 'brand':
|
||||||
if not supplier_info.product_id.product_brand_id.partner_id:
|
if not supplier_info.product_id.product_brand_id.partner_id:
|
||||||
raise osv.except_osv(_('Error !'), _('You need to define a partner for the brand of the product !'))
|
raise osv.except_osv(_('Error !'), _('You need to define a partner for the brand of the product !'))
|
||||||
partner_id = supplier_info.product_id.product_brand_id.partner_id.id
|
partner_id = supplier_info.product_id.product_brand_id.partner_id.id
|
||||||
@@ -88,7 +88,7 @@ class product_supplierinfo(osv.osv):
|
|||||||
"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"),
|
"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"),
|
'return_instructions': fields.many2one('return.instruction', 'Instructions',help="Instructions for product return"),
|
||||||
'active_supplier' : fields.boolean('Active supplier', help=""),
|
'active_supplier' : fields.boolean('Active supplier', help=""),
|
||||||
'warranty_return_address': fields.function(_get_warranty_return_address, type='many2one', relation='res.partner.address', string="Warranty return address"),
|
'warranty_return_address': fields.function(_get_warranty_return_address, type='many2one', relation='res.partner.address', string="Warranty return address"),
|
||||||
}
|
}
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'warranty_return_partner': lambda *a: 'company',
|
'warranty_return_partner': lambda *a: 'company',
|
||||||
|
|||||||
Reference in New Issue
Block a user