It is currently Wed May 23, 2012 2:50 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Make a tree view with different objects
PostPosted: Tue Jul 26, 2011 11:30 am 
Offline

Joined: Tue Jun 14, 2011 6:23 pm
Posts: 12
Hi

is it possible to make a tree view which contain different object

for example a tree view Communication, which contain:
meetings, phonecalls and emails object from ( and for ) a partner?

Thanks


Top
 Profile  
 
 Post subject: Re: Make a tree view with different objects
PostPosted: Mon Aug 01, 2011 5:57 pm 
Offline

Joined: Tue Jun 14, 2011 6:23 pm
Posts: 12
Well,

I've found a solution: I've made a SQL view -with union- using this method:
http://openobject.com/wiki/index.php/AdvModRepPSQLViews

and I've made a tree view in the partner history, everything works pretty fine

but when I click on a tree line I would open the foreign form
so I've call fields_view_get with :
Code:
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):

        meet = self.pool.get('crm.meeting')
        meet_obj = meet.browse(cr, uid, 5, context=context)
        result = meet.fields_view_get( cr, uid, view_id, 'form')
        return result

- I work only with the meetings for the moment, and 5 is an example ID -

so, with this (fields_view_get) when I click on a tree line it open a meeting form, but with the communication (it's my class's name)'s fields, so I've got many blank fields

My Question :
- is it possible to tell fields_view_get(), use an object for a specific id?

nevertheless if somebody have a better solution, I'm interested

Thanks a lot


Top
 Profile  
 
 Post subject: Re: Make a tree view with different objects
PostPosted: Fri Aug 05, 2011 1:21 pm 
Offline

Joined: Thu Oct 28, 2010 1:51 pm
Posts: 53
You can use one of the new memory wizards to make a compound object, i made one that loads in 2 different types of objects(in my case it was a persons availability and what was booked against them) based on my own search criteria, and stuffed them all into 1 in memory object then display that as a calendar.
This meant I could have 1 view that showed me when a person was available and what was already booked against them.

_________________
Developing OpenERP Modules for what seems like an eternity
Smart IT Ltd
http://www.smart-ltd.co.uk


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP