There's more...

Since form views are basically HTML with some extensions, Odoo also makes extensive use of CSS classes. Two very useful ones are oe_read_only and oe_edit_only. These cause elements with these classes applied to be visible only in read/view mode or in edit mode. To have the label visible only in edit mode, use the following:

<label for="name" class="oe_edit_only" /> 

Another very useful class is oe_inline, which you can use on fields to make them render as an inline element, to avoid causing unwanted line breaks. Use this class when you embed a field into text or other markup tags.

Further more, the form element can have the create, edit, and delete attributes. If you set one of these to false, the corresponding action won't be available for this form. Without this being explicitly set, the availability of the action is inferred from the user's permissions. Note that this is purely for straightening the UI; don't use this for security.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset