Hello,
Odoo V11
The model is 'hr.payslip' I study . I am getting an error when update field in 'hr.contract' object
I have a depends method:
@api.one
@api.depends('line_ids')
def _compute_cumulative_income_tax(self):
for record in self:
if record.line_ids:
.... some calculations
#error code
if record.cumulative_income_tax_base:
contract = self.env['hr.contract'].browse(record.contract_id.id)
if contract:
total = contract.varsa_devir_vergi_matrahi + temp_line_amount or 0.0
#After I use write method,error was occurred
contract.write({
'varsa_devir_vergi_matrahi': total
})