trytond-patches/account_asset.diff

23 lines
1.2 KiB
Diff

diff --git a/asset.py b/asset.py
index fc23ca8..cc10240 100644
--- a/trytond/trytond/modules/account_asset/asset.py Mon May 06 14:53:17 2019 +0200
+++ b/trytond/trytond/modules/account_asset/asset.py Tue Jun 11 22:56:45 2019 +0200
@@ -757,7 +757,7 @@ class UpdateAssetShowDepreciation(ModelView):
date = fields.Date('Date', required=True,
domain=[
('date', '>', Eval('latest_move_date')),
- ('date', '<', Eval('next_depreciation_date')),
+ ('date', '<=', Eval('next_depreciation_date')),
],
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)