[FIX] sale: allow multi-record capacity to action_done
Fine-tuning : 6b7bb096e1
closes #32944
closes odoo/odoo#32947
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -667,10 +667,11 @@ class SaleOrder(models.Model):
|
||||
|
||||
@api.multi
|
||||
def action_done(self):
|
||||
tx = self.sudo().transaction_ids.get_last_transaction()
|
||||
if tx and tx.state == 'pending' and tx.acquirer_id.provider == 'transfer':
|
||||
tx._set_transaction_done()
|
||||
tx.write({'is_processed': True})
|
||||
for order in self:
|
||||
tx = order.sudo().transaction_ids.get_last_transaction()
|
||||
if tx and tx.state == 'pending' and tx.acquirer_id.provider == 'transfer':
|
||||
tx._set_transaction_done()
|
||||
tx.write({'is_processed': True})
|
||||
return self.write({'state': 'done'})
|
||||
|
||||
@api.multi
|
||||
|
||||
Reference in New Issue
Block a user