Skip to Content
Menu
This question has been flagged
466 Views

In the register Payment option how can I post a custom field amount in journal when click on validate button in odoo. Here I want to post TDS, VDS and settlement amount for selected journal. How can I do that Please help. here ia the code: 

from odoo import models, fields, _


class AccountPayment(models.Model):
_inherit = "account.payment"

tds_amount = fields.Integer('TDS Amount')
vds_amount = fields.Integer('VDS Amount')
settlement_dis = fields.Integer('Settlement Discount')
bank_reference = fields.Char(copy=False)
cheque_reference = fields.Char(copy=False)
effective_date = fields.Date('Effective Date',
help='Effective date of PDC', copy=False,
default=False)
tds_account_id = fields.Many2one('account.account',
domain=[('deprecated', '=', False)], copy=False)
vds_account_id = fields.Many2one('account.account',
domain=[('deprecated', '=', False)], copy=False)
settle_account_id = fields.Many2one('account.account',
domain=[('deprecated', '=', False)], copy=False)


Avatar
Discard