For the non-developer, it is quite difficult to understand the code written behind Odoo. For developers, gaining access to the editor would be quite impressive.
Let's do an example based on the previous one. The Balance to Receive fields should be visible only if someone is set to customer and vendor, or else hide the field. Enter debug mode before you enable studio mode.
Go to the customer form, enter studio mode, click on the view on the left panel, and at the bottom, you will see the XML button. By clicking on that field, you will have access to the code editor:
Select the correct view from the drop-down box to the left of the SAVE button, the name should be Odoo Studio : res.parner.form customization:
Add a new attribute for the field. The only way to understand the correct field is by the label. Add the following small piece of code below the label attribute:
<attribute name="attrs">{'invisible': ['|',
('customer','=',False), ('supplier','=',False)]} </attribute>
Make sure your code looks as follows after applying the changes:
Click on Save and Close to exit from the editor. Click Close in the upper-right to exit from the studio. The Balance to Receive will be visible only if Is a Customer and Is a Supplier fields are selected under SALES & PURCHASE tab.