[FIX] base_sync : usability imp and if no app slected raise message
authorJigar Amin <jam@tinyerp.com>
Fri, 25 Feb 2011 09:22:40 +0000 (14:52 +0530)
committerJigar Amin <jam@tinyerp.com>
Fri, 25 Feb 2011 09:22:40 +0000 (14:52 +0530)
bzr revid: jam@tinyerp.com-20110225092240-ttj1xmkbzb9p82if

addons/sync_base/wizard/sync_base_view.xml
addons/sync_base/wizard/synchronize_base.py

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..8f49154 100644 (file)
@@ -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):