diff options
| author | Géry Debongnie <ged@odoo.com> | 2015-06-15 16:31:27 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2015-06-15 16:31:27 +0200 |
| commit | 2c7367a8cc8d9e200b1fa2083ce0d80f8f4e4bd3 (patch) | |
| tree | af916cff4d94554b1e9667913e3feb331ec81a13 /addons/hr_gamification | |
| parent | 5cb10d4fc9594f0c6825757c24d66d63664ce026 (diff) | |
| parent | 82186a93bb3f93c36667835df68fa31dcacf97a2 (diff) | |
[MERGE] new kanban view
This branch introduces the new kanban view. It is not completely
compatible with the previous version. Here are a few importants
points to be aware of:
* the kanban view template is rendered directly, not put inside a div.
It means that if a template has more than one root, chaos will ensue
* kanban view has been split into several files, and various js modules
have changed. For example, the KanbanRecord class is now exported by
the 'web_kanban.Record' module. So, require statements need to be
updated
* records do not have access to the view (i.e., record.view.is_action_enabled('edit'))
You can use the 'editable' and 'deletable' key instead
Diffstat (limited to 'addons/hr_gamification')
| -rw-r--r-- | addons/hr_gamification/static/src/js/gamification.js | 6 | ||||
| -rw-r--r-- | addons/hr_gamification/views/gamification.xml | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/addons/hr_gamification/static/src/js/gamification.js b/addons/hr_gamification/static/src/js/gamification.js index 765acb257e4..a7a0201900a 100644 --- a/addons/hr_gamification/static/src/js/gamification.js +++ b/addons/hr_gamification/static/src/js/gamification.js @@ -1,11 +1,11 @@ odoo.define('hr_gamification.hr_gamification', function(require) { "use strict"; -var common = require('web_kanban.common'); +var KanbanRecord = require('web_kanban.Record'); -common.KanbanRecord.include({ +KanbanRecord.include({ on_card_clicked: function() { - if (this.view.dataset.model === 'gamification.badge.user') { + if (this.model === 'gamification.badge.user') { var action = { type: 'ir.actions.act_window', res_model: 'gamification.badge', diff --git a/addons/hr_gamification/views/gamification.xml b/addons/hr_gamification/views/gamification.xml index c3299a3c24b..3684cba5924 100644 --- a/addons/hr_gamification/views/gamification.xml +++ b/addons/hr_gamification/views/gamification.xml @@ -7,9 +7,9 @@ <field name="model">gamification.badge</field> <field name="inherit_id" ref="gamification.badge_form_view"/> <field name="arch" type="xml"> - <xpath expr="//div[@class='oe_right oe_button_box']" position="inside"> + <div name="button_box" position="inside"> <button string="Granted Employees" type="object" name="get_granted_employees" attrs="{'invisible': [('stat_count','=',0)]}" /> - </xpath> + </div> </field> </record> |
