diff --git a/jey_erp/custom_fields.py b/jey_erp/custom_fields.py index 70ff8ac..2334f23 100644 --- a/jey_erp/custom_fields.py +++ b/jey_erp/custom_fields.py @@ -1012,7 +1012,11 @@ def create_custom_fields(): fieldtype='Select', options='\nTax Free\nTaxable', insert_after='item_tax_template', - depends_on='eval:parent.purchase_type || parent.agricultural_goods', + # Column is ALWAYS visible (in_list_view). Only the mandatory + # state toggles, via mandatory_depends_on. Previously depends_on + # 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', in_list_view=1, columns=2 @@ -1022,7 +1026,8 @@ def create_custom_fields(): label='Purchase Tax Amount (5%)', fieldtype='Currency', insert_after='tax_type', - depends_on='eval:parent.purchase_type || parent.agricultural_goods', + # Always-visible read-only column (see tax_type note above). + depends_on='', read_only=1, in_list_view=1, columns=2,