Amit Parmar (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-kanban-views2-survey-aar into
lp:~openerp-dev/openobject-addons/trunk-kanban-views2.
Requested reviews:
Amit (Open ERP) (apa-tiny)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-kanban-views2-survey-aar/+merge/77908
Hello Sir,
I have created kanban view of Surveys of survey
Thanks,
Amit Parmar
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-kanban-views2-survey-aar/+merge/77908
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-kanban-views2.
=== modified file 'survey/survey.py'
--- survey/survey.py 2011-09-22 06:14:19 +0000
+++ survey/survey.py 2011-10-03 11:18:40 +0000
@@ -68,6 +68,7 @@
'send_response': fields.boolean('E-mail Notification on Answer'),
'type': fields.many2one('survey.type', 'Type'),
'invited_user_ids': fields.many2many('res.users', 'survey_invited_user_rel', 'sid', 'uid', 'Invited User'),
+ 'color': fields.integer('Color Index'),
}
_defaults = {
'state': lambda * a: "open",
@@ -75,6 +76,7 @@
'tot_comp_survey': lambda * a: 0,
'send_response': lambda * a: 1,
'response_user': lambda * a:1,
+ 'color': 0,
}
def survey_open(self, cr, uid, ids, arg):
=== modified file 'survey/survey_view.xml'
--- survey/survey_view.xml 2011-09-24 09:10:37 +0000
+++ survey/survey_view.xml 2011-10-03 11:18:40 +0000
@@ -279,16 +279,98 @@
</field>
</record>
+ <!-- SURVEY Kanban View -->
+ <record model="ir.ui.view" id="survey_kanban_view">
+ <field name="name">SURVEY - Kanban</field>
+ <field name="model">survey</field>
+ <field name="type">kanban</field>
+ <field name="arch" type="xml">
+ <kanban default_group_by="state">
+ <templates>
+ <t t-name="kanban-box">
+ <t t-set="color" t-value="kanban_color(record.color.raw_value || record.state.raw_value)"/>
+ <div t-att-class="color + (record.state.raw_value == 'cancel' ? ' oe_kanban_color_alert' : '')">
+ <div class="oe_kanban_box oe_kanban_color_border">
+ <table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
+ <tr>
+ <td class="oe_kanban_title3" align="left" valign="middle">
+ <field name="title"/>
+ </td>
+ </tr>
+ </table>
+
+ <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
+ <div class="oe_kanban_right oe_kanban_small">
+ <field name="responsible_id"/>
+ </div>
+ <div>
+ Survey Type : <field name="type"/>
+ </div>
+ <div>
+ Maximum Answer Limit : <field name="max_response_limit"/>
+ </div>
+ <div>
+ Maximum Answer Per User : <field name="response_user"/>
+ </div>
+ <div class="oe_kanban_small">
+ <t t-if="record.date_open.value">
+ Open Date : <field name="date_open"/>
+ </t>
+ <div class="oe_kanban_right">
+ <t t-if="record.date_close.value">
+ Close Date : <field name="date_close"/>
+ </t>
+ </div>
+ </div>
+ </div>
+
+ <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="Delete" icon="gtk-close" type="delete"/>
+ <a string="Change Color" icon="color-picker" type="color" name="color"/>
+ <a name="%(action_view_survey_question_message)d" states="open,draft,close,cancel" string="Test Survey" type="action" icon="gtk-new" context="{'active':True,'survey_id': active_id}" attrs="{'invisible':[('id','=',0)]}"/>
+ <a name="%(action_view_survey_question_message)d" states="open,draft,close,cancel" string="Answer Survey" type="action" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'invisible':[('state','!=','open')]}"/>
+ <a name="%(action_view_survey_question_message)d" states="open,draft,close,cancel" string="Edit Survey" type="action" icon="gtk-edit" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
+ </div>
+ <div class="oe_kanban_right">
+ <a name="survey_cancel" string="Cancel" states="open" type="object" icon="gtk-cancel"/>
+ <a name="survey_open" string="Open" states="cancel,close" type="object"
+ icon="gtk-go-forward"/>
+ <a name="survey_close" string="Close" states="open" type="object" icon="gtk-close"/>
+ </div>
+ <br class="oe_kanban_clear"/>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
<record model="ir.actions.act_window" id="action_survey_form1">
<field name="name">Surveys</field>
<field name="res_model">survey</field>
<field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
+ <field name="view_mode">tree,form,kanban</field>
<field name="view_id" ref="survey_tree"></field>
<field name="search_view_id" ref="survey_search"/>
<field name="help">You can create survey for different purposes: recruitment interviews, employee's periodical evaluations, marketing campaigns, etc. A survey is made of pages containing questions of several types: text, multiple choices, etc. You can edit survey manually or click on the 'Edit Survey' for a WYSIWYG interface.</field>
</record>
+ <record id="open_view_manufacturing_order_tree" model="ir.actions.act_window.view">
+ <field name="sequence" eval="1"/>
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="survey_tree"/>
+ <field name="act_window_id" ref="action_survey_form1"/>
+ </record>
+ <record id="open_view_manufacturing_order_form" model="ir.actions.act_window.view">
+ <field name="sequence" eval="2"/>
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="survey_form"/>
+ <field name="act_window_id" ref="action_survey_form1"/>
+ </record>
<menuitem name="Surveys" id="menu_survey_form"
action="action_survey_form1" parent="menu_define_survey"
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp