Ravi Gohil (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-client/6.1-opw-575749-rgo into 
lp:openobject-client/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client/6.1-opw-575749-rgo/+merge/109836

Hello,

When the calendar view doesn't get the value for it's fields, it shows `False` 
as a string and not the blank string.

You can reproduce the issue by defining a meeting and not setting the value for 
the fields `Sales Team` or `Partner`.

This MP contains fix for this issue. Kindly review it.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client/6.1-opw-575749-rgo/+merge/109836
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client/6.1-opw-575749-rgo.
=== modified file 'bin/SpiffGtkWidgets/Calendar/CanvasEvent.py'
--- bin/SpiffGtkWidgets/Calendar/CanvasEvent.py	2010-12-13 09:52:05 +0000
+++ bin/SpiffGtkWidgets/Calendar/CanvasEvent.py	2012-06-12 13:26:31 +0000
@@ -41,7 +41,7 @@
         self.append(self.text, hippo.PACK_EXPAND)
 
     def set_text(self, text, description = ''):
-        self.text.set_property('text', text + ', ' + description)
+        self.text.set_property('text', description and text + ', ' + description or text)
 
 
     def set_text_color(self, newcolor):

=== modified file 'bin/widget/view/calendar_gtk/parser.py'
--- bin/widget/view/calendar_gtk/parser.py	2011-10-31 09:12:35 +0000
+++ bin/widget/view/calendar_gtk/parser.py	2012-06-12 13:26:31 +0000
@@ -440,13 +440,13 @@
 
             if isinstance(s, (tuple, list)): s = s[-1]
 
-            caption = ustr(s)
+            if not isinstance(s, bool): caption = ustr(s)
 
             for f in self.axis[1:]:
                 s = event[f]
                 if isinstance(s, (tuple, list)): s = s[-1]
 
-                description += [ustr(s)]
+                if not isinstance(s, bool): description += [ustr(s)]
 
         starts = event.get(self.date_start)
         ends = event.get(self.date_delay) or 1.0

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to