<field name="type">form</field>
<field name="arch" type="xml">
<form string="Google login" >
- <group colspan="4" col="4" width="250">
+ <group colspan="4" col="4" width="300">
<field name="user" />
<newline/>
<label string="ex: user@gmail.com" align="1.0" colspan="2"/>
<field name="password" password="True"/>
</group>
<separator string="" colspan="4"/>
- <group colspan="2" col="2">
- <button special="cancel" string="Cancel" icon="gtk-cancel"/>
- <button name="check_login" string="Login" type="object" icon="terp-check"/>
+ <group colspan="4" col="4">
+ <group colspan="2"/>
+ <group colspan="2">
+ <button special="cancel" string="_Cancel" icon="gtk-cancel"/>
+ <button name="check_login" string="_Login" type="object" icon="terp-check"/>
+ </group>
</group>
</form>
</field>
<field name="tools"/>
<newline />
<separator string="" colspan="4"/>
- <group colspan="4" col="2">
- <button special="cancel" string="Cancel" icon="gtk-cancel"/>
- <button name="action_synchronize" string="Synchronize" type="object" icon="terp-check"/>
+ <group colspan="4" col="4">
+ <group colspan="2"/>
+ <group colspan="2">
+ <button special="cancel" string="_Cancel" icon="gtk-cancel"/>
+ <button name="action_synchronize" string="_Synchronize" type="object" icon="terp-check"/>
+ </group>
</group>
</form>
</field>
#
##############################################################################
-from osv import fields,osv,orm
+from osv import fields,osv
from tools.translate import _
def _get_action(self, cr, uid, tools, context=None):
if not tools:
- tools = 'none'
+ raise osv.except_osv(_("Error !"),_("Select App to synchronize with."))
return self._get_actions_dic(cr, uid, context=context)[tools]
def _get_actions_dic(self, cr, uid, context=None):
res.append(('all','All Groups'))
return res
- def _get_default_group(self, cr, uid, context=None):
- return 'all'
-
_columns = {
'create_partner': fields.boolean('Create Partner', help="It will create Partner for given gmail user otherwise only adds contacts in Partner Addresses.") ,
'group_name': fields.selection(_get_group, "Group Name", size=32,help="Choose which group to import, By defult it take all "),
_defaults = {
'create_partner': True,
- 'group_name': _get_default_group,
+ 'group_name': 'all',
}
def create_partner(self, cr, uid, data={}, context=None):
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Import Google Contacts">
- <group colspan="2" col="2">
+ <group colspan="4" col="4">
<field name="group_name" />
<separator string="Do you want to create partner?" colspan="4"/>
- <field name="create_partner"/>
+ <field name="create_partner" colspan="4"/>
</group>
<separator string="" colspan="4"/>
- <group colspan="2" col="2">
- <button special="cancel" string="Cancel" icon="gtk-cancel"/>
- <button name="import_contact" string="Import Contacts" type="object" icon="terp-personal+"/>
+ <group colspan="4" col="4">
+ <group colspan="2" col="2"/>
+ <group colspan="2" col="2">
+ <button special="cancel" string="_Cancel" icon="gtk-cancel"/>
+ <button name="import_contact" string="_Import Contacts" type="object" icon="terp-personal+"/>
+ </group>
</group>
</form>
</field>