Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

122
Visualizações
Get the search filter used in list view to context Odoo

I have a list view like any other: enter image description here

now when i click on "imprimer" button i'll have a wizard pop up ,i want to pass the search value as a context ,for example here : partenaire have "Woo" in it and i have no idea how to access to it ,i don't mind if it's with JS

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I found a solution with JS : in the button function :

action_def: function (e) {
        
           var self = this;
           var active_id = this.model.get(this.handle).getContext()['active_ids'];
           var model_name = this.model.get(this.handle).getContext()['active_model'];
           var context = this.model.get(this.handle).getContext()

           var datas = self.model.localData
           var domain ;
           for (const [key, value] of Object.entries(datas)) {
              domain = value.domain;
              break;
            };

            self.do_action({
                type: 'ir.actions.act_window',
                res_model: 'imprimer.rapport',
                view_mode: 'form',
                view_type: 'form',
                view_id: 'imprimer_livre_tiers_view',
                views: [[false, 'form']],
                target: 'new',
                context:{"default_domain_record": domain},
               
            });
                 


          },
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda