Created
September 9, 2020 07:38
-
-
Save sehrishnaz/86ba6b1b511606b28d1db4b50a86260b to your computer and use it in GitHub Desktop.
Create New Model in Odoo13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from odoo import models, fields, api | |
class ModelA(models.Model): | |
_name = 'model.a' | |
name = fields.Char(string="Name") | |
age = fields.Integer(string="Age") | |
student_dob = fields.Date(string="Date of Birth") | |
marks = fields.Float(string="marks") | |
image = fields.Binary(string='Photo') | |
gender = fields.Selection([('Male', 'Male'), ('Female', 'Female'), ('Other', 'Other')], string='Gender') | |
address = fields.Text() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For details: https://learnopenerp.blogspot.com/2020/09/how-to-create-model-in-odoo13.html