summaryrefslogtreecommitdiff
path: root/addons/project_issue
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-06-01 13:36:25 +0200
committerThibault Delavallée <tde@openerp.com>2012-06-01 13:36:25 +0200
commitcd19f68eb9f145e9049949074e06196d540cf2c2 (patch)
tree6c050ac836af1e3226ce7b71726db7e40b32a126 /addons/project_issue
parentc9ce120fcdda692dce255359654e9b393332197b (diff)
parentf9e6b60c9f48c48d7b0d2a9b67a3e2376e032fd2 (diff)
[MERGE] Merged with main addons.
bzr revid: tde@openerp.com-20120601113625-c9w0kmnw1dzvjswx
Diffstat (limited to 'addons/project_issue')
-rw-r--r--addons/project_issue/__openerp__.py1
-rw-r--r--addons/project_issue/board_project_issue_view.xml26
-rw-r--r--addons/project_issue/i18n/sv.po952
-rw-r--r--addons/project_issue/project_issue.py190
-rw-r--r--addons/project_issue/project_issue_demo.xml48
-rw-r--r--addons/project_issue/project_issue_view.xml93
-rw-r--r--addons/project_issue/report/project_issue_report.py4
-rw-r--r--addons/project_issue/report/project_issue_report_view.xml4
-rw-r--r--addons/project_issue/test/cancel_issue.yml6
9 files changed, 1180 insertions, 144 deletions
diff --git a/addons/project_issue/__openerp__.py b/addons/project_issue/__openerp__.py
index fc88372fe90..9037523d41e 100644
--- a/addons/project_issue/__openerp__.py
+++ b/addons/project_issue/__openerp__.py
@@ -38,6 +38,7 @@ and decide on their status as they evolve.
'website': 'http://www.openerp.com',
'images': ['images/issue_analysis.jpeg','images/project_issue.jpeg'],
'depends': [
+ 'base_status',
'crm',
'project',
],
diff --git a/addons/project_issue/board_project_issue_view.xml b/addons/project_issue/board_project_issue_view.xml
index a070bdbe521..9945f006e43 100644
--- a/addons/project_issue/board_project_issue_view.xml
+++ b/addons/project_issue/board_project_issue_view.xml
@@ -35,7 +35,7 @@
<field name="type">graph</field>
<field name="arch" type="xml">
<graph orientation="vertical" string="Project Issue" type="bar">
- <field name="type_id"/>
+ <field name="stage_id"/>
<field name="nbr" operator="+"/>
<field group="True" name="user_id"/>
</graph>
@@ -96,18 +96,22 @@
<field name="partner_id"/>
<field name="project_id" />
<field name="priority" string="Priority"/>
- <field name="type_id" widget="selection" readonly="1"/>
- <button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
- <button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
<field name="version_id" widget="selection"/>
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
- <field name="state"/>
- <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
- <button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
- <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" help="To Do"/>
- <button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
- <button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
- <button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
+ <field name="stage_id" widget="selection" readonly="1"/>
+ <button name="stage_previous" string="Previous" type="object"
+ icon="gtk-go-back" help="Change to Previous Stage"
+ attrs="{'invisible': [('stage_id','=', False)]}"/>
+ <button name="stage_next" string="Next" type="object"
+ icon="gtk-go-forward" help="Change to Next Stage"
+ attrs="{'invisible': [('stage_id','=', False)]}"/>
+ <field name="state" groups="base.group_no_one"/>
+ <button name="case_open" string="Open" type="object"
+ states="draft,pending" icon="gtk-go-forward"/>
+ <button name="case_close" string="Done" type="object"
+ states="draft,open,pending" icon="gtk-close"/>
+ <button name="case_cancel" string="Cancel" type="object"
+ states="draft,open,pending" icon="gtk-cancel"/>
<field name="categ_id" invisible="1"/>
<field name="task_id" invisible="1"/>
</tree>
diff --git a/addons/project_issue/i18n/sv.po b/addons/project_issue/i18n/sv.po
new file mode 100644
index 00000000000..134b7a9477b
--- /dev/null
+++ b/addons/project_issue/i18n/sv.po
@@ -0,0 +1,952 @@
+# Swedish translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2012-02-08 01:37+0100\n"
+"PO-Revision-Date: 2012-05-30 19:13+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Swedish <sv@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-05-31 04:54+0000\n"
+"X-Generator: Launchpad (build 15322)\n"
+
+#. module: project_issue
+#: view:project.issue.report:0
+msgid "Previous Month"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue.report,delay_open:0
+msgid "Avg. Delay to Open"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 view:project.issue.report:0
+msgid "Group By..."
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,working_hours_open:0
+msgid "Working Hours to Open the Issue"
+msgstr ""
+
+#. module: project_issue
+#: constraint:project.project:0
+msgid "Error! project start-date must be lower then project end-date."
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,date_open:0
+msgid "Opened"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue.report,opening_date:0
+msgid "Date of Opening"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "March"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,progress:0
+msgid "Progress (%)"
+msgstr ""
+
+#. module: project_issue
+#: code:addons/project_issue/project_issue.py:406
+#, python-format
+msgid "Warning !"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,company_id:0 view:project.issue.report:0
+#: field:project.issue.report,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,email_cc:0
+msgid "Watchers Emails"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Today's features"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.model,name:project_issue.model_project_issue_version
+msgid "project.issue.version"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,day_open:0
+msgid "Days to Open"
+msgstr ""
+
+#. module: project_issue
+#: code:addons/project_issue/project_issue.py:406
+#, python-format
+msgid ""
+"You cannot escalate this issue.\n"
+"The relevant Project has not configured the Escalation Project!"
+msgstr ""
+
+#. module: project_issue
+#: constraint:project.project:0
+msgid "Error! You cannot assign escalation to the same project!"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue,priority:0
+#: selection:project.issue.report,priority:0
+msgid "Highest"
+msgstr ""
+
+#. module: project_issue
+#: help:project.issue,inactivity_days:0
+msgid "Difference in days between last action and current date"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.report:0 field:project.issue.report,day:0
+msgid "Day"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,days_since_creation:0
+msgid "Days since creation date"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Add Internal Note"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,task_id:0 view:project.issue.report:0
+#: field:project.issue.report,task_id:0
+msgid "Task"
+msgstr ""
+
+#. module: project_issue
+#: view:board.board:0
+msgid "Issues By Stage"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,message_ids:0
+msgid "Messages"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,inactivity_days:0
+msgid "Days since last action"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.model,name:project_issue.model_project_project
+#: view:project.issue:0 field:project.issue,project_id:0
+#: view:project.issue.report:0 field:project.issue.report,project_id:0
+msgid "Project"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,name:project_issue.action_view_my_open_project_issue_tree
+msgid "My Open Project issues"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue,state:0 selection:project.issue.report,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Change to Next Stage"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue.report,date_closed:0
+msgid "Date of Closing"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Issue Tracker Search"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,color:0
+msgid "Color Index"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Issue / Partner"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue.report,working_hours_open:0
+msgid "Avg. Working Hours to Open"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,date_action_next:0
+msgid "Next Action"
+msgstr ""
+
+#. module: project_issue
+#: help:project.project,project_escalation_id:0
+msgid ""
+"If any issue is escalated from the current Project, it will be listed under "
+"the project selected here."
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Extra Info"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,help:project_issue.action_project_issue_report
+msgid ""
+"This report on the project issues allows you to analyse the quality of your "
+"support or after-sales services. You can track the issues per age. You can "
+"analyse the time required to open or close an issue, the number of email to "
+"exchange and the time spent on average by issues."
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Change Color"
+msgstr ""
+
+#. module: project_issue
+#: code:addons/project_issue/project_issue.py:482
+#, python-format
+msgid " (copy)"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Responsible"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue,priority:0
+#: selection:project.issue.report,priority:0
+msgid "Low"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Statistics"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Convert To Task"
+msgstr ""
+
+#. module: project_issue
+#: model:crm.case.categ,name:project_issue.bug_categ
+msgid "Maintenance"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,name:project_issue.action_project_issue_report
+#: model:ir.ui.menu,name:project_issue.menu_project_issue_report_tree
+#: view:project.issue.report:0
+msgid "Issues Analysis"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Next"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 field:project.issue,priority:0
+#: view:project.issue.report:0 field:project.issue.report,priority:0
+msgid "Priority"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Send New Email"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 field:project.issue,version_id:0
+#: view:project.issue.report:0 field:project.issue.report,version_id:0
+msgid "Version"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 selection:project.issue,state:0
+#: view:project.issue.report:0
+msgid "New"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,name:project_issue.project_issue_categ_action
+msgid "Issue Categories"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,email_from:0
+msgid "Email"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,channel_id:0 field:project.issue.report,channel_id:0
+msgid "Channel"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue,priority:0
+#: selection:project.issue.report,priority:0
+msgid "Lowest"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Unassigned Issues"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,create_date:0 view:project.issue.report:0
+#: field:project.issue.report,creation_date:0
+msgid "Creation Date"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,name:project_issue.project_issue_version_action
+#: model:ir.ui.menu,name:project_issue.menu_project_issue_version_act
+msgid "Versions"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "To Do Issues"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Reset to Draft"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Today"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,name:project_issue.open_board_project_issue
+#: model:ir.ui.menu,name:project_issue.menu_deshboard_project_issue
+msgid "Project Issue Dashboard"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 selection:project.issue,state:0
+#: view:project.issue.report:0
+msgid "Done"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "July"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.ui.menu,name:project_issue.menu_project_issue_category_act
+msgid "Categories"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 view:project.issue.report:0
+#: field:project.issue.report,type_id:0
+msgid "Stage"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "History Information"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,name:project_issue.action_view_current_project_issue_tree
+#: model:ir.actions.act_window,name:project_issue.action_view_pending_project_issue_tree
+msgid "Project issues"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Communication & History"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.report:0
+msgid "My Open Project Issue"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,name:project_issue.action_view_my_project_issue_tree
+msgid "My Project Issues"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Contact"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 field:project.issue,partner_id:0
+#: view:project.issue.report:0 field:project.issue.report,partner_id:0
+msgid "Partner"
+msgstr ""
+
+#. module: project_issue
+#: view:board.board:0
+msgid "My Issues"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Change to Previous Stage"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,help:project_issue.project_issue_version_action
+msgid ""
+"You can use the issues tracker in OpenERP to handle bugs in the software "
+"development project, to handle claims in after-sales services, etc. Define "
+"here the different versions of your products on which you can work on issues."
+msgstr ""
+
+#. module: project_issue
+#: code:addons/project_issue/project_issue.py:330
+#, python-format
+msgid "Tasks"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue.report,nbr:0
+msgid "# of Issues"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "September"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "December"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Issue Tracker Tree"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 view:project.issue.report:0
+#: field:project.issue.report,month:0
+msgid "Month"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.model,name:project_issue.model_project_issue_report
+msgid "project.issue.report"
+msgstr ""
+
+#. module: project_issue
+#: code:addons/project_issue/project_issue.py:408 view:project.issue:0
+#, python-format
+msgid "Escalate"
+msgstr ""
+
+#. module: project_issue
+#: model:crm.case.categ,name:project_issue.feature_request_categ
+msgid "Feature Requests"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,write_date:0
+msgid "Update Date"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Open Features"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Previous"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 field:project.issue,categ_id:0
+#: view:project.issue.report:0 field:project.issue.report,categ_id:0
+msgid "Category"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,user_email:0
+msgid "User Email"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.report:0
+msgid "#Number of Project Issues"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Reset to New"
+msgstr ""
+
+#. module: project_issue
+#: help:project.issue,channel_id:0
+msgid "Communication channel."
+msgstr ""
+
+#. module: project_issue
+#: help:project.issue,email_cc:0
+msgid ""
+"These email addresses will be added to the CC field of all inbound and "
+"outbound emails for this record before being sent. Separate multiple email "
+"addresses with a comma"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Contact Information"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,date_closed:0 selection:project.issue.report,state:0
+msgid "Closed"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Reply"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue.report,delay_close:0
+msgid "Avg. Delay to Close"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 selection:project.issue,state:0
+#: view:project.issue.report:0 selection:project.issue.report,state:0
+msgid "Pending"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Status"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.report:0
+msgid "#Project Issues"
+msgstr ""
+
+#. module: project_issue
+#: view:board.board:0
+msgid "Current Issues"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "August"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue,priority:0
+#: selection:project.issue.report,priority:0
+msgid "Normal"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Global CC"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 view:project.issue.report:0
+msgid "To Do"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "June"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "New Issues"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,day_close:0
+msgid "Days to Close"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,active:0 field:project.issue.version,active:0
+msgid "Active"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "November"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.report:0
+msgid "Search"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "October"
+msgstr ""
+
+#. module: project_issue
+#: view:board.board:0
+msgid "Issues Dashboard"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 field:project.issue,type_id:0
+msgid "Stages"
+msgstr ""
+
+#. module: project_issue
+#: help:project.issue,days_since_creation:0
+msgid "Difference in days between creation date and current date"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "January"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Feature Tracker Tree"
+msgstr ""
+
+#. module: project_issue
+#: help:project.issue,email_from:0
+msgid "These people will receive email."
+msgstr ""
+
+#. module: project_issue
+#: view:board.board:0
+msgid "Issues By State"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 field:project.issue,date:0
+msgid "Date"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "History"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,user_id:0 view:project.issue.report:0
+#: field:project.issue.report,user_id:0
+msgid "Assigned to"
+msgstr ""
+
+#. module: project_issue
+#: field:project.project,reply_to:0
+msgid "Reply-To Email Address"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,partner_address_id:0
+msgid "Partner Contact"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Issue Tracker Form"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 field:project.issue,state:0
+#: view:project.issue.report:0 field:project.issue.report,state:0
+msgid "State"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "General"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Current Features"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.version:0
+msgid "Issue Version"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue.version,name:0
+msgid "Version Number"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Cancel"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Close"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 selection:project.issue.report,state:0
+msgid "Open"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,name:project_issue.act_project_project_2_project_issue_all
+#: model:ir.actions.act_window,name:project_issue.project_issue_categ_act0
+#: model:ir.ui.menu,name:project_issue.menu_project_confi
+#: model:ir.ui.menu,name:project_issue.menu_project_issue_track
+#: view:project.issue:0
+msgid "Issues"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue,state:0
+msgid "In Progress"
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,name:project_issue.action_project_issue_graph_stage
+#: model:ir.actions.act_window,name:project_issue.action_project_issue_graph_state
+#: model:ir.model,name:project_issue.model_project_issue
+#: view:project.issue.report:0
+msgid "Project Issue"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Creation Month"
+msgstr ""
+
+#. module: project_issue
+#: help:project.issue,progress:0
+msgid "Computed as: Time Spent / Total Time."
+msgstr ""
+
+#. module: project_issue
+#: model:ir.actions.act_window,help:project_issue.project_issue_categ_act0
+msgid ""
+"Issues such as system bugs, customer complaints, and material breakdowns are "
+"collected here. You can define the stages assigned when solving the project "
+"issue (analysis, development, done). With the mailgateway module, issues can "
+"be integrated through an email address (example: support@mycompany.com)"
+msgstr ""
+
+#. module: project_issue
+#: view:board.board:0 view:project.issue:0
+msgid "Pending Issues"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,name:0
+msgid "Issue"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Feature Tracker Search"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0 field:project.issue,description:0
+msgid "Description"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,section_id:0
+msgid "Sales Team"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "May"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.report:0 field:project.issue.report,email:0
+msgid "# Emails"
+msgstr ""
+
+#. module: project_issue
+#: help:project.issue,state:0
+msgid ""
+"The state is set to 'Draft', when a case is created. "
+" \n"
+"If the case is in progress the state is set to 'Open'. "
+" \n"
+"When the case is over, the state is set to 'Done'. "
+" \n"
+"If the case needs to be reviewed then the state is set to 'Pending'."
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "February"
+msgstr ""
+
+#. module: project_issue
+#: code:addons/project_issue/project_issue.py:70
+#, python-format
+msgid "Issue '%s' has been opened."
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Feature description"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "Edit"
+msgstr ""
+
+#. module: project_issue
+#: field:project.project,project_escalation_id:0
+msgid "Project Escalation"
+msgstr ""
+
+#. module: project_issue
+#: help:project.issue,section_id:0
+msgid ""
+"Sales team to which Case belongs to. Define "
+"Responsible user and Email account for mail gateway."
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.report:0
+msgid "Month-1"
+msgstr ""
+
+#. module: project_issue
+#: code:addons/project_issue/project_issue.py:85
+#, python-format
+msgid "Issue '%s' has been closed."
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue.report,month:0
+msgid "April"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue:0
+msgid "References"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,working_hours_close:0
+msgid "Working Hours to Close the Issue"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,id:0
+msgid "ID"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.report:0
+msgid "Current Year"
+msgstr ""
+
+#. module: project_issue
+#: code:addons/project_issue/project_issue.py:415
+#, python-format
+msgid "No Title"
+msgstr ""
+
+#. module: project_issue
+#: help:project.issue.report,delay_close:0
+#: help:project.issue.report,delay_open:0
+msgid "Number of Days to close the project issue"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.report:0 field:project.issue.report,section_id:0
+msgid "Sale Team"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue.report,working_hours_close:0
+msgid "Avg. Working Hours to Close"
+msgstr ""
+
+#. module: project_issue
+#: selection:project.issue,priority:0
+#: selection:project.issue.report,priority:0
+msgid "High"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,date_deadline:0
+msgid "Deadline"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,date_action_last:0
+msgid "Last Action"
+msgstr ""
+
+#. module: project_issue
+#: view:project.issue.report:0 field:project.issue.report,name:0
+msgid "Year"
+msgstr ""
+
+#. module: project_issue
+#: field:project.issue,duration:0
+msgid "Duration"
+msgstr ""
+
+#. module: project_issue
+#: view:board.board:0
+msgid "My Open Issues by Creation Date"
+msgstr ""
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index a460114dd41..ad6e7afdbcc 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -19,6 +19,7 @@
#
##############################################################################
+from base_status.base_stage import base_stage
from crm import crm
from datetime import datetime
from osv import fields,osv
@@ -42,12 +43,62 @@ class project_issue_version(osv.osv):
}
project_issue_version()
-class project_issue(crm.crm_case, osv.osv):
+_ISSUE_STATE= [('draft', 'New'), ('open', 'In Progress'), ('cancel', 'Cancelled'), ('done', 'Done'),('pending', 'Pending')]
+
+class project_issue(base_stage, osv.osv):
_name = "project.issue"
_description = "Project Issue"
_order = "priority, create_date desc"
_inherit = ['ir.needaction_mixin', 'mail.thread']
+ def _get_default_project_id(self, cr, uid, context=None):
+ """ Gives default project by checking if present in the context """
+ return self._resolve_project_id_from_context(cr, uid, context=context)
+
+ def _get_default_stage_id(self, cr, uid, context=None):
+ """ Gives default stage_id """
+ project_id = self._get_default_project_id(cr, uid, context=context)
+ return self.stage_find(cr, uid, [], project_id, [('state', '=', 'draft')], context=context)
+
+ def _resolve_project_id_from_context(self, cr, uid, context=None):
+ """ Returns ID of project based on the value of 'default_project_id'
+ context key, or None if it cannot be resolved to a single
+ project.
+ """
+ if context is None:
+ context = {}
+ if type(context.get('default_project_id')) in (int, long):
+ return context.get('default_project_id')
+ if isinstance(context.get('default_project_id'), basestring):
+ project_name = context['default_project_id']
+ project_ids = self.pool.get('project.project').name_search(cr, uid, name=project_name, context=context)
+ if len(project_ids) == 1:
+ return int(project_ids[0][0])
+ return None
+
+ def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
+ access_rights_uid = access_rights_uid or uid
+ stage_obj = self.pool.get('project.task.type')
+ order = stage_obj._order
+ # lame hack to allow reverting search, should just work in the trivial case
+ if read_group_order == 'stage_id desc':
+ order = "%s desc" % order
+ # retrieve section_id from the context and write the domain
+ # - ('id', 'in', 'ids'): add columns that should be present
+ # - OR ('case_default', '=', True), ('fold', '=', False): add default columns that are not folded
+ # - OR ('project_ids', 'in', project_id), ('fold', '=', False) if project_id: add project columns that are not folded
+ search_domain = []
+ project_id = self._resolve_project_id_from_context(cr, uid, context=context)
+ if project_id:
+ search_domain += ['|', '&', ('project_ids', '=', project_id), ('fold', '=', False)]
+ search_domain += ['|', ('id', 'in', ids), '&', ('case_default', '=', True), ('fold', '=', False)]
+ # perform search
+ stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)
+ result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
+ # restore order of the search
+ result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
+ return result
+
def _compute_day(self, cr, uid, ids, fields, args, context=None):
"""
@param cr: the current row, from the database cursor,
@@ -173,11 +224,13 @@ class project_issue(crm.crm_case, osv.osv):
'partner_id': fields.many2one('res.partner', 'Partner', select=1),
'company_id': fields.many2one('res.company', 'Company'),
'description': fields.text('Description'),
- 'state': fields.selection([('draft', 'New'), ('cancel', 'Cancelled'), ('open', 'In Progress'),('pending', 'Pending'),('done', 'Done') ], 'Status', size=16, readonly=True,
- help='The state is set to \'Draft\', when a case is created.\
- \nIf the case is in progress the state is set to \'Open\'.\
- \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\'.'),
+ 'state': fields.related('stage_id', 'state', type="selection", store=True,
+ selection=_ISSUE_STATE, string="State", readonly=True,
+ help='The state is set to \'Draft\', when a case is created.\
+ If the case is in progress the state is set to \'Open\'.\
+ When the case is over, the state is set to \'Done\'.\
+ If the case needs to be reviewed then the state is \
+ set to \'Pending\'.'),
'email_from': fields.char('Email', size=128, help="These people will receive email.", select=1),
'email_cc': fields.char('Watchers Emails', size=256, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'date_open': fields.datetime('Opened', readonly=True,select=True),
@@ -188,7 +241,8 @@ class project_issue(crm.crm_case, osv.osv):
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('object_id.model', '=', 'crm.project.bug')]"),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
'version_id': fields.many2one('project.issue.version', 'Version'),
- 'type_id': fields.many2one ('project.task.type', 'Stages', domain="[('project_ids', '=', project_id)]"),
+ 'stage_id': fields.many2one ('project.task.type', 'Stages',
+ domain="['|', ('project_ids', '=', project_id), ('case_default', '=', True)]"),
'project_id':fields.many2one('project.project', 'Project'),
'duration': fields.float('Duration'),
'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]"),
@@ -220,15 +274,20 @@ class project_issue(crm.crm_case, osv.osv):
_defaults = {
'active': 1,
- 'partner_id': crm.crm_case._get_default_partner,
- 'email_from': crm.crm_case._get_default_email,
+ 'partner_id': lambda s, cr, uid, c: s._get_default_partner(cr, uid, c),
+ 'email_from': lambda s, cr, uid, c: s._get_default_email(cr, uid, c),
'state': 'draft',
- 'section_id': crm.crm_case._get_section,
+ 'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
+ 'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c),
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
'priority': crm.AVAILABLE_PRIORITIES[2][0],
'categ_id' : lambda *a: False,
}
+ _group_by_full = {
+ 'stage_id': _read_group_stage_ids
+ }
+
def set_priority(self, cr, uid, ids, priority):
"""Set lead priority
"""
@@ -311,36 +370,20 @@ class project_issue(crm.crm_case, osv.osv):
def convert_to_bug(self, cr, uid, ids, context=None):
return self._convert(cr, uid, ids, 'bug_categ', context=context)
- def next_type(self, cr, uid, ids, context=None):
- for task in self.browse(cr, uid, ids):
- typeid = task.type_id.id
- types = map(lambda x:x.id, task.project_id.type_ids or [])
- if types:
- if not typeid:
- self.write(cr, uid, [task.id], {'type_id': types[0]})
- elif typeid and typeid in types and types.index(typeid) != len(types)-1 :
- index = types.index(typeid)
- self.write(cr, uid, [task.id], {'type_id': types[index+1]})
- return True
-
- def prev_type(self, cr, uid, ids, context=None):
- for task in self.browse(cr, uid, ids):
- typeid = task.type_id.id
- types = map(lambda x:x.id, task.project_id and task.project_id.type_ids or [])
- if types:
- if typeid and typeid in types:
- index = types.index(typeid)
- self.write(cr, uid, [task.id], {'type_id': index and types[index-1] or False})
- return True
-
+ def copy(self, cr, uid, id, default=None, context=None):
+ issue = self.read(cr, uid, id, ['name'], context=context)
+ if not default:
+ default = {}
+ default = default.copy()
+ default['name'] = issue['name'] + _(' (copy)')
+ return super(project_issue, self).copy(cr, uid, id, default=default,
+ context=context)
+
def write(self, cr, uid, ids, vals, context=None):
#Update last action date every time the user change the stage, the state or send a new email
- logged_fields = ['type_id', 'state', 'message_ids']
+ logged_fields = ['stage_id', 'state', 'message_ids']
if any([field in vals for field in logged_fields]):
vals['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')
- if vals.get('type_id', False):
- stage = self.pool.get('project.task.type').browse(cr, uid, vals['type_id'], context=context)
- self.message_append_note(cr, uid, ids, body=_("Stage changed to <b>%s</b>.") % stage.name, context=context)
return super(project_issue, self).write(cr, uid, ids, vals, context)
def onchange_task_id(self, cr, uid, ids, task_id, context=None):
@@ -362,15 +405,51 @@ class project_issue(crm.crm_case, osv.osv):
self.create_send_note(cr, uid, [obj_id], context=context)
return obj_id
- def case_open(self, cr, uid, ids, context=None):
- res = super(project_issue, self).case_open(cr, uid, ids, context)
- self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), 'user_id' : uid})
- return res
+ # -------------------------------------------------------
+ # Stage management
+ # -------------------------------------------------------
+
+ def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None):
+ """ Override of the base.stage method
+ Parameter of the stage search taken from the issue:
+ - type: stage type must be the same or 'both'
+ - section_id: if set, stages must belong to this section or
+ be a default case
+ """
+ if isinstance(cases, (int, long)):
+ cases = self.browse(cr, uid, cases, context=context)
+ # collect all section_ids
+ section_ids = []
+ if section_id:
+ section_ids.append(section_id)
+ for task in cases:
+ if task.project_id:
+ section_ids.append(task.project_id.id)
+ # OR all section_ids and OR with case_default
+ search_domain = []
+ if section_ids:
+ search_domain += [('|')] * len(section_ids)
+ for section_id in section_ids:
+ search_domain.append(('project_ids', '=', section_id))
+ search_domain.append(('case_default', '=', True))
+ # AND with the domain in parameter
+ search_domain += list(domain)
+ # perform search, return the first found
+ stage_ids = self.pool.get('project.task.type').search(cr, uid, search_domain, order=order, context=context)
+ if stage_ids:
+ return stage_ids[0]
+ return False
+
+ def case_cancel(self, cr, uid, ids, context=None):
+ """ Cancels case """
+ self.case_set(cr, uid, ids, 'cancelled', {'active': True}, context=context)
+ self.case_cancel_send_note(cr, uid, ids, context=context)
+ return True
def case_escalate(self, cr, uid, ids, context=None):
cases = self.browse(cr, uid, ids)
for case in cases:
- data = {'state' : 'draft'}
+ data = {}
if case.project_id.project_escalation_id:
data['project_id'] = case.project_id.project_escalation_id.id
if case.project_id.project_escalation_id.user_id:
@@ -379,10 +458,14 @@ class project_issue(crm.crm_case, osv.osv):
self.pool.get('project.task').write(cr, uid, [case.task_id.id], {'project_id': data['project_id'], 'user_id': False})
else:
raise osv.except_osv(_('Warning !'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
- self.write(cr, uid, [case.id], data)
- self.case_escalate_send_note(cr, uid, [case.id], context)
+ self.case_set(cr, uid, ids, 'draft', data, context=context)
+ self.case_escalate_send_note(cr, uid, [case.id], context=context)
return True
+ # -------------------------------------------------------
+ # Mail gateway
+ # -------------------------------------------------------
+
def message_new(self, cr, uid, msg, custom_values=None, context=None):
"""Automatically called when new email message arrives"""
if context is None:
@@ -433,7 +516,7 @@ class project_issue(crm.crm_case, osv.osv):
# Reassign the 'open' state to the case if this one is in pending or done
for record in self.browse(cr, uid, ids, context=context):
if record.state in ('pending', 'done'):
- record.write({'state' : 'open'})
+ self.case_set(cr, uid, ids, 'open', {}, context=context)
vls = { }
for line in msg['body_text'].split('\n'):
@@ -447,15 +530,6 @@ class project_issue(crm.crm_case, osv.osv):
res = self.write(cr, uid, ids, vals)
self.message_append_dict(cr, uid, ids, msg, context=context)
return res
-
- def copy(self, cr, uid, id, default=None, context=None):
- issue = self.read(cr, uid, id, ['name'], context=context)
- if not default:
- default = {}
- default = default.copy()
- default['name'] = issue['name'] + _(' (copy)')
- return super(project_issue, self).copy(cr, uid, id, default=default,
- context=context)
# -------------------------------------------------------
# OpenChatter methods and notifications
@@ -474,9 +548,15 @@ class project_issue(crm.crm_case, osv.osv):
if obj.user_id:
sub_ids.append(obj.user_id.id)
return self.pool.get('res.users').read(cr, uid, sub_ids, context=context)
-
+
+ def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
+ """ Override of the (void) default notification method. """
+ stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
+ return self.message_append_note(cr, uid, ids, body= _("Stage changed to <b>%s</b>.") % (stage_name), context=context)
+
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
- return 'Project issue '
+ """ Override of default prefix for notifications. """
+ return 'Project issue'
def convert_to_task_send_note(self, cr, uid, ids, context=None):
message = _("Project issue has been <b>converted</b> in to task.")
diff --git a/addons/project_issue/project_issue_demo.xml b/addons/project_issue/project_issue_demo.xml
index 358e9e55aa5..a213cb02c2e 100644
--- a/addons/project_issue/project_issue_demo.xml
+++ b/addons/project_issue/project_issue_demo.xml
@@ -7,7 +7,6 @@
<field eval="&quot;5&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_agrolait"/>
- <field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="bug_categ"/>
@@ -15,7 +14,7 @@
<field eval="15.0" name="duration"/>
<field eval="&quot;Bug in Accounts module&quot;" name="name"/>
<field eval="&quot;agr@agrolait.com&quot;" name="email_from"/>
- <field name="type_id" ref="project.project_tt_specification"/>
+ <field name="stage_id" ref="project.project_tt_specification"/>
</record>
<record id="crm_case_programnotgivingproperoutput0" model="project.issue">
@@ -23,28 +22,26 @@
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_asus"/>
- <field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="3.5" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field eval="&quot;Program not giving proper output&quot;" name="name"/>
<field name="project_id" ref="project.project_project_22"/>
- <field name="type_id" ref="project.project_tt_specification"/>
+ <field name="stage_id" ref="project.project_tt_specification"/>
</record>
<record id="crm_case_outputincorrect0" model="project.issue">
<field eval="time.strftime('%Y-%m-18 14:30:00')" name="date"/>
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
- <field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.3" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="project_id" ref="project.project_project_23"/>
<field eval="&quot;Output incorrect&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_development"/>
+ <field name="stage_id" ref="project.project_tt_development"/>
</record>
<record id="crm_case_problemloadingpage0" model="project.issue">
@@ -52,14 +49,13 @@
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_14"/>
- <field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="4.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Problem loading page&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_testing"/>
+ <field name="stage_id" ref="project.project_tt_testing"/>
</record>
<record id="crm_case_pagenotfound0" model="project.issue">
@@ -67,14 +63,13 @@
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_desertic_hispafuentes"/>
- <field eval="&quot;draft&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="1.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Page not Found&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_development"/>
+ <field name="stage_id" ref="project.project_tt_development"/>
</record>
<record id="crm_case_programmingerror0" model="project.issue">
@@ -82,14 +77,13 @@
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_5"/>
- <field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="4.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Programming Error&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_testing"/>
+ <field name="stage_id" ref="project.project_tt_testing"/>
</record>
<record id="crm_case_logicalerrorinprogram0" model="project.issue">
@@ -97,14 +91,13 @@
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_6"/>
- <field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Logical Error in Program&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_testing"/>
+ <field name="stage_id" ref="project.project_tt_testing"/>
</record>
<record id="crm_case_constrainterror0" model="project.issue">
@@ -112,14 +105,13 @@
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_6"/>
- <field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="7.3" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Constraint Error&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_testing"/>
+ <field name="stage_id" ref="project.project_tt_testing"/>
</record>
<record id="crm_case_errorinprogram0" model="project.issue">
@@ -127,13 +119,12 @@
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_id" ref="base.res_partner_5"/>
- <field eval="&quot;open&quot;" name="state"/>
<field eval="1" name="active"/>
<field eval="1.3" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Error in Program&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_testing"/>
+ <field name="stage_id" ref="project.project_tt_testing"/>
</record>
<record id="crm_case_patcheserrorinprogram0" model="project.issue">
@@ -141,14 +132,13 @@
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_2"/>
- <field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="13.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Patches Error in Program&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_testing"/>
+ <field name="stage_id" ref="project.project_tt_testing"/>
</record>
<record id="crm_case_newfeaturestobeadded0" model="project.issue">
@@ -156,14 +146,13 @@
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_maxtor"/>
- <field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="3.2" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="project_id" ref="project.project_project_21"/>
<field eval="&quot;New Features To Be Added&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_merge"/>
+ <field name="stage_id" ref="project.project_tt_merge"/>
</record>
<record id="crm_case_addmenustothemodule0" model="project.issue">
@@ -171,7 +160,6 @@
<field eval="&quot;1&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_id" ref="base.res_partner_9"/>
- <field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="3.0" name="duration"/>
@@ -179,7 +167,7 @@
<field name="project_id" ref="project.project_project_21"/>
<field eval="&quot;Add menus to the module&quot;" name="name"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
- <field name="type_id" ref="project.project_tt_development"/>
+ <field name="stage_id" ref="project.project_tt_development"/>
</record>
<record id="crm_case_includeattendancesheetinproject0" model="project.issue">
@@ -187,7 +175,6 @@
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_10"/>
- <field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.0" name="duration"/>
@@ -195,7 +182,7 @@
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Include Attendance sheet in Project&quot;" name="name"/>
<field eval="&quot;contact@tecsas.fr&quot;" name="email_from"/>
- <field name="type_id" ref="project.project_tt_development"/>
+ <field name="stage_id" ref="project.project_tt_development"/>
</record>
<record id="crm_case_createnewobject0" model="project.issue">
@@ -203,14 +190,13 @@
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_6"/>
- <field eval="&quot;draft&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.45" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Create new object&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_specification"/>
+ <field name="stage_id" ref="project.project_tt_specification"/>
</record>
<record id="crm_case_improvereportsinhrms0" model="project.issue">
@@ -218,14 +204,13 @@
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_11"/>
- <field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="15.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Improve Reports in HRMS&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_development"/>
+ <field name="stage_id" ref="project.project_tt_development"/>
</record>
<record id="crm_case_improvereportsinpms0" model="project.issue">
@@ -233,14 +218,13 @@
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_id" ref="base.res_partner_11"/>
- <field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="06.15" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Improve Reports in PMS&quot;" name="name"/>
- <field name="type_id" ref="project.project_tt_specification"/>
+ <field name="stage_id" ref="project.project_tt_specification"/>
</record>
</data>
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index 3a4d0ef91d1..6bafd3112ff 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -52,14 +52,26 @@
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
- <button name="case_open" string="Open" states="draft,pending" type="object"/>
- <button name="case_close" string="Done" states="open,draft,pending" type="object"/>
- <button name="case_pending" string="Pending" states="draft,open" type="object"/>
- <button name="case_reset" string="Reset to New" states="done,cancel" type="object"/>
- <button name="case_escalate" string="Escalate" states="open,draft,pending" type="object"/>
- <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object"/>
+ <button name="case_open" string="Open" type="object"
+ states="draft,pending"/>
+ <button name="case_close" string="Done" type="object"
+ states="draft,open,pending"/>
+ <button name="case_pending" string="Pending" type="object"
+ states="draft,open"/>
+ <button name="case_escalate" string="Escalate" type="object"
+ states="draft,open,pending"/>
+ <button name="case_reset" string="Reset to New" type="object"
+ states="cancelled,done"/>
+ <button name="stage_previous" string="Previous Stage" type="object"
+ states="open,pending" icon="gtk-go-back"
+ attrs="{'invisible': [('stage_id','=', False)]}"/>
+ <button name="stage_next" string="Next Stage" type="object"
+ states="open,pending" icon="gtk-go-forward"
+ attrs="{'invisible': [('stage_id','=', False)]}"/>
+ <button name="case_cancel" string="Cancel" type="object"
+ states="draft,open,pending"/>
<div class="oe_right">
- <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
+ <field name="stage_id" nolabel="1" widget="statusbar"/>
</div>
<div class="oe_clear"/>
</div>
@@ -75,11 +87,7 @@
</group>
<field name="user_id"/>
<field name="version_id" colspan="2" widget="selection"/>
- <group colspan="2" col="4">
- <field name="type_id" string="Stages" />
- <button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
- <button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
- </group>
+ <field name="state" groups="base.group_no_one"/>
</group>
<notebook colspan="4">
<page string="General">
@@ -138,19 +146,23 @@
<field name="partner_id"/>
<field name="project_id" />
<field name="priority" string="Priority"/>
- <field name="type_id" widget="selection" readonly="1" string="Stages" />
- <button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
- <button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
<field name="version_id" widget="selection"/>
<field name="user_id"/>
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
- <field name="state"/>
- <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
- <button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
- <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" help="To Do"/>
- <button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
- <button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
- <button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
+ <field name="stage_id" widget="selection" readonly="1"/>
+ <button name="stage_previous" string="Previous" type="object"
+ icon="gtk-go-back" help="Change to Previous Stage"
+ attrs="{'invisible': [('stage_id','=', False)]}"/>
+ <button name="stage_next" string="Next" type="object"
+ icon="gtk-go-forward" help="Change to Next Stage"
+ attrs="{'invisible': [('stage_id','=', False)]}"/>
+ <field name="state" groups="base.group_no_one"/>
+ <button name="case_open" string="Open" type="object"
+ icon="gtk-go-forward" states="draft,pending"/>
+ <button name="case_close" string="Done" type="object"
+ icon="gtk-close" states="draft,open,pending"/>
+ <button name="case_cancel" string="Cancel" type="object"
+ icon="gtk-cancel" states="draft,open,pending"/>
<field name="categ_id" invisible="1"/>
<field name="task_id" invisible="1"/>
</tree>
@@ -192,7 +204,7 @@
<filter string="Priority" icon="terp-rating-rated" domain="[]"
context="{'group_by':'priority'}" />
<filter string="Stage" icon="terp-stage" domain="[]"
- context="{'group_by':'type_id'}" />
+ context="{'group_by':'stage_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]"
context="{'group_by':'state'}" />
<separator orientation="vertical" />
@@ -224,9 +236,9 @@
<field name="model">project.issue</field>
<field name="type">kanban</field>
<field name="arch" type="xml">
- <kanban default_group_by="type_id">
+ <kanban default_group_by="stage_id">
<field name="color"/>
- <field name="state"/>
+ <field name="state" groups="base.group_no_one"/>
<field name="priority"/>
<field name="user_email"/>
<field name="user_id"/>
@@ -270,8 +282,7 @@
<a string="Convert To Task" name="convert_issue_task" icon="gtk-index" type="object"/>
</div>
<div class="oe_kanban_right">
- <a name="case_open" string="Open" states="draft,pending" type="object" icon="kanban-apply" />
- <a name="case_pending" string="Pending" states="draft,open" type="object" icon="kanban-pause"/>
+ <a name="case_open" string="Open" states="draft,pending" type="object" icon="kanban-apply"/>
<a name="case_close" string="Close" states="open,draft,pending" type="object" icon="kanban-stop"/>
</div>
<div class="oe_kanban_clear"/>
@@ -304,18 +315,22 @@
<field name="name" string="Feature description"/>
<field name="partner_id"/>
<field name="priority" string="Priority"/>
- <field name="type_id" widget="selection" readonly="1"/>
- <button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
- <button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
<field name="version_id"/>
<field name="user_id"/>
- <field name="state"/>
- <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
- <button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
- <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
- <button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
- <button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
- <button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
+ <field name="stage_id" widget="selection" readonly="1"/>
+ <button name="stage_previous" string="Previous" type="object"
+ icon="gtk-go-back" help="Change to Previous Stage"
+ attrs="{'invisible': [('stage_id','=', False)]}"/>
+ <button name="stage_next" string="Next" type="object"
+ icon="gtk-go-forward" help="Change to Next Stage"
+ attrs="{'invisible': [('stage_id','=', False)]}"/>
+ <field name="state" groups="base.group_no_one"/>
+ <button name="case_open" string="Open" type="object"
+ states="draft,pending" icon="gtk-go-forward"/>
+ <button name="case_close" string="Done" type="object"
+ states="draft,open,pending" icon="gtk-close"/>
+ <button name="case_cancel" string="Cancel" type="object"
+ states="draft,open,pending" icon="gtk-cancel"/>
</tree>
</field>
</record>
@@ -326,13 +341,13 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Feature Tracker Search">
- <filter icon="terp-go-today" string="Today"
+ <filter icon="terp-go-today" string="Today"
domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]" help="Today's features"/>
<separator orientation="vertical"/>
<group>
<field name="name" string="Feature description"/>
<field name="user_id"/>
- <field name="state">
+ <field name="state" groups="base.group_no_one">
<filter icon="terp-check" domain="[('state','in',('open','draft'))]" help="Current Features" name="current_feature"/>
<filter icon="terp-camera_test" domain="[('state','=','open')]" help="Open Features"/>
</field>
diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py
index 7cc520308e8..be3309d7175 100644
--- a/addons/project_issue/report/project_issue_report.py
+++ b/addons/project_issue/report/project_issue_report.py
@@ -51,7 +51,7 @@ class project_issue_report(osv.osv):
'creation_date': fields.date('Creation Date', readonly=True),
'date_closed': fields.date('Date of Closing', readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'project.issue')]"),
- 'type_id': fields.many2one('project.task.type', 'Stage'),
+ 'stage_id': fields.many2one('project.task.type', 'Stage'),
'nbr': fields.integer('# of Issues', readonly=True),
'working_hours_open': fields.float('Avg. Working Hours to Open', readonly=True),
'working_hours_close': fields.float('Avg. Working Hours to Close', readonly=True),
@@ -87,7 +87,7 @@ class project_issue_report(osv.osv):
c.working_hours_close,
c.section_id,
c.categ_id,
- c.type_id,
+ c.stage_id,
to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,
c.company_id as company_id,
c.priority as priority,
diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml
index ee0a4fbd1ed..43a49abf2b8 100644
--- a/addons/project_issue/report/project_issue_report_view.xml
+++ b/addons/project_issue/report/project_issue_report_view.xml
@@ -11,7 +11,7 @@
<field name="name" invisible="1"/>
<field name="month" invisible="1"/>
<field name="project_id" invisible="1"/>
- <field name="type_id" invisible="1"/>
+ <field name="stage_id" invisible="1"/>
<field name="version_id" string="Version" invisible="1"/>
<field name="priority" invisible="1"/>
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
@@ -103,7 +103,7 @@
<filter string="Version" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'version_id'}"/>
<separator orientation="vertical" />
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
- <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'type_id'}"/>
+ <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize"
domain="[]" context="{'group_by':'state'}" />
<separator orientation="vertical"/>
diff --git a/addons/project_issue/test/cancel_issue.yml b/addons/project_issue/test/cancel_issue.yml
index ff05d923ed0..76ffa212638 100644
--- a/addons/project_issue/test/cancel_issue.yml
+++ b/addons/project_issue/test/cancel_issue.yml
@@ -7,7 +7,7 @@
I check the issue is in cancel state.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue is in cancel state}:
- - state == 'cancel'
+ - state == 'cancelled'
-
I re-open the Issue.
-
@@ -37,7 +37,7 @@
I check the issue is in cancel state.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue is in cancel state}:
- - state == 'cancel'
+ - state == 'cancelled'
-
I close Issue.
-
@@ -57,4 +57,4 @@
I check the issue is in cancel state.
-
!assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue is in cancel state}:
- - state == 'cancel' \ No newline at end of file
+ - state == 'cancelled'