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

How to show form_view from a tree_view without pop-up

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
viewsone2many
5389 Visualizações
Avatar
Simone

I've this field (one2many) in a form:

<field name="utenzeEE_ids" context="{'default_id_immobile':active_id}"> 

<tree>
<field name="pod"/>
<field name="matricola"/>
<field name="tipo"/>
<field name="indirizzo"/>
<field name="sub"/>
<field name="dal"/>
<field name="al"/>
<field name="id_cig" widget="selection"/>
</tree>
<form>
<header></header>
<sheet>
<group>
<field name="pod"/>
<field name="matricola"/>
<field name="tipo"/>
<field name="indirizzo"/>
<field name="sub"/>
<field name="dal"/>
<field name="al"/>
<field name="id_cig" widget="many2one_list"/>
<field name="id_misuratore" widget="many2one_list"/>
<field name="id_immobile" widget="many2one_list"/>
<field name="attivitasvolte_ids" widget="one2many_list"/>
</group>
</sheet>
</form>
</field>

i've edit the tree and form view because i've to hide some field form the standard tree/form view of the module.

What i want is to open the form_view detail without pop-up in normal window.

I've read that this isn't possible, is it true?

Otherwise how can i add a button in the tree_view that call the correct form_view of the record i've clicked and how to disable the pop-up opening?

Or how would you do that?what is the right way?

0
Avatar
Cancelar
Simone
Autor

If ever someone will have the same problem, I solved it like this:

1 - I've add a button to the tree that open the form_view of the detail :

<button string="view" name="action_view_form_modelname" type="object" alt="Dettaglio" class="btn btn-small btn-primary" />

2 - then i've add the function with an action on the model detail that call the view to open :

@api.multi

def action_view_dettaglio_utenza_ee(self):

view = self.env.ref('utility_power.view_form_utenze_ee')

return {

'type' : 'ir.actions.act_window',

'view_type' : 'form',

'view_mode' : 'form',

'res_model' : 'utilitypower.utenze_ee',

'views': [(view.id,'form')],

'view_id':view.id ,

'res_id': self.id,

'context': self.env.context

}

You can see the full answer of my request on Stackoverflow by Anitha here :

https://stackoverflow.com/questions/57285140/odoo12-how-to-show-form-view-from-a-tree-view-without-pop-up/57285363?noredirect=1#comment101074384_57285363

3 - At this point i've half solution because on clicking on a record cell of the tree i still have the pop-up. I resolved this by adding a css class to the field :

<field name="utenzeEE_ids" context="{'default_id_immobile':active_id}" class="DisableTableRows">

After that i've add at the css style sheet the class with a change the pointer-events for the row and the button :

div.DisableTableRows { pointer-events: none;}

table.o_list_view tr.o_data_row td.o_list_button{ pointer-events: all;}

It seems to works

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
Many2many default behavior
views one2many v14
Avatar
Avatar
1
jul. 22
3197
Cannot modify one2many related field following passage V11 to V13
views one2many Odoo13
Avatar
1
dez. 20
277
How to return different one2many forms based on parent setting
views one2many v7
Avatar
Avatar
1
mar. 15
4999
how pass value to on2many field from parent form via context
one2many
Avatar
Avatar
1
jan. 25
2686
Select multiple elements with XPath Resolvido
views
Avatar
Avatar
Avatar
Avatar
Avatar
5
ago. 24
48185
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