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

Odoo 8+: how to restart server when python has been changed?

Suscribirse

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

Se marcó esta pregunta
developmentrestartodoo8
2 Respuestas
18139 Vistas
Avatar
Kasper Souren

Python is a nice language. But it's annoying to have to restart the server for every little code change when developing. I've worked with Meteor which even reloads pages on the clients, that's really amazing, will take a long time before Odoo will get there. Now the first step to get a nicer dev experience would have some optional way to restart the server whenever a file has been updated.

Related questions:

From 2012: http://stackoverflow.com/questions/12597164/force-python-interpreter-to-reload-a-code-module

From 2013: https://www.odoo.com/forum/help-1/question/must-you-really-restart-openerp-all-the-time-to-develop-a-module-30394

Is there a good solution for Odoo 8 to restart the server when Python code in a module has been changed?

1
Avatar
Descartar
Madura

Restart the server.

Avatar
juan delgado
Mejor respuesta

hi friend you have a solution now, i have the same problem, my change not take a effect

0
Avatar
Descartar
Avatar
Temur
Mejor respuesta

Hi, 

 

I do not think that odoo should include automatic restarting, as it is NOT necessary on production server. instead you can adapt your development tools. How you'll make it, depends on your favorite development tool. If you're using some IDE, most probably there will be possibility to add a shortcut to the IDE for server restart, even make it automatically restarted upon file save... so take a closer look of your favorite development tool. You do not specified what tools you're using for editing code, but if you're using vim, there is how. else you can set up similar behavior in other tools that you're using.

For me restarting of openerp is just 2 keystrokes and I do not find it annoying. I hit F5 for restart it, then I hit Enter to return to editing in VIM. After F5 keystroke I can either wait 2 seconds if I want to see feedback of restart command (success/failure) or hit Enter immediately to continue editing. 

For have such a possibility in Vim, I've set shortcut for F5 key by adding following line to VIM's config file:

map  <F5>  :!  service openerp restart   <CR>

-where 'map' is VIM's command that adds mapping, '<F5>' - stands for F5 keystroke, ':!' - means "calling external command", 
'service openerp restart' - is an actual command that restarts openerp server from command-line. it may differ from OS to OS and from openerp version to version. for v8 it may be  'service odoo restart', for v7 it may same as above or 'service openerp-server restart' or something else. You can adapt this command according your environment and you've to check in command line if the command actually restarts openerp in your system before putting it in Vim's configfile. and finally <CR> at the end, stends for Enter keystroke (Carriage Return), it avoids necessity of hitting Enter for invoke restart command. You can even add another <CR> for second Enter keystroke, that'll return you to editing  without necessity to  hit Enter after F5, i.e. you'll restart openerp just in 1 keystroke (by pressing F5): 

map  <F5>  :!  service openerp restart   <CR> <CR>

- but in this case you'll miss posibility to get feedback of command, as sometimes restart fails, I prefer to have only one <CR> and hit Enter either in 2 seconds for waiting feedback from restart command or hit Enter imediately after F5 and continue editing, according my needs for the moment.

 

regards,

0
Avatar
Descartar
Temur

AFAIK it's not too complicated make some actions upon file save in Eclipse.
So IF you're using Eclipse you can accomplish exactly what you want quite easily, i.e. restart openerp on file save. You have to do just few steps for set up it as needed and then eclipse will restart openerp on every file save for you.

¿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
Can someone explain me the xpath? Resuelto
development module odoo8
Avatar
Avatar
2
oct 15
7477
Odoo OpenERP Server Error Traceback (most recent call last):
development installation database odoo8
Avatar
0
jun 16
11595
How to stop or restrict creating more than 2 users in odoo? Resuelto
development postgresql openerp odoo8
Avatar
Avatar
1
abr 15
6035
Sales Order not confirmed and Invoice not closed using paypal in odoo8
development paypal ecommerce odoo8
Avatar
0
mar 15
6877
Oddo Integration with Intune
development
Avatar
0
dic 25
1593
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.

Sitio web hecho con

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