for record in self:
if record.x_studio_export_presta == False
record.x_studio_test_computed_intero = 1
elif record.x_studio_export_presta == True
record.x_studio_test_computed_intero = 0
Could someone please help me with this computed field? I think the logic is correct, but I'm missing something in the syntax. I want the x_studio_test_computed_intero field = 1 when x_studio_export_presta is True, and if x_studio_test_computed_intero = 0 when x_studio_export_presta is False.
x_studio_export_presta is a boolean field.
Sorry, maybe I expressed myself badly. I'll try to be clearer and simpler.
IF x = True, y = 1
Elseif x = False, y = 0
So,
record.x_studio_export_presta = int(record.x_studio_test_computed_intero)
?
Still don't get why you differentiate between 0/False and 1/True here, but there might be a reason for you, I suppose.