Dhruti Shastri has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-574367-dhs into
lp:openobject-addons/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-574367-dhs/+merge/104704
To reproduce:
- install SALE and CRM
- create a user and assigned the default team to him
- enable extended view
- go to Sales > Configuration > Sales > Sales Teams
- open the default team
Expected behaviour:
- the team members list should contain the new user
Current behaviour:
- the team members is empty
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-574367-dhs/+merge/104704
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-574367-dhs.
=== modified file 'crm/crm.py'
--- crm/crm.py 2012-03-08 15:58:35 +0000
+++ crm/crm.py 2012-05-04 09:34:18 +0000
@@ -127,7 +127,7 @@
def name_get(self, cr, uid, ids, context=None):
"""Overrides orm name_get method"""
- if not isinstance(ids, list) :
+ if not isinstance(ids, list) :
ids = [ids]
res = []
if not ids:
@@ -325,10 +325,10 @@
return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
class crm_case(crm_base):
- """ A simple python class to be used for common functions
+ """ A simple python class to be used for common functions
Object that inherit from this class should inherit from mailgate.thread
And need a stage_id field
- And object that inherit (orm inheritance) from a class the overwrite copy
+ And object that inherit (orm inheritance) from a class the overwrite copy
"""
def stage_find(self, cr, uid, section_id, domain=[], order='sequence'):
@@ -577,6 +577,13 @@
section_obj.write(cr, uid, [vals['context_section_id']], {'member_ids':[(4, res)]}, context)
return res
+ def write (self, cr, uid, ids, vals, context):
+ res = super(users, self).write(cr, uid, ids, vals, context=context)
+ section_obj=self.pool.get('crm.case.section')
+ if vals.get('context_section_id'):
+ section_obj.write(cr, uid, [vals['context_section_id']], {'member_ids':[(6, 0, ids)]}, context)
+ return res
+
users()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp