Skip to Content
Menu
This question has been flagged
2665 Views

Hello to all,

Good day,


You may find this question repeated as before, none of them helped me. and i am trying to solve this problem for almost 1 day. please help me. i am using odoo12. the funny things is last night it ran successfully but this morning is giving me below error: why?!! I check my model name many times . even i didn't find any missed typed. please help me...by the way my _init_.py file is ok..i have imported . also the check the manifest file.


THE ERROR IS :

-----------------------


Error:

Odoo Server Error


Traceback (most recent call last):

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\tools\convert.py", line 758, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\tools\convert.py", line 663, in _tag_record

    record = model.with_context(rec_context)._load_records([data], self.mode == 'update')

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 3866, in _load_records

    data['record']._load_records_write(data['values'])

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 3804, in _load_records_write

    self.write(values)

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\base\models\ir_actions.py", line 66, in write

    res = super(IrActions, self).write(vals)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 3349, in write

    self._write(store_vals)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 3485, in _write

    self._validate_fields(vals)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 1128, in _validate_fields

    check(self)

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\base\models\ir_actions.py", line 141, in _check_model

    raise ValidationError(_('Invalid model name %r in action definition.') % action.res_model)

odoo.exceptions.ValidationError: ("Invalid model name 'subject.member.meeting' in action definition.", None)


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 656, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 314, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\tools\pycompat.py", line 87, in reraise

    raise value

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 698, in dispatch

    result = self._call_function(**self.params)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 346, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\service\model.py", line 98, in wrapper

    return f(dbname, *args, **kwargs)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 339, in checked_call

    result = self.endpoint(*a, **kw)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 941, in __call__

    return self.method(*args, **kw)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 519, in response_wrap

    response = f(*args, **kw)

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\web\controllers\main.py", line 966, in call_button

    action = self._call_kw(model, method, args, {})

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\web\controllers\main.py", line 954, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\api.py", line 759, in call_kw

    return _call_kw_multi(method, model, args, kwargs)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\api.py", line 746, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "<decorator-gen-67>", line 2, in button_immediate_upgrade

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\base\models\ir_module.py", line 74, in check_and_log

    return method(self, *args, **kwargs)

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\base\models\ir_module.py", line 627, in button_immediate_upgrade

    return self._button_immediate_function(type(self).button_upgrade)

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\base\models\ir_module.py", line 561, in _button_immediate_function

    modules.registry.Registry.new(self._cr.dbname, update_module=True)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\modules\registry.py", line 86, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\modules\loading.py", line 417, in load_modules

    force, status, report, loaded_modules, update_module, models_to_check)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\modules\loading.py", line 313, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\modules\loading.py", line 222, in load_module_graph

    load_data(cr, idref, mode, kind='data', package=package, report=report)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\modules\loading.py", line 68, in load_data

    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\tools\convert.py", line 802, in convert_file

    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\tools\convert.py", line 865, in convert_xml_import

    obj.parse(doc.getroot(), mode=mode)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\tools\convert.py", line 764, in parse

    exc_info[2]

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\tools\pycompat.py", line 86, in reraise

    raise value.with_traceback(tb)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\tools\convert.py", line 758, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\tools\convert.py", line 663, in _tag_record

    record = model.with_context(rec_context)._load_records([data], self.mode == 'update')

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 3866, in _load_records

    data['record']._load_records_write(data['values'])

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 3804, in _load_records_write

    self.write(values)

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\base\models\ir_actions.py", line 66, in write

    res = super(IrActions, self).write(vals)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 3349, in write

    self._write(store_vals)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 3485, in _write

    self._validate_fields(vals)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 1128, in _validate_fields

    check(self)

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\base\models\ir_actions.py", line 141, in _check_model

    raise ValidationError(_('Invalid model name %r in action definition.') % action.res_model)

odoo.tools.convert.ParseError: "Invalid model name 'subject.member.meeting' in action definition.

None" while parsing file:/c:/program files (x86)/odoo 12.0/server/odoo/custom-addon/etud_meeting/views/subject_member_meeting.xml:4, near

<record id="subject_member_meeting_action" model="ir.actions.act_window">

        <field name="name">Subject and Members</field>

        <field name="res_model">subject.member.meeting</field>

        <field name="view_type">form</field>

        <field name="view_mode">tree,form,calendar</field>

    </record>



MY XML CODES ARE:

--------------------------------

<?xml version="1.0" encoding="utf-8"?>

<odoo>


    <record id='subject_member_meeting_action' model='ir.actions.act_window'>

        <field name="name">Subject and Members</field>

        <field name="res_model">subject.member.meeting</field>

        <field name="view_type">form</field>

        <field name="view_mode">tree,form,calendar</field>

    </record>


    <!-- Main Menu - Top Left -->

    <menuitem name="Etud Meeting" id="meeting_base_menu" />

    <!-- Page Set a Meeting -->

    <menuitem name="Set a Meeting" id="subject_member_meeting_menu" parent="meeting_base_menu" action="subject_member_meeting_action"/>


    <!-- Form View -->

    <record id="subject_member_meeting_view_form" model="ir.ui.view">

        <field name="name">Subject and Members Form</field>

        <field name="model">subject.member.meeting</field>

        <field name="arch" type="xml">

            <form>

                

                <group string="Subject and Memeber of the meeting" name="subject-member">

                     <field name="subject"/>

                     <field name="number" placeholder="Date-Num"/>

                     <field name="topic"/>

                     <field name="boss" widget="many2many_tags"/>

                     <field name="secretary" widget="many2many_tags"/>

                     <field name="author_member" widget="many2many_tags"/>

                     <field name="informed" widget="many2many_tags"/>

                     <field name="tag"/> 

                     <field name="date_release"/>                  

                </group>    

                <group string="Time and Place of the meeting" name="time-place">   

                         <field name="time"/> 

                         <field name="duration"/>

                         <field name="event_place"/>

                         <field name="venue"/>

                         <field name="google_map_partner"/>

                         <field name="all_day"/>

                         <field name="periodic"/>

                </group>


                <group string="Meeting Attendance Status" name="meeting_att">   

                         <field name="audience"/> 

                         <field name="att_status"/>

                         <field name="delay_rate"/>

                         <field name="abs_reason"/>

                         <field name="delay_reason"/>

                        

                </group>

                 <group string="Approval of the meeting" name="meeting_approvals">   

                         <field name="meeting_order"/> 

                         <field name="meeting_des"/>

                         <field name="meeting_appro"/>

                         <field name="responsible_person" widget="many2many_tags"/>

                         <field name="action_day"/>

                         <field name="action_status" widget="many2many_tags"/>

                         <field name="reason"/>

                        

                </group>

                <group string="Informing People" name="inform_people">   

                         <field name="inform_type"/> 

                         <field name="inform_temp"/>

                         <field name="send_date"/>

                         <field name="reminder"/>

                         <field name="people_meeting" widget="many2many_tags"/>

                         <field name="remind_status"/>

                         <field name="inform_channel"/>

                         <field name="get_invi_date"/>

                         <field name="invi_status"/>

                         <field name="respond_date"/>

                         <field name="res_reject"/>       

                         <button name="button1" string="SEND EMAIL" type="object"/>

                         <button name="button2" string="SEND SMS" type="object"/>

                         <button name="button3" string="SEND TO PORTAL" type="object"/>

                        

                </group>

        

            </form>

        </field>

    </record>


    <!-- Tree(list) View -->

    <record id="subject_member_meeting_view_tree" model="ir.ui.view">

        <field name="name">Subject and Members List</field>

        <field name="model">subject.member.meeting</field>

        <field name="arch" type="xml">

            <tree>

                <field name="subject"/>

                <field name="informed" widget="many2many_tags"/>

                <field name="date_release"/>

                <field name="number"/>

            </tree>

        </field>

    </record>


    <!-- Search View -->

    <record id="subject_member_meeting_view_search" model="ir.ui.view">

        <field name="name">Subject and Members Search</field>

        <field name="model">subject.member.meeting</field>

        <field name="arch" type="xml">

            <search>

                <field name="subject"/>

                <field name="author_member"/>

                <filter string="Without Authors" name="without_author" domain="[('author_member','=',False)]"/>

            </search>

        </field>

    </record>



    <!-- Calendar View -->



    <record id="subject_member_meeting_view_calendar" model="ir.ui.view">

        <field name="model">subject.member.meeting</field>

        <field name="arch" type="xml">

                <calendar date_start="date_release" date_stop="date_release" color="subject" mode="month">

        <field name="subject" />

        <field name="topic" />

        <field name="number" />

</calendar>

</field>

</record>



</odoo>



MY PYTHON CODE IS :

-----------------------------------

from odoo import models, fields, api



class SubjectMemberMeeting(models.Model):

    _name = 'subject.member.meeting'

    _description = 'Subject and Members'

    _inherit = ['mail.thread']


    subject = fields.Char('Tile Of The Meeting', required=True)


    number = fields.Char('Number Of The Meeting', required=True)


    topic = fields.Char('Topic Of The Meeting', required=True)


    boss = fields.Many2many('res.partner', string='Boss')


    secretary = fields.Many2many(

        'res.partner', string='Secretary', required=True)


    author_member = fields.Many2many(

        'res.partner', string='Author Memeber', required=True)


    informed = fields.Many2many('res.partner', string='Informed')


    tag = fields.Char('Tag')


    date_release = fields.Date('Date Of Meeting')


    time = fields.Datetime('Time Of Meeting')


    duration = fields.Char('Duration Of Meeting')


    event_place = fields.Char('Place of the Event', required=True)


    venue = fields.Char('venue Of Meeting')


    google_map_partner = fields.Char(string="Map")


    all_day = fields.Boolean(string="Yes")


    periodic = fields.Boolean(string="Is It Periodic?")


    audience = fields.Char(string="Audience", required=True)


    att_status = fields.Char(string="Attendance Status", required=True)


    delay_rate = fields.Char(string="Delay Rate")


    abs_reason = fields.Char(string="The Reason of absence")


    delay_reason = fields.Char(string="The Reason of Delay")


    meeting_order = fields.Char(string="Meeting Commands")


    meeting_des = fields.Char(string="Meeting Description", required=True)


    meeting_appro = fields.Char(string="Meeting Approvals", required=True)


    responsible_person = fields.Many2many('res.partner',

                                          string="Responsible Person", required=True)


    action_day = fields.Date(string="Action Day", required=True)


    action_status = fields.Many2many('res.partner', string="Action Status")


    reason = fields.Char(string="Reason Of the meeting")


    inform_type = fields.Selection(

        [('type1', 'Invitation to the meeting'), ('type2', 'Cancel the session'), ('type3', 'Send minutes'), ], 'Type Of Inform', default='type1')


    inform_temp = fields.Selection(

        [('type1', 'Invitation to the meeting'), ('type2', 'Cancel the session'), ('type3', 'Send minutes'), ], 'Type Of Inform', default='type2')


    send_date = fields.Datetime('Time Of the sending', required=True)


    reminder = fields.Char(string="Reminder")


    people_meeting = fields.Many2many(

        'res.partner', string="People Of the Meeting", required=True)


    remind_status = fields.Selection(

        [('type1', 'Invitation to the meeting'), ('type2', 'Cancel the session'), ('type3', 'Send minutes'), ], 'Type Of Inform', default='type3', required=True)


    inform_channel = fields.Selection(

        [('type1', 'Email'), ('type2', 'SMS'), ('type3', 'Portal'), ], 'Type Of Inform', default='type2', required=True)


    get_invi_date = fields.Date(

        string="Date of invitation Received", required=True)


    invi_status = fields.Date(

        string="Status of the Invitation", required=True)


    respond_date = fields.Date(

        string="Date of Replay", required=True)


    res_reject = fields.Char(string="Reasons of appcept or reject")


           @api.multi

  def button1(self):

        print('Send Email')


          @api.multi

    def button2(self):

        print('Send SMS')


          @api.multi

    def button3(self):

        print('Send to Portal')





Avatar
Discard