def action_confirm(self): for rec in self: val_faltante = rec.monto_financiar - rec.total_pagar + rec.total_interes - rec.interes_cuota_ad if val_faltante == 0: rec.write({'state': 'confirmed'}) else: raise UserError(_('Por favor revise el crédito que estén ingresado bien todos los valores.'))
The function add takes two arguments a and b and returns the sum of a and b. x = 1 + 1