diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2012-10-26 09:57:15 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2012-10-26 09:57:15 +0200 |
| commit | dd3e728fb60cc91e2a8cf0fcc455c225a53df7b2 (patch) | |
| tree | 8615fbd18b69474277a6e70a4d9986c3c9337b7b /addons/project_issue | |
| parent | e08f2e5102dac500f1a1422fa9fc7a2ec43c7bb9 (diff) | |
| parent | 93be12ab1e1bd607b3a4f04f69a310622a4205ed (diff) | |
[MERGE] + improve hr_timesheet
bzr revid: fp@tinyerp.com-20121026075715-kq910tdzhc1uul3l
Diffstat (limited to 'addons/project_issue')
| -rw-r--r-- | addons/project_issue/project_issue.py | 13 | ||||
| -rw-r--r-- | addons/project_issue/project_issue_view.xml | 14 |
2 files changed, 12 insertions, 15 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 9e434078d2f..770c226fc2f 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -227,11 +227,11 @@ class project_issue(base_stage, osv.osv): 'company_id': fields.many2one('res.company', 'Company'), 'description': fields.text('Description'), '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 \ + selection=_ISSUE_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\'.'), '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"), @@ -275,7 +275,6 @@ class project_issue(base_stage, osv.osv): '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), - 'state': 'draft', '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), @@ -332,7 +331,7 @@ class project_issue(base_stage, osv.osv): }) vals = { 'task_id': new_task_id, - 'state':'pending' + 'stage_id': self.stage_find(cr, uid, [bug], bug.project_id.id, [('state', '=', 'pending')], context=context), } self.convert_to_task_send_note(cr, uid, [bug.id], context=context) case_obj.write(cr, uid, [bug.id], vals, context=context) diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 818d4e6f556..6ff5388ce4a 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -95,14 +95,12 @@ <field name="arch" type="xml"> <form string="Issue" version="7.0"> <header> - <span groups="base.group_user"> - <button name="case_close" string="Done" type="object" - states="open"/> - <button name="case_close" string="Done" type="object" - states="draft,pending"/> - <button name="case_cancel" string="Cancel" type="object" - states="draft,open,pending"/> - </span> + <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" type="object" + states="draft,open,pending" groups="base.group_user"/> <field name="stage_id" widget="statusbar" clickable="True"/> </header> <sheet string="Issue"> |
