diff --git a/l10n_nl_tax_statement/models/l10n_nl_vat_statement.py b/l10n_nl_tax_statement/models/l10n_nl_vat_statement.py index ad081ad72..7872ac4e7 100644 --- a/l10n_nl_tax_statement/models/l10n_nl_vat_statement.py +++ b/l10n_nl_tax_statement/models/l10n_nl_vat_statement.py @@ -130,15 +130,17 @@ def _get_unreported_move_domain(self): ) unreported_move_from_date = fields.Date() - @api.multi def _compute_is_invoice_basis(self): - self.is_invoice_basis = False has_invoice_basis = self.env['ir.model.fields'].sudo().search_count([ ('model', '=', 'res.company'), ('name', '=', 'l10n_nl_tax_invoice_basis') ]) - if has_invoice_basis: - self.is_invoice_basis = self.company_id.l10n_nl_tax_invoice_basis + for statement in self: + if has_invoice_basis: + invoice_basis = statement.company_id.l10n_nl_tax_invoice_basis + statement.is_invoice_basis = invoice_basis + else: + statement.is_invoice_basis = False is_invoice_basis = fields.Boolean( string='NL Tax Invoice Basis',