[Merge]: Merge with trunk addons
bzr revid: rpa@openerp.co.in-20100223114746-d8vyr81xtyh70j0l
This commit is contained in:
+5
-10
@@ -111,8 +111,7 @@ class crm_case_categ(osv.osv):
|
||||
_description = "Category of case"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Case Category Name', size=64, required=True, translate=True),
|
||||
'probability': fields.float('Probability (%)', required=True),
|
||||
'name': fields.char('Case Category Name', size=64, required=True, translate=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Case Section'),
|
||||
'object_id': fields.many2one('ir.model','Object Name'),
|
||||
}
|
||||
@@ -120,8 +119,7 @@ class crm_case_categ(osv.osv):
|
||||
object_id = context and context.get('object_id', False) or False
|
||||
ids =self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
|
||||
return ids and ids[0]
|
||||
_defaults = {
|
||||
'probability': lambda *args: 0.0,
|
||||
_defaults = {
|
||||
'object_id' : _find_object_id
|
||||
}
|
||||
#
|
||||
@@ -156,6 +154,7 @@ class crm_case_stage(osv.osv):
|
||||
'section_id': fields.many2one('crm.case.section', 'Case Section'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
|
||||
'object_id': fields.many2one('ir.model','Object Name'),
|
||||
'probability': fields.float('Probability (%)', required=True),
|
||||
}
|
||||
def _find_object_id(self, cr, uid, context=None):
|
||||
object_id = context and context.get('object_id', False) or False
|
||||
@@ -163,6 +162,7 @@ class crm_case_stage(osv.osv):
|
||||
return ids and ids[0]
|
||||
_defaults = {
|
||||
'sequence': lambda *args: 1,
|
||||
'probability': lambda *args: 0.0,
|
||||
'object_id' : _find_object_id
|
||||
}
|
||||
|
||||
@@ -319,13 +319,8 @@ class crm_case(osv.osv):
|
||||
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
|
||||
if st in s[section]:
|
||||
self.write(cr, uid, [case.id], {'stage_id': s[section][st]})
|
||||
return True
|
||||
return True
|
||||
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.case.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
def onchange_case_id(self, cr, uid, ids, case_id, name, partner_id, context={}):
|
||||
if not case_id:
|
||||
|
||||
@@ -29,6 +29,7 @@ class crm_claim(osv.osv):
|
||||
_inherit = 'crm.case'
|
||||
_columns = {
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'date': fields.datetime('Date'),
|
||||
'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
|
||||
'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
|
||||
'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \
|
||||
|
||||
@@ -78,8 +78,7 @@
|
||||
<field name="stage_id" select="1" nolabel="1"/>
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
</group>
|
||||
<field name="categ_id" select="1" widget="selection"
|
||||
on_change="onchange_categ_id(categ_id)"
|
||||
<field name="categ_id" select="1" widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.claim')]" />
|
||||
<field name="type_id" string="Type of Action" select="1"
|
||||
domain="[('object_id.model', '=', 'crm.claim')]" />
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<field name="user_id" select="2" string="Responsible"/>
|
||||
<field name="section_id" colspan="1" widget="selection"/>
|
||||
<field name="categ_id" select="1"
|
||||
on_change="onchange_categ_id(categ_id)" widget="selection"
|
||||
widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.fundraising')]" />
|
||||
<field name="date"/>
|
||||
<field name="duration"/>
|
||||
|
||||
@@ -29,6 +29,7 @@ class crm_fundraising(osv.osv):
|
||||
_inherit ='crm.case'
|
||||
_columns = {
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'date': fields.datetime('Date'),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'categ_id': fields.many2one('crm.case.categ','Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]"),
|
||||
'planned_revenue': fields.float('Planned Revenue'),
|
||||
|
||||
@@ -29,6 +29,7 @@ class crm_helpdesk(osv.osv):
|
||||
_inherit = 'crm.case'
|
||||
_columns = {
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'date': fields.datetime('Date'),
|
||||
'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
|
||||
'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
|
||||
'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<page string="History" groups="base.group_extended">
|
||||
<field name="id" select="1"/>
|
||||
<field name="active" select="2"/>
|
||||
<field name="categ_id" on_change="onchange_categ_id(categ_id)" select="2"/>
|
||||
<field name="categ_id" select="2"/>
|
||||
<field name="som" select="2"/>
|
||||
<separator colspan="4" string="Dates"/>
|
||||
<field name="create_date"/>
|
||||
|
||||
@@ -57,8 +57,7 @@
|
||||
<separator colspan="4" string="Status and Categorization"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="categ_id"
|
||||
on_change="onchange_categ_id(categ_id)"
|
||||
<field name="categ_id"
|
||||
string="Lead Source" widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.opportunity')]" />
|
||||
<field name="type_id" string="Campaign" select="1"/>
|
||||
|
||||
@@ -37,7 +37,7 @@ class crm_opportunity(osv.osv):
|
||||
_inherit = 'crm.case'
|
||||
_columns = {
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Source', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Resource Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'probability': fields.float('Probability (%)'),
|
||||
@@ -51,6 +51,11 @@ class crm_opportunity(osv.osv):
|
||||
\nWhen the case is over, the state is set to \'Done\'.\
|
||||
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
|
||||
}
|
||||
def onchange_stage_id(self, cr, uid, ids, stage, context={}):
|
||||
if not stage:
|
||||
return {'value':{}}
|
||||
probability = self.pool.get('crm.case.stage').browse(cr, uid, stage, context).probability
|
||||
return {'value':{'probability':probability}}
|
||||
|
||||
crm_opportunity()
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<form string="Opportunities">
|
||||
<group colspan="4" col="7">
|
||||
<field name="name" string="Opportunity"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.opportunity')]"/>
|
||||
<field name="stage_id" on_change="onchange_stage_id(stage_id)" widget="selection" domain="[('object_id.model', '=', 'crm.opportunity')]"/>
|
||||
<field name="user_id"/>
|
||||
<button string="Schedule Meeting"
|
||||
name="%(wizard_crm_opportunity_meeting_set)d" icon="gtk-redo" type="action" />
|
||||
@@ -65,7 +65,7 @@
|
||||
<field name="type_id" select="1" string="Campaign"/>
|
||||
<field name="section_id" colspan="1" widget="selection"/>
|
||||
<field name="priority" string="Priority"/>
|
||||
<field name="categ_id" select="1" on_change="onchange_categ_id(categ_id)" string="Source" widget="selection" domain="[('object_id.model', '=', 'crm.opportunity')]"/>
|
||||
<field name="categ_id" select="1" string="Source" widget="selection" domain="[('object_id.model', '=', 'crm.opportunity')]"/>
|
||||
</group>
|
||||
|
||||
<separator colspan="4" string="Details"/>
|
||||
|
||||
@@ -121,8 +121,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="categ_id"/>
|
||||
<field name="partner_id"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -59,7 +59,9 @@
|
||||
<tree string="Stages">
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="probability"/>
|
||||
<field name="section_id"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -73,6 +75,7 @@
|
||||
<field name="section_id" select="1" widget="selection"/>
|
||||
<field name="object_id" invisible="1" />
|
||||
<field name="sequence"/>
|
||||
<field name="probability"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -92,8 +95,7 @@
|
||||
<form string="Case Category">
|
||||
<field name="name" select="1"/>
|
||||
<field name="section_id" select="1" widget="selection"/>
|
||||
<field name="object_id" invisible="1" />
|
||||
<field name="probability"/>
|
||||
<field name="object_id" invisible="1" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -104,8 +106,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Case Category">
|
||||
<field name="name"/>
|
||||
<field name="section_id"/>
|
||||
<field name="probability"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -29,6 +29,7 @@ class crm_applicant(osv.osv):
|
||||
_inherit ='crm.case'
|
||||
_columns = {
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'date': fields.datetime('Date'),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.applicant')]"),
|
||||
'planned_revenue': fields.float('Planned Revenue'),
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
<field name="state">draft</field>
|
||||
<field name="max_response_limit">20</field>
|
||||
<field eval="[(6,0,[])]" name="users"/>
|
||||
<field name="type" ref="survey.survey_type1"/>
|
||||
<field name="responsible_id" ref="base.user_root"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<newline/>
|
||||
<field name="planned_cost" string="Expected Salary"/>
|
||||
<field name="planned_revenue" string="Proposed Salary"/>
|
||||
<field name="categ_id" string="Applied Job" select="1" on_change="onchange_categ_id(categ_id)"/>
|
||||
<field name="categ_id" string="Applied Job" select="1" />
|
||||
<field name="type_id" string="Degree" select="1"/>
|
||||
<separator colspan="4" string="Qualication"/>
|
||||
<field name="priority" string="Appreciation" select="2"/>
|
||||
|
||||
@@ -42,6 +42,7 @@ class crm_project_bug(osv.osv):
|
||||
_inherit = 'crm.case'
|
||||
_columns = {
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'date': fields.datetime('Date'),
|
||||
'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
|
||||
'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
|
||||
'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
<field name="title">Employee Evaluation</field>
|
||||
<field name="max_response_limit">20</field>
|
||||
<field eval="[(6,0,[])]" name="users"/>
|
||||
<field name="type" ref="survey.survey_type1"/>
|
||||
<field name="responsible_id" ref="base.user_demo"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
@@ -12,6 +14,8 @@
|
||||
<field name="title">Employee Opinion</field>
|
||||
<field name="max_response_limit">20</field>
|
||||
<field eval="[(6,0,[])]" name="users"/>
|
||||
<field name="type" ref="survey.survey_type1"/>
|
||||
<field name="responsible_id" ref="base.user_root"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<field name="virtual_available"/>
|
||||
<field name="lst_price"/>
|
||||
<field name="standard_price"/>
|
||||
<field name="price" invisible="not context.get('pricelist',False)"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -23,14 +23,22 @@
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Administration">
|
||||
<field name="warn_manager"/>
|
||||
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="priority"/>
|
||||
<field name="resource_calendar_id"/>
|
||||
<field name="active" select="2"/>
|
||||
<newline/>
|
||||
<field name="planned_hours" widget="float_time"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Scheduling"/>
|
||||
<field name="resource_calendar_id"/>
|
||||
<field name="priority"/>
|
||||
<field name="active" select="2"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Performance"/>
|
||||
<field name="planned_hours" widget="float_time"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
</group>
|
||||
<group col="2" colspan="2" name="misc">
|
||||
<separator colspan="2" string="Miscelleanous"/>
|
||||
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="warn_manager"/>
|
||||
</group>
|
||||
|
||||
<newline/>
|
||||
<separator colspan="4" string="Project's members"/>
|
||||
@@ -411,6 +419,7 @@
|
||||
<filter domain="[('user_id','=',False)]" help="Unassigned Tasks" icon="gtk-execute" separator="1"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Users" icon="terp-project" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Project" icon="terp-project" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
|
||||
@@ -90,10 +90,8 @@
|
||||
<field name="inherit_id" ref="project.view_task_form2" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="progress" position="after">
|
||||
<newline/>
|
||||
<field name="context_id" select="2" widget="selection" groups="project_gtd.group_project_getting"/>
|
||||
<field name="timebox_id" select="1" groups="project_gtd.group_project_getting"/>
|
||||
<newline/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -32,7 +32,7 @@ def compute_burndown(cr, uid, tasks_id, date_start, date_stop):
|
||||
cr.execute('select w.date,w.hours from project_task_work w left join project_task t on (t.id=w.task_id) where t.id = ANY(%s) and t.state in (%s,%s) order by date',(tasks_id,'open','progress',))
|
||||
tasks2 = cr.fetchall()
|
||||
|
||||
cr.execute('select date_close,planned_hours from project_task where id =ANY(%s) and state in (%s,%s) order by date_close' ,(tasks_id,'cancelled','done',))
|
||||
cr.execute('select date_end,planned_hours from project_task where id =ANY(%s) and state in (%s,%s) order by date_end' ,(tasks_id,'cancelled','done',))
|
||||
tasks2 += cr.fetchall()
|
||||
tasks2.sort()
|
||||
else:
|
||||
|
||||
@@ -45,7 +45,7 @@ def burndown_chart(cr, uid, tasks_id, date_start, date_stop):
|
||||
|
||||
cr.execute('select id,date_start,state,planned_hours from project_task where id = ANY(%s) order by date_start'(tasks_id,))
|
||||
tasks = cr.fetchall()
|
||||
cr.execute('select id,date_close,state,planned_hours*progress/100 from project_task where id =ANY(%s) and state in (%s,%s) order by date_close', (tasks_id,'progress','done',))
|
||||
cr.execute('select id,date_end,state,planned_hours*progress/100 from project_task where id =ANY(%s) and state in (%s,%s) order by date_end', (tasks_id,'progress','done',))
|
||||
tasks2 = cr.fetchall()
|
||||
current_date = date_start
|
||||
total = 0
|
||||
@@ -79,7 +79,7 @@ class report_tasks(report_int):
|
||||
else:
|
||||
datas['date_start'] = time.strftime('%Y-%m-%d')
|
||||
if 'date_stop' not in datas:
|
||||
cr.execute('select max(date_start),max(date_close) from project_task where id = ANY(%s)',(ids,))
|
||||
cr.execute('select max(date_start),max(date_end) from project_task where id = ANY(%s)',(ids,))
|
||||
res = cr.fetchone()
|
||||
datas['date_stop'] = (res[0] and res[0][:10]) or time.strftime('%Y-%m-%d')
|
||||
if res[1] and datas['date_stop']<res[1]:
|
||||
|
||||
+14
-44
@@ -26,31 +26,16 @@ from osv import fields, osv, orm
|
||||
from mx import DateTime
|
||||
import re
|
||||
|
||||
class scrum_team(osv.osv):
|
||||
_name = 'scrum.team'
|
||||
_description = 'Scrum Team'
|
||||
_columns = {
|
||||
'name' : fields.char('Team Name', size=64),
|
||||
'users_id' : fields.many2many('res.users', 'scrum_team_users_rel', 'team_id','user_id', 'Users'),
|
||||
}
|
||||
scrum_team()
|
||||
|
||||
class scrum_project(osv.osv):
|
||||
_name = 'scrum.project'
|
||||
_inherit = 'project.project'
|
||||
_table = 'project_project'
|
||||
_description = 'Scrum Project'
|
||||
_columns = {
|
||||
'product_owner_id': fields.many2one('res.users', 'Product Owner'),
|
||||
'tasks': fields.one2many('scrum.task', 'project_id', 'Scrum Tasks'),
|
||||
'sprint_size': fields.integer('Sprint Days'),
|
||||
'scrum': fields.integer('Is Scrum'),
|
||||
'parent_id': fields.many2one('scrum.project', 'Parent project'),
|
||||
'scrum': fields.integer('Is a Scrum Project'),
|
||||
}
|
||||
_defaults = {
|
||||
'product_owner_id': lambda self,cr,uid,context={}: uid,
|
||||
'warn_manager': lambda *a: 1,
|
||||
'sprint_size': lambda *a: 14,
|
||||
'sprint_size': lambda *a: 15,
|
||||
'scrum': lambda *a: 1
|
||||
}
|
||||
scrum_project()
|
||||
@@ -88,10 +73,10 @@ class scrum_sprint(osv.osv):
|
||||
'name' : fields.char('Sprint Name', required=True, size=64),
|
||||
'date_start': fields.date('Starting Date', required=True),
|
||||
'date_stop': fields.date('Ending Date', required=True),
|
||||
'project_id': fields.many2one('scrum.project', 'Project', required=True, domain=[('scrum','=',1)]),
|
||||
'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)]),
|
||||
'product_owner_id': fields.many2one('res.users', 'Product Owner', required=True),
|
||||
'scrum_master_id': fields.many2one('res.users', 'Scrum Master', required=True),
|
||||
'meetings_id': fields.one2many('scrum.meeting', 'sprint_id', 'Daily Scrum'),
|
||||
'meeting_ids': fields.one2many('scrum.meeting', 'sprint_id', 'Daily Scrum'),
|
||||
'review': fields.text('Sprint Review'),
|
||||
'retrospective': fields.text('Sprint Retrospective'),
|
||||
'backlog_ids': fields.one2many('scrum.product.backlog', 'sprint_id', 'Sprint Backlog'),
|
||||
@@ -107,9 +92,9 @@ class scrum_sprint(osv.osv):
|
||||
def onchange_project_id(self, cr, uid, ids, project_id):
|
||||
v = {}
|
||||
if project_id:
|
||||
proj = self.pool.get('scrum.project').browse(cr, uid, [project_id])[0]
|
||||
v['product_owner_id']= proj.product_owner_id.id
|
||||
v['scrum_master_id']= proj.manager.id
|
||||
proj = self.pool.get('project.project').browse(cr, uid, [project_id])[0]
|
||||
v['product_owner_id']= proj.product_owner_id and proj.product_owner_id.id or False
|
||||
v['scrum_master_id']= proj.user_id and proj.user_id.id or False
|
||||
v['date_stop'] = (DateTime.now() + DateTime.RelativeDateTime(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
|
||||
return {'value':v}
|
||||
|
||||
@@ -160,36 +145,27 @@ class scrum_product_backlog(osv.osv):
|
||||
'name' : fields.char('Feature', size=64, required=True),
|
||||
'note' : fields.text('Note'),
|
||||
'active' : fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the product backlog without removing it."),
|
||||
'project_id': fields.many2one('scrum.project', 'Scrum Project', required=True, domain=[('scrum','=',1)]),
|
||||
'user_id': fields.many2one('res.users', 'User'),
|
||||
'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)]),
|
||||
'user_id': fields.many2one('res.users', 'Responsible'),
|
||||
'sprint_id': fields.many2one('scrum.sprint', 'Sprint'),
|
||||
'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of product backlog."),
|
||||
'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Priority'),
|
||||
'tasks_id': fields.one2many('scrum.task', 'product_backlog_id', 'Tasks Details'),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'),('done','Done')], 'State', required=True),
|
||||
'progress': fields.function(_calc_progress, method=True, string='Progress (0-100)'),
|
||||
'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'),('done','Done'),('cancel','Cancelled')], 'State', required=True),
|
||||
'progress': fields.function(_calc_progress, method=True, string='Progress'),
|
||||
'effective_hours': fields.function(_calc_effective, method=True, string='Effective hours'),
|
||||
'planned_hours': fields.function(_calc_planned, method=True, string='Planned Hours')
|
||||
}
|
||||
_defaults = {
|
||||
'priority': lambda *a: '4',
|
||||
'state': lambda *a: 'draft',
|
||||
'active': lambda *a: 1
|
||||
}
|
||||
_order = "priority,sequence"
|
||||
_order = "sequence"
|
||||
scrum_product_backlog()
|
||||
|
||||
class scrum_task(osv.osv):
|
||||
_name = 'scrum.task'
|
||||
_inherit = 'project.task'
|
||||
_table = 'project_task'
|
||||
_description = 'Scrum Task'
|
||||
_columns = {
|
||||
'product_backlog_id': fields.many2one('scrum.product.backlog', 'Product Backlog'),
|
||||
'scrum': fields.integer('Is Scrum'),
|
||||
}
|
||||
_defaults = {
|
||||
'scrum': lambda *a: 1,
|
||||
}
|
||||
def onchange_backlog_id(self, cr, uid, backlog_id):
|
||||
if not backlog_id:
|
||||
@@ -208,19 +184,13 @@ class scrum_meeting(osv.osv):
|
||||
'question_yesterday': fields.text('Tasks since yesterday'),
|
||||
'question_today': fields.text('Tasks for today'),
|
||||
'question_blocks': fields.text('Blocks encountered'),
|
||||
#
|
||||
# Should be more formal.
|
||||
#
|
||||
'question_backlog': fields.text('Backlog Accurate'),
|
||||
}
|
||||
#
|
||||
# Find the right sprint thanks to users and date
|
||||
# TODO: Find the right sprint thanks to users and date
|
||||
#
|
||||
_defaults = {
|
||||
'date' : lambda *a:time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
scrum_meeting()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
+34
-37
@@ -2,9 +2,9 @@
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- Resource: scrum.project -->
|
||||
<!-- Resource: project.project -->
|
||||
|
||||
<record id="scrum_project_1" model="scrum.project">
|
||||
<record id="scrum_project_1" model="project.project">
|
||||
<!-- FIXME !!! -->
|
||||
<field name="tasks">[24, 25, 28, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 36, 38]</field>
|
||||
<field model="res.users" name="manager" search="[('login','=','demo')]"/>
|
||||
@@ -24,10 +24,7 @@
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
|
||||
<!-- Resource: scrum.team -->
|
||||
|
||||
|
||||
<!-- Resource: scrum.product.backlog -->
|
||||
<!-- Resource: project.product.backlog -->
|
||||
|
||||
<record id="scrum_product_backlog_0" model="scrum.product.backlog">
|
||||
<field name="priority">3</field>
|
||||
@@ -79,111 +76,111 @@
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
</record>
|
||||
|
||||
<!-- Resource: scrum.task -->
|
||||
<!-- Resource: project.task -->
|
||||
|
||||
<record id="scrum_task_3" model="scrum.task">
|
||||
<record id="scrum_task_3" model="project.task">
|
||||
<field name="planned_hours">4.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Review all English Terms</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_3"/>
|
||||
</record>
|
||||
<record id="scrum_task_4" model="scrum.task">
|
||||
<record id="scrum_task_4" model="project.task">
|
||||
<field name="planned_hours">4.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Review all french terms</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_3"/>
|
||||
</record>
|
||||
<record id="scrum_task_5" model="scrum.task">
|
||||
<record id="scrum_task_5" model="project.task">
|
||||
<field name="planned_hours">24.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Analytic Accounting features</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
|
||||
</record>
|
||||
<record id="scrum_task_6" model="scrum.task">
|
||||
<record id="scrum_task_6" model="project.task">
|
||||
<field name="planned_hours">6.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Test and improve automatic migration system</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_0"/>
|
||||
</record>
|
||||
<record id="scrum_task_7" model="scrum.task">
|
||||
<record id="scrum_task_7" model="project.task">
|
||||
<field name="planned_hours">24.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">General accounting features</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
|
||||
</record>
|
||||
<record id="scrum_task_8" model="scrum.task">
|
||||
<record id="scrum_task_8" model="project.task">
|
||||
<field name="planned_hours">24.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Accounting Budgets</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
|
||||
</record>
|
||||
<record id="scrum_task_9" model="scrum.task">
|
||||
<record id="scrum_task_9" model="project.task">
|
||||
<field name="planned_hours">24.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="description">Cash book, general ledger, accounts list, aged trial balance</field>
|
||||
<field name="name">Accounting Report General</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
|
||||
</record>
|
||||
<record id="scrum_task_10" model="scrum.task">
|
||||
<record id="scrum_task_10" model="project.task">
|
||||
<field name="planned_hours">7.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Accounting Report Budget</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
|
||||
</record>
|
||||
<record id="scrum_task_11" model="scrum.task">
|
||||
<record id="scrum_task_11" model="project.task">
|
||||
<field name="planned_hours">8.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Accounting Report Analytic</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
|
||||
</record>
|
||||
<record id="scrum_task_12" model="scrum.task">
|
||||
<record id="scrum_task_12" model="project.task">
|
||||
<field name="planned_hours">4.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Bugfix - memory leak</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_4"/>
|
||||
</record>
|
||||
<record id="scrum_task_13" model="scrum.task">
|
||||
<record id="scrum_task_13" model="project.task">
|
||||
<field name="planned_hours">2.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Bugfix - Translations</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_4"/>
|
||||
</record>
|
||||
<record id="scrum_task_14" model="scrum.task">
|
||||
<record id="scrum_task_14" model="project.task">
|
||||
<field name="planned_hours">4.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Finish the automated plugin system</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_2"/>
|
||||
</record>
|
||||
<record id="scrum_task_15" model="scrum.task">
|
||||
<record id="scrum_task_15" model="project.task">
|
||||
<field name="planned_hours">4.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Reshape the complete menu structure</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_6"/>
|
||||
</record>
|
||||
<record id="scrum_task_16" model="scrum.task">
|
||||
<record id="scrum_task_16" model="project.task">
|
||||
<field name="planned_hours">5.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Test 3.2.0 before releasing</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_5"/>
|
||||
</record>
|
||||
<record id="scrum_task_17" model="scrum.task">
|
||||
<record id="scrum_task_17" model="project.task">
|
||||
<field name="planned_hours">12.0</field>
|
||||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field model="scrum.project" name="project_id" ref="scrum_project_1"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="description">default values, onchange, required, add on top or bottom and shortcuts (Ctrl S, Ctrl X, ...)</field>
|
||||
<field name="name">Editable trees</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_7"/>
|
||||
|
||||
+107
-154
@@ -2,63 +2,28 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<!--
|
||||
Usual views
|
||||
-->
|
||||
|
||||
<menuitem id="menu_scrum"
|
||||
name="Scrum"
|
||||
parent="base.menu_main_pm"/>
|
||||
|
||||
<!-- Scrum Project -->
|
||||
|
||||
<record id="view_scrum_project_form" model="ir.ui.view">
|
||||
<field name="name">scrum.project.form</field>
|
||||
<field name="model">scrum.project</field>
|
||||
<record id="view_project_project_form" model="ir.ui.view">
|
||||
<field name="name">project.project.form</field>
|
||||
<field name="model">project.project</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="project.edit_project"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="state" position="after">
|
||||
<separator string="Scrum Data" colspan="4"/>
|
||||
<field name="product_owner_id" required="1" select="1"/>
|
||||
<field name="sprint_size"/>
|
||||
<newline/>
|
||||
</field>
|
||||
<group name="misc" position="after">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Scrum Data" colspan="4"/>
|
||||
<field name="product_owner_id" required="1" select="1"/>
|
||||
<field name="sprint_size"/>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_scrum_project_tree" model="ir.ui.view">
|
||||
<field name="name">scrum.project.tree</field>
|
||||
<field name="model">scrum.project</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="field_parent">child_id</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Scrum Projects">
|
||||
<field name="name"/>
|
||||
<field name="manager"/>
|
||||
<field name="product_owner_id"/>
|
||||
<field name="planned_hours" sum="Planned hours" widget="float_time"/>
|
||||
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_scrum_project_tree" model="ir.actions.act_window">
|
||||
<field name="name">Projects</field>
|
||||
<field name="res_model">scrum.project</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="view_scrum_project_tree"/>
|
||||
<field name="domain">[('parent_id','=',False),('scrum','=',1)]</field>
|
||||
</record>
|
||||
<menuitem id="next_id_67" name="Scrum" parent="base.menu_main_pm"/><menuitem action="action_scrum_project_tree" id="menu_action_scrum_project_tree" parent="next_id_67"/>
|
||||
|
||||
<record id="action_scrum_project_form" model="ir.actions.act_window">
|
||||
<field name="name">Edit Projects</field>
|
||||
<field name="res_model">scrum.project</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_scrum_project_form"/>
|
||||
<field name="domain">[('scrum','=',1)]</field>
|
||||
</record>
|
||||
<menuitem action="action_scrum_project_form" id="menu_action_scrum_project_form" parent="scrum.menu_action_scrum_project_tree"/>
|
||||
|
||||
|
||||
<!--
|
||||
Product backlog
|
||||
-->
|
||||
@@ -68,12 +33,13 @@
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Scrum Product backlog">
|
||||
<field name="priority"/>
|
||||
<field name="sequence"/>
|
||||
<tree string="Product Backlog">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
<field name="sprint_id"/>
|
||||
<field name="progress"/>
|
||||
<field name="user_id"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
|
||||
<field name="planned_hours" sum="Planned hours" widget="float_time"/>
|
||||
<field name="state"/>
|
||||
@@ -86,59 +52,76 @@
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Scrum Product backlog">
|
||||
<form string="Product backlog">
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="project_id" select="1"/>
|
||||
<field domain="[('project_id','=',project_id)]" name="sprint_id" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<field name="active" select="1"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
<field name="planned_hours" widget="float_time"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Product backlog">
|
||||
<field name="priority"/>
|
||||
<field name="sequence"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="active" select="1"/>
|
||||
<field colspan="4" name="note"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="progress"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
<field name="planned_hours" widget="float_time"/>
|
||||
<page string="Feature Description">
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Tasks">
|
||||
<field colspan="4" name="tasks_id" nolabel="1" widget="one2many_list"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="4" colspan="4">
|
||||
<field name="state" select="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_scrum_product_backlog_search">
|
||||
<field name="name">scrum.product.backlog.search</field>
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Product Backlogs">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-project" string="Draft" domain="[('state','=','draft')]" help="Draft Backlogs"/>
|
||||
<filter icon="terp-project" string="Open" domain="[('state','=','open')]" help="Open Backlogs"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="project_id" select="1" default="context.get('project_id', False)"/>
|
||||
<field name="sprint_id" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="state" select="1"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<field name="name">scrum.product.backlog.search</field>
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Product Backlogs">
|
||||
<group col="10" colspan="4">
|
||||
<filter default="1"
|
||||
icon="terp-project"
|
||||
string="Current"
|
||||
domain="[('state','in',('open','draft'))]"
|
||||
help="Open and Draft Backlogs"/>
|
||||
<filter icon="terp-project" string="Draft" domain="[('state','=','draft')]" help="Draft Backlogs"/>
|
||||
<filter icon="terp-project" string="Open" domain="[('state','=','open')]" help="Open Backlogs"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="project_id"
|
||||
widget="selection"
|
||||
default="context.get('project_id', False)"/>
|
||||
<field name="sprint_id"/>
|
||||
<field name="user_id">
|
||||
<filter default="1"
|
||||
icon="terp-project"
|
||||
string="My Features"
|
||||
domain="[('user_id','=',uid)]"
|
||||
help="My Backlogs"/>
|
||||
</field>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_product_backlog_form" model="ir.actions.act_window">
|
||||
<field name="name">Backlogs</field>
|
||||
<field name="name">Product Backlogs</field>
|
||||
<field name="res_model">scrum.product.backlog</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="search_view_id" ref="view_scrum_product_backlog_search"/>
|
||||
</record>
|
||||
<menuitem action="action_product_backlog_form" id="menu_action_product_backlog_form" parent="scrum.next_id_67"/>
|
||||
<menuitem
|
||||
action="action_product_backlog_form"
|
||||
id="menu_action_product_backlog_form"
|
||||
sequence="20"
|
||||
parent="menu_scrum"/>
|
||||
|
||||
<!--
|
||||
Scrum Sprint
|
||||
@@ -152,9 +135,9 @@
|
||||
<tree string="Scrum Sprint">
|
||||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
<field name="scrum_master_id"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_stop"/>
|
||||
<field name="progress"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
|
||||
<field name="planned_hours" sum="Planned hours" widget="float_time"/>
|
||||
<field name="state"/>
|
||||
@@ -183,7 +166,7 @@
|
||||
<field name="state"/>
|
||||
</page>
|
||||
<page string="Daily Meetings">
|
||||
<field colspan="4" name="meetings_id" nolabel="1" widget="one2many_list"/>
|
||||
<field colspan="4" name="meeting_ids" nolabel="1" widget="one2many_list"/>
|
||||
</page>
|
||||
<page string="Review">
|
||||
<field colspan="4" name="review" nolabel="1"/>
|
||||
@@ -197,24 +180,28 @@
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_scrum_sprint_search">
|
||||
<field name="name">scrum.sprint.search</field>
|
||||
<field name="model">scrum.sprint</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Sprints">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="gtk-execute" string="My" domain="[('scrum_master_id','=',uid)]" help="My Sprints"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-project" string="Draft" domain="[('state','=','draft')]" help="Draft Sprints"/>
|
||||
<filter icon="terp-project" string="Open" domain="[('state','=','open')]" help="Open Sprints"/>
|
||||
<filter icon="terp-project" string="Done" domain="[('state','=','done')]" help="Done Sprints"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="date_start" select="1"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<field name="name">scrum.sprint.search</field>
|
||||
<field name="model">scrum.sprint</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Sprints">
|
||||
<group col="10" colspan="4">
|
||||
<filter default="1" icon="terp-project" string="Current" domain="[('state','in',('draft','open'))]" help="Draft and open Sprints"/>
|
||||
<filter icon="terp-project" string="Draft" domain="[('state','=','draft')]" help="Draft Sprints"/>
|
||||
<filter icon="terp-project" string="Open" domain="[('state','=','open')]" help="Open Sprints"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
<field name="scrum_master_id">
|
||||
<filter icon="gtk-execute" domain="[('scrum_master_id','=',uid)]"
|
||||
default="1"
|
||||
help="My Sprints"/>
|
||||
</field>
|
||||
<field name="date_start"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_sprint_all_tree" model="ir.actions.act_window">
|
||||
<field name="name">Sprints</field>
|
||||
@@ -224,7 +211,9 @@
|
||||
<field name="view_id" ref="view_scrum_sprint_tree"/>
|
||||
<field name="search_view_id" ref="view_scrum_sprint_search"/>
|
||||
</record>
|
||||
<menuitem action="action_sprint_all_tree" id="menu_action_sprint_all_tree" parent="scrum.next_id_67"/>
|
||||
<menuitem
|
||||
sequence="10"
|
||||
action="action_sprint_all_tree" id="menu_action_sprint_all_tree" parent="menu_scrum"/>
|
||||
|
||||
<!--
|
||||
Daily Meeting
|
||||
@@ -249,6 +238,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Scrum Sprint">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date"/>
|
||||
<field name="sprint_id"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Scrum Meeting">
|
||||
@@ -260,8 +250,6 @@
|
||||
<field colspan="4" name="question_blocks" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Optionnal Info">
|
||||
<field name="date"/>
|
||||
<newline/>
|
||||
<separator colspan="4" string="Are your Sprint Backlog estimate accurate ?"/>
|
||||
<field colspan="4" name="question_backlog" nolabel="1"/>
|
||||
</page>
|
||||
@@ -270,15 +258,16 @@
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_meeting_form" model="ir.actions.act_window">
|
||||
<field name="name">Scrum Meeting</field>
|
||||
<field name="name">Scrum Meetings</field>
|
||||
<field name="res_model">scrum.meeting</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_scrum_meeting_form"/>
|
||||
</record>
|
||||
<menuitem action="action_meeting_form" id="menu_action_meeting_form" parent="scrum.next_id_67"/>
|
||||
<menuitem sequence="30"
|
||||
action="action_meeting_form" id="menu_action_meeting_form" parent="menu_scrum"/>
|
||||
|
||||
<!--
|
||||
Clicks on a sprint: what a hack
|
||||
Clicks on a sprint:
|
||||
-->
|
||||
|
||||
<record id="action_sprint_task_open" model="ir.actions.act_window">
|
||||
@@ -349,64 +338,28 @@
|
||||
-->
|
||||
|
||||
<record id="view_task_form2" model="ir.ui.view">
|
||||
<field name="name">scrum.task.form</field>
|
||||
<field name="model">scrum.task</field>
|
||||
<field name="name">project.task.scrum.form</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="project.view_task_form2"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="project_id" position="replace">
|
||||
<newline/>
|
||||
<field name="project_id" required="1" select="1"/>
|
||||
<field name="progress" position="after">
|
||||
<field domain="[('project_id','=',project_id)]" name="product_backlog_id" select="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_task_search_form" model="ir.ui.view">
|
||||
<field name="name">scrum.task.search</field>
|
||||
<field name="model">scrum.task</field>
|
||||
<field name="name">project.task.scrum.search</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="type">search</field>
|
||||
<field name="inherit_id" ref="project.view_task_search_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="project_id" position="after">
|
||||
<field name="product_backlog_id" select="1"/>
|
||||
</field>
|
||||
<field name="project_id" position="after">
|
||||
<field name="product_backlog_id" select="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_task" model="ir.actions.act_window">
|
||||
<field name="name">All Tasks</field>
|
||||
<field name="res_model">scrum.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('scrum','=',1)]</field>
|
||||
<field name="search_view_id" ref="view_task_search_form"/>
|
||||
</record>
|
||||
|
||||
<record id="action_view_scrum_task_tree_view" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="project.view_task_tree2"/>
|
||||
<field name="act_window_id" ref="action_view_task"/>
|
||||
</record>
|
||||
|
||||
<record id="action_view_scrum_task_form_view" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_task_form2"/>
|
||||
<field name="act_window_id" ref="action_view_task"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_view_task" id="menu_action_view_task" parent="scrum.next_id_67"/>
|
||||
|
||||
<record id="action_view_task6" model="ir.actions.act_window">
|
||||
<field name="name">Opened tasks</field>
|
||||
<field name="res_model">scrum.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('state','=','open'),('scrum','=',1)]</field>
|
||||
<field name="filter" eval="True"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<wizard id="wizard_scrum_backlog_task" model="scrum.product.backlog" name="scrum.product.backlog.task.create" string="Created tasks"/>
|
||||
<wizard id="wizard_scrum_backlog_task" model="scrum.product.backlog" name="scrum.product.backlog.task.create" string="Convert to Tasks"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_scrum_team","scrum.team","model_scrum_team","project.group_project_user",1,1,1,1
|
||||
"access_scrum_project","scrum.project","model_scrum_project","project.group_project_user",1,1,1,1
|
||||
"access_scrum_sprint","scrum.sprint","model_scrum_sprint","project.group_project_user",1,,,
|
||||
"access_scrum_product_backlog","scrum.product.backlog","model_scrum_product_backlog","project.group_project_user",1,1,1,1
|
||||
"access_scrum_task","scrum.task","model_scrum_task","project.group_project_user",1,1,1,1
|
||||
"access_scrum_meeting","scrum.meeting","model_scrum_meeting","project.group_project_user",1,,,
|
||||
"access_scrum_meeting_manager","scrum.meeting.manager","model_scrum_meeting","project.group_project_manager",1,1,1,1
|
||||
"access_scrum_sprint_manager","scrum.sprint.manager","model_scrum_sprint","project.group_project_manager",1,1,1,1
|
||||
"access_scrum_product_backlog_manager","scrum.product.backlog manager","model_scrum_product_backlog","project.group_project_manager",1,1,1,1
|
||||
"access_scrum_project_manager","scrum.project manager","model_scrum_project","project.group_project_manager",1,1,1,1
|
||||
|
||||
|
@@ -42,7 +42,7 @@ def _do_create(self, cr, uid, data, context):
|
||||
id = mod_obj.read(cr, uid, result, ['res_id'])
|
||||
ids = []
|
||||
for backlog in backlogs:
|
||||
task = pooler.get_pool(cr.dbname).get('scrum.task')
|
||||
task = pooler.get_pool(cr.dbname).get('project.task')
|
||||
ids.append(task.create(cr, uid, {
|
||||
'product_backlog_id': backlog.id,
|
||||
'name': backlog.name,
|
||||
@@ -58,7 +58,7 @@ def _do_create(self, cr, uid, data, context):
|
||||
'name': 'Open Backlog Tasks',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'scrum.task',
|
||||
'res_model': 'project.task',
|
||||
'view_id': False,
|
||||
'type': 'ir.actions.act_window',
|
||||
'search_view_id': id['res_id']
|
||||
|
||||
@@ -137,7 +137,7 @@ class survey_analysis(report_rml):
|
||||
for que in page.question_ids:
|
||||
rml +="""<blockTable colWidths="500" style="Table5">
|
||||
<tr>
|
||||
<td><para style="question">Que : """ + to_xml(tools.ustr(que.question)) + """</para></td>
|
||||
<td><para style="question">""" + to_xml(tools.ustr(que.question)) + """</para></td>
|
||||
</tr>
|
||||
</blockTable>"""
|
||||
cols_widhts = []
|
||||
|
||||
@@ -203,7 +203,7 @@ class survey_browse_response(report_rml):
|
||||
<td><para style="terp_tblheader_General_Centre_simple">""" + to_xml(time.strftime('%d-%m-%Y %I:%M:%S %p', time.strptime(response.date_create.split('.')[0], '%Y-%m-%d %H:%M:%S'))) + """</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre"></para></td>
|
||||
<td><para style="terp_tblheader_General_right">Response By:- </para></td>
|
||||
<td><para style="terp_tblheader_General_right_simple">""" + to_xml(response.user_id.name) + """</para></td>
|
||||
<td><para style="terp_tblheader_General_right_simple">""" + to_xml(response.user_id.login) + """</para></td>
|
||||
</tr>
|
||||
</blockTable><para style="P2"></para>"""
|
||||
status = "Not Finished"
|
||||
@@ -232,7 +232,7 @@ class survey_browse_response(report_rml):
|
||||
for que in page.question_ids:
|
||||
rml += """<para style="P2"></para>
|
||||
<blockTable colWidths='""" + str(_tbl_widths) + """' style="Table5">
|
||||
<tr><td><para style="question">Que : """ + to_xml(to_xml(que.question)) + """</para></td></tr>
|
||||
<tr><td><para style="question">""" + to_xml(to_xml(que.question)) + """</para></td></tr>
|
||||
</blockTable>"""
|
||||
answer = surv_resp_line_obj.browse(cr ,uid, surv_resp_line_obj.search(cr, uid, [('question_id', '=', que.id),('response_id', '=', response.id)]))
|
||||
if que.type in ['descriptive_text']:
|
||||
|
||||
@@ -174,7 +174,7 @@ class survey_form(report_rml):
|
||||
rml +="""
|
||||
<para style="P2"><font></font></para>
|
||||
<blockTable colWidths='"""+_tbl_widths+"""' style="question_tbl">
|
||||
<tr><td><para style="question">Que : """ + to_xml(tools.ustr(que.question)) + """</para></td></tr>
|
||||
<tr><td><para style="question">""" + to_xml(tools.ustr(que.question)) + """</para></td></tr>
|
||||
</blockTable>
|
||||
<para style="P2"><font></font></para>"""
|
||||
if que.type in ['descriptive_text']:
|
||||
|
||||
+148
-52
@@ -49,7 +49,6 @@ class survey(osv.osv):
|
||||
|
||||
def default_get(self, cr, uid, fields, context={}):
|
||||
data = super(survey, self).default_get(cr, uid, fields, context)
|
||||
data['responsible_id'] = uid
|
||||
return data
|
||||
|
||||
_columns = {
|
||||
@@ -68,7 +67,7 @@ class survey(osv.osv):
|
||||
'history' : fields.one2many('survey.history', 'survey_id', 'History Lines', readonly=True),
|
||||
'users': fields.many2many('res.users', 'survey_users_rel', 'sid', 'uid', 'Users'),
|
||||
'send_response' : fields.boolean('E-mail Notification on Response'),
|
||||
'type' : fields.many2one('survey.type', 'Type')
|
||||
'type' : fields.many2one('survey.type', 'Type'),
|
||||
}
|
||||
_defaults = {
|
||||
'state' : lambda * a: "draft",
|
||||
@@ -97,6 +96,7 @@ class survey(osv.osv):
|
||||
def copy(self, cr, uid, id, default=None,context={}):
|
||||
raise osv.except_osv(_('Error !'),_('You cannot duplicate the resource!'))
|
||||
|
||||
|
||||
survey()
|
||||
|
||||
class survey_history(osv.osv):
|
||||
@@ -177,7 +177,6 @@ class survey_question(osv.osv):
|
||||
for id in ids1:
|
||||
val[id] = 0
|
||||
return val
|
||||
|
||||
_columns = {
|
||||
'page_id' : fields.many2one('survey.page', 'Survey Page', ondelete='cascade', required=1),
|
||||
'question' : fields.char('Question', size=128, required=1),
|
||||
@@ -519,6 +518,7 @@ class survey_response(osv.osv):
|
||||
'state' : lambda * a: "skip",
|
||||
'response_type' : lambda * a: "manually",
|
||||
}
|
||||
|
||||
def copy(self, cr, uid, id, default=None,context={}):
|
||||
raise osv.except_osv(_('Error !'),_('You cannot duplicate the resource!'))
|
||||
|
||||
@@ -577,6 +577,8 @@ class survey_name_wiz(osv.osv_memory):
|
||||
_name = 'survey.name.wiz'
|
||||
|
||||
def default_get(self, cr, uid, fields, context={}):
|
||||
if not context:
|
||||
context = {}
|
||||
data = super(survey_name_wiz, self).default_get(cr, uid, fields, context)
|
||||
if context.has_key('survey_id'):
|
||||
data['survey_id'] = context['survey_id']
|
||||
@@ -620,20 +622,16 @@ class survey_name_wiz(osv.osv_memory):
|
||||
sur_id = self.read(cr, uid, ids, [])[0]
|
||||
survey_id = sur_id['survey_id']
|
||||
context.update({'survey_id' : survey_id, 'sur_name_id' : sur_id['id']})
|
||||
if not context.has_key('active'):
|
||||
cr.execute('select count(id) from survey_history where user_id=%s\
|
||||
and survey_id=%s' % (uid,survey_id))
|
||||
res = cr.fetchone()[0]
|
||||
user_limit = self.pool.get('survey').read(cr, uid, survey_id, ['response_user'])['response_user']
|
||||
if user_limit and res >= user_limit:
|
||||
raise osv.except_osv(_('Warning !'),_("You can not give response for this survey more than %s times") % (user_limit))
|
||||
his_id = self.pool.get('survey.history').create(cr, uid, {'user_id': uid, \
|
||||
'date': strftime('%Y-%m-%d %H:%M:%S'), 'survey_id': survey_id})
|
||||
survey_obj = self.pool.get('survey')
|
||||
sur_rec = survey_obj.read(cr,uid,self.read(cr,uid,ids)[0]['survey_id'])
|
||||
if sur_rec['max_response_limit'] and sur_rec['max_response_limit'] <= sur_rec['tot_start_survey']:
|
||||
raise osv.except_osv(_('Warning !'),_("You can not give more response. Please contact the author of this survey for further assistance."))
|
||||
survey_obj.write(cr, uid, survey_id, {'tot_start_survey' : sur_rec['tot_start_survey'] + 1})
|
||||
cr.execute('select count(id) from survey_history where user_id=%s\
|
||||
and survey_id=%s' % (uid,survey_id))
|
||||
res = cr.fetchone()[0]
|
||||
user_limit = self.pool.get('survey').read(cr, uid, survey_id, ['response_user'])['response_user']
|
||||
if user_limit and res >= user_limit:
|
||||
raise osv.except_osv(_('Warning !'),_("You can not give response for this survey more than %s times") % (user_limit))
|
||||
survey_obj = self.pool.get('survey')
|
||||
sur_rec = survey_obj.read(cr,uid,self.read(cr,uid,ids)[0]['survey_id'])
|
||||
if sur_rec['max_response_limit'] and sur_rec['max_response_limit'] <= sur_rec['tot_start_survey']:
|
||||
raise osv.except_osv(_('Warning !'),_("You can not give more response. Please contact the author of this survey for further assistance."))
|
||||
search_obj = self.pool.get('ir.ui.view')
|
||||
search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
|
||||
return {
|
||||
@@ -662,7 +660,15 @@ class survey_question_wiz(osv.osv_memory):
|
||||
result = super(survey_question_wiz, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu)
|
||||
surv_name_wiz = self.pool.get('survey.name.wiz')
|
||||
if view_type in ['form']:
|
||||
sur_name_rec = surv_name_wiz.read(cr, uid, context['sur_name_id'])
|
||||
wiz_id = 0
|
||||
if not context.has_key('sur_name_id'):
|
||||
wiz_id = surv_name_wiz.create(cr,uid, {'survey_id' : context['survey_id'],'page_no' :-1,'page':'next','transfer' :1,'response':0})
|
||||
sur_name_rec = surv_name_wiz.read(cr, uid, wiz_id, [])
|
||||
context.update({'sur_name_id' :wiz_id})
|
||||
else:
|
||||
sur_name_rec = surv_name_wiz.read(cr, uid, context['sur_name_id'])
|
||||
|
||||
if context.has_key('active_id'): context.pop('active_id')
|
||||
survey_id = context['survey_id']
|
||||
survey_obj = self.pool.get('survey')
|
||||
sur_rec = survey_obj.read(cr, uid, survey_id, [])
|
||||
@@ -674,6 +680,9 @@ class survey_question_wiz(osv.osv_memory):
|
||||
p_id = sur_rec['page_ids']
|
||||
total_pages = len(p_id)
|
||||
pre_button = False
|
||||
readonly = 0
|
||||
if context.has_key('response_id'):
|
||||
readonly = 1
|
||||
if not sur_name_rec['page_no'] + 1 :
|
||||
surv_name_wiz.write(cr, uid, [context['sur_name_id']], {'store_ans':{}})
|
||||
sur_name_read = surv_name_wiz.read(cr, uid, context['sur_name_id'])
|
||||
@@ -681,6 +690,7 @@ class survey_question_wiz(osv.osv_memory):
|
||||
if sur_name_read['transfer'] or not sur_name_rec['page_no'] + 1:
|
||||
surv_name_wiz.write(cr, uid, [context['sur_name_id']], {'transfer':False})
|
||||
flag = False
|
||||
fields = {}
|
||||
if sur_name_read['page'] == "next" or sur_name_rec['page_no'] == - 1 :
|
||||
if len(p_id) > sur_name_rec['page_no'] + 1 :
|
||||
if sur_rec['max_response_limit'] and sur_rec['max_response_limit'] <= sur_rec['tot_start_survey'] and not sur_name_rec['page_no'] + 1:
|
||||
@@ -700,10 +710,13 @@ class survey_question_wiz(osv.osv_memory):
|
||||
if sur_name_rec['page_no'] > 1:
|
||||
pre_button = True
|
||||
if flag:
|
||||
fields = {}
|
||||
pag_rec = page_obj.read(cr, uid, p_id)
|
||||
xml_form = etree.Element('form', {'string': _(tools.ustr(pag_rec['title']))})
|
||||
xml_group = etree.SubElement(xml_form, 'group', {'col': '1', 'colspan': '4'})
|
||||
if wiz_id:
|
||||
fields["wizardid_" + str(wiz_id)] = {'type':'char', 'size' : 255, 'string':"", 'views':{}}
|
||||
etree.SubElement(xml_form, 'field', {'invisible':'1','name': "wizardid_" + str(wiz_id),'default':str(lambda *a: 0)})
|
||||
|
||||
if pag_rec['note']:
|
||||
for que_test in pag_rec['note'].split('\n'):
|
||||
etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(que_test)), 'align':"0.0"})
|
||||
@@ -736,12 +749,12 @@ class survey_question_wiz(osv.osv_memory):
|
||||
for ans in ans_ids:
|
||||
selection.append((tools.ustr(ans['id']), ans['answer']))
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': '2', 'colspan': '2'})
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_selection"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_selection"})
|
||||
fields[tools.ustr(que) + "_selection"] = {'type':'selection', 'selection' :selection, 'string':"Answer"}
|
||||
elif que_rec['type'] == 'multiple_choice_multiple_ans':
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
|
||||
for ans in ans_ids:
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(ans['id'])})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_" + tools.ustr(ans['id'])})
|
||||
fields[tools.ustr(que) + "_" + tools.ustr(ans['id'])] = {'type':'boolean', 'string':ans['answer']}
|
||||
elif que_rec['type'] in ['matrix_of_choices_only_one_ans', 'rating_scale']:
|
||||
if que_rec['comment_column']:
|
||||
@@ -753,14 +766,14 @@ class survey_question_wiz(osv.osv_memory):
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': tools.ustr(col), 'colspan': tools.ustr(colspan)})
|
||||
for row in ans_ids:
|
||||
etree.SubElement(xml_group, 'newline')
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_selection_" + tools.ustr(row['id']),'string':to_xml(tools.ustr(row['answer']))})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_selection_" + tools.ustr(row['id']),'string':to_xml(tools.ustr(row['answer']))})
|
||||
selection = [('','')]
|
||||
for col in que_col_head.read(cr, uid, que_rec['column_heading_ids']):
|
||||
selection.append((str(col['id']), col['title']))
|
||||
fields[tools.ustr(que) + "_selection_" + tools.ustr(row['id'])] = {'type':'selection', 'selection' : selection, 'string': "Answer"}
|
||||
if que_rec['comment_column']:
|
||||
fields[tools.ustr(que) + "_commentcolumn_"+tools.ustr(row['id']) + "_field"] = {'type':'char', 'size' : 255, 'string':tools.ustr(que_rec['column_name']), 'views':{}}
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_commentcolumn_"+tools.ustr(row['id'])+ "_field"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_commentcolumn_"+tools.ustr(row['id'])+ "_field"})
|
||||
elif que_rec['type'] == 'matrix_of_choices_only_multi_ans':
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': str(len(que_rec['column_heading_ids']) + 1), 'colspan': '4'})
|
||||
etree.SubElement(xml_group, 'separator', {'string': '.','colspan': '1'})
|
||||
@@ -769,7 +782,7 @@ class survey_question_wiz(osv.osv_memory):
|
||||
for row in ans_ids:
|
||||
etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(row['answer'])) +' :-', 'align': '0.0'})
|
||||
for col in que_col_head.read(cr, uid, que_rec['column_heading_ids']):
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['id']), 'nolabel':"1"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['id']), 'nolabel':"1"})
|
||||
fields[tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['id'])] = {'type':'boolean', 'string': col['title']}
|
||||
elif que_rec['type'] == 'matrix_of_drop_down_menus':
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': str(len(que_rec['column_heading_ids']) + 1), 'colspan': '4'})
|
||||
@@ -783,7 +796,7 @@ class survey_question_wiz(osv.osv_memory):
|
||||
if col['menu_choice']:
|
||||
for item in col['menu_choice'].split('\n'):
|
||||
if item and not item.strip() == '': selection.append((item ,item))
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['id']),'nolabel':'1'})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['id']),'nolabel':'1'})
|
||||
fields[tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['id'])] = {'type':'selection', 'string': col['title'], 'selection':selection}
|
||||
elif que_rec['type'] == 'multiple_textboxes':
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
|
||||
@@ -796,7 +809,7 @@ class survey_question_wiz(osv.osv_memory):
|
||||
elif que_rec['validation_type'] in ['must_be_date']:
|
||||
type = "date"
|
||||
for ans in ans_ids:
|
||||
etree.SubElement(xml_group, 'field', {'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"})
|
||||
if type == "char" :
|
||||
fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"] = {'type':'char', 'size':255, 'string':ans['answer']}
|
||||
else:
|
||||
@@ -804,26 +817,26 @@ class survey_question_wiz(osv.osv_memory):
|
||||
elif que_rec['type'] == 'numerical_textboxes':
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
|
||||
for ans in ans_ids:
|
||||
etree.SubElement(xml_group, 'field', {'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_numeric"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_numeric"})
|
||||
fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_numeric"] = {'type':'integer', 'string':ans['answer']}
|
||||
elif que_rec['type'] == 'date':
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
|
||||
for ans in ans_ids:
|
||||
etree.SubElement(xml_group, 'field', {'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id'])})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id'])})
|
||||
fields[tools.ustr(que) + "_" + tools.ustr(ans['id'])] = {'type':'date', 'string':ans['answer']}
|
||||
elif que_rec['type'] == 'date_and_time':
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
|
||||
for ans in ans_ids:
|
||||
etree.SubElement(xml_group, 'field', {'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id'])})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id'])})
|
||||
fields[tools.ustr(que) + "_" + tools.ustr(ans['id'])] = {'type':'datetime', 'string':ans['answer']}
|
||||
elif que_rec['type'] == 'descriptive_text':
|
||||
for que_test in que_rec['descriptive_text'].split('\n'):
|
||||
etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(que_test)), 'align':"0.0"})
|
||||
elif que_rec['type'] == 'single_textbox':
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_single", 'nolabel':"1" ,'colspan':"4"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_single", 'nolabel':"1" ,'colspan':"4"})
|
||||
fields[tools.ustr(que) + "_single"] = {'type':'char', 'size' : 255, 'string':"single_textbox", 'views':{}}
|
||||
elif que_rec['type'] == 'comment':
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_comment", 'nolabel':"1" ,'colspan':"4"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_comment", 'nolabel':"1" ,'colspan':"4"})
|
||||
fields[tools.ustr(que) + "_comment"] = {'type':'text', 'string':"Comment/Eassy Box", 'views':{}}
|
||||
elif que_rec['type'] == 'table':
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': str(len(que_rec['column_heading_ids'])), 'colspan': '4'})
|
||||
@@ -831,16 +844,16 @@ class survey_question_wiz(osv.osv_memory):
|
||||
etree.SubElement(xml_group, 'separator', {'string': tools.ustr(col['title']),'colspan': '1'})
|
||||
for row in range(0,que_rec['no_of_rows']):
|
||||
for col in que_col_head.read(cr, uid, que_rec['column_heading_ids']):
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_table_" + tools.ustr(col['id']) +"_"+ tools.ustr(row), 'nolabel':"1"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_table_" + tools.ustr(col['id']) +"_"+ tools.ustr(row), 'nolabel':"1"})
|
||||
fields[tools.ustr(que) + "_table_" + tools.ustr(col['id']) +"_"+ tools.ustr(row)] = {'type':'char','size':255,'views':{}}
|
||||
elif que_rec['type'] == 'multiple_textboxes_diff_type':
|
||||
xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
|
||||
for ans in ans_ids:
|
||||
if ans['type'] == "email" :
|
||||
fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"] = {'type':'char', 'size':255, 'string':ans['answer']}
|
||||
etree.SubElement(xml_group, 'field', {'widget':'email','width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'widget':'email','width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"})
|
||||
else:
|
||||
etree.SubElement(xml_group, 'field', {'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"})
|
||||
if ans['type'] == "char" :
|
||||
fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"] = {'type':'char', 'size':255, 'string':ans['answer']}
|
||||
elif ans['type'] in ['integer','float','date','datetime']:
|
||||
@@ -853,22 +866,22 @@ class survey_question_wiz(osv.osv_memory):
|
||||
fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"] = {'type':'selection', 'selection' : selection, 'string':ans['answer']}
|
||||
if que_rec['type'] in ['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans', 'matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale'] and que_rec['is_comment_require']:
|
||||
if que_rec['type'] in ['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans'] and que_rec['comment_field_type'] in ['char','text'] and que_rec['make_comment_field']:
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_otherfield", 'colspan':"4"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_otherfield", 'colspan':"4"})
|
||||
fields[tools.ustr(que) + "_otherfield"] = {'type':'boolean', 'string':que_rec['comment_label'], 'views':{}}
|
||||
if que_rec['comment_field_type'] == 'char':
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_other", 'nolabel':"1" ,'colspan':"4"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_other", 'nolabel':"1" ,'colspan':"4"})
|
||||
fields[tools.ustr(que) + "_other"] = {'type': 'char', 'string': '', 'size':255, 'views':{}}
|
||||
elif que_rec['comment_field_type'] == 'text':
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_other", 'nolabel':"1" ,'colspan':"4"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_other", 'nolabel':"1" ,'colspan':"4"})
|
||||
fields[tools.ustr(que) + "_other"] = {'type': 'text', 'string': '', 'views':{}}
|
||||
else:
|
||||
if que_rec['comment_field_type'] == 'char':
|
||||
etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(que_rec['comment_label'])),'colspan':"4"})
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_other", 'nolabel':"1" ,'colspan':"4"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_other", 'nolabel':"1" ,'colspan':"4"})
|
||||
fields[tools.ustr(que) + "_other"] = {'type': 'char', 'string': '', 'size':255, 'views':{}}
|
||||
elif que_rec['comment_field_type'] == 'text':
|
||||
etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(que_rec['comment_label'])),'colspan':"4"})
|
||||
etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_other", 'nolabel':"1" ,'colspan':"4"})
|
||||
etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que) + "_other", 'nolabel':"1" ,'colspan':"4"})
|
||||
fields[tools.ustr(que) + "_other"] = {'type': 'text', 'string': '', 'views':{}}
|
||||
etree.SubElement(xml_form, 'separator', {'colspan': '4'})
|
||||
xml_group = etree.SubElement(xml_form, 'group', {'col': '6', 'colspan': '4'})
|
||||
@@ -878,7 +891,7 @@ class survey_question_wiz(osv.osv_memory):
|
||||
etree.SubElement(xml_group, 'button', {'icon': "gtk-cancel", 'special': "cancel",'string':"Cancel"})
|
||||
if pre_button:
|
||||
etree.SubElement(xml_group, 'button', {'colspan':"1",'icon':"gtk-go-back",'name':"action_previous",'string':"Previous",'type':"object"})
|
||||
etree.SubElement(xml_group, 'button', {'icon': "gtk-go-forward", 'name':"action_next",'string':"Next",'type':"object"})
|
||||
etree.SubElement(xml_group, 'button', {'icon': "gtk-go-forward", 'name':"action_next",'string':"Next",'type':"object",'context' : tools.ustr(context)})
|
||||
if context.has_key('active') and context.has_key('edit'):
|
||||
etree.SubElement(xml_form, 'separator', {'string' : '','colspan': '4'})
|
||||
context.update({'page_id' : tools.ustr(p_id),'page_number' : sur_name_rec['page_no'] , 'transfer' : sur_name_read['transfer']})
|
||||
@@ -959,15 +972,54 @@ class survey_question_wiz(osv.osv_memory):
|
||||
tot_page_id = self.pool.get('survey').browse(cr, uid, context['survey_id'])
|
||||
tot_per = (float(100) * (int(field.split('_')[2]) + 1) / len(tot_page_id.page_ids))
|
||||
value[field] = tot_per
|
||||
if context.has_key('active') and context['active']:
|
||||
return value
|
||||
surv_name_wiz = self.pool.get('survey.name.wiz')
|
||||
sur_name_read = surv_name_wiz.read(cr, uid, context['sur_name_id'])
|
||||
ans_list = []
|
||||
for key,val in sur_name_read['store_ans'].items():
|
||||
for field in fields_list:
|
||||
if field in list(val):
|
||||
value[field] = val[field]
|
||||
if context.has_key('response_id'):
|
||||
response_obj = self.pool.get('survey.response')
|
||||
response_ans = response_obj.browse(cr, uid, context['response_id'])
|
||||
fields_list.sort()
|
||||
for que in response_ans.question_ids:
|
||||
for field in fields_list:
|
||||
if field.split('_')[0] != "progress" and field.split('_')[0] == str(que.question_id.id):
|
||||
if que.response_answer_ids and len(field.split('_')) == 4 and field.split('_')[1] == "commentcolumn" and field.split('_')[3] == "field":
|
||||
for ans in que.response_answer_ids:
|
||||
if str(field.split('_')[2]) == str(ans.answer_id.id):
|
||||
value[field] = ans.comment_field
|
||||
if que.response_table_ids and len(field.split('_')) == 4 and field.split('_')[1] == "table":
|
||||
for ans in que.response_table_ids:
|
||||
if str(field.split('_')[2]) == str(ans.column_id.id) and str(field.split('_')[3]) == str(ans.name):
|
||||
value[field] = ans.value
|
||||
if que.comment and (field.split('_')[1] == "comment" or field.split('_')[1] == "other"):
|
||||
value[field] = str(que.comment)
|
||||
elif que.single_text and field.split('_')[1] == "single":
|
||||
value[field] = str(que.single_text)
|
||||
elif que.response_answer_ids and len(field.split('_')) == 3 and field.split('_')[1] == "selection":
|
||||
for ans in que.response_answer_ids:
|
||||
if str(field.split('_')[2]) == str( ans.answer_id.id):
|
||||
value[field] = str(ans.column_id.id)
|
||||
elif que.response_answer_ids and len(field.split('_')) == 2 and field.split('_')[1] == "selection":
|
||||
value[field] = str(que.response_answer_ids[0].answer_id.id)
|
||||
elif que.response_answer_ids and len(field.split('_')) == 3 and field.split('_')[2] != "multi" and field.split('_')[2] != "numeric":
|
||||
for ans in que.response_answer_ids:
|
||||
if str(field.split('_')[1]) == str( ans.answer_id.id) and str(field.split('_')[2]) == str(ans.column_id.id):
|
||||
if ans.value_choice:
|
||||
value[field] = ans.value_choice
|
||||
else:
|
||||
value[field] = True
|
||||
else:
|
||||
for ans in que.response_answer_ids:
|
||||
if str(field.split('_')[1]) == str( ans.answer_id.id):
|
||||
value[field] = ans.answer
|
||||
else:
|
||||
if not context.has_key('sur_name_id'):
|
||||
return value
|
||||
if context.has_key('active') and context['active']:
|
||||
return value
|
||||
surv_name_wiz = self.pool.get('survey.name.wiz')
|
||||
sur_name_read = surv_name_wiz.read(cr, uid, context['sur_name_id'])
|
||||
ans_list = []
|
||||
for key,val in sur_name_read['store_ans'].items():
|
||||
for field in fields_list:
|
||||
if field in list(val):
|
||||
value[field] = val[field]
|
||||
return value
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
@@ -976,13 +1028,15 @@ class survey_question_wiz(osv.osv_memory):
|
||||
for key,val in vals.items():
|
||||
if key.split('_')[0] == "progress":
|
||||
vals.pop(key)
|
||||
break
|
||||
if not context.has_key('sur_name_id') and key.split('_')[0] == "wizardid":
|
||||
context.update({'sur_name_id': int(key.split('_')[1])})
|
||||
vals.pop(key)
|
||||
click_state = True
|
||||
click_update = []
|
||||
surv_name_wiz = self.pool.get('survey.name.wiz')
|
||||
surv_all_resp_obj = self.pool.get('survey.response')
|
||||
surv_tbl_column_obj = self.pool.get('survey.tbl.column.heading')
|
||||
sur_name_read = surv_name_wiz.read(cr, uid, context['sur_name_id'])
|
||||
sur_name_read = surv_name_wiz.read(cr, uid, context['sur_name_id'], [])
|
||||
response_id = 0
|
||||
if not sur_name_read['response']:
|
||||
response_id = surv_all_resp_obj.create(cr, uid, {'response_type':'link', 'user_id':uid, 'date_create':datetime.datetime.now(), 'survey_id' : context['survey_id']})
|
||||
@@ -992,6 +1046,13 @@ class survey_question_wiz(osv.osv_memory):
|
||||
if response_id not in surv_all_resp_obj.search(cr, uid, []):
|
||||
response_id = surv_all_resp_obj.create(cr, uid, {'response_type':'link', 'user_id':uid, 'date_create':datetime.datetime.now(), 'survey_id' : context['survey_id']})
|
||||
surv_name_wiz.write(cr, uid, [context['sur_name_id']], {'response' : tools.ustr(response_id)})
|
||||
#click first time on next button then increemnet on total start suvey
|
||||
if not sur_name_read['store_ans']:
|
||||
his_id = self.pool.get('survey.history').create(cr, uid, {'user_id': uid, \
|
||||
'date': strftime('%Y-%m-%d %H:%M:%S'), 'survey_id': sur_name_read['survey_id']})
|
||||
survey_obj = self.pool.get('survey')
|
||||
sur_rec = survey_obj.read(cr, uid, sur_name_read['survey_id'])
|
||||
survey_obj.write(cr, uid, sur_name_read['survey_id'], {'tot_start_survey' : sur_rec['tot_start_survey'] + 1})
|
||||
for key,val in sur_name_read['store_ans'].items():
|
||||
for field in vals:
|
||||
if field.split('_')[0] == val['question_id']:
|
||||
@@ -1530,4 +1591,39 @@ class survey_request(osv.osv):
|
||||
|
||||
survey_request()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
class survey_print_answer(osv.osv_memory):
|
||||
_name = 'survey.print.answer'
|
||||
|
||||
def _get_survey(self, cr, uid, context=None):
|
||||
surv_obj = self.pool.get("survey")
|
||||
surv_resp_obj = self.pool.get("survey.response")
|
||||
result = []
|
||||
for sur in surv_obj.browse(cr, uid, surv_obj.search(cr, uid, [])):
|
||||
if surv_resp_obj.search(cr, uid, [('survey_id', '=', sur.id)]):
|
||||
result.append((sur.id, sur.title))
|
||||
return result
|
||||
|
||||
_columns = {
|
||||
'survey_id': fields.selection(_get_survey, "Survey", required="1"),
|
||||
'response_id': fields.many2one("survey.response", "Survey Response", required="1"),
|
||||
}
|
||||
|
||||
def action_next(self, cr, uid, ids, context=None):
|
||||
response_id = self.read(cr, uid, ids, [])[0]
|
||||
context.update({'active' : True,'survey_id' : response_id['survey_id'], 'response_id' : response_id['response_id']})
|
||||
search_obj = self.pool.get('ir.ui.view')
|
||||
search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
|
||||
return {
|
||||
'view_type': 'form',
|
||||
"view_mode": 'form',
|
||||
'res_model': 'survey.question.wiz',
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'search_view_id':search_id[0],
|
||||
'context' : context
|
||||
}
|
||||
|
||||
survey_print_answer()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -2,12 +2,25 @@
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record model="survey.type" id="survey_type1">
|
||||
<field name="name">Human Resources</field>
|
||||
<field name="code">Human Resources</field>
|
||||
</record>
|
||||
<record model="survey.type" id="survey_type2">
|
||||
<field name="name">Customer Feeback</field>
|
||||
<field name="code">Customer Feeback</field>
|
||||
</record>
|
||||
<record model="survey.type" id="survey_type3">
|
||||
<field name="name">Supplier Selection</field>
|
||||
<field name="code">Supplier Selection</field>
|
||||
</record>
|
||||
|
||||
<!-- Partner Feedback Demo data -->
|
||||
<record model="survey" id="survey_partner_feedback">
|
||||
<field name="title">Open ERP Partner Feedback</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="question_prefix">Que</field>
|
||||
<field name="responsible_id" ref="base.user_root"/>
|
||||
<field name="max_response_limit">20</field>
|
||||
<field name="type" ref="survey_type2"/>
|
||||
</record>
|
||||
|
||||
<record id="survey_page_who_are_you" model="survey.page">
|
||||
@@ -476,9 +489,9 @@
|
||||
<!-- Partner Feedback Demo data -->
|
||||
<record model="survey" id="survey_odoo_feedback">
|
||||
<field name="title">Odoo Feedback</field>
|
||||
<field name="question_prefix">Que</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="responsible_id" ref="base.user_demo"/>
|
||||
<field name="max_response_limit">20</field>
|
||||
<field name="type" ref="survey_type2"/>
|
||||
</record>
|
||||
|
||||
<record id="survey_page_odoo_who_are_you" model="survey.page">
|
||||
@@ -1264,9 +1277,9 @@
|
||||
<data>
|
||||
<record id="survey_0" model="survey">
|
||||
<field eval=""""OpenERP Feedback"""" name="title"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="question_prefix">Que</field>
|
||||
<field name="responsible_id" ref="base.user_demo"/>
|
||||
<field name="max_response_limit">20</field>
|
||||
<field name="type" ref="survey_type2"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
@@ -2143,6 +2156,7 @@
|
||||
<field name="responsible_id" ref="base.user_root"/>
|
||||
<field eval="1" name="send_response"/>
|
||||
<field eval="[(6,0,[])]" name="users"/>
|
||||
<field name="type" ref="survey_type3"/>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
|
||||
@@ -77,6 +77,38 @@
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
Browse Response Wizard (Survey print answer)
|
||||
-->
|
||||
|
||||
<record id="view_survey_answer" model="ir.ui.view">
|
||||
<field name="name">Survey</field>
|
||||
<field name="model">survey.print.answer</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Survey">
|
||||
<separator colspan="4" string = "Select Survey and related response"/>
|
||||
<field name="survey_id" width="250"/>
|
||||
<field name="response_id" domain="[('survey_id','=', survey_id)]"/>
|
||||
<separator colspan="4" />
|
||||
<label align="0.0" colspan="2" string="" />
|
||||
<button colspan="1" icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button colspan="1" icon="gtk-go-forward" name="action_next" string="Start" type="object"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_browse_survey_response"
|
||||
model="ir.actions.act_window">
|
||||
<field name="name">Answer Survey Response</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">survey.print.answer</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
<report auto="True" id="survey_browse_response" model="survey"
|
||||
name="survey.browse.response"
|
||||
rml=""
|
||||
string="Browse Response"/>
|
||||
string="Print Answers"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<menuitem name="Survey" id="main_menu_survey"
|
||||
sequence="3" groups="group_survey_manager,group_survey_user"
|
||||
parent="base.menu_tools" />
|
||||
<menuitem id="menu_defination" name="Defination" parent="main_menu_survey" sequence="1"/>
|
||||
<menuitem id="menu_defination" name="Definition" parent="main_menu_survey" sequence="1" groups="group_survey_manager"/>
|
||||
<!-- <menuitem name="Configuration" id="menu_survey_config" parent="main_menu_survey" groups="group_survey_manager"/>-->
|
||||
<menuitem name="Configuration" parent="base.menu_tools"
|
||||
id="base.menu_lunch_survey_root" groups="group_survey_manager" sequence="6"/>
|
||||
@@ -25,11 +25,12 @@
|
||||
<field name="title" select="1"/>
|
||||
<group col="6" colspan="6">
|
||||
<field name="responsible_id"/>
|
||||
<button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
|
||||
string="Test Survey" type="action" icon="gtk-new" context="{'active':True,'survey_id': active_id}"/>
|
||||
<button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
|
||||
<button 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}"/>
|
||||
<button 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="{'readonly':[('state','!=','open')]}"/>
|
||||
<button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
|
||||
<button 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}"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
@@ -210,12 +211,12 @@
|
||||
<field name="tot_comp_survey" select="1"/>
|
||||
<field name="history" colspan="4" nolabel="1">
|
||||
<tree string="History">
|
||||
<field name="user_id"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
</tree>
|
||||
<form string="History">
|
||||
<field name="user_id"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
@@ -237,7 +238,7 @@
|
||||
<field name="tot_start_survey" select="2" string="Started"/>
|
||||
<field name="tot_comp_survey" select="2" string="Completed"/>
|
||||
<field name="state" select="1"/>
|
||||
<button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
|
||||
<button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
|
||||
string="Test Survey" type="action" icon="gtk-execute" context="{'active':True,'survey_id': active_id}"/>
|
||||
<button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
|
||||
string="Answer Survey" type="action" icon="gtk-new" context="{'survey_id': active_id}"/>
|
||||
@@ -257,12 +258,11 @@
|
||||
<search string="Search Survey">
|
||||
<group col='10' colspan='4'>
|
||||
<filter icon="terp-crm" string="Draft" domain="[('state','=','draft')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Open" icon="terp-stock" domain="[('state','=','open')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="title" select="1"/>
|
||||
<field name="type" select="1"/>
|
||||
<field name="responsible_id" select="1" widget="selection">
|
||||
<field name="type" select="1" widget="selection"/>
|
||||
<field name="responsible_id" select="1" widget="selection" default="1">
|
||||
<filter string="MY" icon="terp-partner" domain="[('responsible_id','=',uid)]"/>
|
||||
</field>
|
||||
</group>
|
||||
@@ -1119,8 +1119,12 @@
|
||||
action="action_view_survey_name" parent="main_menu_survey"
|
||||
groups="group_survey_manager,group_survey_user" icon="STOCK_INDEX"/>
|
||||
|
||||
<menuitem name="Browse Response" id="menu_browse_survey_response"
|
||||
action="action_browse_survey_response" parent="main_menu_survey"
|
||||
groups="group_survey_manager" icon="STOCK_PRINT_PREVIEW"/>
|
||||
|
||||
<menuitem action="wizard_browse_answer" id="menu_wizard_browse_answer"
|
||||
parent="main_menu_survey" type="wizard" groups="group_survey_manager"/>
|
||||
parent="main_menu_survey" type="wizard" icon="STOCK_PRINT" groups="group_survey_manager"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
<wizard string="Print Survey" id="wizard_print_survey"
|
||||
model="survey" name="wizard.print.survey"/>
|
||||
|
||||
<wizard string="Browse Answer" id="wizard_browse_answer"
|
||||
<wizard string="Print Answers" id="wizard_browse_answer"
|
||||
model="survey.response" name="wizard.browse.answer"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user