[MERGE]
authorBhumika (OpenERP) <sbh@tinyerp.com>
Mon, 28 Feb 2011 06:56:11 +0000 (12:26 +0530)
committerBhumika (OpenERP) <sbh@tinyerp.com>
Mon, 28 Feb 2011 06:56:11 +0000 (12:26 +0530)
bzr revid: sbh@tinyerp.com-20110228065611-4g01cr0he40fu7ft

addons/google_base_account/wizard/google_login_view.xml
addons/sync_base/wizard/sync_base_view.xml
addons/sync_base/wizard/synchronize_base.py
addons/sync_google_contact/wizard/google_contact_import.py
addons/sync_google_contact/wizard/google_contact_import_view.xml

index bb36d16..3684510 100644 (file)
@@ -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"/>
                         <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>
index 6f61e0b..c957993 100644 (file)
                    <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>
index 4a20b0c..9077b32 100644 (file)
@@ -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):
index 6900589..b22c246 100644 (file)
@@ -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.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 "),
@@ -129,7 +126,7 @@ class synchronize_google_contact(osv.osv_memory):
 
     _defaults = {
         'create_partner': True,
-        'group_name': _get_default_group,
+        'group_name': 'all',
     }
 
     def create_partner(self, cr, uid, data={}, context=None):
index 45ec217..41e02dc 100644 (file)
@@ -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="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>