hello guys, i want to make field2 invisible until i get value in field1 how to do this i already attrs but it says odoo17 onwards attrs & states not working please help me and one more thing i have two button start and stop, i want to make stop button invisible when start button is not in active state and when start is activated i want to make start button invisible after activated .
for field :
xml code : <field name="estimate_time"/>
<field name="re_estimated_time" modifiers="{'invisible': [('estimate_time', '=', False)]}"/>
python code: estimate_time = fields.Char(string="Estimated Time (Hours)",)
re_estimated_time = fields.Char(string="Re-Estimated Time")
for button:
python: time_start = fields.Datetime(string='Start Time')
time_end = fields.Datetime(string='End Time')
xml : <button name="action_start_time" type="object" string="Start Time" class="btn-primary"
invisible="time_start != 'False'"/>
<button name="action_stop_time" type="object" string="Stop Time" class="btn-secondary"/>