Browse Source

[IMP] Possibility to reorder tiles;

pull/111/head
Sylvain LE GAL 9 years ago
parent
commit
59120aded9
  1. 2
      web_dashboard_tile/__openerp__.py
  2. 4
      web_dashboard_tile/tile.py
  3. 1
      web_dashboard_tile/tile.xml

2
web_dashboard_tile/__openerp__.py

@ -47,7 +47,7 @@
* add icons
* support client side action (like inbox)
* support select int/float column with min/max/avg/sum to display
* change position (maybe drag&drop)
""",
"summary": "Add tile to dashboard",
'data': ['tile.xml',

4
web_dashboard_tile/tile.py

@ -29,6 +29,7 @@ import random
class tile(orm.Model):
_name = 'tile.tile'
_order = 'sequence, name'
def _get_tile_info(self, cr, uid, ids, fields, args, context=None):
ima_obj = self.pool['ir.model.access']
@ -74,11 +75,14 @@ class tile(orm.Model):
_get_tile_info, type='boolean', string='Active',
multi='tile_info', readonly=True, fnct_search=_search_active),
'color': fields.char('Kanban Color'),
'sequence': fields.integer(
'Sequence', required=True),
}
_defaults = {
'domain': '[]',
'color': 0,
'sequence': 0,
}
def open_link(self, cr, uid, ids, context=None):

1
web_dashboard_tile/tile.xml

@ -6,6 +6,7 @@
<field name="model">tile.tile</field>
<field name="arch" type="xml">
<tree string="Dashboard tiles">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="domain"/>
<field name="model_id"/>

Loading…
Cancel
Save