From 1d769ad5a71e6f1eb686a184288e2ba0e2e39b1d Mon Sep 17 00:00:00 2001 From: "Yenthe V.G" Date: Fri, 8 Sep 2017 09:23:44 +0200 Subject: [PATCH] [FIX] web: Don't show buttons when model has readonly access PR #19314 --- addons/web/static/src/js/views/form_common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/views/form_common.js b/addons/web/static/src/js/views/form_common.js index 2ac0e0a024f..638327c8a3a 100644 --- a/addons/web/static/src/js/views/form_common.js +++ b/addons/web/static/src/js/views/form_common.js @@ -174,8 +174,8 @@ var CompletionFieldMixin = { init: function() { this.limit = 7; this.orderer = new utils.DropMisordered(); - this.can_create = this.node.attrs.can_create || true; - this.can_write = this.node.attrs.can_write || true; + this.can_create = this.node.attrs.can_create == "false" ? false : true; + this.can_write = this.node.attrs.can_write == "false" ? false : true; }, /** * Call this method to search using a string.