diff options
| author | Vidhin Mehta <vme@tinyerp.com> | 2013-08-23 10:36:02 +0530 |
|---|---|---|
| committer | Vidhin Mehta <vme@tinyerp.com> | 2013-08-23 10:36:02 +0530 |
| commit | 75ddd5ccbec73c4a671b6a74efaa3d41dc2ea2db (patch) | |
| tree | 50ed3620df15e8533760f5d47e754a1d39c1e856 /addons/project_issue | |
| parent | 42f27a15275effd9c43dfe99e32c395ca6b3fd8a (diff) | |
| parent | a7f4b6aaa0359d12046e81183417c24f093cd7c3 (diff) | |
[MERGE]Trunk.
bzr revid: vme@tinyerp.com-20130823050602-33bqv07e7g8dhv7x
Diffstat (limited to 'addons/project_issue')
| -rw-r--r-- | addons/project_issue/__openerp__.py | 2 | ||||
| -rw-r--r-- | addons/project_issue/board_project_issue_view.xml | 5 | ||||
| -rw-r--r-- | addons/project_issue/doc/changelog.rst | 13 | ||||
| -rw-r--r-- | addons/project_issue/doc/index.rst | 22 | ||||
| -rw-r--r-- | addons/project_issue/doc/stage_status.rst | 54 | ||||
| -rw-r--r-- | addons/project_issue/i18n/bs.po | 984 | ||||
| -rw-r--r-- | addons/project_issue/project_issue.py | 146 | ||||
| -rw-r--r-- | addons/project_issue/project_issue_data.xml | 24 | ||||
| -rw-r--r-- | addons/project_issue/project_issue_view.xml | 83 | ||||
| -rw-r--r-- | addons/project_issue/report/project_issue_report.py | 20 | ||||
| -rw-r--r-- | addons/project_issue/report/project_issue_report_view.xml | 16 | ||||
| -rw-r--r-- | addons/project_issue/static/description/icon.png (renamed from addons/project_issue/static/src/img/icon.png) | bin | 5727 -> 5727 bytes | |||
| -rw-r--r-- | addons/project_issue/test/cancel_issue.yml | 60 | ||||
| -rw-r--r-- | addons/project_issue/test/issue_process.yml | 42 |
14 files changed, 1190 insertions, 281 deletions
diff --git a/addons/project_issue/__openerp__.py b/addons/project_issue/__openerp__.py index 2c5f311c044..723f362ab4c 100644 --- a/addons/project_issue/__openerp__.py +++ b/addons/project_issue/__openerp__.py @@ -37,7 +37,6 @@ It allows the manager to quickly check the issues, assign them and decide on the 'website': 'http://www.openerp.com', 'images': ['images/issue_analysis.jpeg','images/project_issue.jpeg'], 'depends': [ - 'base_status', 'crm', 'project', ], @@ -55,7 +54,6 @@ It allows the manager to quickly check the issues, assign them and decide on the 'test': [ 'test/subscribe_issue.yml', 'test/issue_process.yml', - 'test/cancel_issue.yml', 'test/issue_demo.yml' ], 'installable': True, diff --git a/addons/project_issue/board_project_issue_view.xml b/addons/project_issue/board_project_issue_view.xml index d7574042c37..6eb48f5572d 100644 --- a/addons/project_issue/board_project_issue_view.xml +++ b/addons/project_issue/board_project_issue_view.xml @@ -6,7 +6,7 @@ <field name="name">Project Issue Board Tree</field> <field name="model">project.issue</field> <field name="arch" type="xml"> - <tree string="Issue Tracker Tree" colors="black:state=='open';blue:state=='pending';grey:state in ('cancel', 'done')"> + <tree string="Issue Tracker Tree"> <field name="id"/> <field name="create_date"/> <field name="name"/> @@ -16,7 +16,6 @@ <field name="version_id" widget="selection"/> <field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/> <field name="stage_id" widget="selection" readonly="1"/> - <field name="state" invisible="1"/> <field name="categ_ids" invisible="1"/> <field name="task_id" invisible="1"/> </tree> @@ -28,7 +27,7 @@ <field name="res_model">project.issue</field> <field name="view_type">form</field> <field name="view_mode">tree,form</field> - <field name="domain">[('state','not in',('cancel','done')),('user_id','=',uid)]</field> + <field name="domain">[('user_id', '=', uid)]</field> <field name="view_id" ref="project_issue_board_tree_view"/> </record> diff --git a/addons/project_issue/doc/changelog.rst b/addons/project_issue/doc/changelog.rst new file mode 100644 index 00000000000..e74516f1600 --- /dev/null +++ b/addons/project_issue/doc/changelog.rst @@ -0,0 +1,13 @@ +.. _changelog: + +Changelog +========= + +`trunk (saas-2)` +---------------- + +- Stage/state update + + - ``project.issue``: removed inheritance from ``base_stage`` class and removed + ``state`` field. Added ``date_last_stage_update`` field holding last stage_id + modification. Updated reports. diff --git a/addons/project_issue/doc/index.rst b/addons/project_issue/doc/index.rst new file mode 100644 index 00000000000..9e12eef2124 --- /dev/null +++ b/addons/project_issue/doc/index.rst @@ -0,0 +1,22 @@ +===================== +Project Issue DevDoc +===================== + +Project Issue module documentation +=================================== + +Documentation topics +'''''''''''''''''''' + +.. toctree:: + :maxdepth: 1 + + stage_status.rst + +Changelog +''''''''' + +.. toctree:: + :maxdepth: 1 + + changelog.rst diff --git a/addons/project_issue/doc/stage_status.rst b/addons/project_issue/doc/stage_status.rst new file mode 100644 index 00000000000..6afd4508cd9 --- /dev/null +++ b/addons/project_issue/doc/stage_status.rst @@ -0,0 +1,54 @@ +.. _stage_status: + +Stage and Status +================ + +.. versionchanged:: 8.0 saas-2 state/stage cleaning + +Stage ++++++ + +This revision removed the concept of state on project.issue objects. The ``state`` +field has been totally removed and replaced by stages, using ``stage_id``. The +following models are impacted: + + - ``project.issue`` now use only stages. However a convention still exists about + 'New' stage. An issue is consdered as ``new`` when it has the following + properties: + + - ``stage_id and stage_id.sequence = 1`` + + - ``project.task.type`` do not have any ``state`` field anymore. + - ``project.issue.report`` do not have any ``state`` field anymore. + +By default a newly created issue is in a new stage. It means that it will +fetch the stage having ``sequence = 1``. Stage mangement is done using the +kanban view or the clikable statusbar. It is not done using buttons anymore. + +Stage analysis +++++++++++++++ + +Stage analysis can be performed using the newly introduced ``date_last_stage_update`` +datetime field. This field is updated everytime ``stage_id`` is updated. + +``project.issue.report`` model also uses the ``date_last_stage_update`` field. +This allows to group and analyse the time spend in the various stages. + +Open / Assignation date ++++++++++++++++++++++++ + +The ``date_open`` field meaning has been updated. It is now set when the ``user_id`` +(responsible) is set. It is therefore the assignation date. + +Subtypes +++++++++ + +The following subtypes are triggered on ``project.issue``: + + - ``mt_issue_new``: new tasks. Condition: ``obj.stage_id and obj.stage_id.sequence == 1`` + - ``mt_issue_stage``: stage changed. Condition: ``obj.stage_id and obj.stage_id.sequence != 1`` + - ``mt_issue_assigned``: user assigned. condition: ``obj.user_id and obj.user_id.id`` + - ``mt_issue_blocked``: kanban state blocked. Condition: ``obj.kanban_state == 'blocked'`` + +Those subtypes are also available on the ``project.project`` model and are used +for the auto subscription. diff --git a/addons/project_issue/i18n/bs.po b/addons/project_issue/i18n/bs.po new file mode 100644 index 00000000000..db49b0c586c --- /dev/null +++ b/addons/project_issue/i18n/bs.po @@ -0,0 +1,984 @@ +# Bosnian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2012-12-21 17:04+0000\n" +"PO-Revision-Date: 2013-08-06 17:46+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Bosnian <bs@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: 2013-08-07 04:46+0000\n" +"X-Generator: Launchpad (build 16721)\n" + +#. module: project_issue +#: model:project.category,name:project_issue.project_issue_category_03 +msgid "Deadly bug" +msgstr "Ubojita greška" + +#. module: project_issue +#: help:project.config.settings,fetchmail_issue:0 +msgid "" +"Allows you to configure your incoming mail server, and create issues from " +"incoming emails." +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 +#: model:mail.message.subtype,description:project_issue.mt_issue_started +msgid "Issue started" +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 +#: view:project.issue:0 +#: field:project.issue,message_unread:0 +msgid "Unread Messages" +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 +#: help:project.issue,kanban_state:0 +msgid "" +"A Issue's kanban state indicates special situations affecting it:\n" +" * Normal is the default situation\n" +" * Blocked indicates something is preventing the progress of this issue\n" +" * Ready for next stage indicates the issue is ready to be pulled to the " +"next stage" +msgstr "" + +#. module: project_issue +#: help:project.issue,message_unread:0 +msgid "If checked new messages require your attention." +msgstr "" + +#. module: project_issue +#: help:account.analytic.account,use_issues:0 +msgid "Check this field if this project manages issues" +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:479 +#, 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 +#: field:project.issue,task_id:0 +#: view:project.issue.report:0 +#: field:project.issue.report,task_id:0 +msgid "Task" +msgstr "" + +#. module: project_issue +#: model:mail.message.subtype,name:project_issue.mt_project_issue_stage +msgid "Issue Stage Changed" +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,help:project_issue.project_issue_categ_act0 +msgid "" +"<p class=\"oe_view_nocontent_create\">\n" +" Click to report a new issue.\n" +" </p><p>\n" +" The OpenERP issues tacker allows you to efficiantly manage " +"things\n" +" like internal requests, software development bugs, customer\n" +" complaints, project troubles, material breakdowns, etc.\n" +" </p>\n" +" " +msgstr "" + +#. module: project_issue +#: selection:project.issue,state:0 +#: selection:project.issue.report,state:0 +msgid "Cancelled" +msgstr "" + +#. module: project_issue +#: field:project.issue,description:0 +msgid "Private Note" +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 +#: field:project.issue.report,working_hours_open:0 +msgid "Avg. Working Hours to Open" +msgstr "" + +#. module: project_issue +#: model:ir.model,name:project_issue.model_account_analytic_account +msgid "Analytic Account" +msgstr "" + +#. module: project_issue +#: help:project.issue,message_summary:0 +msgid "" +"Holds the Chatter summary (number of messages, ...). This summary is " +"directly in html format in order to be inserted in kanban views." +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 "Edit..." +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +msgid "Responsible" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +msgid "Statistics" +msgstr "" + +#. module: project_issue +#: field:project.issue,kanban_state:0 +msgid "Kanban State" +msgstr "" + +#. module: project_issue +#: code:addons/project_issue/project_issue.py:366 +#, python-format +msgid "Project issue <b>converted</b> to task." +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 +#: field:project.issue,version_id:0 +#: view:project.issue.report:0 +#: field:project.issue.report,version_id:0 +msgid "Version" +msgstr "" + +#. module: project_issue +#: field:project.issue,message_follower_ids:0 +msgid "Followers" +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 +#: code:addons/project_issue/project_issue.py:388 +#, python-format +msgid "%s (copy)" +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 +#: model:ir.model,name:project_issue.model_project_issue_version +msgid "project.issue.version" +msgstr "" + +#. module: project_issue +#: field:project.config.settings,fetchmail_issue:0 +msgid "Create issues from an incoming email account " +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 +#: field:project.issue,stage_id:0 +#: view:project.issue.report:0 +#: field:project.issue.report,stage_id:0 +msgid "Stage" +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 +#: code:addons/project_issue/project_issue.py:516 +#, python-format +msgid "No Subject" +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 +#: field:project.issue,partner_id:0 +#: view:project.issue.report:0 +#: field:project.issue.report,partner_id:0 +msgid "Contact" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +msgid "Delete" +msgstr "" + +#. module: project_issue +#: code:addons/project_issue/project_issue.py:371 +#, 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 +#: field:project.issue,categ_ids:0 +msgid "Tags" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +msgid "Issue Tracker Tree" +msgstr "" + +#. module: project_issue +#: model:project.category,name:project_issue.project_issue_category_01 +msgid "Little problem" +msgstr "" + +#. module: project_issue +#: view:project.project:0 +msgid "creates" +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 "Project:" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +msgid "Open Features" +msgstr "" + +#. module: project_issue +#: field:project.issue,date_action_next:0 +msgid "Next Action" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +#: selection:project.issue,kanban_state:0 +msgid "Blocked" +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 +#: 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 +#: model:crm.case.categ,name:project_issue.bug_categ +msgid "Maintenance" +msgstr "" + +#. module: project_issue +#: selection:project.issue.report,state:0 +msgid "Draft" +msgstr "" + +#. module: project_issue +#: selection:project.issue,priority:0 +#: selection:project.issue.report,priority:0 +msgid "Low" +msgstr "" + +#. module: project_issue +#: field:project.issue,date_closed:0 +#: selection:project.issue.report,state:0 +msgid "Closed" +msgstr "" + +#. module: project_issue +#: field:project.issue.report,delay_close:0 +msgid "Avg. Delay to Close" +msgstr "" + +#. module: project_issue +#: 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 +#: field:project.issue,state:0 +#: field:project.issue.report,state:0 +msgid "Status" +msgstr "" + +#. module: project_issue +#: view:project.issue.report:0 +msgid "#Project Issues" +msgstr "" + +#. module: project_issue +#: selection:project.issue.report,month:0 +msgid "August" +msgstr "" + +#. module: project_issue +#: selection:project.issue,kanban_state:0 +#: selection:project.issue,priority:0 +#: selection:project.issue.report,priority:0 +msgid "Normal" +msgstr "" + +#. module: project_issue +#: field:project.project,issue_count:0 +msgid "unknown" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +msgid "Category:" +msgstr "" + +#. module: project_issue +#: selection:project.issue.report,month:0 +msgid "June" +msgstr "" + +#. module: project_issue +#: help:project.issue,message_ids:0 +msgid "Messages and communication history" +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,message_is_follower:0 +msgid "Is a Follower" +msgstr "" + +#. module: project_issue +#: help:project.issue,state:0 +msgid "" +"The status is set to 'Draft', when a case is created. " +"If the case is in progress the status is set to 'Open'. " +"When the case is over, the status is set to 'Done'. If " +"the case needs to be reviewed then the status is set " +"to 'Pending'." +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 +#: code:addons/project_issue/project_issue.py:479 +#, python-format +msgid "Warning!" +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 +#: 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 +#: field:project.issue,message_summary:0 +msgid "Summary" +msgstr "" + +#. module: project_issue +#: field:project.issue,date:0 +msgid "Date" +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 +#: view:project.config.settings:0 +msgid "Configure" +msgstr "" + +#. module: project_issue +#: model:mail.message.subtype,description:project_issue.mt_issue_closed +msgid "Issue closed" +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 +#: selection:project.issue.report,state:0 +msgid "Open" +msgstr "" + +#. module: project_issue +#: field:account.analytic.account,use_issues:0 +#: 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 +#: view:project.project:0 +msgid "Issues" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +#: selection:project.issue,state:0 +msgid "In Progress" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +#: view:project.issue.report:0 +msgid "To Do" +msgstr "" + +#. module: project_issue +#: 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 +#: view:project.issue:0 +#: selection:project.issue,kanban_state:0 +msgid "Ready for next stage" +msgstr "" + +#. module: project_issue +#: view:project.issue.report:0 +#: field:project.issue.report,section_id:0 +msgid "Sale Team" +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 +#: view:project.issue:0 +#: field:project.issue,name:0 +#: view:project.project:0 +msgid "Issue" +msgstr "" + +#. module: project_issue +#: model:project.category,name:project_issue.project_issue_category_02 +msgid "PBCK" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +msgid "Feature Tracker Search" +msgstr "" + +#. module: project_issue +#: view:project.issue: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 +#: model:ir.model,name:project_issue.model_project_config_settings +msgid "project.config.settings" +msgstr "" + +#. module: project_issue +#: model:mail.message.subtype,name:project_issue.mt_issue_closed +#: model:mail.message.subtype,name:project_issue.mt_project_issue_closed +msgid "Issue Closed" +msgstr "" + +#. module: project_issue +#: view:project.issue.report:0 +#: field:project.issue.report,email:0 +msgid "# Emails" +msgstr "" + +#. module: project_issue +#: model:mail.message.subtype,name:project_issue.mt_issue_new +#: model:mail.message.subtype,name:project_issue.mt_project_issue_new +msgid "Issue Created" +msgstr "" + +#. module: project_issue +#: model:mail.message.subtype,name:project_issue.mt_issue_blocked +#: model:mail.message.subtype,name:project_issue.mt_project_issue_blocked +msgid "Issue Blocked" +msgstr "" + +#. module: project_issue +#: selection:project.issue.report,month:0 +msgid "February" +msgstr "" + +#. module: project_issue +#: model:mail.message.subtype,description:project_issue.mt_issue_stage +#: model:mail.message.subtype,description:project_issue.mt_project_issue_stage +msgid "Stage changed" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +msgid "Feature description" +msgstr "" + +#. module: project_issue +#: field:project.project,project_escalation_id:0 +msgid "Project Escalation" +msgstr "" + +#. module: project_issue +#: model:ir.actions.act_window,help:project_issue.project_issue_version_action +msgid "" +"<p class=\"oe_view_nocontent_create\">\n" +" Click to add a new version.\n" +" </p><p>\n" +" Define here the different versions of your products on " +"which\n" +" you can work on issues.\n" +" </p>\n" +" " +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:board.board:0 +msgid "My Issues" +msgstr "" + +#. module: project_issue +#: help:project.issue.report,delay_open:0 +msgid "Number of Days to open the project issue." +msgstr "" + +#. module: project_issue +#: selection:project.issue.report,month:0 +msgid "April" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +msgid "⇒ Escalate" +msgstr "" + +#. module: project_issue +#: view:project.issue:0 +msgid "References" +msgstr "" + +#. module: project_issue +#: model:mail.message.subtype,description:project_issue.mt_issue_new +msgid "Issue created" +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 +#: model:mail.message.subtype,description:project_issue.mt_issue_blocked +msgid "Issue blocked" +msgstr "" + +#. module: project_issue +#: model:ir.model,name:project_issue.model_project_issue_report +msgid "project.issue.report" +msgstr "" + +#. module: project_issue +#: help:project.issue.report,delay_close:0 +msgid "Number of Days to close the project issue" +msgstr "" + +#. module: project_issue +#: field:project.issue.report,working_hours_close:0 +msgid "Avg. Working Hours to Close" +msgstr "" + +#. module: project_issue +#: model:mail.message.subtype,name:project_issue.mt_issue_stage +msgid "Stage Changed" +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 +#: model:mail.message.subtype,name:project_issue.mt_issue_started +#: model:mail.message.subtype,name:project_issue.mt_project_issue_started +msgid "Issue Started" +msgstr "" diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 8bcac4581c3..f23f6b6a286 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -19,19 +19,16 @@ # ############################################################################## +from datetime import datetime + from openerp import SUPERUSER_ID -from openerp.addons.base_status.base_stage import base_stage -from openerp.addons.project.project import _TASK_STATE +from openerp import tools from openerp.addons.crm import crm -from datetime import datetime from openerp.osv import fields, osv, orm -from openerp.tools.translate import _ -import binascii -import time -from openerp import tools from openerp.tools import html2plaintext +from openerp.tools.translate import _ -class project_issue_version(osv.osv): +class project_issue_version(osv.Model): _name = "project.issue.version" _order = "name desc" _columns = { @@ -42,37 +39,33 @@ class project_issue_version(osv.osv): 'active': 1, } -class project_issue(base_stage, osv.osv): +class project_issue(osv.Model): _name = "project.issue" _description = "Project Issue" _order = "priority, create_date desc" _inherit = ['mail.thread', 'ir.needaction_mixin'] + _mail_post_access = 'read' _track = { - 'state': { - 'project_issue.mt_issue_new': lambda self, cr, uid, obj, ctx=None: obj['state'] in ['new', 'draft'], - 'project_issue.mt_issue_closed': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'done', - 'project_issue.mt_issue_started': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'open', - }, 'stage_id': { - 'project_issue.mt_issue_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'draft', 'done', 'open'], + 'project_issue.mt_issue_new': lambda self, cr, uid, obj, ctx=None: obj.stage_id and obj.stage_id.sequence == 1, + 'project_issue.mt_issue_stage': lambda self, cr, uid, obj, ctx=None: obj.stage_id and obj.stage_id.sequence != 1, + }, + 'user_id': { + 'project_issue.mt_issue_assigned': lambda self, cr, uid, obj, ctx=None: obj.user_id and obj.user_id.id, }, 'kanban_state': { - 'project_issue.mt_issue_blocked': lambda self, cr, uid, obj, ctx=None: obj['kanban_state'] == 'blocked', + 'project_issue.mt_issue_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked', }, } - def create(self, cr, uid, vals, context=None): - if context is None: - context = {} - if not vals.get('stage_id'): - ctx = context.copy() - if vals.get('project_id'): - ctx['default_project_id'] = vals['project_id'] - vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx) - # context: no_log, because subtype already handle this - create_context = dict(context, mail_create_nolog=True) - return super(project_issue, self).create(cr, uid, vals, context=create_context) + def _get_default_partner(self, cr, uid, context=None): + project_id = self._get_default_project_id(cr, uid, context) + if project_id: + project = self.pool.get('project.project').browse(cr, uid, project_id, context=context) + if project and project.partner_id: + return project.partner_id.id + return False def _get_default_project_id(self, cr, uid, context=None): """ Gives default project by checking if present in the context """ @@ -81,7 +74,7 @@ class project_issue(base_stage, osv.osv): 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) + return self.stage_find(cr, uid, [], project_id, [('sequence', '=', 1)], 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' @@ -215,6 +208,10 @@ class project_issue(base_stage, osv.osv): return res def on_change_project(self, cr, uid, ids, project_id, context=None): + if project_id: + project = self.pool.get('project.project').browse(cr, uid, project_id, context=context) + if project and project.partner_id: + return {'value': {'partner_id': project.partner_id.id}} return {} def _get_issue_task(self, cr, uid, ids, context=None): @@ -247,13 +244,6 @@ class project_issue(base_stage, osv.osv): 'partner_id': fields.many2one('res.partner', 'Contact', select=1), 'company_id': fields.many2one('res.company', 'Company'), 'description': fields.text('Private Note'), - 'state': fields.related('stage_id', 'state', type="selection", store=True, - selection=_TASK_STATE, string="Status", readonly=True, - help='The status is set to \'Draft\', when a case is created.\ - If the case is in progress the status is set to \'Open\'.\ - When the case is over, the status is set to \'Done\'.\ - If the case needs to be reviewed then the status is \ - set to \'Pending\'.'), 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State', track_visibility='onchange', help="A Issue's kanban state indicates special situations affecting it:\n" @@ -267,6 +257,7 @@ class project_issue(base_stage, osv.osv): # Project Issue fields 'date_closed': fields.datetime('Closed', readonly=True,select=True), 'date': fields.datetime('Date'), + 'date_last_stage_update': fields.datetime('Last Stage Update', select=True), 'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."), 'categ_ids': fields.many2many('project.category', string='Tags'), 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True), @@ -302,13 +293,12 @@ class project_issue(base_stage, osv.osv): _defaults = { 'active': 1, - '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), '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], 'kanban_state': 'normal', + 'date_last_stage_update': fields.datetime.now(), + 'user_id': lambda obj, cr, uid, context: uid, } _group_by_full = { @@ -361,7 +351,7 @@ class project_issue(base_stage, osv.osv): }) vals = { 'task_id': new_task_id, - 'stage_id': self.stage_find(cr, uid, [bug], bug.project_id.id, [('state', '=', 'pending')], context=context), + 'stage_id': self.stage_find(cr, uid, [bug], bug.project_id.id, [('sequence', '=', 1)], context=context), } message = _("Project issue <b>converted</b> to task.") self.message_post(cr, uid, [bug.id], body=message, context=context) @@ -389,19 +379,25 @@ class project_issue(base_stage, osv.osv): return super(project_issue, self).copy(cr, uid, id, default=default, context=context) + def create(self, cr, uid, vals, context=None): + if context is None: + context = {} + if vals.get('project_id') and not context.get('default_project_id'): + context['default_project_id'] = vals.get('project_id') + + # context: no_log, because subtype already handle this + create_context = dict(context, mail_create_nolog=True) + return super(project_issue, self).create(cr, uid, vals, context=create_context) + def write(self, cr, uid, ids, vals, context=None): - - #Update last action date every time the user changes the stage + # stage change: update date_last_stage_update if 'stage_id' in vals: - vals['date_action_last'] = time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT) - state = self.pool.get('project.task.type').browse(cr, uid, vals['stage_id'], context=context).state - for issue in self.browse(cr, uid, ids, context=context): - # Change from draft to not draft EXCEPT cancelled: The issue has been opened -> set the opening date - if issue.state == 'draft' and state not in ('draft', 'cancelled'): - vals['date_open'] = time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT) - # Change from not done to done: The issue has been closed -> set the closing date - if issue.state != 'done' and state == 'done': - vals['date_closed'] = time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT) + vals['date_last_stage_update'] = fields.datetime.now() + if 'kanban_state' not in vals: + vals['kanban_state'] = 'normal' + # user_id change: update date_start + if vals.get('user_id'): + vals['date_start'] = fields.datetime.now() return super(project_issue, self).write(cr, uid, ids, vals, context) @@ -411,13 +407,6 @@ class project_issue(base_stage, osv.osv): task = self.pool.get('project.task').browse(cr, uid, task_id, context=context) return {'value': {'user_id': task.user_id.id, }} - def case_reset(self, cr, uid, ids, context=None): - """Resets case as draft - """ - res = super(project_issue, self).case_reset(cr, uid, ids, context) - self.write(cr, uid, ids, {'date_open': False, 'date_closed': False}) - return res - def get_empty_list_help(self, cr, uid, help, context=None): context['empty_list_help_model'] = 'project.project' context['empty_list_help_id'] = context.get('default_project_id') @@ -466,11 +455,6 @@ class project_issue(base_stage, osv.osv): 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) - return True - def case_escalate(self, cr, uid, ids, context=None): cases = self.browse(cr, uid, ids) for case in cases: @@ -483,7 +467,6 @@ class project_issue(base_stage, 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.case_set(cr, uid, ids, 'draft', data, context=context) return True # ------------------------------------------------------- @@ -495,17 +478,6 @@ class project_issue(base_stage, osv.osv): return [issue.project_id.message_get_reply_to()[0] if issue.project_id else False for issue in self.browse(cr, uid, ids, context=context)] - def check_mail_message_access(self, cr, uid, mids, operation, model_obj=None, context=None): - """ mail.message document permission rule: can post a new message if can read - because of portal document. """ - if not model_obj: - model_obj = self - if operation == 'create': - model_obj.check_access_rights(cr, uid, 'read') - model_obj.check_access_rule(cr, uid, mids, 'read', context=context) - else: - return super(project_issue, self).check_mail_message_access(cr, uid, mids, operation, model_obj=model_obj, context=context) - def message_get_suggested_recipients(self, cr, uid, ids, context=None): recipients = super(project_issue, self).message_get_suggested_recipients(cr, uid, ids, context=context) try: @@ -523,21 +495,19 @@ class project_issue(base_stage, osv.osv): through message_process. This override updates the document according to the email. """ - if custom_values is None: custom_values = {} - if context is None: context = {} + if custom_values is None: + custom_values = {} + if context is None: + context = {} context['state_to'] = 'draft' - - desc = html2plaintext(msg.get('body')) if msg.get('body') else '' - defaults = { 'name': msg.get('subject') or _("No Subject"), - 'description': desc, 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), 'partner_id': msg.get('author_id', False), 'user_id': False, } - if msg.get('priority'): + if msg.get('priority'): defaults['priority'] = msg.get('priority') defaults.update(custom_values) @@ -578,8 +548,8 @@ class project_issue(base_stage, osv.osv): if context is None: context = {} res = super(project_issue, self).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, content_subtype=content_subtype, **kwargs) - if thread_id: - self.write(cr, SUPERUSER_ID, thread_id, {'date_action_last': time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)}, context=context) + if thread_id and subtype: + self.write(cr, SUPERUSER_ID, thread_id, {'date_action_last': fields.datetime.now()}, context=context) return res @@ -593,7 +563,7 @@ class project(osv.Model): res = dict.fromkeys(ids, 0) issue_ids = self.pool.get('project.issue').search(cr, uid, [('project_id', 'in', ids)]) for issue in self.pool.get('project.issue').browse(cr, uid, issue_ids, context): - if issue.state not in ('done', 'cancelled'): + if issue.stage_id and not issue.stage_id.fold: res[issue.project_id.id] += 1 return res @@ -653,6 +623,14 @@ class project_project(osv.Model): elif vals.get('use_issues') and not vals.get('use_tasks'): vals['alias_model'] = 'project.issue' + def on_change_use_tasks_or_issues(self, cr, uid, ids, use_tasks, use_issues, context=None): + values = {} + if use_tasks and not use_issues: + values['alias_model'] = 'project.task' + elif not use_tasks and use_issues: + values['alias_model'] = 'project.issues' + return {'value': values} + def create(self, cr, uid, vals, context=None): self._check_create_write_values(cr, uid, vals, context=context) return super(project_project, self).create(cr, uid, vals, context=context) diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml index 2e43ca69193..25a336d4094 100644 --- a/addons/project_issue/project_issue_data.xml +++ b/addons/project_issue/project_issue_data.xml @@ -35,11 +35,11 @@ Access all issues from the top Project menu, and access the issues of a specific <field name="default" eval="False"/> <field name="description">Issue created</field> </record> - <record id="mt_issue_started" model="mail.message.subtype"> - <field name="name">Issue Started</field> + <record id="mt_issue_assigned" model="mail.message.subtype"> + <field name="name">Issue Assigned</field> <field name="res_model">project.issue</field> <field name="default" eval="False"/> - <field name="description">Issue started</field> + <field name="description">Issue assigned</field> </record> <record id="mt_issue_blocked" model="mail.message.subtype"> <field name="name">Issue Blocked</field> @@ -47,12 +47,6 @@ Access all issues from the top Project menu, and access the issues of a specific <field name="default" eval="False"/> <field name="description">Issue blocked</field> </record> - <record id="mt_issue_closed" model="mail.message.subtype"> - <field name="name">Issue Closed</field> - <field name="res_model">project.issue</field> - <field name="default" eval="False"/> - <field name="description">Issue closed</field> - </record> <record id="mt_issue_stage" model="mail.message.subtype"> <field name="name">Stage Changed</field> <field name="res_model">project.issue</field> @@ -67,11 +61,11 @@ Access all issues from the top Project menu, and access the issues of a specific <field name="parent_id" eval="ref('mt_issue_new')"/> <field name="relation_field">project_id</field> </record> - <record id="mt_project_issue_started" model="mail.message.subtype"> - <field name="name">Issue Started</field> + <record id="mt_project_issue_assigned" model="mail.message.subtype"> + <field name="name">Issue Assigned</field> <field name="res_model">project.project</field> <field name="default" eval="False"/> - <field name="parent_id" eval="ref('mt_issue_started')"/> + <field name="parent_id" eval="ref('mt_issue_assigned')"/> <field name="relation_field">project_id</field> </record> <record id="mt_project_issue_blocked" model="mail.message.subtype"> @@ -80,12 +74,6 @@ Access all issues from the top Project menu, and access the issues of a specific <field name="parent_id" eval="ref('mt_issue_blocked')"/> <field name="relation_field">project_id</field> </record> - <record id="mt_project_issue_closed" model="mail.message.subtype"> - <field name="name">Issue Closed</field> - <field name="res_model">project.project</field> - <field name="parent_id" eval="ref('mt_issue_closed')"/> - <field name="relation_field">project_id</field> - </record> <record id="mt_project_issue_stage" model="mail.message.subtype"> <field name="name">Issue Stage Changed</field> <field name="res_model">project.project</field> diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 46caba0021e..1fbea33f3df 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -48,12 +48,6 @@ <field name="arch" type="xml"> <form string="Issue" version="7.0"> <header> - <button name="case_close" string="Done" type="object" - states="open" groups="base.group_user"/> - <button name="case_close" string="Done" type="object" - states="draft,pending" groups="base.group_user"/> - <button name="case_cancel" string="Cancel Issue" type="object" - states="draft,open,pending" groups="base.group_user"/> <field name="stage_id" widget="statusbar" clickable="True"/> </header> <sheet string="Issue"> @@ -76,7 +70,7 @@ <label for="project_id"/> <div> <field name="project_id" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/> - <button name="case_escalate" string="⇒ Escalate" type="object" states="draft,open,pending" class="oe_link" + <button name="case_escalate" string="⇒ Escalate" type="object" class="oe_link" groups="base.group_user"/> </div> </group> @@ -106,7 +100,6 @@ </group> <group string="Status" groups="base.group_no_one"> <field name="active"/> - <field name="state" string="Status"/> </group> </page> </notebook> @@ -123,7 +116,7 @@ <field name="name">Project Issue Tracker Tree</field> <field name="model">project.issue</field> <field name="arch" type="xml"> - <tree string="Issue Tracker Tree" fonts="bold:message_unread==True" colors="black:state=='open';blue:state=='pending';grey:state in ('cancel', 'done')"> + <tree string="Issue Tracker Tree" fonts="bold:message_unread==True"> <field name="message_unread" invisible="1"/> <field name="id"/> <field name="name"/> @@ -135,7 +128,6 @@ <field name="user_id"/> <field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/> <field name="stage_id" widget="selection" readonly="1"/> - <field name="state" invisible="1"/> <field name="categ_ids" invisible="1"/> <field name="task_id" invisible="1"/> </tree> @@ -149,17 +141,16 @@ <search string="Issue Tracker Search"> <field name="name" string="Issue" filter_domain="['|', '|', '|', ('partner_id','child_of',self), ('description','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/> <field name="id"/> - <filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/> - <separator/> - <filter name="filter_new" string="New" icon="terp-document-new" domain="[('state','=','draft')]" help="New Issues"/> - <filter name="filter_open" string="To Do" domain="[('state','=','open')]" help="To Do Issues" icon="terp-check"/> + <field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/> + <filter string="Unassigned" name="unassigned" domain="[('user_id', '=', False)]"/> + <filter string="New" name="draft" domain="[('stage_id.sequence', '=', 1)]"/> <separator/> - <filter string="Unassigned Issues" domain="[('user_id','=',False)]" help="Unassigned Issues" icon="terp-personal-"/> + <filter string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/> <separator/> <field name="user_id"/> <field name="project_id"/> <field name="categ_ids"/> - <field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/> + <field name="stage_id" domain="[]"/> <group expand="0" string="Group By..." > <filter string="Responsible" name="group_user_id" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/> <filter string="Contact" name="group_partner_id" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/> @@ -269,7 +260,7 @@ <field name="name">Project Issue- Feature Tracker Tree</field> <field name="model">project.issue</field> <field name="arch" type="xml"> - <tree string="Feature Tracker Tree" fonts="bold:message_unread==True" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')"> + <tree string="Feature Tracker Tree" fonts="bold:message_unread==True"> <field name="id"/> <field name="message_unread" invisible="1"/> <field name="name" string="Feature description"/> @@ -278,27 +269,10 @@ <field name="version_id"/> <field name="user_id"/> <field name="stage_id" widget="selection" readonly="1"/> - <field name="state" groups="base.group_no_one"/> </tree> </field> </record> - <record id="view_project_feature_filter" model="ir.ui.view"> - <field name="name">Project Issue - Feature Tracker Search</field> - <field name="model">project.issue</field> - <field name="arch" type="xml"> - <search string="Feature Tracker Search"> - <field name="name" string="Feature description"/> - <field name="date"/> - <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 name="user_id"/> - <field name="project_id" string="Project"/> - </search> - </field> - </record> - <record id="act_project_project_2_project_issue_all" model="ir.actions.act_window"> <field name="res_model">project.issue</field> <field name="view_type">form</field> @@ -325,7 +299,8 @@ <field name="inherit_id" ref="project.edit_project"/> <field name="arch" type="xml"> <xpath expr='//div[@name="options_active"]' position='inside'> - <field name="use_issues" class="oe_inline"/> + <field name="use_issues" class="oe_inline" + on_change="on_change_use_tasks_or_issues(use_tasks, use_issues)"/> <label for="use_issues"/> </xpath> <xpath expr='//div[@name="buttons"]' position='inside'> @@ -334,21 +309,12 @@ <xpath expr='//page[@name="project_stages"]' position="attributes"> <attribute name="attrs">{'invisible': [('use_tasks', '=', False),('use_issues','=',False)]}</attribute> </xpath> + <xpath expr='//field[@name="use_tasks"]' position="attributes"> + <attribute name="attrs">{'on_change': 'on_change_use_tasks_or_issues(use_tasks, use_issues)'}</attribute> + </xpath> <field name="priority" position="before"> <field name="project_escalation_id"/> </field> - <xpath expr='//span[@name="edit_alias"]' position='replace'> - <span class="oe_edit_only" name="edit_alias"> - <field name="alias_name" class="oe_inline" attrs="{'required': [('alias_id', '!=', False)]}"/> - @ - <field class="oe_inline" name="alias_domain"/> - <span class="oe_inline" - attrs="{'invisible': ['|', ('use_issues', '!=', True), ('use_tasks', '!=', True)]}"> - <label for="alias_model" string="creates"/> - <field name="alias_model" class="oe_inline"/> - </span> - </span> - </xpath> </field> </record> @@ -384,16 +350,33 @@ </field> </record> + <record id="action_view_issues" model="ir.actions.act_window"> + <field name="res_model">project.issue</field> + <field name="view_type">form</field> + <field name="name">Issues</field> + <field name="view_mode">kanban,tree,form,calendar,graph</field> + <field name="help" type="html"> + <p> + The OpenERP issues tacker allows you to efficiantly manage things + like internal requests, software development bugs, customer + complaints, project troubles, material breakdowns, etc. + </p> + </field> + </record> + <!-- res.partner --> <record model="ir.ui.view" id="res_partner_issues_button_view"> <field name="name">res.partner.issues.button.view</field> <field name="model">res.partner</field> <field name="inherit_id" ref="base.view_partner_form" /> - <field name="priority" eval="10"/> + <field name="priority" eval="50"/> <field name="arch" type="xml"> <xpath expr="//div[@name='buttons']" position="inside"> - <button type="action" string="Issues" attrs="{'invisible': [('customer', '=', False)]}" - name="%(act_project_project_2_project_issue_all)d" context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}" groups="project.group_project_user"/> + <button class="oe_inline" type="action" string="Issues" + attrs="{'invisible': [('customer', '=', False)]}" + name="%(action_view_issues)d" + context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}" + groups="project.group_project_user"/> </xpath> </field> </record> diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py index 5cca0ff8689..5f59b51f290 100644 --- a/addons/project_issue/report/project_issue_report.py +++ b/addons/project_issue/report/project_issue_report.py @@ -20,17 +20,10 @@ # ############################################################################## -from openerp.osv import fields,osv +from openerp.osv import fields, osv from openerp import tools from openerp.addons.crm import crm -AVAILABLE_STATES = [ - ('draft','Draft'), - ('open','Open'), - ('cancel', 'Cancelled'), - ('done', 'Closed'), - ('pending','Pending') -] class project_issue_report(osv.osv): _name = "project.issue.report" _auto = False @@ -38,18 +31,13 @@ class project_issue_report(osv.osv): _columns = { 'name': fields.char('Year', size=64, required=False, readonly=True), 'section_id':fields.many2one('crm.case.section', 'Sale Team', readonly=True), - 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True), - 'month':fields.selection([('01', 'January'), ('02', 'February'), \ - ('03', 'March'), ('04', 'April'),\ - ('05', 'May'), ('06', 'June'), \ - ('07', 'July'), ('08', 'August'),\ - ('09', 'September'), ('10', 'October'),\ - ('11', 'November'), ('12', 'December')], 'Month', readonly=True), + 'month':fields.selection(fields.date.MONTHS, 'Month', readonly=True), 'company_id': fields.many2one('res.company', 'Company', readonly=True), 'day': fields.char('Day', size=128, readonly=True), 'opening_date': fields.date('Date of Opening', readonly=True), 'creation_date': fields.date('Creation Date', readonly=True), 'date_closed': fields.date('Date of Closing', readonly=True), + 'date_last_stage_update': fields.date('Last Stage Update', readonly=True), '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, group_operator="avg"), @@ -80,7 +68,7 @@ class project_issue_report(osv.osv): to_char(c.create_date, 'YYYY-MM-DD') as day, to_char(c.date_open, 'YYYY-MM-DD') as opening_date, to_char(c.create_date, 'YYYY-MM-DD') as creation_date, - c.state, + date_trunc('day',c.date_last_stage_update) as date_last_stage_update, c.user_id, c.working_hours_open, c.working_hours_close, diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml index a885dcd8a7f..f9ca7168841 100644 --- a/addons/project_issue/report/project_issue_report_view.xml +++ b/addons/project_issue/report/project_issue_report_view.xml @@ -20,7 +20,7 @@ <field name="partner_id" invisible="1"/> <field name="task_id" invisible="1"/> <field name="date_closed" invisible="1"/> - <field name="state" invisible="1"/> + <field name="date_last_stage_update" invisible="1"/> <field name="day" invisible="1"/> <field name="nbr" string="#Project Issues" sum="#Number of Project Issues"/> <field name="delay_open" avg="Avg Opening Delay"/> @@ -36,9 +36,9 @@ <field name="model">project.issue.report</field> <field name="arch" type="xml"> <graph orientation="horizontal" string="Project Issue" type="bar"> - <field name="state"/> <field name="nbr" operator="+"/> - <field group="True" name="user_id"/> + <field name="user_id" group="True"/> + <field name="stage_id" group="True"/> </graph> </field> </record> @@ -49,14 +49,15 @@ <field name="arch" type="xml"> <search string="Search"> <field name="creation_date"/> - <filter icon="terp-camera_test" string="New" domain="[('state','=','draft')]"/> - <filter icon="terp-check" string="To Do" domain="[('state','=','open')]"/> - <filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]"/> - <filter icon="terp-dialog-close" string="Done" domain="[('state','=','done')]"/> <field name="project_id"/> <field name="user_id"/> <field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/> <field name="version_id"/> + <field name="stage_id"/> + <filter string="Unassigned" name="unassigned" domain="[('user_id','=',False)]"/> + <filter string="New" name="new" domain="[('stage_id.sequence', '=', 1)]"/> + <filter string="Done" name="done" domain="[('stage_id.fold', '=', True)]" + help="Tasks beloging to a folded stage"/> <group expand="1" string="Group By..."> <filter string="Assigned to" name="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" /> <filter string="Contact" icon="terp-partner" context="{'group_by':'partner_id'}" /> @@ -70,6 +71,7 @@ <filter string="Day" icon="terp-go-today" domain="[]" context="{'group_by':'day'}" help="Creation Date"/> <filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'month'}" help="Creation Date"/> <filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'name'}" help="Creation Date"/> + <filter string="Last Stage Update" context="{'group_by':'date_last_stage_update'}"/> </group> </search> </field> diff --git a/addons/project_issue/static/src/img/icon.png b/addons/project_issue/static/description/icon.png Binary files differindex 620ac3e9170..620ac3e9170 100644 --- a/addons/project_issue/static/src/img/icon.png +++ b/addons/project_issue/static/description/icon.png diff --git a/addons/project_issue/test/cancel_issue.yml b/addons/project_issue/test/cancel_issue.yml deleted file mode 100644 index 76ffa212638..00000000000 --- a/addons/project_issue/test/cancel_issue.yml +++ /dev/null @@ -1,60 +0,0 @@ -- - In order to test process of issue tracking in OpenERP, I cancel the unqualified Issue. -- - !python {model: project.issue}: | - self.case_cancel(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - 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 == 'cancelled' -- - I re-open the Issue. -- - !python {model: project.issue}: | - self.case_open(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - I check the state of issue after open it. -- - !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue is in open state}: - - state == 'open' -- - I put the issue in pending state. -- - !python {model: project.issue}: | - self.case_pending(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - I check the state of issue after put it in pending state. -- - !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in pending state}: - - state == 'pending' -- - I cancel the issue is in pending state. -- - !python {model: project.issue}: | - self.case_cancel(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - 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 == 'cancelled' -- - I close Issue. -- - !python {model: project.issue}: | - self.case_close(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - I check state of Issue after close. -- - !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue is in done state}: - - state == 'done' -- - I cancel the issue is in done state. -- - !python {model: project.issue}: | - self.case_cancel(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - 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 == 'cancelled' diff --git a/addons/project_issue/test/issue_process.yml b/addons/project_issue/test/issue_process.yml index afb68a9b6c2..280df50ebea 100644 --- a/addons/project_issue/test/issue_process.yml +++ b/addons/project_issue/test/issue_process.yml @@ -1,24 +1,4 @@ - - In order to test process of issue tracking in OpenERP, I Open the Issue. -- - !python {model: project.issue}: | - self.case_open(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - I check state of Issue after opened it. -- - !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in open state}: - - state == 'open' -- - Now I put Issue in pending due to need more information. -- - !python {model: project.issue}: | - self.case_pending(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - I check state after put in pending. -- - !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in pending state}: - - state == 'pending' -- I send mail to get more details. TODO revert mail.mail to mail.compose.message (conversion to customer should be automatic). - !python {model: mail.mail }: | @@ -29,29 +9,9 @@ new_id = self.create(cr, uid, {'email_from': 'support@mycompany.com','email_to': 'Robert_Adersen@yahoo.com', 'subject': 'Regarding error in account module we nees more details'}) self.send_mail(cr, uid, [new_id], context=ctx) except Exception, e: - pass -- - After getting sufficient details, I re-open Issue from pending state. -- - !python {model: project.issue}: | - self.case_open(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - I check state of Issue after re-opened. -- - !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in open state}: - - state == 'open' + pass - I create Task for Issue. - !python {model: project.issue}: | self.convert_issue_task(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - I close Issue after resolving it -- - !python {model: project.issue}: | - self.case_close(cr, uid, [ref("crm_case_buginaccountsmodule0")]) -- - I Check state of Issue after closed. -- - !assert {model: project.issue, id: crm_case_buginaccountsmodule0, severity: error, string: Issue should be in done state}: - - state == 'done' |
