İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1002 Görünümler

I'm developing an Odoo module to apply taxes globally on the entire invoice amount. This means users will add taxes to the final total instead of individual invoice lines.

I'm facing an issue when updating the amount_total field. The current calculation isn't reflecting the globally applied taxes.


the amount_residual is updated correctly but amount_total is not updated


Is there any solution, that can help achieve that purpose? 

Thank you 

    @api.depends('custom_total_amount', 'amount_paid')
    def _compute_amount(self):
        super(InvoiceExtension, self)._compute_amount()
        for record in self:
            record.amount_total = record.custom_total_amount
            record.amount_residual = record.custom_total_amount - record.amount_paid

    amount_total = fields.Monetary(string='Total', compute='_compute_amount', store=True)
    amount_residual = fields.Monetary(string='Amount Due', compute='_compute_amount', store=True)
Avatar
Vazgeç
En İyi Yanıt

did you find a solution 


Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Ağu 25
2842
2
Tem 25
1805
1
Tem 25
1156
1
Ağu 25
1152
0
May 25
1580