Hello,
With studio, I have added a float field. I would like in Advanced Properties ‘compute’ a calculation. The calculation is working fine. But now, I want to add a condition ‘if contains’. I have tried with
- if (record.taxes_id.__contains__(‘test')):
- if record.taxes_id == “test":
The first one is not working and the second one is working if the field is for instance a char. However taxes_id is a M2M, which is the issue.
- I have tried to add a [0] after taxes_id but the result is always false
- I have tried to add in a char field : for record in self: record['x_studio_test2'] = record.taxes_id, in order to see the value. It’s for instance (account.tax(1,).
- If I do the same with [0], I have still the same result.
- If I do the same with if record.taxes_id == "account.tax(1,)": I have always false.
How could I do to have my condition that research inside the table ? The goal is to say if 1 (or something else like to a value in a table of a M2M(taxes_id)) that works. Means that is not always false...