feat(purchase): show/require Act Kind only for Purchase Act
Add depends_on and mandatory_depends_on on the Purchase Invoice act_kind field so it is shown and mandatory only when act_type == "Purchase Act". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1c9883ecc7
commit
bea08279d8
|
|
@ -552,7 +552,10 @@ def create_custom_fields():
|
||||||
fieldtype='Select',
|
fieldtype='Select',
|
||||||
options='\nAgricultural Products Act\nMetal Scrap Reception Act\nTire Products For Disposal Act\nPlastic Products For Disposal Act\nRawhide Supply\nOther Product Receipt Act',
|
options='\nAgricultural Products Act\nMetal Scrap Reception Act\nTire Products For Disposal Act\nPlastic Products For Disposal Act\nRawhide Supply\nOther Product Receipt Act',
|
||||||
insert_after='etaxes_agricultural_section',
|
insert_after='etaxes_agricultural_section',
|
||||||
description='Type of act for e-taxes'
|
description='Type of act for e-taxes',
|
||||||
|
# Shown and mandatory only for a Purchase Act.
|
||||||
|
depends_on='eval:doc.act_type == "Purchase Act"',
|
||||||
|
mandatory_depends_on='eval:doc.act_type == "Purchase Act"'
|
||||||
),
|
),
|
||||||
dict(
|
dict(
|
||||||
fieldname='etaxes_purchase_id',
|
fieldname='etaxes_purchase_id',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue