mirror of https://github.com/OCA/web.git
[IMP] Possibility to reorder tiles;
parent
bdadea4a44
commit
59120aded9
|
@ -47,7 +47,7 @@
|
||||||
* add icons
|
* add icons
|
||||||
* support client side action (like inbox)
|
* support client side action (like inbox)
|
||||||
* support select int/float column with min/max/avg/sum to display
|
* support select int/float column with min/max/avg/sum to display
|
||||||
* change position (maybe drag&drop)
|
|
||||||
""",
|
""",
|
||||||
"summary": "Add tile to dashboard",
|
"summary": "Add tile to dashboard",
|
||||||
'data': ['tile.xml',
|
'data': ['tile.xml',
|
||||||
|
|
|
@ -29,6 +29,7 @@ import random
|
||||||
|
|
||||||
class tile(orm.Model):
|
class tile(orm.Model):
|
||||||
_name = 'tile.tile'
|
_name = 'tile.tile'
|
||||||
|
_order = 'sequence, name'
|
||||||
|
|
||||||
def _get_tile_info(self, cr, uid, ids, fields, args, context=None):
|
def _get_tile_info(self, cr, uid, ids, fields, args, context=None):
|
||||||
ima_obj = self.pool['ir.model.access']
|
ima_obj = self.pool['ir.model.access']
|
||||||
|
@ -74,11 +75,14 @@ class tile(orm.Model):
|
||||||
_get_tile_info, type='boolean', string='Active',
|
_get_tile_info, type='boolean', string='Active',
|
||||||
multi='tile_info', readonly=True, fnct_search=_search_active),
|
multi='tile_info', readonly=True, fnct_search=_search_active),
|
||||||
'color': fields.char('Kanban Color'),
|
'color': fields.char('Kanban Color'),
|
||||||
|
'sequence': fields.integer(
|
||||||
|
'Sequence', required=True),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'domain': '[]',
|
'domain': '[]',
|
||||||
'color': 0,
|
'color': 0,
|
||||||
|
'sequence': 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
def open_link(self, cr, uid, ids, context=None):
|
def open_link(self, cr, uid, ids, context=None):
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<field name="model">tile.tile</field>
|
<field name="model">tile.tile</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Dashboard tiles">
|
<tree string="Dashboard tiles">
|
||||||
|
<field name="sequence" widget="handle"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="domain"/>
|
<field name="domain"/>
|
||||||
<field name="model_id"/>
|
<field name="model_id"/>
|
||||||
|
|
Loading…
Reference in New Issue