changeset a15c3d5fc379 in modules/account_asset:5.6 details: https://hg.tryton.org/modules/account_asset?cmd=changeset&node=a15c3d5fc379 description: Include latest move and next depreciation as update date
issue10342 review334251002 (grafted from 64c8d13d0d632fa4edc024d1f2c60d79bf33bc98) diffstat: asset.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (23 lines): diff -r 7d6f71b9149c -r a15c3d5fc379 asset.py --- a/asset.py Fri Apr 16 19:37:02 2021 +0200 +++ b/asset.py Wed Apr 28 00:37:26 2021 +0200 @@ -784,8 +784,8 @@ amount = fields.Numeric('Amount', readonly=True) date = fields.Date('Date', required=True, domain=[ - ('date', '>', Eval('latest_move_date')), - ('date', '<', Eval('next_depreciation_date')), + ('date', '>=', Eval('latest_move_date')), + ('date', '<=', Eval('next_depreciation_date')), ], depends=['latest_move_date', 'next_depreciation_date'], help=('The date must be between the last update/depreciation date ' @@ -894,7 +894,7 @@ asset = Asset(Transaction().context['active_id']) latest_move_date = self.show_move.latest_move_date next_date = self.show_move.next_depreciation_date - if not (latest_move_date < self.show_move.date < next_date): + if not (latest_move_date <= self.show_move.date <= next_date): raise ValueError('The update move date is invalid') move = self.get_move(asset) move.lines = self.get_move_lines(asset)