mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
Added tile categories.
This commit is contained in:
committed by
Sylvain LE GAL
parent
2752089382
commit
481b74a0e8
@@ -4,4 +4,4 @@
|
||||
# © 2015-Today GRAP
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from . import tile_tile
|
||||
from . import tile_tile, tile_category
|
||||
|
||||
17
web_dashboard_tile/models/tile_category.py
Normal file
17
web_dashboard_tile/models/tile_category.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2018 Iván Todorovich <ivan.todorovich@gmail.com>
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from openerp import fields, models
|
||||
|
||||
|
||||
class TileCategory(models.Model):
|
||||
_name = 'tile.category'
|
||||
_description = 'Dashboard Tile Category'
|
||||
_order = 'sequence asc'
|
||||
|
||||
name = fields.Char(required=True)
|
||||
sequence = fields.Integer(
|
||||
help="Used to order the tile categories",
|
||||
default=0)
|
||||
fold = fields.Boolean('Folded by default')
|
||||
@@ -77,6 +77,7 @@ class TileTile(models.Model):
|
||||
# Column Section
|
||||
name = fields.Char(required=True)
|
||||
sequence = fields.Integer(default=0, required=True)
|
||||
category_id = fields.Many2one('tile.category', 'Category')
|
||||
user_id = fields.Many2one('res.users', 'User')
|
||||
background_color = fields.Char(default='#0E6C7E', oldname='color')
|
||||
font_color = fields.Char(default='#FFFFFF')
|
||||
|
||||
Reference in New Issue
Block a user