Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Adding group by field to res.partner form in v7?

Odoberať

Get notified when there's activity on this post

This question has been flagged
partnerfieldgroup_by
1 Odpoveď
11009 Zobrazenia
Avatar
Sean Samborski

I'm trying to follow the instructions here however I think perhaps it's a different version. Using v7, I need to create some fields on the res.partner form and use them in the group by menu.

Already I have <?xml version="1.0"?><field name="ref" position="after"> <field name="x_user.id"> </field></field> which works just fine by itself, but adding the group by instructions on the linked question does not work.

So how do I add a group by to the code I have?

EDIT: So I've tried copying some of the existing views but I keep getting an error. Since the field I'm adding to the group by is essentially a copy of the Salesperson (user_id) field, I copied that view (res.partner.select) and saved it as res.partner.select2. Now I inherit the original res.partner.select and added:

<?xml version="1.0"?>
<search string="Search Partner">
                   <group expand="0" string="Group By...">
                       <filter string="Outside Salesperson" icon="terp-personal" domain="[]" context="{'group_by' : 'x_user_id'}"/>
                   </group>
               </search>

This apparently works to add the "Outside Salesperson" to the group by filter. However, when I try to acutally use that, I get an error:

Traceback (most recent call last):
File "/home/odoo/src/web/saas-2/addons/web/http.py", line 325, in dispatch response["result"] = self._call_function(*self.params)
File "/home/odoo/src/web/saas-2/addons/web/http.py", line 174, in _call_function return self.func(
args, *kwargs) File "/home/odoo/src/web/saas-2/addons/web/http.py", line 1060, in nfunc return checked_call(request.db, *args, *kwargs) File "/home/odoo/src/server/saas-2/openerp/service/model.py", line 111, in wrapper return f(dbname, args, *kwargs) File "/home/odoo/src/web/saas-2/addons/web/http.py", line 1052, in checked_call return func(a, *kw) File "/home/odoo/src/web/saas-2/addons/web/controllers/main.py", line 1098, in call_kw return self._call_kw(model, method, args, kwargs) File "/home/odoo/src/web/saas-2/addons/web/controllers/main.py", line 1090, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, args, *kwargs) File "/home/odoo/src/server/saas-2/openerp/osv/orm.py", line 2662, in read_group assert groupby_def and groupby_def._classic_write, "Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True" AssertionError: Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True

Even when I edit the original res.partner.select do I get the same error. As in:

<?xml version="1.0"?>
<search string="Search Partner">
                   <field name="name" filter_domain="['|','|',('display_name','ilike',self),('ref','=',self),('email','ilike',self)]"/>
                   <filter help="My Partners" icon="terp-personal+" domain="[('user_id','=',uid)]"/>
                   <separator/>
                   <filter string="Persons" name="type_person" domain="[('is_company','=',0)]"/>
                   <filter string="Companies" name="type_company" domain="[('is_company','=',1)]"/>
                   <separator/>
                   <filter string="Customers" name="customer" domain="[('customer','=',1)]" help="Customer Partners"/>
                   <filter string="Suppliers" name="supplier" domain="[('supplier','=',1)]" help="Supplier Partners"/>
                   <separator/>
                   <field name="category_id" string="Tag" filter_domain="[('category_id','ilike', self)]"/>
                   <field name="user_id"/>
                   <field name="parent_id" domain="[('is_company','=',1)]" filter_domain="[('parent_id','child_of',[self])]"/>
                   <group expand="0" string="Group By...">
                       <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by' : 'user_id'}”/>
                       <filter string=“Outside Salesperson" icon="terp-personal" domain="[]" context="{'group_by' : ‘x_user_id'}"/>
                       <filter string="Company" context="{'group_by': 'parent_id'}"/>
                       <filter string="Country" context="{'group_by': 'country_id'}"/>
                   </group>
               </search>
0
Avatar
Zrušiť
Avatar
Ashif Abdulrahman
Best Answer

first create a category like

<record model="ir.module.category" id="module_category_name">
            <field name="name">Category Name</field>
            <field name="sequence">6</field>
         </record>

then add a group to that category

<record model="res.groups" id="group_name_id">
        <field name="name">Group Nmae</field>
        <field name="category_id" ref="module_category_name"/>
     </record>
0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
Do you know if the field employee of res.partner is used somewhere? Solved
partner field employee boolean
Avatar
Avatar
Avatar
3
dec 22
7884
Get same value as issued_total from res.partner for custom computed field
partner field compute computed
Avatar
0
dec 16
4316
Project module or fields
field
Avatar
0
feb 25
2140
extra checkout step
field
Avatar
0
jan 25
1858
Field service upgrade Solved
field
Avatar
Avatar
1
dec 24
2349
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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