From 398bb1ff500548a600f0bdac159fa4a6585b5827 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Mon, 21 May 2012 11:16:07 +0530 Subject: [PATCH 1/2] [IMP] hr_holiday:improve leave report color,tooltips bzr revid: pna@tinyerp.com-20120521054607-74ou4uplze3astxg --- addons/hr_holidays/hr_holidays.py | 2 +- addons/hr_holidays/hr_holidays_data.xml | 2 +- addons/hr_holidays/i18n/hr_holidays.pot | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 43d7202547c..cddb449fae0 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -76,7 +76,7 @@ class hr_holidays_status(osv.osv): 'name': fields.char('Leave Type', size=64, required=True, translate=True), 'categ_id': fields.many2one('crm.case.categ', 'Meeting', domain="[('object_id.model', '=', 'crm.meeting')]", help='If you set a meeting type, OpenERP will create a meeting in the calendar once a leave is validated.'), 'color_name': fields.selection([('red', 'Red'),('blue','Blue'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Departement'), - 'limit': fields.boolean('Allow to Override Limit', help='If you tick this checkbox, the system will allow, for this section, the employees to take more leaves than the available ones.'), + 'limit': fields.boolean('Allow to Override Limit', help='If you select this checkbox, the system will allow the employees to take more leaves than the available ones for this type.'), 'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."), 'max_leaves': fields.function(_user_left_days, string='Maximum Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'), 'leaves_taken': fields.function(_user_left_days, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'), diff --git a/addons/hr_holidays/hr_holidays_data.xml b/addons/hr_holidays/hr_holidays_data.xml index b312d79c03d..c5045d7b318 100644 --- a/addons/hr_holidays/hr_holidays_data.xml +++ b/addons/hr_holidays/hr_holidays_data.xml @@ -20,7 +20,7 @@ Compensatory Days True - brown + lavender diff --git a/addons/hr_holidays/i18n/hr_holidays.pot b/addons/hr_holidays/i18n/hr_holidays.pot index 76cbd507c0e..5a09b75649c 100644 --- a/addons/hr_holidays/i18n/hr_holidays.pot +++ b/addons/hr_holidays/i18n/hr_holidays.pot @@ -767,8 +767,8 @@ msgstr "" #. module: hr_holidays #: help:hr.holidays.status,limit:0 msgid "" -"If you tick this checkbox, the system will allow, for this section, the " -"employees to take more leaves than the available ones." +"If you select this checkbox, the system will allow the " +"employees to take more leaves than the available ones for this type. " msgstr "" #. module: hr_holidays From 19aa442bd46cd458a85a09fd2235b4cf3a09e187 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Wed, 23 May 2012 11:15:03 +0530 Subject: [PATCH 2/2] [IMP] hr_holidays:improve leave report,mail_thread bzr revid: pna@tinyerp.com-20120523054503-y2s7ihicjmyr3we7 --- addons/mail/mail_thread.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 8cd8ef415c3..edc07817b26 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -293,8 +293,7 @@ class mail_thread(osv.osv): 'res_id': thread.id, } to_attach.append(ir_attachment.create(cr, uid, data_attach, context=context)) - - partner_id = hasattr(thread, 'partner_id') and (thread.partner_id and thread.partner_id.id or False) or False + partner_id = ('partner_id' in thread._columns.keys()) and (thread.partner_id and thread.partner_id.id or False) or False if not partner_id and thread._name == 'res.partner': partner_id = thread.id data = { @@ -313,7 +312,6 @@ class mail_thread(osv.osv): 'res_id': thread.id, 'partner_id': partner_id, } - if email_from or type == 'email': for param in (email_to, email_cc, email_bcc): if isinstance(param, list):