Python Inheritance
in Odoo 16
Using python inheritance each model or record is
able to perform standard CRUD actions, they are
create, read, unlink and write.
Let us check how they work
• We are going to discuss the inheritance of create() function in python
• For that create a new model and define some fields, here you can see the model created,
• In this model we need to add dynamic sequence for the each record, so we created a data file
for sequence as below
• To generate sequence when creating a new record you need to inherit create function
• A demo of inheriting create function is given below
• Like this you can inherit create function, the output will be as follows
• You can inherit the other CRUD functions such as write(), update(), and delete() as your need
Check our company website
for related blogs and Odoo book.
https://www.youtube.com/watch?v=s1R3QjcZatQ

Python Inheritance in Odoo 16

  • 1.
  • 2.
    Using python inheritanceeach model or record is able to perform standard CRUD actions, they are create, read, unlink and write. Let us check how they work
  • 3.
    • We aregoing to discuss the inheritance of create() function in python • For that create a new model and define some fields, here you can see the model created,
  • 4.
    • In thismodel we need to add dynamic sequence for the each record, so we created a data file for sequence as below • To generate sequence when creating a new record you need to inherit create function • A demo of inheriting create function is given below
  • 5.
    • Like thisyou can inherit create function, the output will be as follows
  • 6.
    • You caninherit the other CRUD functions such as write(), update(), and delete() as your need
  • 7.
    Check our companywebsite for related blogs and Odoo book. https://www.youtube.com/watch?v=s1R3QjcZatQ