Skip to Content
Menu
This question has been flagged
5 Replies
2850 Views

Hi ,I created a lot of fields in model.py for inherit but i hadn't got any model in database after inherit from openeducat admission, I depend app from Technical Name and inherit from exiting models but after restart and update there is no models  in database.Please ,Help me  and Give me some advices . Thank you.. Models and Openerp.py are below..

model.py

from openerp import models, fields


class st_admission(models.Model):

_inherit = 'op.admission.register'


sex = fields.Selection([('male','Male'),('female','Female')], 'Sex', required=True),

current_age = fields.Integer('Current Age'),

prf_name = fields.Char('Preferred Name'),

birthday = fields.Date('Date of Birth'),

anti_enroll_date = fields.Date('Anticipated Enrollment Date'),

last_grade = fields.Char('Last Grade Completed'),

anti_grade_enter = fields.Char('Anticipated Grade To Enter'),

passort = fields.Char('Passort #', help='If a child has dual citizenship, provide additional passport information'),

country = fields.Char('Country for Passport'),

exp_date = fields.Date('Expiration Date for Passport'),

nrc_no = fields.Char('NRC'),

type_visa = fields.Selection([('debit','Debit Card'),('credit','Credit Card')], 'Type of Visa Held', required=True),

religion = fields.Char('Religion'),

nationally = fields.Char('Nationally'),

is_myanmar = fields.Selection([('yes','YES'),('no','NO')], 'Myanmar_citizen?'),

home_language = fields.Char('Home Language'),

oth_language = fields.Char('Other Language'),

current_address = fields.Text('Current Residence Address'),

home_phone = fields.Integer('Home Phone', required=True),

home_fax = fields.Integer('Home Fax'),

email = fields.Char('Email', required=True),

emergency_phone = fields.Integer('Emergency  Contant Phone', required=True),


__openerp__.py files

    'name': 'Advance for addmissions', 

    'version': '1.0',

    'description': 'Add more information for Addmissions.',

    'author': 'Hannay Oo', 

    'depends': ['openeducat_admission'], 

    'data': [

        'views/admission.xml',        

        ],

    'application': True,

    'installable': True, 

}

  


Avatar
Discard
Author
Sir , I put it all the step i need but ther is no model show up .Can i use openerp in odoo11? Is it the problem? Sir please help me.

On Fri, 6 Mar 2020, 12:51 pm Niyas Raphy, <niyasraphyk@gmail.com> wrote:

A new question AFter inherit ,Missing Models in odoo11 on Help has been posted. Click here to access the question :

See question

Sent by Odoo S.A. using Odoo.

So you are saying that the module is not seen in the apps list ? Did you placed the module in addons path itself ? If not aware of addons path, see this: https://www.youtube.com/watch?v=A1ENvtgmD74

Once module is places in addons path, restart the odoo service and click Update App list menu after activating the debug mode.

Thanks

Author
Sir, i did addons path and i am on developer mode.I've already  installed my app and updated but i cant find model in database what i just create in model.py file.Please Give me some advice.Thank you

On Fri, 6 Mar 2020, 1:14 pm Niyas Raphy, <niyasraphyk@gmail.com> wrote:

So you are saying that the module is not seen in the apps list ? Did you placed the module in addons path itself ? If not aware of addons path, see this: https://www.youtube.com/watch?v=A1ENvtgmD74

Once module is places in addons path, restart the odoo service and click Update App list menu after activating the debug mode.

Thanks

Sent by Odoo S.A. using Odoo.

Check these odoo customization tips: https://goo.gl/8HgnCF

Best Answer

Hi,

Did you imported the newly created python file inside the __init__.py file ? Create a file named __init__.py file and import the file model.py like this,

from . import models

See this: https://www.youtube.com/watch?v=L6MxDR71_1k&list=PLqRRLx0cl0hoJhjFWkFYowveq2Zn55dhM&index=2

Thanks

Avatar
Discard