From 50e87b50aa32a0306621da92c5fbe15ea3ef5aa9 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 21 Jun 2017 09:20:54 +0200 Subject: [PATCH] Fix onchange_date_range_id() --- l10n_nl_tax_statement/models/l10n_nl_vat_statement.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 27223a1aa..c8e292181 100644 --- a/l10n_nl_tax_statement/models/l10n_nl_vat_statement.py +++ b/l10n_nl_tax_statement/models/l10n_nl_vat_statement.py @@ -72,10 +72,8 @@ def default_get(self, fields_list): @api.onchange('date_range_id') def onchange_date_range_id(self): if self.date_range_id and self.state == 'draft': - self.write({ - 'from_date': self.date_range_id.date_start, - 'to_date': self.date_range_id.date_end, - }) + self.from_date = self.date_range_id.date_start + self.to_date = self.date_range_id.date_end @api.onchange('from_date', 'to_date') def onchange_date(self):