summaryrefslogtreecommitdiff
path: root/addons/project_issue
diff options
context:
space:
mode:
Diffstat (limited to 'addons/project_issue')
-rw-r--r--addons/project_issue/project_issue.py116
-rw-r--r--addons/project_issue/project_issue_data.xml4
-rw-r--r--addons/project_issue/project_issue_demo.xml5
-rw-r--r--addons/project_issue/project_issue_view.xml226
-rw-r--r--addons/project_issue/res_config.py2
-rw-r--r--addons/project_issue/res_config_view.xml10
6 files changed, 212 insertions, 151 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index ad6e7afdbcc..fea7a64d2b7 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -241,7 +241,7 @@ class project_issue(base_stage, 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'),
- 'stage_id': fields.many2one ('project.task.type', 'Stages',
+ 'stage_id': fields.many2one ('project.task.type', 'Stage',
domain="['|', ('project_ids', '=', project_id), ('case_default', '=', True)]"),
'project_id':fields.many2one('project.project', 'Project'),
'duration': fields.float('Duration'),
@@ -288,7 +288,7 @@ class project_issue(base_stage, osv.osv):
'stage_id': _read_group_stage_ids
}
- def set_priority(self, cr, uid, ids, priority):
+ def set_priority(self, cr, uid, ids, priority, *args):
"""Set lead priority
"""
return self.write(cr, uid, ids, {'priority' : priority})
@@ -467,87 +467,68 @@ class project_issue(base_stage, osv.osv):
# -------------------------------------------------------
def message_new(self, cr, uid, msg, custom_values=None, context=None):
- """Automatically called when new email message arrives"""
- if context is None:
- context = {}
- subject = msg.get('subject') or _('No Title')
- body = msg.get('body_text')
- msg_from = msg.get('from')
- priority = msg.get('priority')
- vals = {
- 'name': subject,
- 'email_from': msg_from,
+ """ Overrides mail_thread message_new that is called by the mailgateway
+ through message_process.
+ This override updates the document according to the email.
+ """
+ if custom_values is None: custom_values = {}
+ if context is None: context = {}
+ context['state_to'] = 'draft'
+
+ custom_values.update({
+ 'name': msg.get('subject') or _("No Subject"),
+ 'description': msg.get('body_text'),
+ 'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
- 'description': body,
'user_id': False,
- }
- if priority:
- vals['priority'] = priority
- vals.update(self.message_partner_by_email(cr, uid, msg_from))
- context.update({'state_to' : 'draft'})
-
- if custom_values and isinstance(custom_values, dict):
- vals.update(custom_values)
+ })
+ if msg.get('priority'):
+ custom_values['priority'] = msg.get('priority')
+ custom_values.update(self.message_partner_by_email(cr, uid, msg.get('from'), context=context))
- res_id = self.create(cr, uid, vals, context)
- self.message_append_dict(cr, uid, [res_id], msg, context=context)
+ res_id = super(project_issue, self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
self.convert_to_bug(cr, uid, [res_id], context=context)
return res_id
- def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None):
- if vals is None:
- vals = {}
-
+ def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
+ """ Overrides mail_thread message_update that is called by the mailgateway
+ through message_process.
+ This method updates the document according to the email.
+ """
if isinstance(ids, (str, int, long)):
ids = [ids]
+ if update_vals is None: update_vals = {}
- vals.update({
- 'description': msg['body_text']
- })
- if msg.get('priority', False):
- vals['priority'] = msg.get('priority')
-
+ # Update doc values according to the message
+ update_vals['description'] = msg.get('body_text', '')
+ if msg.get('priority'):
+ update_vals['priority'] = msg.get('priority')
+ # Parse 'body_text' to find values to update
maps = {
'cost': 'planned_cost',
'revenue': 'planned_revenue',
- 'probability': 'probability'
+ 'probability': 'probability',
}
-
- # 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'):
- self.case_set(cr, uid, ids, 'open', {}, context=context)
-
- vls = { }
- for line in msg['body_text'].split('\n'):
+ for line in msg.get('body_text', '').split('\n'):
line = line.strip()
res = tools.misc.command_re.match(line)
if res and maps.get(res.group(1).lower(), False):
key = maps.get(res.group(1).lower())
- vls[key] = res.group(2).lower()
+ update_vals[key] = res.group(2).lower()
- vals.update(vls)
- res = self.write(cr, uid, ids, vals)
- self.message_append_dict(cr, uid, ids, msg, context=context)
- return res
+ return super(project_issue, self).message_update(cr, uid, ids, update_vals=update_vals, context=context)
# -------------------------------------------------------
# OpenChatter methods and notifications
# -------------------------------------------------------
- def get_needaction_user_ids(self, cr, uid, ids, context=None):
- result = dict.fromkeys(ids, [])
- for obj in self.browse(cr, uid, ids, context=context):
- if obj.state == 'draft' and obj.user_id:
- result[obj.id] = [obj.user_id.id]
- return result
-
def message_get_subscribers(self, cr, uid, ids, context=None):
- sub_ids = self.message_get_subscribers_ids(cr, uid, ids, context=context);
+ """ Override to add responsible user. """
+ user_ids = super(project_issue, self).message_get_subscribers(cr, uid, ids, context=context)
for obj in self.browse(cr, uid, ids, context=context):
- if obj.user_id:
- sub_ids.append(obj.user_id.id)
- return self.pool.get('res.users').read(cr, uid, sub_ids, context=context)
+ if obj.user_id and not obj.user_id.id in user_ids:
+ user_ids.append(obj.user_id.id)
+ return user_ids
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
""" Override of the (void) default notification method. """
@@ -591,14 +572,9 @@ class project(osv.osv):
_columns = {
'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'reply_to' : fields.char('Reply-To Email Address', size=256),
- 'use_issues' : fields.boolean('Use Issues', help="Check this field if this project manages issues"),
'issue_count': fields.function(_issue_count, type='integer'),
}
- _defaults = {
- 'use_issues': True,
- }
-
def _check_escalation(self, cr, uid, ids, context=None):
project_obj = self.browse(cr, uid, ids[0], context=context)
if project_obj.project_escalation_id:
@@ -611,4 +587,18 @@ class project(osv.osv):
]
project()
+class account_analytic_account(osv.osv):
+ _inherit = 'account.analytic.account'
+ _description = 'Analytic Account'
+
+ _columns = {
+ 'use_issues' : fields.boolean('Issues Tracking', help="Check this field if this project manages issues"),
+ }
+
+ def _trigger_project_creation(self, cr, uid, vals, context=None):
+ res = super(account_analytic_account, self)._trigger_project_creation(cr, uid, vals, context=context)
+ return res or vals.get('use_issues')
+
+account_analytic_account()
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml
index 8f0f097cb87..34fea22f9b9 100644
--- a/addons/project_issue/project_issue_data.xml
+++ b/addons/project_issue/project_issue_data.xml
@@ -8,13 +8,13 @@
<record model="crm.case.categ" id="bug_categ">
<field name="name">Maintenance</field>
<field name="section_id" ref="crm.section_sales_department"/>
- <field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
+ <field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="feature_request_categ">
<field name="name">Feature Requests</field>
<field name="section_id" ref="crm.section_sales_department"/>
- <field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
+ <field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
</record>
<!-- Case type_id -->
diff --git a/addons/project_issue/project_issue_demo.xml b/addons/project_issue/project_issue_demo.xml
index a213cb02c2e..b3fb4582cf2 100644
--- a/addons/project_issue/project_issue_demo.xml
+++ b/addons/project_issue/project_issue_demo.xml
@@ -227,5 +227,10 @@
<field name="stage_id" ref="project.project_tt_specification"/>
</record>
+ <!-- Call Function to set some issues as Unread -->
+ <function model="project.issue" name="message_mark_as_unread"
+ eval="[ ref('crm_case_improvereportsinhrms0'), ref('crm_case_createnewobject0')], {}"
+ />
+
</data>
</openerp>
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index 1d8fe6b2509..c6629f2f9d4 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -2,7 +2,44 @@
<openerp>
<data>
- <menuitem id="menu_project_confi" name="Issues" parent="project.menu_definitions" sequence="2"/>
+ <menuitem id="menu_project_confi" name="Issues" parent="base.menu_definitions" sequence="2"/>
+
+ <!-- Project issue Read/Unread actions -->
+ <record id="actions_server_project_issue_unread" model="ir.actions.server">
+ <field name="name">Mark unread</field>
+ <field name="condition">True</field>
+ <field name="type">ir.actions.server</field>
+ <field name="model_id" ref="model_project_issue"/>
+ <field name="state">code</field>
+ <field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
+ </record>
+ <record id="action_project_issue_unread" model="ir.values">
+ <field name="name">action_project_issue_unread</field>
+ <field name="action_id" ref="actions_server_project_issue_unread"/>
+ <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_project_issue_unread'))" />
+ <field name="key">action</field>
+ <field name="model_id" ref="model_project_issue" />
+ <field name="model">project.issue</field>
+ <field name="key2">client_action_multi</field>
+ </record>
+
+ <record id="actions_server_project_issue_read" model="ir.actions.server">
+ <field name="name">Mark read</field>
+ <field name="condition">True</field>
+ <field name="type">ir.actions.server</field>
+ <field name="model_id" ref="model_project_issue"/>
+ <field name="state">code</field>
+ <field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
+ </record>
+ <record id="action_project_issue_read" model="ir.values">
+ <field name="name">action_project_issue_read</field>
+ <field name="action_id" ref="actions_server_project_issue_read"/>
+ <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_project_issue_read'))" />
+ <field name="key">action</field>
+ <field name="model_id" ref="model_project_issue" />
+ <field name="model">project.issue</field>
+ <field name="key2">client_action_multi</field>
+ </record>
<record model="ir.ui.view" id="project_issue_version_search_view">
<field name="name">Issue Version</field>
@@ -55,24 +92,28 @@
<field name="arch" type="xml">
<form version="7.0">
<header>
- <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"/>
+ <span groups="base.group_user">
+ <button name="case_open" string="Open" type="object"
+ states="draft,pending" class="oe_highlight"/>
+ <button name="case_close" string="Done" type="object"
+ states="open"/>
+ <button name="case_close" string="Done" type="object"
+ states="draft,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"/>
+ </span>
<field name="stage_id" widget="statusbar"/>
</header>
<sheet string="Issue">
@@ -86,7 +127,7 @@
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
<field name="email_from"/>
</group><group>
- <field name="task_id" on_change="onchange_task_id(task_id)" />
+ <field name="task_id" on_change="onchange_task_id(task_id)"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
<field name="version_id" widget="selection"/>
<field name="priority"/>
@@ -94,7 +135,7 @@
<field name="state" groups="base.group_no_one"/>
</group>
</group>
- <field name="description" placeholder="Add a description..." />
+ <field name="description" placeholder="Add a description..."/>
<notebook groups="base.group_no_one">
<page string="Extra Info">
@@ -116,7 +157,7 @@
</notebook>
</sheet>
<footer>
- <field name="message_ids" widget="ThreadView"/>
+ <field name="message_ids" widget="mail_thread"/>
</footer>
</form>
</field>
@@ -133,8 +174,8 @@
<field name="create_date" groups="base.group_no_one"/>
<field name="name"/>
<field name="partner_id"/>
- <field name="project_id" />
- <field name="priority" string="Priority"/>
+ <field name="project_id"/>
+ <field name="priority" string="Priority" groups="base.group_user"/>
<field name="version_id" widget="selection"/>
<field name="user_id"/>
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
@@ -155,9 +196,13 @@
<group>
<field name="name" string="Issue" filter_domain="['|', '|',('partner_id','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
<separator orientation="vertical"/>
+ <filter icon="terp-mail-message-new"
+ string="Inbox" help="Unread messages"
+ name="needaction_pending"
+ domain="[('needaction_pending','=',True)]"/>
+ <separator orientation="vertical"/>
<filter string="New" icon="terp-document-new" domain="[('state','=','draft')]" help="New Issues"/>
<filter string="To Do" domain="[('state','=','open')]" help="To Do Issues" icon="terp-check"/>
- <filter string="Pending" domain="[('state','=','pending')]" help="Pending Issues" icon="terp-gtk-media-pause"/>
<filter string="Unassigned Issues" domain="[('user_id','=',False)]" help="Unassigned Issues" icon="terp-personal-" />
<separator orientation="vertical"/>
<field name="user_id"/>
@@ -168,24 +213,24 @@
<newline/>
<group expand="0" string="Group By..." >
<filter string="Responsible" icon="terp-personal"
- domain="[]" context="{'group_by':'user_id'}" />
+ domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-partner" domain="[]"
- context="{'group_by':'partner_id'}" />
+ context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Project" icon="terp-folder-violet" domain="[]"
- context="{'group_by':'project_id'}" />
+ context="{'group_by':'project_id'}"/>
<filter string="Version" icon="terp-gtk-jump-to-rtl"
- domain="[]" context="{'group_by':'version_id'}" />
+ domain="[]" context="{'group_by':'version_id'}"/>
<separator orientation="vertical"/>
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]"
- context="{'group_by':'categ_id'}" />
+ context="{'group_by':'categ_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]"
- context="{'group_by':'priority'}" />
+ context="{'group_by':'priority'}"/>
<filter string="Stage" icon="terp-stage" domain="[]"
- context="{'group_by':'stage_id'}" />
+ context="{'group_by':'stage_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]"
- context="{'group_by':'state'}" />
- <separator orientation="vertical" />
+ context="{'group_by':'state'}"/>
+ <separator orientation="vertical"/>
<filter string="Month" icon="terp-go-month"
domain="[]" context="{'group_by':'create_date'}" help="Creation Month"/>
</group>
@@ -216,55 +261,58 @@
<field name="arch" type="xml">
<kanban default_group_by="stage_id">
<field name="color"/>
- <field name="state" groups="base.group_no_one"/>
<field name="priority"/>
<field name="user_email"/>
<field name="user_id"/>
+ <field name="date_deadline"/>
<templates>
+ <t t-name="kanban-tooltip">
+ <ul class="oe_kanban_tooltip">
+ <li><b>Project:</b> <field name="project_id"/></li>
+ <li><b>Category:</b> <field name="categ_id"/></li>
+ </ul>
+ </t>
<t t-name="kanban-box">
- <t t-set="color" t-value="kanban_color(record.color.raw_value || record.state.raw_value)"/>
- <div t-att-class="color + (record.priority.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
- <div class="oe_kanban_box oe_kanban_color_border">
- <table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
- <tr>
- <td align="left" valign="middle" width="16">
- <a t-if="record.priority.raw_value == 1" icon="star-on" type="object" name="set_normal_priority"/>
- <a t-if="record.priority.raw_value != 1" icon="star-off" type="object" name="set_high_priority" style="opacity:0.6; filter:alpha(opacity=60);"/>
- </td>
- <td align="left" valign="middle" class="oe_kanban_title">
- <field name="name"/>
- </td>
- <td valign="top" width="22">
- <img t-att-src="kanban_gravatar(record.user_email.value, 22)" class="oe_kanban_gravatar" t-att-title="record.user_id.value"/>
- </td>
- </tr>
- </table>
- <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
- <div t-if="record.partner_id.raw_value">
- <field name="partner_id"/>
- </div>
- <div t-if="record.project_id.raw_value">
- <field name="project_id"/>
- </div>
- <div t-if="record.version_id.raw_value">
- <i><field name="version_id"/></i>
- </div>
- </div>
- <div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
- <div class="oe_kanban_left">
- <a string="Edit" icon="gtk-edit" type="edit"/>
- <a string="Change Color" icon="color-picker" type="color" name="color"/>
- <a string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
- <a string="Escalate" name="case_escalate" icon="gtk-go-up" type="object"/>
- <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_close" string="Close" states="open,draft,pending" type="object" icon="kanban-stop"/>
+ <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
+ <div class="oe_dropdown_toggle oe_dropdown_kanban">
+ <span class="oe_e">i</span>
+ <ul class="oe_dropdown_menu">
+ <li><a type="edit" >Edit...</a></li>
+ <li><a type="delete">Delete</a></li>
+ <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
+ </ul>
+ </div>
+ <div class="oe_kanban_content" tooltip="kanban-tooltip">
+ <div>
+ <b><field name="name"/></b> <br/>
+ <field name="partner_id"/> <br/>
+ <field name="version_id"/>
+ </div>
+ <div class="oe_kanban_footer_left">
+ <div class="oe_right">
+ <span class="oe_kanban_highlight">
+ <t t-set="priority" t-value="record.priority.raw_value || 5"/>
+ <a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority">
+ <img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>
+ </a>
+ <a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority">
+ <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>
+ </a>
+ <a type="object" name="set_priority" args="['2']" title="High Priority">
+ <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>
+ </a>
+ <a type="object" name="set_priority" args="['1']" title="Highest Priority">
+ <img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
+ </a>
+ </span>
+ <t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())">
+ <span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span>
+ </t>
+ <img t-att-src="kanban_image('res.users', 'avatar', record.user_id.raw_value[0])" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
- <div class="oe_kanban_clear"/>
</div>
</div>
+ <div class="oe_clear"></div>
</div>
</t>
</templates>
@@ -273,10 +321,6 @@
</record>
-
-
-
-
# ------------------------------------------------------
# Feature Requests
# ------------------------------------------------------
@@ -340,9 +384,12 @@
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
- <field name="use_tasks" position="after">
- <field name="use_issues"/>
- </field>
+ <xpath expr='//tr[@name="use_tasks_row"]' position='after'>
+ <tr>
+ <td><group><field name="use_issues"/></group></td>
+ <td><button icon="terp-gtk-go-back-rtl" name="%(act_project_project_2_project_issue_all)d" string="Issues" type="action" attrs="{'invisible':[('use_issues','=', 0)]}"/></td>
+ </tr>
+ </xpath>
<field name="priority" position="before">
<field name="project_escalation_id"/>
<field name="reply_to"/>
@@ -367,5 +414,20 @@
</xpath>
</field>
</record>
+ <record id="analytic_account_inherited_issue_form" model="ir.ui.view">
+ <field name="name">account.analytic.account.issue.form.inherit</field>
+ <field name="model">account.analytic.account</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="project.analytic_account_inherited_form"/>
+ <field eval="18" name="priority"/>
+ <field name="arch" type="xml">
+ <xpath expr='//separator[@name="project_sep"]' position='replace'>
+ <separator colspan="4" string="Project Management" name="project_sep"/> <!-- removal of invisible attribute -->
+ </xpath>
+ <xpath expr='//separator[@name="project_sep"]' position='after'>
+ <field name="use_issues" />
+ </xpath>
+ </field>
+ </record>
</data>
</openerp>
diff --git a/addons/project_issue/res_config.py b/addons/project_issue/res_config.py
index 21e50b21e8d..ec7080708ac 100644
--- a/addons/project_issue/res_config.py
+++ b/addons/project_issue/res_config.py
@@ -26,7 +26,7 @@ class project_issue_settings(osv.osv_memory):
_inherit = ['project.config.settings', 'fetchmail.config.settings']
_columns = {
- 'fetchmail_issue': fields.boolean("Create Issues from Incoming Mails", readonly=True,
+ 'fetchmail_issue': fields.boolean("Create Issues from Incoming Mails",
fetchmail_model='project.issue', fetchmail_name='Incoming Issues',
help="""Allows you to configure your incoming mail server, and create issues from incoming emails."""),
}
diff --git a/addons/project_issue/res_config_view.xml b/addons/project_issue/res_config_view.xml
index 0a470205c24..1c9702e3d38 100644
--- a/addons/project_issue/res_config_view.xml
+++ b/addons/project_issue/res_config_view.xml
@@ -8,9 +8,13 @@
<field name="type">form</field>
<field name="inherit_id" ref="project.view_config_settings"/>
<field name="arch" type="xml">
- <group name="support" position="after">
- <field name="fetchmail_issue"/>
- <button colspan="2" type="object" name="configure_fetchmail_issue" string="Configure" icon="gtk-execute"/>
+ <group name="support" position="inside">
+ <label for="fetchmail_issue"/>
+ <div>
+ <field name="fetchmail_issue"/>
+ <button name="configure_fetchmail_issue" type="object" string="Configure" icon="gtk-go-forward"
+ attrs="{'invisible': [('fetchmail_issue','=',False)]}"/>
+ </div>
</group>
</field>
</record>