[FIX] Fix flake8 issues

This commit is contained in:
Ondřej Kuzník
2015-05-05 10:23:45 +01:00
parent 4517ce08db
commit d835c12774
5 changed files with 33 additions and 24 deletions

View File

@@ -26,14 +26,16 @@
Product Warranty
================
Extend the product warranty management with warranty details on product / supplier relation:
Extend 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)
* return product to company, supplier, other
Those informations are used in the RMA Claim (Product Return Management) module.
Those informations are used in the RMA Claim (Product Return Management)
module.
""",
'author': "Akretion,Odoo Community Association (OCA)",

View File

@@ -35,9 +35,9 @@ msgstr "Información de garantía"
#: 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 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 "
"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 "
@@ -51,7 +51,7 @@ msgstr ""
#: help:product.supplierinfo,warranty_return_other_address_id:0
msgid ""
"Where the customer has to send back the product(s) if warranty return is "
"setto 'other'."
"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'."

View File

@@ -34,9 +34,9 @@ msgstr ""
#: 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 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 "
"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 "
@@ -49,7 +49,7 @@ msgstr ""
#: help:product.supplierinfo,warranty_return_other_address_id:0
msgid ""
"Where the customer has to send back the product(s) if warranty return is "
"setto 'other'."
"set to 'other'."
msgstr ""
#. module: product_warranty

View File

@@ -30,12 +30,12 @@ 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 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"
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 setto 'other'."
msgid "Where the customer has to send back the product(s) if warranty return is set to 'other'."
msgstr ""
#. module: product_warranty

View File

@@ -56,8 +56,10 @@ class product_supplierinfo(orm.Model):
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
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
@@ -74,28 +76,33 @@ class product_supplierinfo(orm.Model):
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
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
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"),
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 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"),
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',