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 ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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 ?
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")]}'
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.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up