UPDATE exp_payroll_custom
This commit is contained in:
parent
d4dbd6cbbd
commit
54ff050032
|
|
@ -2961,10 +2961,7 @@ class HrPayslipRun(models.Model):
|
|||
|
||||
def transfer(self):
|
||||
list_of_vals = []
|
||||
attachments = self.env['ir.attachment'].search([
|
||||
('res_model', '=', 'hr.payslip.run'),
|
||||
('res_id', 'in', self.ids)
|
||||
])
|
||||
|
||||
if self.salary_scale.transfer_type == 'all':
|
||||
total_of_list = []
|
||||
for line in self.slip_ids:
|
||||
|
|
@ -3051,17 +3048,12 @@ class HrPayslipRun(models.Model):
|
|||
# 'date': fields.Date.context_today(self),
|
||||
'date': self.date_end,
|
||||
'ref': self.name,
|
||||
'line_ids': [(0, 0, item) for item in record_final_item]
|
||||
'line_ids': [(0, 0, item) for item in record_final_item],
|
||||
'res_model': 'hr.payslip.run',
|
||||
'res_id': self.id
|
||||
})
|
||||
self.move_id = move.id
|
||||
for attachment in attachments:
|
||||
new_attachment = self.env['ir.attachment'].create({
|
||||
'name': attachment.name,
|
||||
'type': attachment.type,
|
||||
'datas': attachment.datas,
|
||||
'res_model': 'account.move',
|
||||
'res_id': move.id,
|
||||
})
|
||||
|
||||
|
||||
########################## per_analytic_account ###########
|
||||
|
||||
|
|
@ -3176,17 +3168,12 @@ class HrPayslipRun(models.Model):
|
|||
'date': self.date_end,
|
||||
|
||||
'ref': self.name,
|
||||
'line_ids': [(0, 0, item) for item in record_final_item]
|
||||
'line_ids': [(0, 0, item) for item in record_final_item],
|
||||
'res_model': 'hr.payslip.run',
|
||||
'res_id': self.id
|
||||
})
|
||||
self.move_id = move.id
|
||||
for attachment in attachments:
|
||||
new_attachment = self.env['ir.attachment'].create({
|
||||
'name': attachment.name,
|
||||
'type': attachment.type,
|
||||
'datas': attachment.datas,
|
||||
'res_model': 'account.move',
|
||||
'res_id': move.id,
|
||||
})
|
||||
|
||||
|
||||
# import pdb
|
||||
# pdb.set_trace()
|
||||
|
|
@ -3271,17 +3258,11 @@ class HrPayslipRun(models.Model):
|
|||
# 'date': fields.Date.context_today(self),
|
||||
'date': self.date_end,
|
||||
'ref': line.name,
|
||||
'line_ids': [(0, 0, item) for item in new_record_list]
|
||||
'line_ids': [(0, 0, item) for item in new_record_list],
|
||||
'res_model': 'hr.payslip.run',
|
||||
'res_id': self.id
|
||||
})
|
||||
line.move_id = move.id
|
||||
for attachment in attachments:
|
||||
new_attachment = self.env['ir.attachment'].create({
|
||||
'name': attachment.name,
|
||||
'type': attachment.type,
|
||||
'datas': attachment.datas,
|
||||
'res_model': 'account.move',
|
||||
'res_id': move.id,
|
||||
})
|
||||
|
||||
else:
|
||||
bank_id = ''
|
||||
|
|
@ -3439,17 +3420,11 @@ class HrPayslipRun(models.Model):
|
|||
# 'date': fields.Date.context_today(self),
|
||||
'date': self.date_end,
|
||||
'ref': bank_id,
|
||||
'line_ids': [(0, 0, item) for item in record_final_item]
|
||||
'line_ids': [(0, 0, item) for item in record_final_item],
|
||||
'res_model': 'hr.payslip.run',
|
||||
'res_id': self.id
|
||||
})
|
||||
line.move_id = move.id
|
||||
for attachment in attachments:
|
||||
new_attachment = self.env['ir.attachment'].create({
|
||||
'name': attachment.name,
|
||||
'type': attachment.type,
|
||||
'datas': attachment.datas,
|
||||
'res_model': 'account.move',
|
||||
'res_id': move.id,
|
||||
})
|
||||
|
||||
for line in self.slip_ids:
|
||||
payslip = self.env['hr.payslip'].search([('state', '=', line.state)])
|
||||
|
|
|
|||
Loading…
Reference in New Issue