Fix bug on backport from 5.2 for the account_asset improve (last commit)

This commit is contained in:
Bernat Brunet 2020-12-15 15:54:44 +01:00
parent 6e33165525
commit 2a2fc36fa6
1 changed files with 9 additions and 0 deletions

View File

@ -11,3 +11,12 @@ index fc23ca8..cc10240 100644
],
depends=['latest_move_date', 'next_depreciation_date'],
help=('The date must be between the last update/depreciation date '
@@ -866,7 +866,7 @@ class UpdateAsset(Wizard):
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)