Merge pull request #3284 from expsa/change_translate_open_emp
Change translate open emp
This commit is contained in:
commit
244be12d90
|
|
@ -164,7 +164,12 @@ msgstr "ساعات "
|
||||||
#: model_terms:ir.ui.view,arch_db:attendances.employee_lateness_absense_overtime_form_view
|
#: model_terms:ir.ui.view,arch_db:attendances.employee_lateness_absense_overtime_form_view
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Absent Hours By HR"
|
msgid "Absent Hours By HR"
|
||||||
msgstr "إستثناء ساعات الغياب"
|
msgstr "إستثناء الساعات "
|
||||||
|
|
||||||
|
#. module: attendances
|
||||||
|
#: model_terms:ir.ui.view,arch_db:attendances.employee_lateness_absense_overtime_form_view
|
||||||
|
msgid "Select Employee"
|
||||||
|
msgstr "إختيار الموظفين"
|
||||||
|
|
||||||
#. module: attendances
|
#. module: attendances
|
||||||
#: code:addons/attendances/wizard/attendances_report_wiz.py:0
|
#: code:addons/attendances/wizard/attendances_report_wiz.py:0
|
||||||
|
|
@ -1747,7 +1752,7 @@ msgstr ""
|
||||||
#. module: attendances
|
#. module: attendances
|
||||||
#: model_terms:ir.ui.view,arch_db:attendances.employee_lateness_absense_overtime_form_view
|
#: model_terms:ir.ui.view,arch_db:attendances.employee_lateness_absense_overtime_form_view
|
||||||
msgid "Send Email"
|
msgid "Send Email"
|
||||||
msgstr "إرسال إيميل"
|
msgstr "إرسال بريد إلكتروني"
|
||||||
|
|
||||||
#. module: attendances
|
#. module: attendances
|
||||||
#: model:ir.model.fields,field_description:attendances.field_hr_attendance_report__send_email
|
#: model:ir.model.fields,field_description:attendances.field_hr_attendance_report__send_email
|
||||||
|
|
@ -2036,7 +2041,7 @@ msgstr ""
|
||||||
#: model_terms:ir.ui.view,arch_db:attendances.employee_lateness_absense_overtime_form_view
|
#: model_terms:ir.ui.view,arch_db:attendances.employee_lateness_absense_overtime_form_view
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Total Absence Hours"
|
msgid "Total Absence Hours"
|
||||||
msgstr "مجموع ساعات الغياب"
|
msgstr "مجموع الساعات "
|
||||||
|
|
||||||
#. module: attendances
|
#. module: attendances
|
||||||
#: code:addons/attendances/wizard/attendances_report_wiz.py:0
|
#: code:addons/attendances/wizard/attendances_report_wiz.py:0
|
||||||
|
|
@ -2048,7 +2053,7 @@ msgstr "اجمالي الغياب"
|
||||||
#. module: attendances
|
#. module: attendances
|
||||||
#: model:ir.model.fields,field_description:attendances.field_hr_attendance_transaction__total_absent_hours
|
#: model:ir.model.fields,field_description:attendances.field_hr_attendance_transaction__total_absent_hours
|
||||||
msgid "Total Absent Hours"
|
msgid "Total Absent Hours"
|
||||||
msgstr "مجموع ساعات الغياب"
|
msgstr "مجموع الساعات "
|
||||||
|
|
||||||
#. module: attendances
|
#. module: attendances
|
||||||
#: model:ir.model.fields,field_description:attendances.field_hr_attendance_report_line__total_deduction
|
#: model:ir.model.fields,field_description:attendances.field_hr_attendance_report_line__total_deduction
|
||||||
|
|
|
||||||
|
|
@ -40,19 +40,10 @@ class HrAttendanceReport(models.Model):
|
||||||
compute='_compute_available_employees',
|
compute='_compute_available_employees',
|
||||||
store=False
|
store=False
|
||||||
)
|
)
|
||||||
selected_lines = fields.One2many(
|
|
||||||
'hr.attendance.report.line',
|
|
||||||
compute='_compute_selected_lines',
|
|
||||||
string="Selected Employees Lines"
|
|
||||||
)
|
|
||||||
send_email = fields.Boolean(string=" Is Send Email", default=False,store=True)
|
send_email = fields.Boolean(string=" Is Send Email", default=False,store=True)
|
||||||
|
|
||||||
|
|
||||||
@api.depends('selected_employee_ids', 'line_ids','department_ids')
|
|
||||||
def _compute_selected_lines(self):
|
|
||||||
for report in self:
|
|
||||||
lines = report.line_ids.filtered(lambda line: line.employee_name.id in report.selected_employee_ids.ids)
|
|
||||||
report.selected_lines = lines
|
|
||||||
|
|
||||||
@api.onchange('department_ids')
|
@api.onchange('department_ids')
|
||||||
def _compute_available_employees(self):
|
def _compute_available_employees(self):
|
||||||
|
|
@ -60,7 +51,8 @@ class HrAttendanceReport(models.Model):
|
||||||
if report.department_ids:
|
if report.department_ids:
|
||||||
employees = self.env['hr.employee'].search([
|
employees = self.env['hr.employee'].search([
|
||||||
('department_id', 'in', report.department_ids.ids),
|
('department_id', 'in', report.department_ids.ids),
|
||||||
('finger_print', '=', True)
|
('finger_print', '=', True),
|
||||||
|
('state', '=', 'open')
|
||||||
])
|
])
|
||||||
report.available_employee_ids = employees
|
report.available_employee_ids = employees
|
||||||
else:
|
else:
|
||||||
|
|
@ -404,8 +396,13 @@ class HrAttendanceReport(models.Model):
|
||||||
template = self._get_email_template()
|
template = self._get_email_template()
|
||||||
sent_count = 0
|
sent_count = 0
|
||||||
for line in self.line_ids:
|
for line in self.line_ids:
|
||||||
if not line.employee_name or not line.employee_name.work_email:
|
if (
|
||||||
|
not line.employee_name or
|
||||||
|
not line.employee_name.work_email or
|
||||||
|
line.total_deduction <= 0
|
||||||
|
):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
template.with_context(
|
template.with_context(
|
||||||
email_to=line.employee_name.work_email,
|
email_to=line.employee_name.work_email,
|
||||||
employee_name=line.employee_name.name,
|
employee_name=line.employee_name.name,
|
||||||
|
|
@ -414,6 +411,8 @@ class HrAttendanceReport(models.Model):
|
||||||
).send_mail(line.id, force_send=True)
|
).send_mail(line.id, force_send=True)
|
||||||
|
|
||||||
sent_count += 1
|
sent_count += 1
|
||||||
|
|
||||||
self.send_email = True
|
self.send_email = True
|
||||||
return sent_count
|
return sent_count
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,16 +117,12 @@
|
||||||
<field name="selected_employee_ids"
|
<field name="selected_employee_ids"
|
||||||
widget="many2many"
|
widget="many2many"
|
||||||
domain="[('id', 'in', available_employee_ids)]"
|
domain="[('id', 'in', available_employee_ids)]"
|
||||||
string="اختر الموظفين"
|
string="Select Employee"
|
||||||
context="{'search_default_available_employees': True}"
|
context="{'search_default_available_employees': True}"
|
||||||
options="{'no_create': True}"
|
options="{'no_create': True}"
|
||||||
>
|
/>
|
||||||
<tree editable="top">
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="company_id" invisible="1"/>
|
|
||||||
<field name="department_id"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue