mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
This commits adds the possibility to update the payment reference on a payment transaction before generating XML file.
17 lines
547 B
Python
17 lines
547 B
Python
# Copyright 2009-2023 Noviat
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class AccountPaymentUpdate(models.TransientModel):
|
|
_name = "account.payment.update"
|
|
_description = "Update Payment Reference"
|
|
|
|
payment_reference = fields.Char(required=True)
|
|
|
|
def update_payment_reference(self):
|
|
payment = self.env["account.payment"].browse(self.env.context.get("active_id"))
|
|
payment.payment_reference = self.payment_reference
|
|
payment.ref = self.payment_reference
|