[IMP] hr_payroll_account: Don't erase journal_id if already set
If the journal_id is already set on the payslip and if there are no journal_id on the contract, don't erase the value on the onchange method closes odoo/odoo#29616
This commit is contained in:
@@ -42,7 +42,7 @@ class HrPayslip(models.Model):
|
||||
@api.onchange('contract_id')
|
||||
def onchange_contract(self):
|
||||
super(HrPayslip, self).onchange_contract()
|
||||
self.journal_id = self.contract_id.journal_id.id or (not self.contract_id and self.default_get(['journal_id'])['journal_id'])
|
||||
self.journal_id = self.contract_id.journal_id.id or self.default_get(['journal_id'])['journal_id']
|
||||
|
||||
@api.multi
|
||||
def action_payslip_cancel(self):
|
||||
|
||||
Reference in New Issue
Block a user