fix(purchase): keep tax_type/purchase_tax_amount always visible in grid
Clear depends_on on the Purchase Invoice Item tax_type and purchase_tax_amount custom fields so their grid columns are always shown (in_list_view). Mandatory state still toggles via mandatory_depends_on on tax_type. Previously depends_on hid the column and a JS hidden-toggle re-added it, which broke the grid layout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c737884fae
commit
4fc406cb17
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue