Ir al contenido
Odoo Menú
  • Inicia 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 propiedades
    • 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
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

launch wizard in python

Suscribirse

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

Se marcó esta pregunta
6 Respuestas
16002 Vistas
Avatar
Voathnak Lim

I have a requirement, to launch a wizard in my python. could anyone help me please!

here is my view:

        <record id="my_config_view_form" model="ir.ui.view">
            <field name="name">my.item.config.view</field>
            <field name="model">my.model.config</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="base.res_config_view_base"/>
                <field name="arch" type="xml">

                    <group string="res_config_contents" position="replace">
                        <label colspan="4" align="0.0" string="
                            Configure this item by defining its field"/>
                        <field name="my_field"/>
                    </group>
                    <xpath expr="//button[@name='action_skip']"  position="attributes">
                        <attribute name="string">Proceed</attribute>
                        <attribute name="class">oe_highlight</attribute>
                    </xpath>
                    <xpath expr="//button[@name='action_next']" position="attributes">
                        <attribute name="string">Ok</attribute>
                        <attribute name="class">none</attribute>
                    </xpath>
                </field>
        </record>

        <record id="my_config_window" model="ir.actions.act_window">
            <field name="name">My config window</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">my.model.config</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="my_config_view_form"/>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>

        <record id="my_config_step" model="ir.actions.todo">
            <field name="action_id" ref="my_config_window"/>
        </record>

I wrote this code but the wizard is not not showing:

def onchange_test_wizard(self, cr, uid, ids, context=None):


        return {
            'name': 'test',
            'view_type': 'form',
            'view_mode': 'form',
            'view_id': 'my_config_view_form',
            'res_model': 'my.model.config',
            'domain': [],
            'context': context,
            'type': 'ir.actions.act_window',
            'target': 'new',
        }
1
Avatar
Descartar
saad

Same question: "http://help.openerp.com/question/9406/run-a-wizard-from-python-code-or-as-a-return-of-a-function/"

Voathnak Lim
Autor

could anyone write a python code to launch this wizard? Please!

Cyril Gaspard (GEM)

Hi, you cannot return an action or view or wizard in an onchange function. You can find example of return view in python in account/account.py with function "execute" or "fiedls_view_get", but are used to override an existant function. Bye

Voathnak Lim
Autor

Hello, thank you for your answer. but what if I really want to return in in onchange function. how can i do?

Cyril Gaspard (GEM)

Hi, I repeat a second time, it is not possible to return a view in an onchange. Bye

Avatar
Nikunj Dhameliya
Mejor respuesta

Hi, 

First of all, you can not put your own model when inheriting view. So you have to put res.config in the model field and you can call wizard in button action.

Thanks

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

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

Registrarse
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 Svenska ภาษาไทย 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