Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Auto-expand the Chart of Accounts? Possible?

Subscribe

Get notified when there's activity on this post

This question has been flagged
8 Replies
6953 Views
Avatar
Ray Carnes

The Chart of Accounts by default is shown collapsed:

image description

I'd like it shown fully expanded by default, instead of requiring the user to click on all of the expand arrows:

image description

3
Avatar
Discard
Avatar
Ray Carnes
Author Best Answer

UPDATED 5/26/15 (I added a git compatible patch for v8)

ORIGINAL ANSWER:

----------------------------------------------------------------------------------------------------------------

This is possible by adding several lines to the view_tree.js file in web addons.

Use the following bzr patch files:

v7

=== modified file 'addons/web/static/src/js/view_tree.js'
--- addons/web/static/src/js/view_tree.js 2013-08-29 12:44:48 +0000
+++ addons/web/static/src/js/view_tree.js 2014-03-23 20:10:31 +0000
@@ -210,6 +210,11 @@
} else {
self.$el.find('tbody').html(children_rows);
}
+ _(records).each(function (record) {
+ self.records[record.id] = record;
+ children_ids = record[self.children_field];
+ self.getdata(record.id, children_ids);
+ });
});
},

v8

=== modified file 'addons/web/static/src/js/view_tree.js'
--- addons/web/static/src/js/view_tree.js 2013-09-10 12:52:23 +0000
+++ addons/web/static/src/js/view_tree.js 2014-03-23 20:13:24 +0000
@@ -213,6 +213,11 @@
} else {
self.$el.find('tbody').html(children_rows);
}
+ _(records).each(function (record) {
+ self.records[record.id] = record;
+ children_ids = record[self.children_field];
+ self.getdata(record.id, children_ids);
+ });
});
},

----------------------------------------------------------------------------------------------------------------

UPDATE:

Use the following git patch file for v8:

index 380f160..0d8a05d 100644
--- a/addons/web/static/src/js/view_tree.js
+++ b/addons/web/static/src/js/view_tree.js
@@ -213,6 +213,11 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
} else {
self.$el.find('tbody').html(children_rows);
}
+ _(records).each(function (record) {
+ self.records[record.id] = record;
+ children_ids = record[self.children_field];
+ self.getdata(record.id, children_ids);
+ });
});
},

3
Avatar
Discard
Fabrice Henrion (fhe)

Great post Ray!

Temur

As I guess it'll affect any tree to be opened expanded, not only "Chart of Accounts" ? If so, then your question title does not exactly define what is this change for... please read my !Answer

Ray Carnes

I am now aware of any other views that are affected by this change, but this is a global change to the way certain types of views are shown.

Avatar
NextERP Romania SRL
Best Answer

There was for v7 a module named web_group_expand, but i don't know if it's ported to v8..you can look after it.

1
Avatar
Discard
Temur

I've found that module in v7. it's not exactly what I'm looking for, but it may be useful and I'll check if so. thank you very much.

Avatar
Serpent Consulting Services Pvt. Ltd.
Best Answer

Guys,

We've added groupby expand feature on Odoo Apps Web Groupby Expand.

Hope this helps.

Thanks.

0
Avatar
Discard
jignesh Bharadiya

It is not working in Odoo v11.

Avatar
Temur
Best Answer

Hi Ray, 

As I guess code you posted in your answer will affect any tree like structure to be opened expanded, not only "Chart of Accounts" ? If so, then your question title does not exactly define what is this change for. However It should be interesting how to do same thing really for "Chart of Accounts", not for any tree (I do not want to affect other trees). Additionally I've requirement to expand Chart of Accounts to some level (lets say 1 or 2), not Fully as it's in your case. If I expand to level 1, so on second picture in the question above, account "1" will be displayed expanded and accounts "100" and "150" collapsed. If I decide to expand to level 2, then picture in this example will be same, but if the tree has more deep, so next levels will be collapsed. i.e. if in this picture account "1399" will be of "view" type and have children, then it'll displayed collapsed and so on.  Any tips?

Regards,

-1
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

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

Sign up
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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