mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] Typo and docstring
This commit is contained in:
@@ -125,6 +125,9 @@ def get_or_create_partner(pool, cursor, uid, name, address, postal_code, city,
|
|||||||
country_code, log):
|
country_code, log):
|
||||||
'''
|
'''
|
||||||
Get or create the partner belonging to the account holders name <name>
|
Get or create the partner belonging to the account holders name <name>
|
||||||
|
|
||||||
|
If multiple partners are found with the same name, select the first and
|
||||||
|
add a warning to the import log.
|
||||||
'''
|
'''
|
||||||
partner_obj = pool.get('res.partner')
|
partner_obj = pool.get('res.partner')
|
||||||
partner_ids = partner_obj.search(cursor, uid, [('name', 'ilike', name)])
|
partner_ids = partner_obj.search(cursor, uid, [('name', 'ilike', name)])
|
||||||
@@ -180,7 +183,7 @@ def get_or_create_partner(pool, cursor, uid, name, address, postal_code, city,
|
|||||||
else:
|
else:
|
||||||
if len(partner_ids) > 1:
|
if len(partner_ids) > 1:
|
||||||
log.append(
|
log.append(
|
||||||
_('More then one possible match found for partner with name %(name)s')
|
_('More than one possible match found for partner with name %(name)s')
|
||||||
% {'name': name}
|
% {'name': name}
|
||||||
)
|
)
|
||||||
partner_id = partner_ids[0]
|
partner_id = partner_ids[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user