Skip to content

Commit

Permalink
Fix onchange_date_range_id()
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Jun 21, 2017
1 parent 38792c8 commit 2b7012b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions l10n_nl_tax_statement/models/l10n_nl_vat_statement.py
Expand Up @@ -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):
Expand Down

0 comments on commit 2b7012b

Please sign in to comment.