[MERGE]:Merged lp:~openerp-dev/openobject-addons/trunk-customer_portal-atp-include-survey-bde with some changes in survey and event modules.
bzr revid: atp@tinyerp.com-20120419073959-5gd1uc65b0dg0ca4
This commit is contained in:
commit
1ec2eed874
|
@ -40,6 +40,7 @@
|
|||
"update_xml" : [
|
||||
"security/portal_customer_security.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"board_portal_customer_view.xml",
|
||||
"portal_customer_view.xml",
|
||||
"portal_customer_menu.xml",
|
||||
],
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- <record model="ir.actions.act_window" id="action_event_view_main">
|
||||
<field name="name">Events</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.event</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_mode">kanban</field>
|
||||
<field name="view_id" ref="event.view_event_kanban"/>
|
||||
<field name="context">{"search_default_upcoming":1}</field>
|
||||
</record> -->
|
||||
|
||||
<record id="action_mail_my_feeds" model="ir.actions.client">
|
||||
<field name="name">My Feeds</field>
|
||||
<field name="tag">mail.all_feeds</field>
|
||||
</record>
|
||||
|
||||
<record id="board_customer_portal_form" model="ir.ui.view">
|
||||
<field name="name">board.customer.portal.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Events">
|
||||
<board style="2-1">
|
||||
<column>
|
||||
<action name="%(mail.action_mail_my_feeds)d" string="My Wall"/>
|
||||
</column>
|
||||
<column>
|
||||
<!--action name="" string="Latest News"/-->
|
||||
</column>
|
||||
</board>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="open_customer_portal" model="ir.actions.act_window">
|
||||
<field name="name">Customer Portal Dashboard</field>
|
||||
<field name="res_model">board.board</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_customer_portal_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="portal_customer.customer_portal" action="open_customer_portal"
|
||||
name="Customer Portal" groups="portal_customer.group_sales_portal"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -32,6 +32,7 @@
|
|||
'depends': ['event','portal_customer'],
|
||||
'update_xml': [
|
||||
'security/portal_customer_security.xml',
|
||||
"board_portal_customer_event_view.xml",
|
||||
'portal_customer_event_view.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_event_view_main">
|
||||
<field name="name">Events</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.event</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_mode">kanban</field>
|
||||
<field name="view_id" ref="event.view_event_kanban"/>
|
||||
<field name="context">{"search_default_upcoming":1}</field>
|
||||
</record>
|
||||
|
||||
<record id="board_customer_portal_inherit_form" model="ir.ui.view">
|
||||
<field name="name">board.customer.portal.inherit.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="inherit_id" ref="portal_customer.board_customer_portal_form"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/board/column[0]" position="inside">
|
||||
<action name="%(action_event_view_main)d" string="Upcomming Events"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Customer Portal Feedback',
|
||||
'version': '0.1',
|
||||
'category': 'Tools',
|
||||
'complexity': "easy",
|
||||
'description': """
|
||||
This module add the menu if claim and portal_customer is install.
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['survey','portal_customer'],
|
||||
'update_xml': [
|
||||
'portal_customer_feedback_view.xml',
|
||||
"security/ir.model.access.csv",
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install':True,
|
||||
'category':'Hidden',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem name="Feedback" id="customer_portal_feedback" parent="portal_customer.customer_portal_after_sales" action="survey.action_survey_form1"/>
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,10 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_survey_survey,survey_survey,survey.model_survey,portal_customer.group_sales_portal,1,1,0,0
|
||||
access_survey_page,survey_page,survey.model_survey_page,portal_customer.group_sales_portal,1,1,0,0
|
||||
access_survey_question,survey_question,survey.model_survey_question,portal_customer.group_sales_portal,1,0,0,0
|
||||
access_survey_answer,survey_answer,survey.model_survey_answer,portal_customer.group_sales_portal,1,1,0,0
|
||||
access_survey_response,survey_response,survey.model_survey_response,portal_customer.group_sales_portal,1,1,1,0
|
||||
access_survey_history,survey_history,survey.model_survey_history,portal_customer.group_sales_portal,1,1,1,0
|
||||
access_survey_question_column_heading,survey_question_column_heading,survey.model_survey_question_column_heading,portal_customer.group_sales_portal,1,0,0,0
|
||||
access_survey_response_line,survey_response_line,survey.model_survey_response_line,portal_customer.group_sales_portal,1,1,1,0
|
||||
access_survey_response_answer,survey_response_answer,survey.model_survey_response_answer,portal_customer.group_sales_portal,1,1,1,0
|
|
|
@ -53,6 +53,7 @@ Partners are also sent mails with user name and password for the invitation of t
|
|||
'test/survey_question_type.yml',
|
||||
'test/survey_report.yml',
|
||||
],
|
||||
'css': ['static/src/css/survey.css'],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'certificate' : '001131639736864143245',
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
.oe_module_survey{
|
||||
font-size: 12px;
|
||||
border-style:dotted;
|
||||
border-radius: 15px;
|
||||
text-align: left;
|
||||
height:145px;
|
||||
width:220px;
|
||||
}
|
||||
|
||||
.oe_survey_title{
|
||||
font-size: 15px;
|
||||
height: auto;
|
||||
font-size: 16px;
|
||||
font-weight:bold;
|
||||
width: 205px;
|
||||
}
|
||||
|
||||
.oe_survey_responsible{
|
||||
height: auto;
|
||||
width: 200px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.oe_survey_start_date{
|
||||
height: auto;
|
||||
width: 200px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.oe_survey_fill{
|
||||
align: right;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.oe_survey_rate{
|
||||
font-size: 14px;
|
||||
}
|
|
@ -142,6 +142,17 @@ class survey(osv.osv):
|
|||
'nodestroy':True,
|
||||
}
|
||||
return report
|
||||
|
||||
def fill_survey(self, cr, uid, ids, context=None):
|
||||
return {
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'survey.question.wiz',
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'context': {'survey_id': ids[0]}
|
||||
}
|
||||
|
||||
survey()
|
||||
|
||||
class survey_history(osv.osv):
|
||||
|
|
|
@ -279,13 +279,53 @@
|
|||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_survey_kanban">
|
||||
<field name="name">event.survey.kanban</field>
|
||||
<field name="model">survey</field>
|
||||
<field name="type">kanban</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban>
|
||||
<field name="title"/>
|
||||
<field name="date_open"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_module_survey">
|
||||
<a class="oe_module_icon">
|
||||
<div class="oe_survey_title"><t t-esc="record.title.raw_value.toString()"/></div><br/>
|
||||
<div class="oe_survey_responsible">
|
||||
<t t-if="record.responsible_id.raw_value">By: <field name="responsible_id"/></t>
|
||||
</div><br/>
|
||||
<div class="oe_survey_start_date">
|
||||
Open From:
|
||||
<t t-if="record.date_open.raw_value">
|
||||
<t t-esc="record.date_open.raw_value.getDate()"/>
|
||||
<t t-esc="record.date_open.raw_value.toString('MMM')"/>,
|
||||
<t t-esc="record.date_open.raw_value.getFullYear()"/>
|
||||
</t>
|
||||
</div><br/>
|
||||
<div class="oe_survey_rate">
|
||||
Rate:
|
||||
<div class="oe_survey_fill" >
|
||||
<button type="object" name="fill_survey" class="">
|
||||
<span>Fill</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</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_id" ref="survey_tree"></field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_id" ref="view_survey_kanban"></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>
|
||||
|
|
Loading…
Reference in New Issue