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

How does specification of a XML View in v8 work?

Subscribe

Get notified when there's activity on this post

This question has been flagged
v8viewsxmlviewodoo
1 Reply
5190 Views
Avatar
Peter Nietz

I tried to reproduce this tutorial for my module with the same data structure:

specify_view_to_use_doc_v6  

Is this still the right way for Odoo V8 because only the view with priority 15 is shown in both menu entries?

Is there a difference if there is no form view but only a tree/list view?

THX.

0
Avatar
Discard
Peter Nietz
Author

The tutorial to specify the FORM view works so far for me, but if I change the view type to list instead of form only the view with the higher priority is shown. Is there a way to specify a list view, too?

Peter Nietz
Author

Did it! - Had to add my custom view_modes to VIEW_TYPES in: /openerp/addons/base/ir/ir_actions.py Then just I used my custom_type as view_mode for ir.actions.act_window.view and it works like perfect.

Avatar
John
Best Answer

To my knowledge, that is still applicable.  You did notice that the only difference in the two actions was specifying the view_id in the following line, correct?

   <field name="view_id" ref="client_form_view_1"/> 
1
Avatar
Discard
Peter Nietz
Author

and also in the "ir.ui.view" for the higher priority: field name="priority" eval="15"

John

Setting the eval to 15 makes client_form_view_2 a higher priority (the default view), but I thought you were saying that only the one with eval=15 was showing. Again, the only difference between the two actions are that client_form_action calls the default view and client_form_action1 specifies a view_id and that "overrides" the default view.

Peter Nietz
Author

ok for the form view it works without priority, but for list graph gantt kanban its not working at all... how is it possible to use the "REF" for lists or even better for customized lists derived from list of the web module.

John

Peter,

As far as I know, without using the "views" option in some python code, you can only specify a single view_id or set the priority like you did originally to get the views you want by default.

Look at the answer here for an example of how to specify the views for all view types using python code:
http://stackoverflow.com/questions/27441230/why-isnt-my-act-window-with-views-definition-and-using-act-window-view-equival

So, you could call an action that specifies some python code which returns the list, graph, gantt, kanban, etc. views specified with the 'views' dictionary key.

Hope that helps!

John

I also just came across this:

https://answers.launchpad.net/openobject-server/+question/197559

I've never done it, but please try it and let me know if it works for you!

Peter Nietz
Author

I also found the method with ir.actions.act_window.view and it all works with form,tree,kanban,graph but if I add list or custom_list to view_mode it tells me: ParseError: "Wrong value for ir.actions.act_window.view.view_mode: 'custom_list'" but in the normal ir.actions.act_window the view_mode custom_list works fine but not with a ref to a view_id.

OdooBot
Peter,

I'm sorry, but I've not used lists or custom_lists before, so I have no idea what it could be.

Maybe try looking at the postgres and see what the other view_modes look like?
 
~John Walsh



On Wednesday, June 10, 2015 11:37 AM, Peter Nietz <nietz-gmx.net@mail.odoo.com> wrote:


I also found the method with ir.actions.act_window.view and it all works with form,tree,kanban,graph but if I add list or custom_list to view_mode it tells me: ParseError: "Wrong value for ir.actions.act_window.view.view_mode: 'custom_list'" but in the normal ir.actions.act_window the view_mode custom_list works fine but not with a ref to a view_id.
--
Peter Nietz
Sent by Odoo Inc. using Odoo access your messages


Peter Nietz
Author

Thx ... u put me on the right track ... just had to add custom_list to VIEW_TYPES in /openerp/addons/base/ir/ir_actions.py

OdooBot
Glad to hear it! Good luck!
 
~John Walsh




On Thursday, June 11, 2015 11:52 AM, Peter Nietz <nietz-gmx.net@mail.odoo.com> wrote:


Thx ... u put me on the right track ... just had to add custom_list to VIEW_TYPES in /openerp/addons/base/ir/ir_actions.py
--
Peter Nietz
Sent by Odoo Inc. using Odoo access your messages


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
Related Posts Replies Views Activity
partner view blank page
javascript v8 views xml odoo
Avatar
0
Aug 16
3646
Why on my module which works in saas-5 in v8 field labels are missing?
v8 views view
Avatar
Avatar
1
Mar 15
4320
Display eternal duration in Gantt view (f. e. without end date)
views xml view
Avatar
0
Mar 15
2597
[ODOO 16CE] How to choose the form used when clicking on 'Add a line' in a tree view?
views view odoo odoo16features
Avatar
Avatar
2
Jun 23
3852
[ODOO 16CE] How to choose the form view used with Many2One or Many2Many (m2x) field? Solved
views view odoo odoo16features
Avatar
Avatar
1
Jun 23
3610
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