[MERGE] replace assigned_to by user_id in project.issue
bzr revid: rco@openerp.com-20110902134736-l06c7csko7hoxiql
This commit is contained in:
commit
81c6a9c87f
|
@ -123,7 +123,7 @@
|
||||||
<field name="res_model">project.issue</field>
|
<field name="res_model">project.issue</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('state','not in',('cancel','done')),'|',('assigned_to','=',uid),('user_id','=',uid)]</field>
|
<field name="domain">[('state','not in',('cancel','done')),('user_id','=',uid)]</field>
|
||||||
<field name="view_id" ref="project_issue_board_tree_view"/>
|
<field name="view_id" ref="project_issue_board_tree_view"/>
|
||||||
</record>
|
</record>
|
||||||
<record id="view_my_open_project_issue_graph" model="ir.ui.view">
|
<record id="view_my_open_project_issue_graph" model="ir.ui.view">
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
<field name="res_model">project.issue.report</field>
|
<field name="res_model">project.issue.report</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">graph,tree,form,</field>
|
<field name="view_mode">graph,tree,form,</field>
|
||||||
<field name="domain">[('state','=','open'),'|',('assigned_to','=',uid),('user_id','=',uid)]</field>
|
<field name="domain">[('state','=','open'),('user_id','=',uid)]</field>
|
||||||
<field name="view_id" ref="view_my_open_project_issue_graph"/>
|
<field name="view_id" ref="view_my_open_project_issue_graph"/>
|
||||||
</record>
|
</record>
|
||||||
<record id="board_my_project_issue_form" model="ir.ui.view">
|
<record id="board_my_project_issue_form" model="ir.ui.view">
|
||||||
|
|
|
@ -56,7 +56,7 @@ class project_issue(crm.crm_case, osv.osv):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
res = super(project_issue, self).case_open(cr, uid, ids, *args)
|
res = super(project_issue, self).case_open(cr, uid, ids, *args)
|
||||||
self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), 'assigned_to' : uid})
|
self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), 'user_id' : uid})
|
||||||
for (id, name) in self.name_get(cr, uid, ids):
|
for (id, name) in self.name_get(cr, uid, ids):
|
||||||
message = _("Issue '%s' has been opened.") % name
|
message = _("Issue '%s' has been opened.") % name
|
||||||
self.log(cr, uid, id, message)
|
self.log(cr, uid, id, message)
|
||||||
|
@ -189,7 +189,6 @@ class project_issue(crm.crm_case, osv.osv):
|
||||||
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
|
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
|
||||||
select=True, help='Sales team to which Case belongs to.\
|
select=True, help='Sales team to which Case belongs to.\
|
||||||
Define Responsible user and Email account for mail gateway.'),
|
Define Responsible user and Email account for mail gateway.'),
|
||||||
'user_id': fields.related('project_id', 'user_id', type='many2one', relation='res.users', store=True, select=1, string='Responsible'),
|
|
||||||
'partner_id': fields.many2one('res.partner', 'Partner', select=1),
|
'partner_id': fields.many2one('res.partner', 'Partner', select=1),
|
||||||
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
|
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
|
||||||
domain="[('partner_id','=',partner_id)]"),
|
domain="[('partner_id','=',partner_id)]"),
|
||||||
|
@ -218,7 +217,7 @@ class project_issue(crm.crm_case, osv.osv):
|
||||||
multi='compute_day', type="float", store=True),
|
multi='compute_day', type="float", store=True),
|
||||||
'day_close': fields.function(_compute_day, string='Days to Close', \
|
'day_close': fields.function(_compute_day, string='Days to Close', \
|
||||||
multi='compute_day', type="float", store=True),
|
multi='compute_day', type="float", store=True),
|
||||||
'assigned_to': fields.many2one('res.users', 'Assigned to', required=False, select=1),
|
'user_id': fields.many2one('res.users', 'Assigned to', required=False, select=1),
|
||||||
'working_hours_open': fields.function(_compute_day, string='Working Hours to Open the Issue', \
|
'working_hours_open': fields.function(_compute_day, string='Working Hours to Open the Issue', \
|
||||||
multi='compute_day', type="float", store=True),
|
multi='compute_day', type="float", store=True),
|
||||||
'working_hours_close': fields.function(_compute_day, string='Working Hours to Close the Issue', \
|
'working_hours_close': fields.function(_compute_day, string='Working Hours to Close the Issue', \
|
||||||
|
@ -243,19 +242,11 @@ class project_issue(crm.crm_case, osv.osv):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def on_change_project(self, cr, uid, ids, project_id, context=None):
|
def on_change_project(self, cr, uid, ids, project_id, context=None):
|
||||||
result = {}
|
return {}
|
||||||
|
|
||||||
if project_id:
|
|
||||||
project = self.pool.get('project.project').browse(cr, uid, project_id, context=context)
|
|
||||||
if project.user_id:
|
|
||||||
result['value'] = {'user_id' : project.user_id.id}
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'active': 1,
|
'active': 1,
|
||||||
#'user_id': crm.crm_case._get_default_user,
|
|
||||||
'partner_id': crm.crm_case._get_default_partner,
|
'partner_id': crm.crm_case._get_default_partner,
|
||||||
'partner_address_id': crm.crm_case._get_default_partner_address,
|
'partner_address_id': crm.crm_case._get_default_partner_address,
|
||||||
'email_from': crm.crm_case._get_default_email,
|
'email_from': crm.crm_case._get_default_email,
|
||||||
|
@ -265,7 +256,6 @@ class project_issue(crm.crm_case, osv.osv):
|
||||||
'priority': crm.AVAILABLE_PRIORITIES[2][0],
|
'priority': crm.AVAILABLE_PRIORITIES[2][0],
|
||||||
'project_id':_get_project,
|
'project_id':_get_project,
|
||||||
'categ_id' : lambda *a: False,
|
'categ_id' : lambda *a: False,
|
||||||
#'assigned_to' : lambda obj, cr, uid, context: uid,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def convert_issue_task(self, cr, uid, ids, context=None):
|
def convert_issue_task(self, cr, uid, ids, context=None):
|
||||||
|
@ -294,7 +284,7 @@ class project_issue(crm.crm_case, osv.osv):
|
||||||
'date': bug.date,
|
'date': bug.date,
|
||||||
'project_id': bug.project_id.id,
|
'project_id': bug.project_id.id,
|
||||||
'priority': bug.priority,
|
'priority': bug.priority,
|
||||||
'user_id': bug.assigned_to.id,
|
'user_id': bug.user_id.id,
|
||||||
'planned_hours': 0.0,
|
'planned_hours': 0.0,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -362,7 +352,7 @@ class project_issue(crm.crm_case, osv.osv):
|
||||||
if not task_id:
|
if not task_id:
|
||||||
return {'value':{}}
|
return {'value':{}}
|
||||||
task = self.pool.get('project.task').browse(cr, uid, task_id, context=context)
|
task = self.pool.get('project.task').browse(cr, uid, task_id, context=context)
|
||||||
return {'value':{'assigned_to': task.user_id.id,}}
|
return {'value':{'user_id': task.user_id.id,}}
|
||||||
|
|
||||||
def case_escalate(self, cr, uid, ids, *args):
|
def case_escalate(self, cr, uid, ids, *args):
|
||||||
"""Escalates case to top level
|
"""Escalates case to top level
|
||||||
|
|
|
@ -55,8 +55,7 @@
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="project_id" required="True" on_change="on_change_project(project_id)"/>
|
<field name="project_id" required="True" on_change="on_change_project(project_id)"/>
|
||||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||||
<field name="user_id" invisible="1" />
|
<field name="user_id"/>
|
||||||
<field name="assigned_to"/>
|
|
||||||
<field name="version_id" colspan="2" widget="selection"/>
|
<field name="version_id" colspan="2" widget="selection"/>
|
||||||
<group colspan="2" col="4">
|
<group colspan="2" col="4">
|
||||||
<field name="type_id" string="Resolution" />
|
<field name="type_id" string="Resolution" />
|
||||||
|
@ -191,7 +190,7 @@
|
||||||
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
|
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
|
||||||
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
|
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
|
||||||
<field name="version_id" widget="selection"/>
|
<field name="version_id" widget="selection"/>
|
||||||
<field name="assigned_to"/>
|
<field name="user_id"/>
|
||||||
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
|
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||||
|
@ -219,8 +218,8 @@
|
||||||
<filter string="Pending" domain="[('state','=','pending')]" help="Pending Issues" icon="terp-gtk-media-pause"/>
|
<filter string="Pending" domain="[('state','=','pending')]" help="Pending Issues" icon="terp-gtk-media-pause"/>
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
<field name="name" string="Issue / Partner" filter_domain="['|', '|', ('partner_id','ilike',self), ('email_from','ilike',self), ('name','ilike',self)]"/>
|
<field name="name" string="Issue / Partner" filter_domain="['|', '|', ('partner_id','ilike',self), ('email_from','ilike',self), ('name','ilike',self)]"/>
|
||||||
<field name="assigned_to">
|
<field name="user_id">
|
||||||
<filter domain="[('assigned_to','=',False)]" help="Unassigned Issues" icon="terp-personal-" separator="1"/>
|
<filter domain="[('user_id','=',False)]" help="Unassigned Issues" icon="terp-personal-" separator="1"/>
|
||||||
</field>
|
</field>
|
||||||
<field name="project_id"/>
|
<field name="project_id"/>
|
||||||
<field name="id"/>
|
<field name="id"/>
|
||||||
|
@ -228,7 +227,7 @@
|
||||||
<newline/>
|
<newline/>
|
||||||
<group expand="0" string="Group By..." groups="base.group_extended">
|
<group expand="0" string="Group By..." groups="base.group_extended">
|
||||||
<filter string="Responsible" icon="terp-personal"
|
<filter string="Responsible" icon="terp-personal"
|
||||||
domain="[]" context="{'group_by':'assigned_to'}" />
|
domain="[]" context="{'group_by':'user_id'}" />
|
||||||
<filter string="Partner" icon="terp-partner" domain="[]"
|
<filter string="Partner" icon="terp-partner" domain="[]"
|
||||||
context="{'group_by':'partner_id'}" />
|
context="{'group_by':'partner_id'}" />
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
|
@ -259,7 +258,7 @@
|
||||||
<field name="type">calendar</field>
|
<field name="type">calendar</field>
|
||||||
<field name="priority" eval="2"/>
|
<field name="priority" eval="2"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<calendar string="Issues" date_start="date" color="assigned_to" date_delay="duration">
|
<calendar string="Issues" date_start="date" color="user_id" date_delay="duration">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="partner_id"/>
|
<field name="partner_id"/>
|
||||||
</calendar>
|
</calendar>
|
||||||
|
@ -284,7 +283,7 @@
|
||||||
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
|
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
|
||||||
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
|
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
|
||||||
<field name="version_id"/>
|
<field name="version_id"/>
|
||||||
<field name="assigned_to"/>
|
<field name="user_id"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||||
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
|
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
|
||||||
|
@ -307,7 +306,7 @@
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
<group>
|
<group>
|
||||||
<field name="name" select='1' string="Feature description"/>
|
<field name="name" select='1' string="Feature description"/>
|
||||||
<field name="assigned_to" select="1"/>
|
<field name="user_id" select="1"/>
|
||||||
<field name="state" select="1">
|
<field name="state" select="1">
|
||||||
<filter icon="terp-check" domain="[('state','in',('open','draft'))]" help="Current Features" name="current_feature"/>
|
<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"/>
|
<filter icon="terp-camera_test" domain="[('state','=','open')]" help="Open Features"/>
|
||||||
|
|
|
@ -37,7 +37,6 @@ class project_issue_report(osv.osv):
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'name': fields.char('Year', size=64, required=False, readonly=True),
|
'name': fields.char('Year', size=64, required=False, readonly=True),
|
||||||
'user_id':fields.many2one('res.users', 'Responsible', readonly=True),
|
|
||||||
'section_id':fields.many2one('crm.case.section', 'Sale Team', readonly=True),
|
'section_id':fields.many2one('crm.case.section', 'Sale Team', readonly=True),
|
||||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||||
'month':fields.selection([('01', 'January'), ('02', 'February'), \
|
'month':fields.selection([('01', 'January'), ('02', 'February'), \
|
||||||
|
@ -64,7 +63,7 @@ class project_issue_report(osv.osv):
|
||||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||||
'project_id':fields.many2one('project.project', 'Project',readonly=True),
|
'project_id':fields.many2one('project.project', 'Project',readonly=True),
|
||||||
'version_id': fields.many2one('project.issue.version', 'Version'),
|
'version_id': fields.many2one('project.issue.version', 'Version'),
|
||||||
'assigned_to' : fields.many2one('res.users', 'Assigned to',readonly=True),
|
'user_id' : fields.many2one('res.users', 'Assigned to',readonly=True),
|
||||||
'partner_id': fields.many2one('res.partner','Partner',domain="[('object_id.model', '=', 'project.issue')]"),
|
'partner_id': fields.many2one('res.partner','Partner',domain="[('object_id.model', '=', 'project.issue')]"),
|
||||||
'channel_id': fields.many2one('crm.case.channel', 'Channel',readonly=True),
|
'channel_id': fields.many2one('crm.case.channel', 'Channel',readonly=True),
|
||||||
'task_id': fields.many2one('project.task', 'Task',domain="[('object_id.model', '=', 'project.issue')]" ),
|
'task_id': fields.many2one('project.task', 'Task',domain="[('object_id.model', '=', 'project.issue')]" ),
|
||||||
|
@ -95,7 +94,6 @@ class project_issue_report(osv.osv):
|
||||||
c.project_id as project_id,
|
c.project_id as project_id,
|
||||||
c.version_id as version_id,
|
c.version_id as version_id,
|
||||||
1 as nbr,
|
1 as nbr,
|
||||||
c.assigned_to,
|
|
||||||
c.partner_id,
|
c.partner_id,
|
||||||
c.channel_id,
|
c.channel_id,
|
||||||
c.task_id,
|
c.task_id,
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
<field name="channel_id" invisible="1"/>
|
<field name="channel_id" invisible="1"/>
|
||||||
<field name="partner_id" invisible="1"/>
|
<field name="partner_id" invisible="1"/>
|
||||||
<field name="task_id" invisible="1"/>
|
<field name="task_id" invisible="1"/>
|
||||||
<field name="assigned_to" invisible="1"/>
|
|
||||||
<field name="date_closed" invisible="1"/>
|
<field name="date_closed" invisible="1"/>
|
||||||
<field name="state" invisible="1"/>
|
<field name="state" invisible="1"/>
|
||||||
<field name="day" invisible="1"/>
|
<field name="day" invisible="1"/>
|
||||||
|
@ -89,7 +88,7 @@
|
||||||
|
|
||||||
</field>
|
</field>
|
||||||
<field name="project_id"/>
|
<field name="project_id"/>
|
||||||
<field name="user_id" select="1" widget="selection"/>
|
<field name="user_id" select="1" widget="selection" filter_domain="[('user_id','ilike',self)]"/>
|
||||||
</group>
|
</group>
|
||||||
<newline/>
|
<newline/>
|
||||||
<group expand="0" string="Extended Filters..." colspan="10" col="12" groups="base.group_extended">
|
<group expand="0" string="Extended Filters..." colspan="10" col="12" groups="base.group_extended">
|
||||||
|
@ -109,11 +108,9 @@
|
||||||
<field name="date_closed" string="Date Closed"/>
|
<field name="date_closed" string="Date Closed"/>
|
||||||
</group>
|
</group>
|
||||||
<newline/>
|
<newline/>
|
||||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||||
<filter name="User" string="Responsible" icon="terp-personal"
|
|
||||||
domain="[]" context="{'group_by':'user_id'}" />
|
|
||||||
<filter string="Assigned to" name="Responsible" icon="terp-personal"
|
<filter string="Assigned to" name="Responsible" icon="terp-personal"
|
||||||
domain="[]" context="{'group_by':'assigned_to'}" />
|
domain="[]" context="{'group_by':'user_id'}" />
|
||||||
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}" />
|
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}" />
|
||||||
<separator orientation="vertical" />
|
<separator orientation="vertical" />
|
||||||
<filter string="Sale Team" icon="terp-personal+"
|
<filter string="Sale Team" icon="terp-personal+"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
<notebook colspan="4">
|
<notebook colspan="4">
|
||||||
<page string="Worklogs">
|
<page string="Worklogs">
|
||||||
<field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : assigned_to, 'default_account_id' : analytic_account_id}">
|
<field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
|
||||||
<tree editable="top" string="Timesheet">
|
<tree editable="top" string="Timesheet">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
|
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
|
||||||
|
|
Loading…
Reference in New Issue