Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Menu Item not Appering and No Result of Code..

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
odooodooV8odoo8.0
1 Responder
5960 Vistas
Avatar
Mazhar Iqbal Rana

Hi There

Module is installed propey after writing the code in xml but menu item id not appearing above in parent..

_init__.opy

 

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"],
}

 

My sea.py file

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

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


File of 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>

 

And 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>

Plesae guide that module installs correctly but data as well as menu item in parent is not shown

 

Thanks

 

 

 

0
Avatar
Descartar
Mazhar Iqbal Rana
Autor

OK I doo @Vasanth PLease tell remaining code seems ok? Javascript path etc?

Mazhar Iqbal Rana
Autor

Andt his template will come within the record?

Avatar
Vasanth
Mejor respuesta

try this in instead of your menu item

        <menuitem name="Sea Map"   id="main_sea_menu" />
        <menuitem name="Sea Map1" parent="main_sea_menu"  id="sea_menu" />
        <menuitem name="Sea Map2" parent="sea_menu"  id="maps_menu" action="sea_list_action" />

 <record model="ir.actions.act_window" id="sea_list_action">
        <field name="name">Ideas</field>
        <field name="res_model">idea.idea</field>
        <field name="view_mode">tree,form</field>

</record>

2
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
odoo 8.0 opening balance doesn't appear in balance sheet and trail balance
odoo odooV8 odoo8.0
Avatar
Avatar
1
dic 24
4914
set default user Resuelto
odoo odooV8 odoo8.0
Avatar
Avatar
1
nov 16
10296
TRANSFER ODOO V8 DATABASE TO ANOTHER PC BUT CANT BOOT WINDOWS 7
odoo odooV8 odoo8.0
Avatar
Avatar
1
feb 16
4485
Keeping excel fonts Same? Odoo 8
odoo odooV8 odoo8.0
Avatar
0
mar 15
3876
Bold in List View for Many Records?
odoo odooV8 odoo8.0
Avatar
Avatar
1
mar 15
6404
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now