diff --git a/account_reset_chart/models/res_company.py b/account_reset_chart/models/res_company.py index d9996fffe..62415ffcb 100644 --- a/account_reset_chart/models/res_company.py +++ b/account_reset_chart/models/res_company.py @@ -60,7 +60,8 @@ class Company(models.Model): [('company_id', '=', self.id), ('state', 'in', ('proforma', 'posted'))]) vouchers.cancel_voucher() - vouchers.unlink() + voucher_obj.search( + [('company_id', '=', self.id)]).unlink() except KeyError: pass