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

problem on hiding page on odoo 11

Suscribirse

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

Se marcó esta pregunta
invisiblepageodoo11
3 Respuestas
5091 Vistas
Avatar
Tiến Paul

I know that on v10 and v11 cannot use string as an identifier string for xpath, in "purchase.order form" there are 2 pages of Product and Deliveries & Invoices. I tried page [2] but didn't work, currently I leave the page [2] / group, then the page groups are gone. So what is the new method to hide the page? thanks for all sharing

1
Avatar
Descartar
Avatar
Yenthe Van Ginneken (Mainframe Monkey)
Mejor respuesta

HI Vu,

You can hide/remove a page by calling it by the name:

<xpath expr="//page[name='the_page_name']" position="inside">
    <!-- Your code here to add custom logic -->
</xpath>


<!-- Or to remove the page -->
<xpath expr="//page[name='the_page_name']" position="replace"/>

If your page has no name set your only option is to use xpath expressions with an index (so page[2]). Don't forget that xpath expressions start counting from 0 and not 1:

<xpath expr="//page[2]" position="inside">
    <!-- Your code here to add custom logic -->
</xpath>


<!-- Or to remove the page -->
<xpath expr="//page[2]" position="replace"/>

You can find quite some xpath expressions that look much like what you need in the code. Have a look at https://github.com/odoo/odoo/search?l=XML&q=%3Cxpath+expr%3D%2F%2Fpage for quite some examples.

Regards,
Yenthe

3
Avatar
Descartar
Tiến Paul
Autor

Hi, Yenthe,

The form has 2 pages. As mentioned above, when page [1], the page product is hidden, ie the index starts from 1, but [2] cannot, ?? - inside does not work, unfortunately because there is no "name". I also tried xpath on "name" for page [2] and then made it hidden by page [name = 'the_page_name'] but failed. I don't understand what this page is special about. although it does not inherit from any other form

Avatar
Jainesh Shah(Aktiv Software)
Mejor respuesta

Hello @Vu,

As you know  that on v10 and v11 cannot use string as an identifier string for x-path,


Thanks for the answer @yenthe and it works in common views

But In this conditions, 

we have notebook  inside page and page inside addons have added another notebook and pages in purchase(Product page) view 

- so when we have tried using page[2] and other ways it's always taken the first page inside notebook pages


<record id="purchase_order_form_inherit" model="ir.ui.view">

            <field name="name">purchase.order.form</field>

            <field name="model">purchase.order</field>

            <field name="inherit_id" ref="purchase.purchase_order_form"/>

            <field name="arch" type="xml">

                <xpath expr="//sheet/notebook" position="attributes">

                    <attribute name="name">orderline_notebook</attribute>

                </xpath>

                <xpath expr="//sheet/notebook[@name='orderline_notebook']/page[2]" position="replace"/>

            </field>

    </record>

Regards,




Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

2
Avatar
Descartar
Tiến Paul
Autor

Hi, aktivsoftware Great, i have tried before: xpath name = "name" like yours and then continue inherit the custom form again. but failed, once again thanks for this solution.

Yenthe Van Ginneken (Mainframe Monkey)

Never noticed that, odd design decision :)

Tiến Paul
Autor

(y) I do not understand why I did not add the attribute name = "_ name_page" to some pages of the base, or it was a missing error,

¿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
Hiding a page depends on condition Resuelto
invisible page odoo8 Odoo8
Avatar
Avatar
Avatar
Avatar
3
feb 17
18330
create backorder odoo after validate purchase shipment ? Resuelto
odoo11
Avatar
Avatar
1
oct 25
11947
I can't create any sub-task
odoo11
Avatar
Avatar
Avatar
2
jul 24
3622
odoo 11 display calendar widget in website layout
odoo11
Avatar
Avatar
1
jun 24
5928
How to make a page invisible to a group?
xml invisible groups page v17
Avatar
0
abr 24
30
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