Hi,
I am working in a module triying release a FileChooserDialog for open
a file:
In xml file the module I have:
form:
<field name="id_pass"/>
<label name="start_contract"/>
<field name="start_contract"/>
<label name="section"/>
<field name="section"/>
<button string="Photo"
type="object"
name="_get_image"
icon="tryton-go-next"/>
I create a button for call method _get_image and work it.
In the model I have:
from tryton.common import file_selection
class MyModel(ModelSQL, ModelView):
. . .
def _get_image(self, ids):
response = file_selection("Selecting Image", '', parent=None)
return {}
. . .
MyModel()
but this fail, because to generate the next ExceptionError.
parent.present(), "Parent don't have attribute the
'present'" (related with common.common) line 325.
I know that must to exist 'parent', but how I get parent window main
instance (from tryton client), for to pass to "file_selection" method
or exit other way for Call FileChooserDialog.
Thanks
Atte,
Oscar Alvarez
--
[email protected] mailing list