Skip to Content
Menu
This question has been flagged
1 Reply
2759 Views

In the forum for the same code you use  " or ' .

exemple :

 fields.related( " product.id", "product.uom"....).  or  fields.related( 'product.id','product.uom'.....)

which rule for this ?

Avatar
Discard
Best Answer

Hi @Maurice

That's not matter, both represents a string, you could use what you prefers. You can also mix them for your needs for example a common one:

domain="{'required': [('name', '=', 'value')]}"

or

domain='{"required": [("name", "=", "value")]}'
Avatar
Discard

To add a note on this: it is adviced to use the same character through the whole file. So once you start using " stick to it, don't mix.

(with exception of domains, which require to mix " and ' ofcourse). I'm talking about the Python files specifically.