Skip to Content
Menu
This question has been flagged
1817 Views

It affects error on installation: "ParseError: "Invalid model name u'project.version' in action definition. While parsing <act_window id="version_action_tree" name="Versions" res_model="project.version" view_mode="tree,form"/>

__init__.py

# -*- coding: utf-8 -*-
from . import project_task_version

__manifest__.py

# -*- coding: utf-8 -*-
{
    'name': "project_version",
    'summary': 'Task version tracking',
    'author': "MyCompany",
    'category': 'Project',
    'version': '0.2',
    'depends': ['project'],
    'data': [
        'views/views.xml',
    ],
    'installable': True,
    'auto_install': False,
    'application': False,
}

project_task_version.py

# -*- coding: utf-8 -*- from odoo import models, fields, api

class ProjectVersion(models.Model):
    # _inherit = 'project.project'
    _name = 'project.version'
    _order = 'name desc'
    name = fields.char('Version Number', required=True)
    active = fields.boolean('Active', required=False)
    _defaults = {
        'active': 1,
    }

views.xml

<odoo>
  <data>
    <menuitem name="Версии" id="versions" parent="project.menu_project_config"/>
  </data>
</odoo>
Avatar
Discard

It's complaining about the action. Did you create one for that menu?

Author

I don't know how I get this error, and it didn't happen again. The question is not actual any more.

Related Posts Replies Views Activity
2
Nov 24
25098
2
May 24
5522
3
Mar 24
4964
0
Mar 24
264
3
Feb 24
11421