Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

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

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
2 Risposte
86 Visualizzazioni
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
Abbandona
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
Risposta migliore

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
Abbandona
Avatar
Piyush H
Risposta migliore

Check this video: 


0
Avatar
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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