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

editable="bottom" with report

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
report
1 Responder
1828 Visualizações
Avatar
David RIzo

Greetings, I am making a report about the products that a team needs to maintain. I add these products through an editable="bottom"

I need the option to mark the products when making the report and print those that I mark.

my code:

string="Products" editable="bottom">
name="product_id"/>
name="product_qty"/>
name="product_uom"/>
name="price_unit"/>
name="amount" sum="Total"/>
name="date"/>
name="delivery_status" sum="Total"/>


0
Avatar
Cancelar
Avatar
Savya Sachin
Melhor resposta

Hi,

For this you can add a Boolean field to the product model that will be used to mark the products, let's call this field to_be_printed.

When generating the report, filter the products based on the to_be_printed field. You can use Odoo's domain notation to filter the products that are marked to be printed. When printing the report, only the products that are marked to be printed will be printed.

<tree>


    <field name="product_id"/>


    <field name="product_qty"/>


    <field name="product_uom"/>


    <field name="price_unit"/>


    <field name="amount" sum="Total"/>


    <field name="date"/>


    <field name="delivery_status" sum="Total"/>


    <field name="to_be_printed" widget="boolean_toggle"/>


</tree>




<report ...>


    ...


    <xpath expr="//button[@name='print_report']" position="before">


        <button name="action_mark_to_be_printed" string="Mark to be Printed"/>


    </xpath>


    ...


</report>




we have added a Boolean field to the report's tree view that corresponds to the to_be_printed field in the product model. We have also added a button to the report's action menu that triggers an action to mark the products as to be printed. When the button is clicked, it triggers the action_mark_to_be_printed method that sets the to_be_printed field of the selected products to True. You can use Odoo's recordset API to update the products.

def action_mark_to_be_printed(self):
self.write({'to_be_printed': True})
return {'type': 'ir.actions.do_nothing'}

Finally, when generating the report, filter the products based on the to_be_printed field using Odoo's domain notation.

<record id="report_products_to_be_printed" model="ir.actions.report">


    <field name="name">Products To Be Printed</field>


    <field name="model">my_module.product</field>


    <field name="report_type">qweb-pdf</field>


    <field name="report_name">my_module.products_to_be_printed</field>


    <field name="print_report_name">Products To Be Printed</field>


    <field name="multi">True</field>


    <field name="paperformat_id" ref="report.paperformat_a4"/>


    <field name="context">{'active_test': False, 'to_be_printed': True}</field>


</record>




we have added a context to the report's action that filters the products based on the to_be_printed field. When the report is generated, only the products that are marked to be printed will be printed.


Regards

4
Avatar
Cancelar
Odoo

monitor: {}_james

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
Report with a different footer in the first page. How to do it?
report
Avatar
Avatar
2
nov. 25
374
How to make snaking column layout for report ?
report
Avatar
0
out. 24
2558
Report between 2 accounts
report
Avatar
0
ago. 24
2262
agregar un campo a etiqueta de producto.
report
Avatar
0
jan. 24
2597
Recent activity report
report
Avatar
Avatar
1
nov. 23
2467
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