changeset 64c8d13d0d63 in modules/account_asset:default
details: 
https://hg.tryton.org/modules/account_asset?cmd=changeset&node=64c8d13d0d63
description:
        Include latest move and next depreciation as update date

        issue10342
        review334251002
diffstat:

 asset.py |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r e73a6d71ecae -r 64c8d13d0d63 asset.py
--- a/asset.py  Sat Apr 10 23:46:23 2021 +0200
+++ b/asset.py  Wed Apr 28 00:37:26 2021 +0200
@@ -811,8 +811,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 '
@@ -915,7 +915,7 @@
 
         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(self.record)
         move.lines = self.get_move_lines(self.record)

Reply via email to