Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • e-learning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Conocimientos
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Cervecería
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y soporte técnico
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Explorar todos los sectores
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Servicios para partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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

Name Error : Name 'time' is not defined

Suscribirse

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

Se marcó esta pregunta
errorv7namerror
12 Respuestas
48414 Vistas
Avatar
GuruDev

Hello all, I am getting an error while refreshing the page in V7

server/openerp/addons/base/ir/ir_ui_menu.py", line 336, in get_needaction_data dom = menu.action.domain and eval(menu.action.domain, {'uid': uid}) or []

erver/openerp/tools/safe_eval.py", line 241, in safe_eval return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict) File "", line 1, in <module> NameError: name 'time' is not defined

What may be the issue? Please help..

1
Avatar
Descartar
Avatar
Lucio
Mejor respuesta

Hi,

It seems that's a known bug: https://code.launchpad.net/~openerp-dev/openobject-server/7.0-opw-603382-ado 

I went through the the fix proposed and tested it and, at a first glance, it works!


Hope this helps!

0
Avatar
Descartar
Avatar
Francesco OpenCode
Mejor respuesta

Add this line at top of your code, with the other import lines:

import time

0
Avatar
Descartar
GuruDev
Autor

Dear Francesco and Keyur,Thank you for the reply, I tried this one, but my case is different. I am getting this error for Admin users only. All other users get expected result.

I was trying to create new Groups via GUI and to give acces rights in the Menus.

Avatar
Keyur
Mejor respuesta

Hi GuruDev,

Maybe you have not imported time library in your py file. That's why it is giving error of time.

Hope it will work after importing time in py file.

0
Avatar
Descartar
GuruDev
Autor

Thanks for the reply, Keyur..

I should import it in the ir_ui_menu.py file? How to import? in the .py file.. import time is it ok?

Keyur

Have you created your custom module? Have you created any menu or apply domain on any action? I think the error comes because of the domain in action.

GuruDev
Autor

I didint create any module. But I duplicated some groups and made some modification in acces. And also, I didnt add any domain.

Keyur

Basic addons are not error prone. Maybe there can be other reason. You should try different database maybe then it will work properly.

GuruDev
Autor

Dear Keyur, I was creating a new user group for Approvals. I've added a new Menu item into the Existing Accounting-Menu and gave acces rights for this newly created user group. That menu item contains...an action---Purchase Orders Waiting for Approval.

This was the only change that I made.

Keyur

Can you please paste your action code here? I will try it in my custom module. Then I can figure out what exactly the problem is.

Krishna

hello Keyur...I need your help..i am adding domain in action the its giving error of time is not defined..I have defined import time in .py file..but of no use..Please help

Avatar
Krishna
Mejor respuesta
 <record id="action_view_task" model="ir.actions.act_window">
            <field name="name">Tasks</field>
            <field name="res_model">project.task</field>
            <field name="view_mode">kanban,tree,form,calendar,gantt,graph</field>
            <field name="domain">[('date','=',time.strftime('%Y-%m-%d')),('user_id','=',uid)]</field>
            <field name="filter" eval="True"/>
            <field name="search_view_id" ref="view_task_search_form"/>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to create a new task.
              </p><p>
                OpenERP's project management allows you to manage the pipeline
                of tasks in order to get things done efficiently. You can
                track progress, discuss on tasks, attach documents, etc.
              </p>
            </field>
        </record>

This is my action code.

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

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

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Error occurred while validating the field(s) arch: Invalid XML for View Architecture!
error v7
Avatar
Avatar
Avatar
3
mar 15
9819
What is "ValueError: No such external ID currently defined in the system: note.note_stage_01"?
error v7
Avatar
0
mar 15
4442
Broken Pipe error when trying to view module's description
error v7
Avatar
0
mar 15
8798
TypeError: ClientWidget is null - bug ?
error v7
Avatar
Avatar
2
mar 15
8132
Messaging Archives Warning: Access Denied
error v7 massaging
Avatar
Avatar
Avatar
Avatar
Avatar
9
abr 19
11609
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 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