Hi hda,
I have a synchonisation wizard with two pages (or steps or forms) which I'd
like to start by showing a default value for the url of the server to sync with
in an editable field, which then might be overwritten. On the second page I
would like to show the result. I am able to get the entered values without any
problems, but how would I pass the values to show the default url on the first
page and the result of synchro on the second ?
many thanks
(I'm sorry but identation is lost while posting)
wizard form definitions:
sync_form1 = '''<?xml version="1.0"?>
<form string="Sync with Server">
<newline />
<label string="Are you sure you want to synchronize with server ?"
colspan="2"/>
<newline />
<field name="url_server" width="128" />
</form>'''
sync_fields1 = {
'url_p2w':{'string':'Server', 'type':'char', 'required':True},
}
sync_form2 = '''<?xml version="1.0"?>
<form string="Sync with Server">
<newline />
<label string="Synchronizing with Server finished" colspan="2"/>
</form>'''
sync_fields2 = {
'res_synserver':{'string':'Result', 'type':'boolean', 'readonly':True},
}
# sync function/action
def _sync_server(self, cr, uid, args, context):
# do sync here
# Return result of sync
return dctValues
# wizard class definition
class sync_with_server(wizard.interface):
states = {
'init': {
'actions': [],
'result': {
'type':'form',
'arch':sync_form1,
'fields':sync_fields1,
'state':[
('end','Cancel', 'gtk-cancel'),
('sync_server','Synchronize', '', True),
]
}
},
'sync_server': {
'actions': [_sync_server],
'result': {
'type':'form',
'arch':sync_form2,
'fields':sync_fields2,
'state':[
('end','Ok'),
]
},
}
}
sync_with_server("sync_with_server")
-------------------- m2f --------------------
--
http://www.openobject.com/forum/viewtopic.php?p=43871#43871
-------------------- m2f --------------------
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users