[MERGE] Merge hr_holidays improverment

bzr revid: sbh@tinyerp.com-20120523061806-g36ezzvr02py6ewr
This commit is contained in:
Sbh (Openerp) 2012-05-23 11:48:06 +05:30
commit 135790bb6f
4 changed files with 5 additions and 7 deletions

View File

@ -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'),

View File

@ -20,7 +20,7 @@
<record model="hr.holidays.status" id="holiday_status_comp">
<field name="name">Compensatory Days</field>
<field name="limit">True</field>
<field name="color_name">brown</field>
<field name="color_name">lavender</field>
</record>
<!--Unpaid Leave -->

View File

@ -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

View File

@ -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):