Add posted counters + update translation

This commit is contained in:
Alexis de Lattre
2015-06-19 18:29:57 +02:00
parent 1108f79664
commit b2a0e44121
4 changed files with 170 additions and 35 deletions

View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-06-11 22:19+0000\n"
"PO-Revision-Date: 2015-06-11 22:19+0000\n"
"POT-Creation-Date: 2015-06-19 16:26+0000\n"
"PO-Revision-Date: 2015-06-19 16:26+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -179,6 +179,11 @@ msgstr "Compteur pour ce type de congé"
msgid "Counters"
msgstr "Compteurs"
#. module: hr_holidays_usability
#: model:ir.model,name:hr_holidays_usability.model_hr_holidays_employee_counter
msgid "Counters for holidays of employees"
msgstr "Compteurs pour les congés des employés"
#. module: hr_holidays_usability
#: view:hr.holidays.mass.allocation:0
msgid "Create Allocations"
@@ -190,12 +195,22 @@ msgstr "Créer des attributions"
msgid "Current Leaves Taken"
msgstr "Congés pris"
#. module: hr_holidays_usability
#: field:hr.holidays.employee.counter,current_leaves_taken_posted:0
msgid "Current Leaves Taken Posted"
msgstr "Congés pris comptabilisés"
#. module: hr_holidays_usability
#: field:hr.holidays,current_remaining_leaves:0
#: field:hr.holidays.employee.counter,current_remaining_leaves:0
#: field:hr.holidays.employee.counter,current_leaves_remaining:0
msgid "Current Remaining Leaves"
msgstr "Congés restants"
#. module: hr_holidays_usability
#: field:hr.holidays.employee.counter,current_leaves_remaining_posted:0
msgid "Current Remaining Leaves Posted"
msgstr "Congés restants comptabilisés"
#. module: hr_holidays_usability
#: field:res.company,mass_allocation_default_holiday_status_id:0
msgid "Default Leave Type for Mass Allocation"
@@ -209,17 +224,16 @@ msgstr "Description"
#. module: hr_holidays_usability
#: selection:hr.holidays.post,state:0
msgid "Done"
msgstr ""
msgstr "Done"
#. module: hr_holidays_usability
#: selection:hr.holidays.post,state:0
msgid "Draft"
msgstr ""
msgstr "Draft"
#. module: hr_holidays_usability
#: view:hr.holidays.employee.counter:0
#: field:hr.holidays.employee.counter,employee_id:0
#: model:ir.model,name:hr_holidays_usability.model_hr_employee
msgid "Employee"
msgstr "Employé"
@@ -410,7 +424,7 @@ msgstr "Début du congé"
#. module: hr_holidays_usability
#: field:hr.holidays.post,state:0
msgid "State"
msgstr ""
msgstr "State"
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/hr_holidays.py:238
@@ -480,6 +494,11 @@ msgstr "Total des congés pris"
msgid "Total Remaining Leaves"
msgstr "Total des congés restants"
#. module: hr_holidays_usability
#: view:hr.holidays.employee.counter:0
msgid "Total Remaining and Posted Leaves"
msgstr "Total des congés restants comptabilisés"
#. module: hr_holidays_usability
#: field:hr.holidays.status,vacation_compute_method:0
msgid "Vacation Compute Method"
@@ -489,7 +508,7 @@ msgstr "Méthode de calcul des jours de congé"
#: code:addons/hr_holidays_usability/hr_holidays.py:346
#, python-format
msgid "Warning!"
msgstr "Warning!"
msgstr "Attention !"
#. module: hr_holidays_usability
#: model:ir.model,name:hr_holidays_usability.model_hr_holidays_mass_allocation
@@ -516,10 +535,5 @@ msgstr "Vous devez entrer une valeur pour le nombre de jours."
#. module: hr_holidays_usability
#: constraint:hr.holidays:0
msgid "error msg in raise"
msgstr ""
#. module: hr_holidays_usability
#: model:ir.model,name:hr_holidays_usability.model_hr_holidays_employee_counter
msgid "hr.holidays.employee.counter"
msgstr "hr.holidays.employee.counter"
msgstr "error msg in raise"

View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-06-12 07:36+0000\n"
"PO-Revision-Date: 2015-06-12 07:36+0000\n"
"POT-Creation-Date: 2015-06-19 16:24+0000\n"
"PO-Revision-Date: 2015-06-19 16:24+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -24,37 +24,48 @@ msgid "\n"
"<p>WARNING : THIS IS A TEST E-MAIL sent from a test OpenERP database (${ctx.get('dbname')}). Do not take into account !</p>\n"
"\n"
"% endif\n"
"<p>The following ${object.type == 'remove' and 'leave request' or 'ALLOCATION request (i.e. credit of days, not debit !)'} has been ${ctx.get('wkf_tracker') or 'ERROR'} today in OpenERP by ${user.name or ''} :</p>\n"
"<p>La ${object.type == 'remove' and 'demande' or \"demande d'ATTRIBUTION\"} de congé a été ${ctx.get('wkf_tracker') or 'ERROR'} aujourd'hui dans OpenERP par ${user.name or ''} :</p>\n"
"\n"
"<ul>\n"
"<li>Employee : ${object.employee_id.name or ''}</li>\n"
"<li>Employé : ${object.employee_id.name or ''}</li>\n"
"% if object.employee_id.parent_id:\n"
"<li>Employee's manager : ${object.employee_id.parent_id.name or ''}</li>\n"
"<li>Manager : ${object.employee_id.parent_id.name or ''}</li>\n"
"% endif\n"
"% if object.type == 'remove':\n"
"<li>Start date : ${object.vacation_date_from or ''} ${object.vacation_time_from or ''}</li>\n"
"<li>End date : ${object.vacation_date_to or ''} ${object.vacation_time_to or ''}</li>\n"
"<li>Début : ${object.vacation_date_from or ''}\n"
"% if object.vacation_time_from == 'morning':\n"
"au matin\n"
"% elif object.vacation_time_from == 'noon':\n"
"midi\n"
"% endif\n"
"<li>Number of days : ${object.number_of_days < 0 and object.number_of_days * -1 or object.number_of_days}</li>\n"
"<li>Leave type : ${object.holiday_status_id.name or ''}</li>\n"
"</li>\n"
"<li>Fin : ${object.vacation_date_to or ''}\n"
"% if object.vacation_time_to == 'noon':\n"
"midi\n"
"% elif object.vacation_time_to == 'evening':\n"
"au soir\n"
"% endif\n"
"</li>\n"
"% endif\n"
"<li>Nombre de jours : ${object.number_of_days < 0 and object.number_of_days * -1 or object.number_of_days}</li>\n"
"<li>Type de congé : ${object.holiday_status_id.name or ''}</li>\n"
"<li>Description : ${object.name or ''}</li>\n"
"% if object.notes:\n"
"<li>Notes : ${object.notes or ''}</li>\n"
"% endif\n"
"</ul>\n"
"\n"
"% if ctx.get('wkf_tracker') == 'submitted':\n"
"% if ctx.get('wkf_tracker') == 'soumise':\n"
"% if object.type == 'remove':\n"
"<p>To validate or refuse it, go to the menu Human Resources > Leaves > Leave requests to approve.</p>\n"
"<p>Pour la valider ou la refuser, allez dans le menu Ressources humaines > Congés > Demandes de congé à valider.</p>\n"
"% else:\n"
"<p>To validate or refuse it, go to the menu Human Resources > Leaves > Allocation requests.</p>\n"
"<p>Pour la valider ou la refuser, allez dans le menu Ressources humaines > Congés > Demandes d'attribution de congés à valider.</p>\n"
"% endif\n"
"\n"
"% endif\n"
"<p>\n"
"-- <br/>\n"
"Automatic e-mail sent by OpenERP. Do not reply.<br/>\n"
"Database : ${ctx.get('dbname')}<br/>\n"
"Mail envoyé automatiquement par OpenERP. Ne pas répondre.<br/>\n"
"Base de donnée : ${ctx.get('dbname')}<br/>\n"
"</p>\n"
"</div>\n"
""
@@ -67,7 +78,7 @@ msgstr ""
#. module: hr_holidays_usability
#: model:email.template,subject:hr_holidays_usability.email_template_hr_holidays
msgid "${ctx.get('dbname') and 'prod' not in ctx.get('dbname') and '[TEST]' or ''}[${object.type == 'remove' and 'Leave' or 'Allocation'} ${ctx.get('wkf_tracker')}] ${object.name or ''} - ${object.employee_id.name or ''}"
msgid "${ctx.get('dbname') and 'prod' not in ctx.get('dbname') and '[TEST]' or ''}[${object.type == 'remove' and 'Demande' or 'Attribution'} de congé ${ctx.get('wkf_tracker')}] ${object.name or ''} - ${object.employee_id.name or ''}"
msgstr ""
#. module: hr_holidays_usability
@@ -133,12 +144,22 @@ msgstr ""
msgid "Current Leaves Taken"
msgstr ""
#. module: hr_holidays_usability
#: field:hr.holidays.employee.counter,current_leaves_taken_posted:0
msgid "Current Leaves Taken Posted"
msgstr ""
#. module: hr_holidays_usability
#: field:hr.holidays,current_remaining_leaves:0
#: field:hr.holidays.employee.counter,current_remaining_leaves:0
#: field:hr.holidays.employee.counter,current_leaves_remaining:0
msgid "Current Remaining Leaves"
msgstr ""
#. module: hr_holidays_usability
#: field:hr.holidays.employee.counter,current_leaves_remaining_posted:0
msgid "Current Remaining Leaves Posted"
msgstr ""
#. module: hr_holidays_usability
#: field:res.company,mass_allocation_default_holiday_status_id:0
msgid "Default Leave Type for Mass Allocation"
@@ -190,6 +211,20 @@ msgstr ""
msgid "Enter the last day of vacation. For example, if you leave one full calendar week, the last day of vacation is Friday evening (and not Monday of the week after)"
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/hr_holidays.py:237
#: code:addons/hr_holidays_usability/hr_holidays.py:243
#: code:addons/hr_holidays_usability/hr_holidays.py:250
#: code:addons/hr_holidays_usability/hr_holidays.py:257
#: code:addons/hr_holidays_usability/hr_holidays.py:263
#: code:addons/hr_holidays_usability/hr_holidays.py:269
#: code:addons/hr_holidays_usability/wizard/hr_holidays_mass_allocation.py:71
#: code:addons/hr_holidays_usability/wizard/hr_holidays_mass_allocation.py:75
#: code:addons/hr_holidays_usability/wizard/hr_holidays_post.py:84
#, python-format
msgid "Error:"
msgstr ""
#. module: hr_holidays_usability
#: selection:hr.holidays,vacation_time_to:0
msgid "Evening"
@@ -282,6 +317,12 @@ msgstr ""
msgid "Morning"
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/wizard/hr_holidays_post.py:85
#, python-format
msgid "No leave request to post."
msgstr ""
#. module: hr_holidays_usability
#: selection:hr.holidays,vacation_time_from:0
#: selection:hr.holidays,vacation_time_to:0
@@ -334,16 +375,58 @@ msgstr ""
msgid "State"
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/hr_holidays.py:238
#, python-format
msgid "The first day cannot be after the last day !"
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/hr_holidays.py:264
#, python-format
msgid "The first day of vacation cannot be a bank holiday !"
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/hr_holidays.py:251
#, python-format
msgid "The first day of vacation cannot be a saturday or sunday !"
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/hr_holidays.py:258
#, python-format
msgid "The last day of Vacation cannot be a saturday or sunday !"
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/hr_holidays.py:270
#, python-format
msgid "The last day of vacation cannot be a bank holiday !"
msgstr ""
#. module: hr_holidays_usability
#: sql_constraint:hr.holidays.mass.allocation:0
msgid "The number of days must be positive"
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/hr_holidays.py:244
#, python-format
msgid "The start of vacation is exactly the same as the end !"
msgstr ""
#. module: hr_holidays_usability
#: help:hr.holidays.post,before_date:0
msgid "The wizard will select the validated holidays that ended before that date (including holidays that ended on that date)."
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/hr_holidays.py:347
#, python-format
msgid "There are not enough %s allocated for employee %s (requesting %s days but only %s days left)."
msgstr ""
#. module: hr_holidays_usability
#: field:hr.holidays,total_allocated_leaves:0
#: field:hr.holidays.employee.counter,total_allocated_leaves:0
@@ -360,11 +443,22 @@ msgstr ""
msgid "Total Remaining Leaves"
msgstr ""
#. module: hr_holidays_usability
#: view:hr.holidays.employee.counter:0
msgid "Total Remaining and Posted Leaves"
msgstr ""
#. module: hr_holidays_usability
#: field:hr.holidays.status,vacation_compute_method:0
msgid "Vacation Compute Method"
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/hr_holidays.py:346
#, python-format
msgid "Warning!"
msgstr ""
#. module: hr_holidays_usability
#: model:ir.model,name:hr_holidays_usability.model_hr_holidays_mass_allocation
msgid "Wizard for mass allocation of holidays"
@@ -375,6 +469,18 @@ msgstr ""
msgid "Wizard for post holidays"
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/wizard/hr_holidays_mass_allocation.py:76
#, python-format
msgid "You must select at least one employee."
msgstr ""
#. module: hr_holidays_usability
#: code:addons/hr_holidays_usability/wizard/hr_holidays_mass_allocation.py:72
#, python-format
msgid "You must set a value for the number of days."
msgstr ""
#. module: hr_holidays_usability
#: constraint:hr.holidays:0
msgid "error msg in raise"

View File

@@ -36,7 +36,9 @@ class HrHolidaysEmployeeCounter(orm.Model):
'holiday_status_id': fields.many2one(
"hr.holidays.status", "Leave Type"),
'current_leaves_taken': fields.float('Current Leaves Taken'),
'current_remaining_leaves': fields.float('Current Remaining Leaves'),
'current_leaves_taken_posted': fields.float('Current Leaves Taken Posted'),
'current_leaves_remaining': fields.float('Current Remaining Leaves'),
'current_leaves_remaining_posted': fields.float('Current Remaining Leaves Posted'),
'total_allocated_leaves': fields.float('Total Allocated Leaves'),
}
@@ -53,7 +55,17 @@ class HrHolidaysEmployeeCounter(orm.Model):
THEN hh.number_of_days * -1
ELSE 0
END) AS current_leaves_taken,
sum(hh.number_of_days) AS current_remaining_leaves,
sum(
CASE WHEN hh.type='remove' AND hh.posted_date IS NOT null
THEN hh.number_of_days * -1
ELSE 0
END) AS current_leaves_taken_posted,
sum(hh.number_of_days) AS current_leaves_remaining,
sum(
CASE WHEN (hh.type='remove' AND hh.posted_date IS NOT null) OR hh.type='add'
THEN hh.number_of_days
ELSE 0
END) as current_leaves_remaining_posted,
sum(
CASE WHEN hh.type = 'add'
THEN hh.number_of_days

View File

@@ -10,9 +10,12 @@
<field name="employee_id"
invisible="not context.get('hr_holidays_employee_counter_tree_main_view')"/>
<field name="holiday_status_id"/>
<field name="current_leaves_taken"/>
<field name="current_remaining_leaves" sum="Total Remaining Leaves"/>
<field name="total_allocated_leaves"/>
<field name="current_leaves_taken"/>
<field name="current_leaves_taken_posted"/>
<field name="current_leaves_remaining" sum="Total Remaining Leaves"/>
<field name="current_leaves_remaining_posted"
sum="Total Remaining and Posted Leaves"/>
</tree>
</field>
</record>