View unanswered posts | View active topics
|
Page 1 of 1
|
[ 3 posts ] |
|
| Author |
Message |
|
Toad
|
Post subject: osv_memory Posted: Thu Mar 11, 2010 3:10 am |
|
Joined: Fri Apr 10, 2009 5:41 am Posts: 46 Location: Ottawa, Canada
|
|
Hello,
I'm trying to develop a multi-page wizard for estimation. I basically collect a bunch of info about the order on the first couple of pages and then (try to) open up a one2many_list (also osv_memory) which is populated with products filtered by category.
What I've noticed is that it appears that it creates a new object every time I move to the next form in the wizard, which doesn't work for my approach. I'm using two classes - one for the estimate and one for the one2many, so every time I go to the next form it writes a new line to the estimate table.
I've tried returning the active_id in the context but that didn't seem to help. When I get to the one2many_list I end up with a bunch of new records in the estimate table and it ends up trying to do a select on 'id=False' which fails miserably.
So... does anyone have any insights into how to work with the new wizards? Specifically, how to operate on the same id for a multi-page wizard? I couldn't find any decent examples...
Thanks!
|
|
| Top |
|
 |
|
bb39700
|
Post subject: Posted: Sun Mar 14, 2010 10:38 pm |
|
Joined: Sun Aug 17, 2008 7:39 pm Posts: 71 Location: France - Jura
|
|
perhaps with :
new_part_id = self.read(cr, uid, ids, [])[0]
context.update({'new_part_id' : new_part_id['id']})
new_part_id contains actual osv_memory object on which you work.
put this in your action_method and pass new context in the return to the next page.
You can acces it via context['new_part_id']
|
|
| Top |
|
 |
|
Toad
|
Post subject: Posted: Wed Mar 24, 2010 4:11 am |
|
Joined: Fri Apr 10, 2009 5:41 am Posts: 46 Location: Ottawa, Canada
|
|
Thanks bb39700, you pointed me in the right direction!
|
|
| Top |
|
 |
|
Page 1 of 1
|
[ 3 posts ] |
|
|
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
|