diff --git a/jey_erp/custom_fields.py b/jey_erp/custom_fields.py index 947ec0a..dbc1f85 100644 --- a/jey_erp/custom_fields.py +++ b/jey_erp/custom_fields.py @@ -552,7 +552,10 @@ def create_custom_fields(): 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', 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( fieldname='etaxes_purchase_id',