summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2013-04-04 12:34:22 +0200
committerThibault Delavallée <tde@openerp.com>2013-04-04 12:34:22 +0200
commit431f447fa4232a037f1cfa0579fcd8f005583180 (patch)
tree34fdbf3f3979399c3f9f246846eb2276ee706c5b /addons/web/static/src/xml/base.xml
parentcaff74a6504d48e2a3fde8fb61d23efcd3c68a2f (diff)
parentb207801acc5daa3c1244f9a0321fa1caaf8ca07e (diff)
[MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20130328112348-5gcg79ipve3rt4ut bzr revid: tde@openerp.com-20130402081347-hgz8vg6af9l18vcx bzr revid: tde@openerp.com-20130404090149-csbp0wnodbe126q7 bzr revid: tde@openerp.com-20130404103422-p533mmjn7btlhvcb
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
-rw-r--r--addons/web/static/src/xml/base.xml29
1 files changed, 26 insertions, 3 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index bcd5763a37e..405ee81e0cd 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -40,11 +40,11 @@
<td>
<p>
<t t-js="d">
- var message = d.error.data.message || d.error.data.fault_code;
- d.error.html_error = context.engine.tools.html_escape(message)
+ var message = d.message ? d.message : d.error.data.message;
+ d.html_error = context.engine.tools.html_escape(message)
.replace(/\n/g, '<br/>');
</t>
- <t t-raw="error.html_error"/>
+ <t t-raw="html_error"/>
</p>
</td>
</tr>
@@ -1111,6 +1111,29 @@
</select>
</span>
</t>
+<t t-name="FieldRadio">
+ <span t-attf-class="oe_form_field oe_form_field_radio #{widget.horizontal ? 'oe_horizontal' : 'oe_vertical'}" t-att-style="widget.node.attrs.style">
+ <t t-if="widget.horizontal">
+ <t t-set="width" t-value="Math.floor(100 / widget.field.selection.length)"/>
+ <t t-if="!widget.no_radiolabel">
+ <t t-foreach="widget.field.selection" t-as="selection">
+ <div class="oe_radio_header" t-att-style="'width: ' + width + '%;'"><t t-esc="selection[1]"/></div>
+ </t>
+ <br/>
+ </t>
+ <t t-foreach="widget.field.selection" t-as="selection">
+ <div class="oe_radio_input" t-att-style="'width: ' + width + '%;'" t-att-data-id="selection[0]">&amp;nbsp;</div>
+ </t>
+ </t>
+ <t t-if="!widget.horizontal">
+ <t t-foreach="widget.field.selection" t-as="selection">
+ <div class="oe_radio_header" t-att-style="'width: ' + width + '%;'" t-att-data-id="selection[0]">
+ <div class="oe_radio_input">&amp;nbsp;</div><t t-if="!widget.no_radiolabel" t-esc="selection[1]"/>
+ </div>
+ </t>
+ </t>
+ </span>
+</t>
<t t-name="FieldMany2One">
<span class="oe_form_field oe_form_field_many2one oe_form_field_with_button" t-att-style="widget.node.attrs.style">
<t t-if="widget.get('effective_readonly')">