求助,自定义了一个新的模块 在模块中搜索不到
-
目录结构
px_addons
dictionary
init.py
openerp.py
dictionary.py
dictionary_group_view.xml
init.py
# -- coding: utf-8 --
author = 'Darcy'
import dictionary
openerp.py
# -- coding:utf-8 --
author = 'Darcy'
{
'name':'SXT dictionary',
'version':'1.0',
'author':'Darcy',
'description':'字典表类型(组)',
'depends':[],
'data':[
'dictionary_group_view.xml',
],
'category':'Others',
'installable':True,
'application':True,
}
dictionary.py
# -- coding : utf-8 --
author = 'Darcy'
import time
from datetime import datetime
from dateutil.relativedelta import relativedelta
from openerp.osv import fields, osv
import openerp.addons.decimal_precision as dp
from openerp.tools.translate import _
class dictionary(osv.osv):
_name="dictionary.group"
_description="字典表(组)"
_columns = {
"type":fields.char("Type",required=True),
"code":fields.char("code",required=True)
}
dictionary_group_view.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_dictionary_group_form">
<field name="name">dictionary.group.form</field>
<field name="model">dictionary.group</field>
<field name="arch" type="xml">
<form string="dictionaryFrom">
<group>
<field name="type"/>
</group>
<group>
<field name="code"/>
</group>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_dictionary_group_tree">
<field name="name">dictionary.group.tree</field>
<field name="model">dictionary.group</field>
<field name="arch" type="xml">
<tree string="dictionaryTree">
<field name="type"/>
<field name="code"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_dictionary_group_search">
<field name="name">dictionary.group.search</field>
<field name="model">dictionary.group</field>
<field name="arch" type="xml">
<search string="Search Dictionary Group">
<field name="type" string="Dictionary Type"/>
</search>
</field>
</record>
<menuitem id="system" name="system"/>
<menuitem id="dictionary" name="Dictionary" parent="system"/>
<menuitem id="dictionary_group" name="dictionary_group" parent="dictionary" action="view_dictionary_group_search"/>
</data>
</openerp>
openerp-server.conf 其他的参数就不写了
addons_path = E:\odoo-8.0\addons,E:\odoo-8.0\px_addons
启动odoo以后 就是找不到该模块