Skip to content

Instantly share code, notes, and snippets.

View crottolo's full-sized avatar
🎯
Focusing

Crottolo crottolo

🎯
Focusing
  • FL1 sro
  • Czech Republic
  • 03:29 (UTC +02:00)
View GitHub Profile
@crottolo
crottolo / example_model.py
Created December 12, 2021 10:23 — forked from CakJuice/example_model.py
Example code for Many2one & One2many fields
from odoo import models, fields
class ParentModel(models.Model):
_name = 'parent.model'
parent_field_1 = fields.Char(string="Parent Field 1")
parent_field_2 = fields.Integer(string="Parent Field 2")
# If you want to display child data, you must create One2many field.