web mailing list archives

web@odoo-community.org

Avatar

Re: [OCA/web] [14.0][ADD] web list view general buttons (#1846)

by "Sylvain LE GAL" <notifications@github.com> - 29/03/2021 11:47:54

@legalsylvain commented on this pull request.


In web_list_view_general_buttons/static/src/js/list_controller.js:

> +                    })
+                );
+                this.$buttons.on(
+                    "click",
+                    ".o_general_button",
+                    this._onClickGeneralButton.bind(this)
+                );
+                this.$buttons.prepend(this.$generalButtons);
+            }
+        },
+
+        _onClickGeneralButton: function (event) {
+            var el = event.target;
+            var self = this;
+            self._rpc({
+                model: $(el).attr("model") || self.modelName,

I dont understand in which case ModelName is not defined or different of model key. And so i dont think model key is required. Dont you think ?


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.