Browse Source

[PORT][REF] change name of field;

pull/180/head
Sylvain LE GAL 9 years ago
parent
commit
f189ab5bd1
  1. 2
      web_dashboard_tile/models/tile_tile.py
  2. 7
      web_dashboard_tile/views/tile.xml

2
web_dashboard_tile/models/tile_tile.py

@ -123,7 +123,7 @@ class TileTile(Model):
" ('ttype', 'in', ['float', 'int'])]") " ('ttype', 'in', ['float', 'int'])]")
active=fields.Boolean( active=fields.Boolean(
compute='_get_tile_info', readonly=True, search='_search_active') compute='_get_tile_info', readonly=True, search='_search_active')
color=fields.Char(default='#0E6C7E', string='Background Color')
background_color=fields.Char(default='#0E6C7E', oldname='color')
font_color=fields.Char(default='#FFFFFF') font_color=fields.Char(default='#FFFFFF')
sequence=fields.Integer(default=0, required=True) sequence=fields.Integer(default=0, required=True)

7
web_dashboard_tile/views/tile.xml

@ -13,6 +13,7 @@
<field name="field_function"/> <field name="field_function"/>
<field name="field_id"/> <field name="field_id"/>
<field name="user_id"/> <field name="user_id"/>
<field name="background_color" widget="color"/>
</tree> </tree>
</field> </field>
</record> </record>
@ -30,7 +31,7 @@
<field name="action_id"/> <field name="action_id"/>
<field name="field_function"/> <field name="field_function"/>
<field name="field_id"/> <field name="field_id"/>
<field name="color" widget="color"/>
<field name="background_color" widget="color"/>
<field name="font_color" widget="color"/> <field name="font_color" widget="color"/>
</group> </group>
</form> </form>
@ -48,14 +49,14 @@
<field name="model_id"/> <field name="model_id"/>
<field name="action_id"/> <field name="action_id"/>
<field name="count"/> <field name="count"/>
<field name="color"/>
<field name="background_color"/>
<field name="font_color"/> <field name="font_color"/>
<field name="field_id" /> <field name="field_id" />
<field name="field_function" /> <field name="field_function" />
<field name="helper" /> <field name="helper" />
<templates> <templates>
<t t-name="kanban-box"> <t t-name="kanban-box">
<div t-attf-class="oe_dashbaord_tile oe_kanban_global_click" t-attf-style="background-color:#{record.color.raw_value}" >
<div t-attf-class="oe_dashbaord_tile oe_kanban_global_click" t-attf-style="background-color:#{record.background_color.raw_value}" >
<div class="oe_kanban_content"> <div class="oe_kanban_content">
<a type="object" name="open_link" args="[]" t-attf-style="color:#{record.font_color.raw_value};"> <a type="object" name="open_link" args="[]" t-attf-style="color:#{record.font_color.raw_value};">
<div class="tile_label"> <div class="tile_label">

Loading…
Cancel
Save