Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

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

Naroči se

Get notified when there's activity on this post

This question has been flagged
2 Odgovori
170 Prikazi
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
Opusti
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
Best Answer

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
Opusti
Avatar
Piyush H
Best Answer

Check this video: 


0
Avatar
Opusti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

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