[FIX] payment: fees computation depending on country
The computed fees can depend on the country. There was a typo about it: there is no `country_id` field on the `payment.transaction` model, it's `partner_country_id`. Therefore, the computed fees according to the country were not always correctly computed. e.g. for Paypal, where the domestic fees are lower than the international fees, it always computed the fees as international. opw-651778
This commit is contained in:
@@ -448,7 +448,7 @@ class PaymentTransaction(osv.Model):
|
||||
custom_method_name = '%s_compute_fees' % acquirer.provider
|
||||
if hasattr(Acquirer, custom_method_name):
|
||||
fees = getattr(Acquirer, custom_method_name)(
|
||||
cr, uid, acquirer.id, values.get('amount', 0.0), values.get('currency_id'), values.get('country_id'), context=None)
|
||||
cr, uid, acquirer.id, values.get('amount', 0.0), values.get('currency_id'), values.get('partner_country_id'), context=None)
|
||||
values['fees'] = float_round(fees, 2)
|
||||
|
||||
# custom create
|
||||
|
||||
Reference in New Issue
Block a user