Setting field values

The <record> element defines a data record and contains <field> elements to set values on each field.

The name attribute of the field element identifies the field to write on.

The value to write is the element content: the text between the field's opening and closing tag. For dates and datetimes, strings with "YYYY-mm-dd" and "YYYY-mm-dd HH:MM:SS" will be converted properly, but for Boolean fields any non-empty value will be converted as True, and the "0" and "False" values are converted to False.

The way Boolean False values are read from data files is improved in Odoo 10. In previous versions, any non-empty values, including "0" and "False" were converted to True. For Booleans, using the eval attribute discussed in ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.