diff --git a/l10n_th_account_tax_expense/models/hr_expense.py b/l10n_th_account_tax_expense/models/hr_expense.py
index 72bb65c14..491542d2a 100644
--- a/l10n_th_account_tax_expense/models/hr_expense.py
+++ b/l10n_th_account_tax_expense/models/hr_expense.py
@@ -10,6 +10,7 @@ class HrExpense(models.Model):
bill_partner_id = fields.Many2one(
comodel_name="res.partner",
string="Vendor",
+ tracking=True,
)
wht_tax_id = fields.Many2one(
comodel_name="account.withholding.tax",
@@ -17,6 +18,7 @@ class HrExpense(models.Model):
compute="_compute_wht_tax_id",
store=True,
readonly=False,
+ tracking=True,
)
@api.onchange("tax_ids", "wht_tax_id")
diff --git a/l10n_th_account_tax_expense/views/hr_expense_view.xml b/l10n_th_account_tax_expense/views/hr_expense_view.xml
index c30629c68..6bfc1310c 100644
--- a/l10n_th_account_tax_expense/views/hr_expense_view.xml
+++ b/l10n_th_account_tax_expense/views/hr_expense_view.xml
@@ -26,14 +26,14 @@
{'readonly': [('advance', '=', True)]}
+ >{'readonly': ['|', ('advance', '=', True), ('state', 'in', ['done', 'approved', 'reported'])]}
1