Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

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

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
2 Antwoorden
175 Weergaven
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
Annuleer
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
Beste antwoord

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
Annuleer
Avatar
Piyush H
Beste antwoord

Check this video: 


0
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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