It is currently Sat Feb 11, 2012 12:00 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: osv momory wizard cant find id of parent form
PostPosted: Thu Feb 11, 2010 6:38 am 
Offline

Joined: Thu Feb 11, 2010 6:30 am
Posts: 3
Hi all,

I have created a osv.osv_momory wizard and view for that and i m calling that wizard on one button on the form (eg. form Sale) now i m not able to get the id of record for that Sale form on which wizard is place and called.bcos i want to pick up and write the value in the Sale form thru wizard so without id i cant do that...I m unable to get relation bettween the wizard and form.
As in normal osv wizard we can get the id and fields from data['form'] ,like that how would i get the id of current record of form.?

Thanking You
Shashi


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 11, 2010 1:00 pm 
Offline

Joined: Tue Jul 08, 2008 3:23 pm
Posts: 73
Hello,

if you have a button definition like this in your xml file:
Code:
<button name="%(<module>.<your_method>)d" string=" Go " type="action"/>


and a method signature like this one in your wizard py file:
Code:
    def <your_method>(self, cr, uid, ids, context):
        #print context


check the content of the context dictionary.

Eduardo


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 11, 2010 2:33 pm 
Offline

Joined: Thu Feb 11, 2010 6:30 am
Posts: 3
Thanks Rui ,

I tried the same thing and it worked thanks again for help....


Thanks for your help
Shashi


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