[FIX] payment_transfer: correctly display transfer information

When moving fields name -> provider on payment.acquire, the condition in payment_transfer was not updated.
This lead to no post_msg value in the Wired Transfert acquire.
Fixes #2423, opw 613934
This commit is contained in:
rmu-odoo 2014-10-21 18:35:32 +05:30 committed by Martin Trigaux
parent ef72a96de7
commit 299e39555b
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@
<field name="company_id"/>
<field name="website_published"/>
<field name="environment"/>
<field name="validation"/>
</group>
<group>
<field name="fees_active"/>

View File

@ -45,7 +45,7 @@ class TransferPaymentAcquirer(osv.Model):
""" Hook in create to create a default post_msg. This is done in create
to have access to the name and other creation values. If no post_msg
or a void post_msg is given at creation, generate a default one. """
if values.get('name') == 'transfer' and not values.get('post_msg'):
if values.get('provider') == 'transfer' and not values.get('post_msg'):
values['post_msg'] = self._format_transfer_data(cr, uid, context=context)
return super(TransferPaymentAcquirer, self).create(cr, uid, values, context=context)