'calculate amount_total from tax Odoo 15

Please I want to know how to calculate the tax and adding it in total amount . taxs name's is FODEC nad he has a fixed pourcentage 1% of total. so : total= 1% of total + total .

please help me . I can't resolve it .

from odoo import models, fields, api, http
import logging

_logger = logging.getLogger(__name__)


class AccountTax(models.Model):
    _inherit = "account.tax.template"

    fodec = fields.Boolean("FODEC")


class AccountTax(models.Model):
    _inherit = "account.tax"

    fodec = fields.Boolean("FODEC")


class InvoiceStampTax(models.Model):
    _inherit = 'account.move'

    
    fodec = fields.Many2one('account.tax',string="FODEC", domain=[('fodec', '=', True)])

here when I choose Fodec taxe 1% , he must calculate the total amount in second picture enter image description here

second picture



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source