Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2
shashank verma
On 7/28/14, 5:29 AM

Hello Ayman,

We can create dynamic view by using one of the strongest ORM method of OpenERP called field_view_get
################################
Following syntax:

fields_view_get(cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False)

Get the detailed composition of the requested view like fields, model, view architecture

Parameters:

  • cr -- database cursor

  • user -- current user id

  • view_id -- id of the view or None

  • view_type -- type of the view to return if view_id is None ('form', tree', ...)

  • context -- context arguments, like lang, time zone

  • toolbar -- true to include contextual actions

  • submenu -- example (portal_project module)

###########################


Good examples of how to utilize this method:

http://blog.openerp4you.in/2013/06/creating-views-dynamically-in-openerp.html

http://aasimania.wordpress.com/2011/04/09/creating-views-dynamically/

###########################

This will be an overview.Since your question seems to look partial ,so if you can elaborate your requirement then it will be more easy to provide you complete solution along with code.

thanks , I create the dynamic view but , how to store the dynamic fields in database ?

ayman mohammed adam
on 8/20/14, 5:44 AM

How to create dynamic view of the generated report? Means Instead of print when clicked the button(print button) in Financial report(or my custom fin.report) module,I should get a dynamic view. Is it possible?

Kuldeep Jadeja
on 9/8/14, 9:41 AM

ayman mohammed adam https://www.odoo.com/forum/help-1/partner/203280 , how do you create a dynamic view, i am in bad need of it, please can you explain?

Kuldeep Jadeja
on 9/8/14, 10:09 AM
1

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 7/28/14, 4:13 AM

Hi

One cannot change the Tree View based on form data ...

According  to Openerp Framework.. views(XML) will be loaded first then the data from your database will be retrived.. hence one cannot change the view which is already been loaded ...

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/24/14, 4:26 AM
Seen: 2591 times
Last updated: 3/16/15, 8:10 AM