콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
5540 화면

xml file

<?xml version="1.0"?> <openerp><data> <!-- Action to open To-do Task list --> <act_window id="action_todo_task" name="To-do Task" res_model="todo.task" view_mode="tree,form" />

       <!-- Menu item to open To-do Task list --> <menuitem id="menu_todo_task" name="To-Do Tasks" sequence="20" action="action_todo_task" /> </data></openerp>


__openerp__.py

{ 'name':'To-Do Application', 'description':'Manage your personal tasks with this module', 'author':'Priyanshi Dharu', 'depends':['mail'], 'application':True, 'data':['todo_view.xml'],}

model.py

# -*- coding: utf-8 -*-from openerp import models,fieldsclass TodoTask(models.Model):

 #model added to our custom module _name = 'todo.task' #attribute used to refer this model name as name = fields.Char('Description',required=True) #name of record is_done = fields.Boolean('Done?') active = fields.Boolean('Active?',default=True) #showing only active records


__init.py

from . import todo_model


아바타
취소
베스트 답변

Hello,

Try to add a parent in the menuitem as:


<menuitem id="menu_todo_task"
name="To-Do Tasks"
parent="mail.mail_channel_menu_root_chat"
sequence="20"
action="action_todo_task" />
아바타
취소
작성자

thank you:)

i have some more doubts as well , keep answering :)

베스트 답변

The problem is not clear, What the problem, Also you have not parent menu in xml file

아바타
취소
작성자 베스트 답변

yes i forgot to mention that , that parent menu creates error

Error: External id not found in system:mail.mail_feeds" while parsing "filename"


<?xml version="1.0"?> <openerp><data> <!-- Action to open To-do Task list --> <act_window id="action_todo_task" name="To-do Task" res_model="todo.task" view_mode="tree,form" />

       <!-- Menu item to open To-do Task list --> <menuitem id="menu_todo_task" name="To-Do Tasks" parent = "mail.mail_feeds" sequence="20" action="action_todo_task" /> </data></openerp>

아바타
취소

First Check the mail module is installed, second check you module is depends on the mail module

관련 게시물 답글 화면 활동
1
10월 23
96
1
6월 23
5551
0
6월 21
3408
5
12월 24
33508
2
2월 25
1218