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

created a custom field named x_brand on the Product form (product.template) using Studio / custom module. Now I want to use this field in Sales → Reporting → Group By

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
2 Respostas
87 Visualizações
Avatar
Rafeeda

Created a custom field named x_brand on the Product form (product.template). I would like to include this field in the Sales → Reporting → Group By options

0
Avatar
Cancelar
OdooBot
Showing this error:
RPC_ERROR

Odoo Server Error

Occured on localhost:8069 on model sale.report on 2025-11-11 10:20:41 GMT

Traceback (most recent call last):
  File "C:\Project\odoo-18.0\odoo\http.py", line 2123, in _transactioning
    return service_model.retrying(func, env=self.env)
  File "C:\Project\odoo-18.0\odoo\service\model.py", line 156, in retrying
    result = func()
  File "C:\Project\odoo-18.0\odoo\http.py", line 2090, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "C:\Project\odoo-18.0\odoo\http.py", line 2338, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "C:\Project\odoo-18.0\odoo\addons\base\models\ir_http.py", line 333, in _dispatch
    result = endpoint(**request.params)
  File "C:\Project\odoo-18.0\odoo\http.py", line 754, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "c:\project\odoo-18.0\addons\web\controllers\dataset.py", line 36, in call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "C:\Project\odoo-18.0\odoo\api.py", line 535, in call_kw
    result = getattr(recs, name)(*args, **kwargs)
  File "c:\project\odoo-18.0\addons\web\models\models.py", line 246, in web_read_group
    groups = self._web_read_group(domain, fields, groupby, limit, offset, orderby, lazy)
  File "c:\project\odoo-18.0\addons\web\models\models.py", line 272, in _web_read_group
    groups = self.read_group(domain, fields, groupby, offset=offset, limit=limit,
  File "C:\Project\odoo-18.0\odoo\models.py", line 2887, in read_group
    rows = self._read_group(domain, annotated_groupby.values(), annotated_aggregates.values(), offset=offset, limit=limit, order=orderby)
  File "C:\Project\odoo-18.0\odoo\models.py", line 2021, in _read_group
    row_values = self.env.execute_query(query.select(*[groupby_terms[spec] for spec in groupby], *select_terms))
  File "C:\Project\odoo-18.0\odoo\api.py", line 993, in execute_query
    self.cr.execute(query)
  File "C:\Project\odoo-18.0\odoo\sql_db.py", line 357, in execute
    res = self._obj.execute(query, params)
psycopg2.errors.UndefinedColumn: column sale_report.x_studio_brand_1 does not exist
LINE 1: SELECT "sale_report"."x_studio_brand_1", COUNT(*), COUNT(DIS...
               ^


The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (http://localhost:8069/web/assets/afab0df/web.assets_web.min.js:3148:163)
        at XMLHttpRequest.<anonymous> (http://localhost:8069/web/assets/afab0df/web.assets_web.min.js:3153:13)

On Tue, Nov 11, 2025 at 3:13 PM Piyush H <notifications@mail.odoo.com> wrote:
A new answer on created a custom field named x_brand on the Product form (product.template) using Studio / custom module. Now I want to use this field in Sales → Reporting → Group By [...] ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​

A new answer on created a custom field named x_brand on the Product form (product.template) using Studio / custom module. Now I want to use this field in Sales → Reporting → Group By has been posted. Click here to access the post :

See post

--

--
Piyush

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Melhor resposta

Hi,


To include your custom x_brand field from product.template in the Sales Reporting "Group By" options, create a custom Odoo module and inherit the sale.report model. Add x_brand as a related field, linking it to the original field on product.template using the correct data model path.


from odoo import models, fields


class SaleReport(models.Model):

    _inherit = 'sale.report'


    x_brand = fields.Many2one(

        'product.template',

        string='Brand',

        readonly=True,

        related='product_id.product_tmpl_id.x_brand'

    )



Next, inherit the sale.sale_report_search_view and add a <filter> element to the search view, enabling grouping by x_brand. Install your custom module and clear the Odoo cache to apply the changes. This makes the x_brand field available for grouping in the Sales Reporting view.


<odoo>

    <data>

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

            <field name="name">sale.report.search.view.inherit.x_brand</field>

            <field name="model">sale.report</field>

            <field name="inherit_id" ref="sale.sale_report_search_view"/>

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

                <xpath expr="//group/filter[last()]" position="after">

                    <filter string="Brand" name="brand" domain="[]" context="{'group_by': 'x_brand'}"/>

                </xpath>

            </field>

        </record>

    </data>

</odoo>


If you want to display the x_brand field directly in the Sales Report pivot view (not just as a grouping option), you'll need to inherit the sale.report.pivot view and add the field to the view's structure. This is less common, but included for completeness.


<odoo>

    <data>

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

            <field name="name">sale.report.pivot.view.inherit.x_brand</field>

            <field name="model">sale.report</field>

            <field name="inherit_id" ref="sale.sale_report_pivot"/>

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

                <xpath expr="//field[@name='product_id']" position="after">

                    <field name="x_brand"/>

                </xpath>

            </field>

        </record>

    </data>

</odoo>



Hope it helps

0
Avatar
Cancelar
Avatar
Piyush H
Melhor resposta

Check this video: 


0
Avatar
Cancelar
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
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