diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-03-27 11:50:40 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-03-27 11:50:40 +0100 |
| commit | b08a2f2bbc8f615b778ec75e4b8f410626c52800 (patch) | |
| tree | a782a6cbad8f2f220d7b4113c467638975662daa /addons/gamification/static | |
| parent | 6674de3e04d258d9408034f15270ac98f4e31c9e (diff) | |
[ADD] user defined action for goal update
bzr revid: mat@openerp.com-20130327105040-ezlg1ml0xvoe5z58
Diffstat (limited to 'addons/gamification/static')
| -rw-r--r-- | addons/gamification/static/src/js/gamification.js | 3 | ||||
| -rw-r--r-- | addons/gamification/static/src/xml/gamification.xml | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/addons/gamification/static/src/js/gamification.js b/addons/gamification/static/src/js/gamification.js index 62de4835842..dfd8b2f607b 100644 --- a/addons/gamification/static/src/js/gamification.js +++ b/addons/gamification/static/src/js/gamification.js @@ -75,6 +75,7 @@ openerp.gamification = function(instance) { var self = this; self.dfm = new instance.web.form.DefaultFieldManager(self); + // Generate a FieldMonetary for each .oe_goal_field_monetary self.$el.find(".oe_goal_field_monetary").each(function() { money_field = new instance.web.form.FieldMonetary(self.dfm, { attrs: { @@ -84,9 +85,7 @@ openerp.gamification = function(instance) { money_field.set('currency', currency_id); money_field.get_currency_info(); money_field.set('value', parseInt($(this).text())); - console.log(money_field.get('value')); money_field.replace($(this)); - console.log(money_field.$el.html()); }); } }); diff --git a/addons/gamification/static/src/xml/gamification.xml b/addons/gamification/static/src/xml/gamification.xml index 31664f4c4f4..6eca4093084 100644 --- a/addons/gamification/static/src/xml/gamification.xml +++ b/addons/gamification/static/src/xml/gamification.xml @@ -10,7 +10,7 @@ <ul class="oe_goals_list"> <li t-foreach="plan.goals" t-as="goal"> <strong t-attf-class="#{goal.state == 'reached' ? 'oe_goal_reached' : goal.state == 'failed' ? 'oe_goal_failed' : ''}" t-att-title="goal.type_description"><t t-esc="goal.type_name" /></strong> - <t t-if="goal.computation_mode == 'manually'"> + <t t-if="goal.computation_mode == 'manually' or goal.type_action"> <a class="oe_goal_action" t-att-id="goal.id">modify</a> </t> <!-- <t t-if="goal.type_description"> @@ -42,7 +42,7 @@ <tr> <th colspan="4" t-attf-title="#{planline.type_description ? planline.type_description : ''}"> <t t-esc="planline.type_name"/> - <t t-if="planline.type_computation_mode == 'manually'"> + <t t-if="planline.type_computation_mode == 'manually' or planline.type_action"> <a class="oe_goal_action" t-att-id="goal.id">modify</a> </t> </th> |
