I created a field in Product form view and i need to show that field on the sales quote.
But, i need to show that field only if it's not empty.
So, if the field is empty, i need to show the product name, and if the field is not empty, i need to show it's content.
I'm trying to accomplish this using a relation and adding the following code in Studio:
If (product_id.x_studio_descrio_1) == "":
x_studio_descrio_1 = product_id.x_studio_descrio_1
Else:
x_studio_descrio_1 = product_variant_id.name
So, product_id.x_studio_descrio_1 is the field name i want to show if it's not empty, and x_studio_descrio_1 is the field i'll show it in.
If it possible to do this relation? Relate one or another?
Is my code wrong?