mirror of
https://github.com/bringout/oca-ocb-l10n_me-africa.git
synced 2026-04-28 03:42:04 +02:00
19.0 vanilla
This commit is contained in:
parent
c5006a6999
commit
80293571e7
420 changed files with 21812 additions and 44297 deletions
19
odoo-bringout-oca-ocb-l10n_ke/l10n_ke/models/account_tax.py
Normal file
19
odoo-bringout-oca-ocb-l10n_ke/l10n_ke/models/account_tax.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class AccountTax(models.Model):
|
||||
_inherit = 'account.tax'
|
||||
|
||||
l10n_ke_item_code_id = fields.Many2one(
|
||||
'l10n_ke.item.code',
|
||||
string='KRA Item Code',
|
||||
help='KRA code that describes a tax rate or exemption on specific products or services.',
|
||||
)
|
||||
|
||||
@api.onchange('amount')
|
||||
def _onchange_l10n_ke_item_code_id(self):
|
||||
""" When the amount of the tax changes this field is reset """
|
||||
for tax in self:
|
||||
if tax._origin.amount != tax.amount:
|
||||
tax.l10n_ke_item_code_id = None
|
||||
Loading…
Add table
Add a link
Reference in a new issue