Odoo 8 ..菜单项未显示,也没有模块数据

时间:2015-02-11 06:09:36

标签: customization odoo

在xml中编写代码后,模块已正确安装,但菜单项ID未显示在父级..

上面

_init __。PY

import sea

_openerp __。PY

# -*- coding: utf-8 -*-
{
'name': "vessel Tracker",

'summary': """Vssel Finder""",

'description': """
    Module for tracking vessels:
        It handles millions of vessel position records daily. Our API    allows you to integrate our data into your application or website. You can  harness all this data, along with port calls, ship particulars etc. to build powerful applications for real-time, targeted intelligence.
Get started by selecting an option from the available services below.   Please contact us if you can't find what you are looking for.
""",

'author': "RANA",
'website': "http://www.my-cricket.weebly.com",

# Categories can be used to filter modules in modules listing
# Check https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xml
# for the full list
'category': 'Fleet',
'version': '0.1',

# any module necessary for this one to work correctly
'depends': ['base'],

# always loaded
'data': [
    # 'security/ir.model.access.csv',
    #'track.xml',
#'act_data.xml',
'sea_view.xml',

],
# only loaded in demonstration mode
'demo': [

],
'js': ["static/src/sea.js"],
}

我的sea.py文件

from openerp import models, fields,api
import canvas
import math

class Sea(models.Model):
_name = 'vessel.track'

seamodule文件/ static / src / sea.js

<script type="text/javascript">
// Map Size
var width='800';  // width of the embedded map in pixels (min. 600 px) or percentage (default=600px)
var height='500'; // height of the embedded map in pixels (min. 400 px)  (default=400px)
// Map View (does not work if Ship Selection is used)
var latitude='40.0'; // coordinates of the map center in decimal degrees (not mandatory)
var longitude='2.0';
var zoom='2';        // map zoom level (between 2 and 17)
// Ship selection
// IMPORTANT: USE ONLY ONE OF THE FOLLOWING OPTIONS
// Option 1 – by MMSI
var mmsi='xxxxxxxxx';      // center map over selected vessel specified by MMSI
var show_track=true;       // show track of the selected ship
// Option 2 – by IMO
var imo='xxxxxxx';         // center map over selected vessel specified by IMO
var show_track=true;       // show track of the selected ship
// Option 3 – display user fleet ships
var fleet='your fleet id'; // your fleet key (default is false)
var fleet_hide_old_positions=false; // Hide ships with old positions (default is false)
// Auxiliary parameters
var names=false; // always display ship names (default is false)
var click_to_activate=true; // user has to click on the map before zooming with mouse wheel
var store_position=false; // store the last position of the map (default is false, does not work when ship selection is used
var default_maptype=1; // change default map type: 1 -  google.maps.MapTypeId.ROADMAP, 2 - google.maps.MapTypeId.SATELLITE
var map_style=[ // use this tool for custom map styling
{"featureType": "landscape.natural.landcover", "stylers": [{ "hue":  "#ffaa00" }]},
{"featureType": "water", "stylers": [{ "hue": "#00a1ff" },{     "saturation": 91 },{ "lightness": -18 }]}];
</script>

和sea_view.xml

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>

    <!-- top level menu: no parent -->
    <menuitem id="main_sea_menu" name="Sea Map"/>
    <!-- A first level in the left side menu is needed
         before using action= attribute -->
     <menuitem id="sea_menu" name="Sea Map" parent="main_sea_menu"/>
    <!--the following menuitem should appear *after*
         its parent openacademy_menu and *after* its
         action course_list_action -->
   <!--<menuitem id="maps_menu" name="Sea Map" parent="sea_menu" action="sea_list_action"/>
     Full id location:
         action="openacademy.course_list_action" It is not required when it is the same module -->
  <!-- -<menuitem id="configuration_menu" name="Configuraiton"  action="configuration_list_action"/>
<record model="ir.actions.act_window" id="action_sea_map">
    <field name="name">Ideas</field>
    <field name="res_model">idea.idea</field>
    <field name="view_mode">tree,form</field> -->

<template>
 <html>
    <head>
        <script type="text/javascript" src="static/src/sea.js"/>

    </head>
</html>

</template>        

</data>
</openerp>

请指导该模块正确安装,但不显示父项中的数据和菜单项

由于

0 个答案:

没有答案