Showing posts with label Kanban View in openERP. Show all posts
Showing posts with label Kanban View in openERP. Show all posts

Monday, 26 March 2012

Kanban View in openERP.

 By : Pinakin Nayi
        Trainee at OpenERP Gandhinagar. (Info-City)

<!--kanban -->
        <record model="ir.ui.view" id="event_kanban_view">
            <field name="name">CRM Meeting</field>
            <field name="model">crm.meeting</field>
            <field name="type">kanban</field>
            <field name="arch" type="xml">
        <kanban>
                <!--Filtered By -->
                <field name="name"/>
               
                <!--template start -->
                <templates>
                    <t t-name="lead_details">
                        <!--template tooltip -->
                        <ul class="oe_kanban_tooltip">
                            <!--if there is data in table than go further(check the condi.) -->
                            <li t-if="record.name.raw_value"><b>Meeting</b> <field name="name"/></li>                          
                        </ul>
                    </t>
                    <!--kanban view box start -->
                    <t t-name="kanban-box">
                        <!--kanban view box border -->
                        <t  t-set="border">oe_kanban_color_red</t>
                        <div t-attf-class="#{kanban_color(1)} #{border || ''}">
                            <div class="oe_kanban_box oe_kanban_color_border">
                               <!--kanban box header -->
                                <table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
                                <tr>
                                   <!--kanban header image/ Icon -->
                                    <td align="left" valign="middle" width="16">
                                        <a  icon="star-on" type="object" name="set_normal_priority"/>
                                        <a icon="star-off" type="object" name="set_high_priority" style="opacity:0.6; filter:alpha(opacity=60);"/>
                                    </td>
                                    <!--kanban title -->         
                                    <td align="left" valign="middle" class="oe_kanban_title" tooltip="lead_details">
                                       <!--kanban title name -->
                                        <field name="name"/>
                                    </td>
                                    <td valign="top" width="22"></td>
                                </tr>
                                </table>
                               <!--kanban content box -->
                                <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
                                    <div>
                                        <b>
                                              <field name="name"/>
                                        </b>
                                    </div>
                                    <div>
                                        <t><b>Date :</b></t><field name="date"/>
                                    </div>
                                    <div>
                                        <t><b>Duration :</b></t><field name="duration"/>
                                    </div>
                                    <div>
                                        <t><b>Location :</b></t><field name="location"/>
                                    </div>
                                </div>

                               <!--below the kanban view button like view,e-mail,color -->
                                <div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
                                    <div class="oe_kanban_left">
                                        <a string="Edit" icon="gtk-edit" type="edit"/>
                                        <a string="Change Color" icon="color-picker" type="color" name="color"/>
                                        <a string="Send New Email" name="111" icon="terp-mail-message-new" type="action"/>
                                        <a string="Log Call" name="450" icon="terp-call-start" type="action"/>
                                        <a string="Schedule Meeting" name="action_makeMeeting" type="object" icon="stock_calendar"/>
                                        <a string="Add Internal Note" name="453" context="{'model': 'crm.lead' }" icon="terp-document-new" type="action"/>
                                    </div>
                                    <div class="oe_kanban_right">
                                     
                                    </div>
                                    <br class="oe_kanban_clear"/>
                                </div>
                            </div>
                        </div>
                    </t>
                </templates>
            </kanban>
        </field>
        </record>