Pular para o conteúdo
Odoo Menu
  • Entrar
  • Experimente grátis
  • Aplicativos
    Finanças
    • Financeiro
    • Faturamento
    • Despesas
    • Planilhas (BI)
    • Documentos
    • Assinar Documentos
    Vendas
    • CRM
    • Vendas
    • PDV Loja
    • PDV Restaurantes
    • Assinaturas
    • Locação
    Websites
    • Criador de Sites
    • e-Commerce
    • Blog
    • Fórum
    • Chat ao Vivo
    • e-Learning
    Cadeia de mantimentos
    • Inventário
    • Fabricação
    • PLM - Ciclo de Vida do Produto
    • Compras
    • Manutenção
    • Qualidade
    Recursos Humanos
    • Funcionários
    • Recrutamento
    • Folgas
    • Avaliações
    • Indicações
    • Frota
    Marketing
    • Redes Sociais
    • Marketing por E-mail
    • Marketing por SMS
    • Eventos
    • Automação de Marketing
    • Pesquisas
    Serviços
    • Projeto
    • Planilhas de Horas
    • Serviço de Campo
    • Central de Ajuda
    • Planejamento
    • Compromissos
    Produtividade
    • Mensagens
    • Aprovações
    • Internet das Coisas
    • VoIP
    • Conhecimento
    • WhatsApp
    Aplicativos de terceiros Odoo Studio Plataforma Odoo Cloud
  • Setores
    Varejo
    • Loja de livros
    • Loja de roupas
    • Loja de móveis
    • Mercearia
    • Loja de ferramentas
    • Loja de brinquedos
    Comida e hospitalidade
    • Bar e Pub
    • Restaurante
    • Fast Food
    • Hospedagem
    • Distribuidor de bebidas
    • Hotel
    Imóveis
    • Imobiliária
    • Escritório de arquitetura
    • Construção
    • Administração de propriedades
    • Jardinagem
    • Associação de proprietários de imóveis
    Consultoria
    • Escritório de Contabilidade
    • Parceiro Odoo
    • Agência de marketing
    • Escritório de advocacia
    • Aquisição de talentos
    • Auditoria e Certificação
    Fabricação
    • Têxtil
    • Metal
    • Móveis
    • Alimentação
    • Cervejaria
    • Presentes corporativos
    Saúde e Boa forma
    • Clube esportivo
    • Loja de óculos
    • Academia
    • Profissionais de bem-estar
    • Farmácia
    • Salão de cabeleireiro
    Comércio
    • Handyman
    • Hardware e Suporte de TI
    • Sistemas de energia solar
    • Sapataria
    • Serviços de limpeza
    • Serviços de climatização
    Outros
    • Organização sem fins lucrativos
    • Agência Ambiental
    • Aluguel de outdoors
    • Fotografia
    • Aluguel de bicicletas
    • Revendedor de software
    Navegar por todos os setores
  • Comunidade
    Aprenda
    • Tutoriais
    • Documentação
    • Certificações
    • Treinamento
    • Blog
    • Podcast
    Empodere a Educação
    • Programa de educação
    • Scale Up! Jogo de Negócios
    • Visite a Odoo
    Obtenha o Software
    • Baixar
    • Comparar edições
    • Releases
    Colaborar
    • Github
    • Fórum
    • Eventos
    • Traduções
    • Torne-se um parceiro
    • Serviços para parceiros
    • Cadastre seu escritório contábil
    Obtenha os serviços
    • Encontre um parceiro
    • Encontre um Contador
    • Conheça um consultor
    • Serviços de Implementação
    • Referências de Clientes
    • Suporte
    • Upgrades
    Github YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Faça uma demonstração
  • Preços
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Financeiro
  • Inventário
  • PoS
  • Projeto
  • MRP
All apps
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
Ajuda

problem on hiding page on odoo 11

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
invisiblepageodoo11
3 Respostas
5094 Visualizações
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
Cancelar
Avatar
Yenthe Van Ginneken (Mainframe Monkey)
Melhor resposta

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
Cancelar
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)
Melhor resposta

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
Cancelar
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,

Está gostando da discussão? Não fique apenas lendo, participe!

Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!

Inscreva-se
Publicações relacionadas Respostas Visualizações Atividade
Hiding a page depends on condition Resolvido
invisible page odoo8 Odoo8
Avatar
Avatar
Avatar
Avatar
3
fev. 17
18332
create backorder odoo after validate purchase shipment ? Resolvido
odoo11
Avatar
Avatar
1
out. 25
11949
I can't create any sub-task
odoo11
Avatar
Avatar
Avatar
2
jul. 24
3623
odoo 11 display calendar widget in website layout
odoo11
Avatar
Avatar
1
jun. 24
5931
How to make a page invisible to a group?
xml invisible groups page v17
Avatar
0
abr. 24
30
Comunidade
  • Tutoriais
  • Documentação
  • Fórum
Open Source
  • Baixar
  • Github
  • Runbot
  • Traduções
Serviços
  • Odoo.sh Hosting
  • Suporte
  • Upgrade
  • Desenvolvimentos personalizados
  • Educação
  • Encontre um Contador
  • Encontre um parceiro
  • Torne-se um parceiro
Sobre nós
  • Nossa empresa
  • Ativos da marca
  • Contato
  • Empregos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidade
  • Segurança
الْعَرَبيّة 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 é um conjunto de aplicativos de negócios em código aberto que cobre todas as necessidades de sua empresa: CRM, comércio eletrônico, contabilidade, estoque, ponto de venda, gerenciamento de projetos, etc.

A proposta de valor exclusiva Odoo é ser, ao mesmo tempo, muito fácil de usar e totalmente integrado.

Site feito com

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