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 taberna
    • 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
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • 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

Problem with wizard on tree view on odoo10.

Suscribirse

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

Se marcó esta pregunta
wizardviewsmodulesodoo10
2 Respuestas
6044 Vistas
Avatar
wizardz

hi,

I want to open a wizard, a new form when I click on this button in my purchase.order tree view:


  My Code looks like this: 

<button name="this_test" string="test Button" type="object"/> 


<record id="purchase_order_addon_form" model="ir.ui.view"> <field name="name">purchase.order.addon.form</field> <field name="model">purchase.order</field>  <field name="arch" type="xml"> <form string="testing"> <sheet> <div class="oe_title"> <h1> <!--<field name="name" readonly="1"/>--> </h1> </div>  </sheet>

</form> </field> </record>

@api.multi def this_test(self): view_id = self.env.ref('my_module.purchase_order_addon_form').id context = self._context.copy() return { 'name':'test123', 'view_type':'form', 'view_mode':'form', 'views' : [(view_id,'form')], 'res_model':'purchase.order', 'view_id':view_id, 'type':'ir.actions.act_window', 'res_id':self.id, 'target':'new', 'context':context, }

Now when I click the button, the wizard popups with my designed xml view.

My problem is, when I click not on the button, but on the record, the same view is called, and I don't understand why...

Do I need a new model for that, or is that another way to handle this issue?


Thank you

0
Avatar
Descartar
Avatar
Sudhir Arya (ERP Harbor Consulting Services)
Mejor respuesta

You just need to change the "priority" of your custom form view.

EX:

<record id="test_id" model="ir.ui.view">
<field name="model">my.test.model</field>
<field name="name">test.form</field>
<field name="priority">100</field>
</record>

It is a priority for the views. Lower the number means higher the priority (priority 1 is higher than priority 10).

If there action is not bind to any view(s), system will automatically bind the views that has high priority.

Hope this will help you.

Sudhir Arya
ERP Harbor Consulting Services
skype: 
sudhir@erpharbor.com  website: http://www.erpharbor.com
5
Avatar
Descartar
wizardz
Autor

thank you, I have fixed the issue with this: <field name="priority">100</field>

what is the meaning of priority in the views?

Sudhir Arya (ERP Harbor Consulting Services)

It is a priority for the views. Lower the number means higher the priority (priority 1 is higher than priority 10).

If there action is not bind to any view(s), system will automatically bind the views that has high priority.

Please accept the answer if it has solved your issue so that others can take it's reference.

Sudhir Arya (ERP Harbor Consulting Services)

It is a priority for the views. Lower the number means higher the priority (priority 1 is higher than priority 10).

If there action is not bind to any view(s), system will automatically bind the views that has high priority.

Avatar
Hilar Andikkadavath
Mejor respuesta

Try to bind your action with the form view like this.

<record id="ir_action_window_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_window_action_form"/>
<field name="act_window_id" ref="ir_action_window"/>
</record>

Here replace the act_window_id with your action and view_id with your custom model. If this donts works then kindly comment your queries here.

2
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
Update Wizard without closing it after button click
wizard odoo10
Avatar
0
oct 23
2520
odoo 10 : form for picking with only one field
views odoo10
Avatar
Avatar
Avatar
2
dic 19
3802
How to hide fields in the create and edit popup view?
views odoo10
Avatar
0
nov 18
3939
How to save the values of fields ?
wizard odoo10
Avatar
Avatar
Avatar
4
oct 18
9364
Is it possible to create a new record with wizard? Resuelto
wizard odoo10
Avatar
Avatar
Avatar
3
jun 18
7698
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