@@ -7,7 +7,7 @@
|
||||
<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"/>
|
||||
@@ -15,9 +15,12 @@
|
||||
<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>
|
||||
|
||||
@@ -10,9 +10,12 @@
|
||||
<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>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields,osv,orm
|
||||
from osv import fields,osv
|
||||
from tools.translate import _
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class synchronize_base(osv.osv_memory):
|
||||
|
||||
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):
|
||||
|
||||
@@ -119,9 +119,6 @@ class synchronize_google_contact(osv.osv_memory):
|
||||
res.append(('all','All Groups'))
|
||||
return res
|
||||
|
||||
def _get_default_group(self, cr, uid, context=None):
|
||||
return 'all'
|
||||
|
||||
_columns = {
|
||||
'create_partner': fields.selection([('create_all','Create partner for each contact'),('create_address','Import only address')],'Options'),
|
||||
'group_name': fields.selection(_get_group, "Group Name", size=32,help="Choose which group to import, By default it takes all."),
|
||||
@@ -129,7 +126,7 @@ class synchronize_google_contact(osv.osv_memory):
|
||||
|
||||
_defaults = {
|
||||
'create_partner': 'create_all',
|
||||
'group_name': _get_default_group,
|
||||
'group_name': 'all',
|
||||
}
|
||||
|
||||
def create_partner(self, cr, uid, data={}, context=None):
|
||||
|
||||
@@ -7,15 +7,18 @@
|
||||
<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="Import Options" colspan="4"/>
|
||||
<field name="create_partner"/>
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user