Paramjit Singh Sahota(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-improve-little-big-details-notifications-psa
 into lp:~openerp-dev/openobject-addons/trunk-improve-little-big-details.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve-little-big-details-notifications-psa/+merge/132892

Hello Sir,

I had improved code for the notificationz whenever the notifications exceed 99 
than at that time the INFINITY symbol will be displayed in place of numbers.

Thankz You.
 -PSA
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve-little-big-details-notifications-psa/+merge/132892
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openobject-addons/trunk-improve-little-big-details-notifications-psa
 into lp:~openerp-dev/openobject-addons/trunk-improve-little-big-details.
=== modified file 'crm/res_partner_view.xml'
--- crm/res_partner_view.xml	2012-10-16 09:52:25 +0000
+++ crm/res_partner_view.xml	2012-11-05 13:15:28 +0000
@@ -93,10 +93,12 @@
                 </field>
                 <xpath expr="//div[@class='oe_kanban_partner_links']" position="inside">
                     <a name="%(relate_partner_opportunities)d" type="action" t-if="record.opportunity_count.value>0">
-                        <t t-esc="record.opportunity_count.value"/> Opportunities
+                        <t t-if="record.opportunity_count.value > 99"> &#8734; </t>
+                        <t t-if="record.opportunity_count.value lt= 99"> <t t-esc="record.opportunity_count.value"/> </t> Opportunities
                     </a>
                     <a name="%(crm_meeting_partner)d" type="action" t-if="record.meeting_count.value>0">
-                        <t t-esc="record.meeting_count.value"/> Meetings
+                        <t t-if="record.opportunity_count.value > 99"> &#8734; </t>
+                        <t t-if="record.opportunity_count.value lt= 99"> <t t-esc="record.meeting_count.value"/> </t> Meetings
                     </a>
                 </xpath>
             </field>

=== modified file 'mail/mail_thread.py'
--- mail/mail_thread.py	2012-11-02 08:27:07 +0000
+++ mail/mail_thread.py	2012-11-05 13:15:28 +0000
@@ -88,7 +88,16 @@
 
         for thread in self.browse(cr, uid, ids, context=context):
             cls = res[thread.id]['message_unread'] and ' class="oe_kanban_mail_new"' or ''
-            res[thread.id]['message_summary'] = "<span%s><span class='oe_e'>9</span> %d</span> <span><span class='oe_e'>+</span> %d</span>" % (cls, len(thread.message_comment_ids), len(thread.message_follower_ids))
+            infinity = u"\u221E"
+            if (len(thread.message_comment_ids) > 99):
+                message_comment = "<span%s><span class='oe_e'>9</span> %s</span>" % (cls, tools.ustr(infinity))
+            else:
+                message_comment = "<span%s><span class='oe_e'>9</span> %d</span>" % (cls, len(thread.message_comment_ids))
+            if (len(thread.message_follower_ids) > 99):
+                message_follower = "<span><span class='oe_e'>+</span> %s</span>" % (tools.ustr(infinity))
+            else:
+                message_follower = "<span><span class='oe_e'>+</span> %s</span>" % len(thread.message_follower_ids)
+            res[thread.id]['message_summary'] = message_comment + message_follower
 
         return res
 

=== modified file 'purchase/partner_view.xml'
--- purchase/partner_view.xml	2012-09-29 22:08:39 +0000
+++ purchase/partner_view.xml	2012-11-05 13:15:28 +0000
@@ -42,7 +42,8 @@
                 </field>
                 <xpath expr="//div[@class='oe_kanban_partner_links']" position="inside">
                     <a name="%(purchase.act_res_partner_2_purchase_order)d" type="action" t-if="record.purchase_order_count.value>0">
-                        <t t-esc="record.purchase_order_count.value"/> Purchases
+                        <t t-if="record.purchase_order_count.value > 99"> &#8734; </t>
+                        <t t-if="record.purchase_order_count.value lt= 99"> <t t-esc="record.purchase_order_count.value"/> </t>Purchases
                     </a>
                 </xpath>
             </field>

=== modified file 'sale/res_partner_view.xml'
--- sale/res_partner_view.xml	2012-10-18 07:15:37 +0000
+++ sale/res_partner_view.xml	2012-11-05 13:15:28 +0000
@@ -35,7 +35,8 @@
                 </field>
                 <xpath expr="//div[@class='oe_kanban_partner_links']" position="inside">
                     <a name="%(sale.act_res_partner_2_sale_order)d" type="action" t-if="record.sale_order_count.value>0">
-                        <t t-esc="record.sale_order_count.value"/> Sales
+                        <t t-if="record.sale_order_count.value > 99"> &#8734; </t>
+                        <t t-if="record.sale_order_count.value lt= 99"> <t t-esc="record.sale_order_count.value"/> </t>Sales
                     </a>
                 </xpath>
             </field>

_______________________________________________
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