diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-02-26 18:56:26 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-02-26 18:56:26 +0100 |
| commit | 109dae2efa84d5561bed6ead8d1aa2f1a8570d7f (patch) | |
| tree | bb04e41e6950bf93765bd6b1df3ec02ae0910f85 /addons/web | |
| parent | f6d32a9fe9311e7c2c8c5dd5fd1d1afc182391c5 (diff) | |
| parent | d4f41a18a6a21ea627f2cabccb17d4049f4ad0cc (diff) | |
[MERGE] forward port of branch 8.0 up to d4f41a1
Diffstat (limited to 'addons/web')
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 4 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index bed0cefbd9e..ba7a689a8a4 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2501,7 +2501,9 @@ instance.web.form.Priority = instance.web.form.FieldChar.extend({ this.record_id = this.view.datarecord.id; this.priorities = this.prepare_priority(); this.$el.html(QWeb.render("Priority", {'widget': this})); - this.$el.find('li').on('click', this.set_priority.bind(this)); + if (!this.get('readonly')){ + this.$el.find('li').on('click', this.set_priority.bind(this)); + } }, /* setting the value: in view mode, perform an asynchronous call and reload the form view; in edit mode, use set_value to save the new value that will diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index ab242df110b..bbf83d02b0e 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1118,9 +1118,10 @@ <ul style="list-style: none; padding-left: 2px; display: inline-block;"> <t t-foreach="widget.priorities" t-as="rec" > <li t-att-data-value="rec.click_value" style="display: inline-block;"> - <a href="#" t-att-title="rec.name"> + <a t-if="!widget.get('readonly')" href="#" t-att-title="rec.name"> <i t-att-class="widget.get('value') gte rec.value and 'fa fa-star oe_star_on' or 'fa fa-star oe_star_off'"/> </a> + <span t-if="widget.get('readonly')" t-att-title="rec.name" t-att-class="widget.get('value') gte rec.value and 'oe_e oe_star_on' or 'oe_e oe_star_off'">7</span> </li> </t> </ul> |
