changeset 922377a859da in sao:5.0
details: https://hg.tryton.org/sao?cmd=changeset&node=922377a859da
description:
        Always combine Time when setting DateTime with a Date

        issue11346
        review368381008
        (grafted from 35a2da4a20d8590c2d97a4d4331f7ec2f9034367)
diffstat:

 src/model.js |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (16 lines):

diff -r 1507e5418549 -r 922377a859da src/model.js
--- a/src/model.js      Fri Apr 15 21:26:55 2022 +0200
+++ b/src/model.js      Tue Apr 19 13:24:43 2022 +0200
@@ -1689,10 +1689,8 @@
                         value = null;
                     }
                 } else if (value.isDate) {
-                    current_value = this.get(record);
-                    if (current_value) {
-                        value = Sao.DateTime.combine(value, current_value);
-                    }
+                    current_value = this.get(record) || Sao.Time();
+                    value = Sao.DateTime.combine(value, current_value);
                 }
             }
             Sao.field.DateTime._super.set_client.call(this, record, value,

Reply via email to