diff options
| author | Yenthe V.G <yenthevg@gmail.com> | 2017-09-08 09:23:44 +0200 |
|---|---|---|
| committer | ged-odoo <ged@odoo.com> | 2017-09-08 09:23:44 +0200 |
| commit | 1d769ad5a71e6f1eb686a184288e2ba0e2e39b1d (patch) | |
| tree | a74af518cfe11cb464af3369693e162bfec9c23f /addons | |
| parent | 55b8a454c97020fa52799651c3312fcebb3ee5d3 (diff) | |
[FIX] web: Don't show buttons when model has readonly access
PR #19314
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web/static/src/js/views/form_common.js | 4 |
1 files 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. |
