Browse Source

[FIX] monetary fields

pull/1/head
Ivan Yelizariev 10 years ago
parent
commit
39dfc872bb
  1. 2
      models.py
  2. 9
      static/src/css/main.css
  3. 2
      static/src/xml/main.xml

2
models.py

@ -99,6 +99,8 @@ Slice - use "domain" for total and "won_domain" for target
}
if self.value_field_id:
r_json['current'] = getattr(r, self.value_field_id.name)
if self.value_field_monetary:
r_json['monetary'] = 1
res['lines'].append(r_json)
elif self.type == 'funnel':
stage_ids = [] # [key]

9
static/src/css/main.css

@ -14,6 +14,15 @@
min-width: 65px;
padding: 0 5px;
}
.openerp .oe_mail_wall .oe_goal .oe_goals_list .oe_cell.oe_goal_current .oe_form_field_monetary{
font-weight: normal;
font-size: 70%;
}
.openerp .oe_mail_wall .oe_goal .oe_goals_list .oe_cell.oe_goal_current .oe_form_field_monetary .oe_form_char_content {
font-weight: bold;
font-size: 142%; /* 1/.7 */
}
.openerp .oe_mail_wall .oe_goal .oe_goals_list .oe_cell.oe_goal_current span.small {
font-weight: normal;
font-size: 70%;

2
static/src/xml/main.xml

@ -17,7 +17,7 @@
<t t-if="line.display_mode == 'progress'">
<div class="oe_goal_progress_background"></div>
<div class="oe_goal_progress" t-attf-style="#{line.display_mode == 'progress' ? 'width: '+line.completeness+'%;' : 'width:0;'}"></div>
<div class="oe_cell oe_goal_current"><t t-esc="line.current" /></div>
<div class="oe_cell oe_goal_current" ><span t-attf-class="#{line.monetary ? 'oe_goal_field_monetary' : ''}" t-attf-data-id="#{line.monetary ? info.currency : ''}"><t t-esc="line.current" /></span></div>
</t>
<div class="oe_cell">
<span t-att-title="line.description"><t t-raw="line.name" /></span>

Loading…
Cancel
Save