Merge lp:~openerp-dev/openobject-client/6.1-opw-575749-rgo into lp:openobject-client/6.1

Proposed by Ravi Gohil (OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: 2066
Merged at revision: 2077
Proposed branch: lp:~openerp-dev/openobject-client/6.1-opw-575749-rgo
Merge into: lp:openobject-client/6.1
Diff against target: 32 lines (+3/-3)
2 files modified
bin/SpiffGtkWidgets/Calendar/CanvasEvent.py (+1/-1)
bin/widget/view/calendar_gtk/parser.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client/6.1-opw-575749-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+109836@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
2065. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2066. By Ravi Gohil (OpenERP)

[FIX] entries in calendar view shows 'False' as a string if there is no value in the field: (Maintenance Case : 575749)

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

just modified the patch a bit before final merge

=== 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-07-20 06:25:32 +0000
@@ -440,13 +440,14 @@

             if isinstance(s, (tuple, list)): s = s[-1]

- caption = ustr(s)
-
+ if not (isinstance(s,bool) or self.fields[f]['type'] == 'boolean'):
+ 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) or self.fields[f]['type'] == 'boolean'):
+ description += [ustr(s)]

         starts = event.get(self.date_start)
         ends = event.get(self.date_delay) or 1.0

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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-14 06:07:22 +0000
@@ -41,7 +41,7 @@
41 self.append(self.text, hippo.PACK_EXPAND)41 self.append(self.text, hippo.PACK_EXPAND)
4242
43 def set_text(self, text, description = ''):43 def set_text(self, text, description = ''):
44 self.text.set_property('text', text + ', ' + description)44 self.text.set_property('text', text + ', ' + description if text and description else text or description or '')
4545
4646
47 def set_text_color(self, newcolor):47 def set_text_color(self, newcolor):
4848
=== 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-14 06:07:22 +0000
@@ -440,13 +440,13 @@
440440
441 if isinstance(s, (tuple, list)): s = s[-1]441 if isinstance(s, (tuple, list)): s = s[-1]
442442
443 caption = ustr(s)443 caption = ustr(s) if not isinstance(s, bool) else '' if not self.fields[f]['type'] == 'boolean' else ustr(s)
444444
445 for f in self.axis[1:]:445 for f in self.axis[1:]:
446 s = event[f]446 s = event[f]
447 if isinstance(s, (tuple, list)): s = s[-1]447 if isinstance(s, (tuple, list)): s = s[-1]
448448
449 description += [ustr(s)]449 description += [ustr(s)] if not isinstance(s, bool) else [] if not self.fields[f]['type'] == 'boolean' else [ustr(s)]
450450
451 starts = event.get(self.date_start)451 starts = event.get(self.date_start)
452 ends = event.get(self.date_delay) or 1.0452 ends = event.get(self.date_delay) or 1.0

Subscribers

People subscribed via source and target branches