Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To create a static tree view in Odoo with a set number of rows, with the first column consisting of predetermined values and the second and third columns being editable, you can follow these steps:

  1. Create a new model for your data that includes fields for the predetermined values and the editable fields.

  2. Create a tree view for your model. In the view definition, use the tree tag to specify the type of view and define the columns you want to display.

  3. In the fields tag of the tree view definition, include the fields you want to display in each column. For the predetermined values, you can use the related field type to pull in the data from another related model.

  4. To make the second and third columns editable, include the editable attribute in the field definition for those columns.

  5. To limit the number of rows in the tree view, you can use the limit attribute in the tree tag.

  6. Customize the view as needed to ensure it matches your requirements.

Overall, these steps provide a basic framework for creating a static tree view in Odoo that has specific columns with editable fields. With some additional customization, you can create a more complex view that includes additional fields, filters, and other features that can improve your overall user experience.