Hello everyone. Now, we’ll have a quick look at how to define list (tree), graph and pivot views. List views are used when we work in list mode in order to visualize several resources at once. These views are simpler than the form views and have less options. Continue reading
Hello everyone. In this blog-post tutorial we will learn how to create a form view in Odoo. Firstly, let’s define views. Views is the way the records of a model are displayed. Each type of view represents a mode of visualization ( a list of records, form, a graph, calendar, kanban). Here we will learn one mode ‘Form’ view.
So, here we have a model named Marks which has a Many2one field called ‘student_id’. This field represents the informations of the Students(e.g name, age, number,…) other Many2one field called ‘courses_id’ (e.g name, number), and Float fields ‘exam1’ ‘exam2’ ‘extra’ ‘average’. Marks model looks like this: Continue reading
Hello everyone. Today I’m gonna explain you how to use @api.depends decorated method.
First of all, the fields can be computed (instead of read from the database) using the compute parameter, it must assign the computed value to the field, it uses the values of other fields from the same model or others model (unlike @api.onchange which work only with the fields in the same view), it should specify fields using depends(). Continue reading
Hello everyone. Today, we will learn how to create menuitem in odoo using api8. Here we have an axample:
- Create an xml file for your module.
Hello everyone. In this blog-post we will learn how onchange function works.
When we want to change a field’s value in a form (but hasn’t saved the form yet), onchange can be useful to automarically update other fields based on that value.
Hello everyone. Now I’m gonna explain you, how to override write method.
The write method is invoked everytime you click on the ‘Edit’ and ‘Save’ button in the view. Once the record is being created and then if you modify and you save record that time the write is being called. So the write method is called whenever the record is modified. The values with whitch it is being modified come in the vals argument.