summaryrefslogtreecommitdiff
path: root/addons/payment
diff options
context:
space:
mode:
authorAdrian Torres <adt@odoo.com>2019-09-23 11:52:06 +0000
committerAdrian Torres <adt@odoo.com>2020-03-23 15:14:10 +0000
commit9befa3d245f058f7b687509bec88160986b2b877 (patch)
treea4b60ecfd5950c9688f09d31dc5243c825cbc302 /addons/payment
parent0d16e7331cc859a6f060eeed8ea2b53801c08ca6 (diff)
[FIX] *: adapt code for resolve_2many_commands removal
This code adapts all business code instances of calls to `resolve_2many_commands` and replaces them by calls to `new` which returns a record-like object whose api is more familiar than the `resolve_2many_commands` api.
Diffstat (limited to 'addons/payment')
-rw-r--r--addons/payment/models/payment_acquirer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py
index 6453965ff5f..afe2a1fe65b 100644
--- a/addons/payment/models/payment_acquirer.py
+++ b/addons/payment/models/payment_acquirer.py
@@ -865,8 +865,8 @@ class PaymentTransaction(models.Model):
@api.model
def _compute_reference_prefix(self, values):
if values and values.get('invoice_ids'):
- many_list = self.resolve_2many_commands('invoice_ids', values['invoice_ids'], fields=['name'])
- return ','.join(dic['name'] for dic in many_list)
+ invoices = self.new({'invoice_ids': values['invoice_ids']}).invoice_ids
+ return ','.join(invoices.mapped('name'))
return None
@api.model