fix
This commit is contained in:
parent
e10813728c
commit
b85ce8ae2f
|
|
@ -2978,3 +2978,14 @@ msgstr "الترحيل حسب نوع الموظف"
|
|||
#: model_terms:ir.ui.view,arch_db:exp_payroll_custom.hr_payslip_run_inherited_form_view
|
||||
msgid "Holiday Period"
|
||||
msgstr "فترة الإجازات"
|
||||
|
||||
#. module: exp_payroll_custom
|
||||
#: model:ir.model.fields,field_description:exp_payroll_custom.field_hr_payroll_structure__analytic_account_id
|
||||
#: model_terms:ir.ui.view,arch_db:exp_payroll_custom.salary_scale_form_view
|
||||
msgid "Analytic Account"
|
||||
msgstr "الحساب التحليلي"
|
||||
|
||||
#. module: exp_payroll_custom
|
||||
#: code:addons/exp_payroll_custom/models/hr_advance_payslip.py:0
|
||||
msgid "Sorry The Contract Employee %s is Not Journal Set"
|
||||
msgstr "للأسف، لم يتم اعداد دفتر اليومية لعقد الموظف %s."
|
||||
|
|
|
|||
|
|
@ -3019,11 +3019,15 @@ class HrPayslipRun(models.Model):
|
|||
res = []
|
||||
for v, items in grupos:
|
||||
new_items = list(items)
|
||||
analytic_account_id = None
|
||||
if round(sum(dicc['debit'] for dicc in new_items),2) > 0:
|
||||
analytic_account_id = self.salary_scale.analytic_account_id.id
|
||||
res.append({
|
||||
'name': v[0],
|
||||
'account_id': v[1],
|
||||
'debit': round(sum(dicc['debit'] for dicc in new_items),2),
|
||||
'credit': round(sum(dicc2['credit'] for dicc2 in new_items),2)
|
||||
'credit': round(sum(dicc2['credit'] for dicc2 in new_items),2),
|
||||
'analytic_account_id': analytic_account_id ,
|
||||
})
|
||||
return res
|
||||
|
||||
|
|
@ -3292,6 +3296,9 @@ class HrPayslipRun(models.Model):
|
|||
total_list = []
|
||||
move_vals = dict()
|
||||
journal = line.contract_id.journal_id
|
||||
if not journal:
|
||||
raise exceptions.Warning(
|
||||
_('Sorry The Contract Employee %s is Not Journal Set') % line.employee_id.name)
|
||||
for l in line.allowance_ids:
|
||||
amount_allow = l.total
|
||||
# account = l.salary_rule_id.rule_debit_account_id
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ class HrSalaryScale(models.Model):
|
|||
|
||||
salary_scale_id = fields.Many2one('hr.payroll.structure', string='Salary Scale', index=True) # salary scale
|
||||
|
||||
#Percentage_increase = fields.Float('Percentage Increase %',default=0.05)
|
||||
|
||||
analytic_account_id = fields.Many2one(comodel_name='account.analytic.account')
|
||||
|
||||
# Override Function
|
||||
|
||||
def get_all_rules(self):
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@
|
|||
<field name="end_date" attrs="{'invisible':[('type', '!=', 'scale')]}"/>
|
||||
<field name="transfer_type"
|
||||
attrs="{'invisible':[('type', '!=', 'scale')], 'required': [('type','=','scale')]}"/>
|
||||
<field name="analytic_account_id" string="Analytic Account"
|
||||
attrs="{'invisible':[('type', '!=', 'scale')]}"/>
|
||||
<field name="groups_number" attrs="{'invisible':[('type', '!=', 'level')]}"
|
||||
required="1"/>
|
||||
<field name="degree_number" required="1" attrs="{'invisible':[('type', '!=', 'group')]}"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue