mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
13 lines
406 B
Python
13 lines
406 B
Python
from odoo import api, models
|
|
|
|
|
|
class PaymentTransaction(models.Model):
|
|
_inherit = 'payment.transaction'
|
|
|
|
@api.model
|
|
def create(self, values):
|
|
active_ids = self._context.get('active_ids')
|
|
if active_ids and self._context.get('active_model') == 'sale.order':
|
|
values['sale_order_ids'] = [(6, 0, active_ids)]
|
|
return super(PaymentTransaction, self).create(values)
|