[ADD] sale_payment_web: add further functionalities to register payment wizard

This commit is contained in:
Connor Christian
2020-11-23 18:32:26 -05:00
committed by Cedric Collins
parent d1a686c13f
commit 003c3bc769
6 changed files with 105 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
from odoo import api, models
from odoo import api, fields, models
class PaymentTransaction(models.Model):
@@ -10,3 +10,9 @@ class PaymentTransaction(models.Model):
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)
class AccountPayment(models.Model):
_inherit = 'account.payment'
sale_order_id = fields.Many2one('sale.order', string="Sale Order")