fix(purchase): make tax_type mandatory only for Purchase Act
Purchase Invoice Item.tax_type (Tax Free / Taxable) models the 5% withholding that only applies to a Purchase Act. EQF and Import documents don't use it, but the e-taxes import now stamps purchase_type=1 on EQF invoices too, which made tax_type mandatory on every line. Narrow mandatory_depends_on to act_type == "Purchase Act". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7d885b5a34
commit
76a9d57b48
|
|
@ -1101,7 +1101,10 @@ def create_custom_fields():
|
|||
# hid the column and JS re-toggled `hidden`, which broke the grid
|
||||
# layout — so depends_on is intentionally cleared here.
|
||||
depends_on='',
|
||||
mandatory_depends_on='eval:parent.purchase_type || parent.agricultural_goods',
|
||||
# tax_type (Tax Free / Taxable) only applies to a Purchase Act
|
||||
# (5% withholding). EQF / Import documents don't use it, so it is
|
||||
# mandatory only when act_type == "Purchase Act".
|
||||
mandatory_depends_on='eval:parent.act_type == "Purchase Act"',
|
||||
in_list_view=1,
|
||||
columns=2
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue