changeset 8a7a4e1c281f in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=8a7a4e1c281f
description:
        Use name instead of rec_name for button_link action

        Since issue9445, action values are explicitly defined. Default values 
for
        actions are now: id, name, type and icon.rec_name. That's why we should 
use
        name instead of rec_name.

        issue9481
        review310061002
diffstat:

 src/view/form.js |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r c41500543b1e -r 8a7a4e1c281f src/view/form.js
--- a/src/view/form.js  Mon Jul 13 21:14:27 2020 +0200
+++ b/src/view/form.js  Wed Jul 15 17:32:39 2020 +0200
@@ -942,7 +942,7 @@
                 'method': 'model.ir.action.get_action_value',
                 'params': [this.action_id, context],
             }, Sao.Session.current_session, false);
-            this.label.text(action.rec_name);
+            this.label.text(action.name);
 
             var decoder = new Sao.PYSON.Decoder(pyson_ctx);
             var domain = decoder.decode(action.pyson_domain);
@@ -960,7 +960,7 @@
             var counter;
             if (record && record.links_counts[this.action_id]) {
                 counter = record.links_counts[this.action_id];
-                this.set_label(action.rec_name, tab_domains, counter);
+                this.set_label(action.name, tab_domains, counter);
             } else {
                 if (tab_domains.length) {
                     counter = tab_domains.map(function() {
@@ -984,7 +984,7 @@
                         }, Sao.Session.current_session).then(function(value) {
                             this._set_count(
                                 value, i, current, counter,
-                                action.rec_name, tab_domains);
+                                action.name, tab_domains);
                         }.bind(this));
                     }, this);
                 } else {
@@ -995,7 +995,7 @@
                     }, Sao.Session.current_session).then(function(value) {
                         this._set_count(
                             value, 0, current, counter,
-                            action.rec_name, tab_domains);
+                            action.name, tab_domains);
                     }.bind(this));
                 }
             }

Reply via email to