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

How do I limit the number of results in a tree view?

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
developmenttreeviewlimit
5 Antwoorden
46411 Weergaven
Avatar
Alex Malone

Hi folks,

So, within a form view I have an embedded tree view (one2many field). This embedded view, by default, shows 80 results before it starts paging. As this is an embedded view, the number of results is simply too much to be useful. Ideally, I want to limit the number of results to 10.

Now, I have found how to change the number of results system wide but that is not what I want. I only want to change the number of results on this one single view whilst leaving the other views unaffected. Is this functionality possible? If it is not possible out of the box, has anyone written any code to update the web client to make it possible?

Code in question:

<field name="activitylog" colspan="3" nolabel="1" >
      <tree string="Activity Log Entries">
            <field name="entry_date" />
            <field name="activity_type" />
            <field name="name" />
            <field name="state" />
            <field name="contact_id" />
            <field name="user_id" />
            <button type="object" string="Open Activity" name="button_view_activity" icon="gtk-open" />
       </tree>
</field>

I want that tree view to be limited by results. Many thanks

2
Avatar
Annuleer
Praveen Upadhyaya

can you please tell me how you fetch all the 80 records in the tree view..............?

Praveen Upadhyaya

please help me

Xsias

Similar ask here.

Alan Luo

if changed \addons\web\static\src\js\view_list.js, like add 'limit': 18, on odoo 8.0, the all tree views will change to limited number of 18, even you've setup limited number on action view.

I would ask question again: I only want to change the number of results on this one single view whilst leaving the other views unaffected. Is this functionality possible?

Omar OUHARI

Hello,

I have the same issu. did you find a solution.

Thanks to informe me if is there any solution.

Regards.

Avatar
Ghanshyam Prajapati
Beste antwoord

Hi Alex, Try

<field name="limit">150</field>

in your action (XML file).

Try Following,

for example,

<record id="action_your_object_form" model="ir.actions.act_window">
    <field name="name">Your Object Name</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">your.object</field>
    <field name="view_type">form</field>
    <field name="limit">150</field>
    <field name="view_mode">tree,form</field>
</record>

Hope this work for you.

3
Avatar
Annuleer
Alex Malone
Auteur

Thanks for the quick response but I don't think this will work. Like I said in the original question, the tree view in question is embedded, meaning that it is a one2many field within a form and the tree view for that one2many field is defined inline.

Ghanshyam Prajapati

Go to Settings / Customization / Low Level Objects / Window Actions Select the action you want to change, edit and change the field Limit, for the number of record you want to display.

Alex Malone
Auteur

I've updated the original question to show the code in question. Again, the emphasis here is that this is an embedded tree view, meaning there are no defined actions for it so there is nothing for me to edit.

Ghanshyam Prajapati

If you are using OpenERP v7, then GO to Settings / Technical / Windows Actions. Select the action you want to change, edit and change the field Limit, for the number of record you want to display.

Alex Malone
Auteur

I am using v7. However, like I've said, there is no action defined for this view! Therefore there is nothing to edit in the settings area. As a test, I edited all window actions where the destination model matched what I wanted, but it didn't change anything. I will keep searching for a proper code solution but I expect I am going to have to hack the web client so that it accepts an additional arguement on one2many fields that sets the limit.

Avatar
Hardik Shah
Beste antwoord

Refer the link bugs.launchpad.net/openerp-web/+bug/1310486

I have provided a view_form.js patch.

you can add list_options = '{"limit":10}' as O2M field attribute.

1
Avatar
Annuleer
Avatar
kaynis
Beste antwoord

A quick fix which shows only 10 items at a time on sales order. Go to settings-->customization-->window actions--> look for the sales order window action and edit/change the Limit from 80 to 10 or to any number you wish to reduce the number of items displayed at a time to. You may have to add this number of items in the .js (C:\Program Files (x86)\OpenERP 6.1-1\server\openerp\addons\web\static\src\js open view_list.js and add to the list bwt line 273 and 278) file of web module as well. That is what I have done to reduce the number of items displayed in tree view of Sales Order. This does not however stop you from creating more that 10 items which i think is what you want. If you locate the window action of module of interest you can apply this same process to it.

1
Avatar
Annuleer
Avatar
Muhammad Ihza Putra Handayani
Beste antwoord

hi alex, simply add in your tag tree limit="your desire number"
in your case, will be



0
Avatar
Annuleer
Avatar
Ritesh Bambhaniya
Beste antwoord
limit = "5" default_order="entry_date"


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
Gerelateerde posts Antwoorden Weergaven Activiteit
Decoration on grouped treeview?
development treeview listview support
Avatar
Avatar
1
aug. 25
2561
How to get the value from a tree view? Odoo 14
development treeview helpme v14
Avatar
Avatar
Avatar
2
apr. 22
3336
How to set the number of records on a tree view inside a form ? Opgelost
treeview form listview limit
Avatar
Avatar
Avatar
2
jan. 24
15941
How to make all branches for user active automatically after login his account?
development
Avatar
Avatar
Avatar
3
nov. 25
335
MrpBom _skip_bom_line skips line of product that has two multi-choice attribute values when both are selected in Apply to variant
development
Avatar
Avatar
1
nov. 25
286
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