diff --git a/l10n_th_account_tax/models/account_move.py b/l10n_th_account_tax/models/account_move.py index e92f3c3c0..17f6c27d1 100644 --- a/l10n_th_account_tax/models/account_move.py +++ b/l10n_th_account_tax/models/account_move.py @@ -545,7 +545,9 @@ def _post(self, soft=True): # but still need to keep track the withholding.move base amount for move in self: # Normal case, create withholding.move only when withholding - wht_moves = move.line_ids.filtered("account_id.wht_account") + wht_moves = move.line_ids.filtered( + lambda l: l.account_id.wht_account and l.wht_tax_id + ) withholding_moves = [ Command.create(self._prepare_withholding_move(wht_move)) for wht_move in wht_moves