openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #06825
lp:~openerp-dev/openobject-addons/trunk-trunk-crm-imp-final-backlog_correction_1605-jam into lp:~openerp-dev/openobject-addons/trunk-trunk-crm-imp-final
Jigar Amin - OpenERP has proposed merging lp:~openerp-dev/openobject-addons/trunk-trunk-crm-imp-final-backlog_correction_1605-jam into lp:~openerp-dev/openobject-addons/trunk-trunk-crm-imp-final.
Requested reviews:
Bhumika (OpenERP) (sbh-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-trunk-crm-imp-final-backlog_correction_1605-jam/+merge/61107
Changes :
+ [IMP] crm : reorder convert to opportunity at the bottom (of the three button).
+ [IMP] crm : convert to opportunity possible in all state.
+ [IMP] crm : remove the visibility of the draft from phone-call.
+ [IMP] crm : added partner field to schedule call wizard for info.
Kindly Review this
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-trunk-crm-imp-final-backlog_correction_1605-jam/+merge/61107
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-trunk-crm-imp-final.
=== modified file 'crm/crm.py'
--- crm/crm.py 2011-04-20 15:29:55 +0000
+++ crm/crm.py 2011-05-16 12:53:23 +0000
@@ -331,8 +331,6 @@
if not case.user_id:
data['user_id'] = uid
self.write(cr, uid, case.id, data)
-
-
self._action(cr, uid, cases, 'open')
return True
@@ -423,11 +421,14 @@
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
+ state = 'draft'
+ if 'crm.phonecall' in args:
+ state = 'open'
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self._history(cr, uid, cases, _('Draft'))
- self.write(cr, uid, ids, {'state': 'draft', 'active': True})
- self._action(cr, uid, cases, 'draft')
+ self.write(cr, uid, ids, {'state': state, 'active': True})
+ self._action(cr, uid, cases, state)
return True
def remind_partner(self, cr, uid, ids, context=None, attach=False):
=== modified file 'crm/crm_phonecall.py'
--- crm/crm_phonecall.py 2011-04-20 09:17:39 +0000
+++ crm/crm_phonecall.py 2011-05-16 12:53:23 +0000
@@ -50,13 +50,12 @@
'company_id': fields.many2one('res.company', 'Company'),
'description': fields.text('Description'),
'state': fields.selection([
- ('draft', 'Draft'),
('open', 'Todo'),
('cancel', 'Cancelled'),
('done', 'Held'),
('pending', 'Pending'),
], 'State', size=16, readonly=True,
- help='The state is set to \'Draft\', when a case is created.\
+ help='The state is set to \'Todo\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
@@ -126,14 +125,14 @@
return res
def case_reset(self, cr, uid, ids, *args):
- """Resets case as draft
+ """Resets case as Todo
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current userâs ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
- res = super(crm_phonecall, self).case_reset(cr, uid, ids, args)
+ res = super(crm_phonecall, self).case_reset(cr, uid, ids, args, 'crm.phonecall')
self.write(cr, uid, ids, {'duration': 0.0})
return res
=== modified file 'crm/crm_phonecall_view.xml'
--- crm/crm_phonecall_view.xml 2011-04-27 09:22:02 +0000
+++ crm/crm_phonecall_view.xml 2011-05-16 12:53:23 +0000
@@ -35,16 +35,16 @@
<field name="create_date" invisible="1"/>
<button string="Convert to Opportunity"
name="%(phonecall2opportunity_act)d"
- states="draft,open,pending"
+ states="open,pending"
icon="gtk-index"
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
<button string="Meeting"
- states="draft,open,pending" icon="gtk-redo"
+ states="open,pending" icon="gtk-redo"
name="action_make_meeting" type="object" />
<field name="state"/>
- <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
- <button name="case_open" string="Todo" states="draft,pending" type="object" icon="gtk-go-forward"/>
- <button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
+ <button name="case_cancel" string="Cancel" states="open,pending" type="object" icon="gtk-cancel"/>
+ <button name="case_open" string="Todo" states="pending" type="object" icon="gtk-go-forward"/>
+ <button name="case_close" string="Held" states="open,pending" type="object" icon="gtk-jump-to"/>
<button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
</tree>
</field>
@@ -67,15 +67,15 @@
<field name="date"/>
<field name="user_id"/>
<field name="section_id" colspan="1" widget="selection" />
+ <button string="Schedule Other Call"
+ icon="terp-call-start"
+ name="%(phonecall_to_phonecall_act)d"
+ type="action" />
+ <label colspan="6" string=""/>
<button string="Convert to Opportunity"
name="%(phonecall2opportunity_act)d"
icon="gtk-index" type="action"
- attrs="{'invisible':['|', ('opportunity_id','!=',False), ('state','=','done')]}" />
- <label colspan="6" string=""/>
- <button string="Schedule Other Call"
- icon="terp-call-start"
- name="%(phonecall_to_phonecall_act)d"
- type="action" />
+ attrs="{'invisible':[('opportunity_id','!=',False)]}" />
</group>
@@ -108,17 +108,17 @@
<group col="8" colspan="4">
<field name="state" select="1" />
<button name="case_cancel" string="Cancel"
- states="draft,open,pending" type="object"
+ states="open,pending" type="object"
icon="gtk-cancel" />
<button name="case_open" string="Todo"
- states="draft,pending" type="object"
+ states="pending" type="object"
icon="gtk-go-forward" />
<button name="case_pending" string="Not Held"
states="open" type="object" icon="gtk-media-pause" />
<button name="case_close" string="Held"
- states="open,draft,pending" type="object"
+ states="open,pending" type="object"
icon="gtk-jump-to" />
- <button name="case_reset" string="Reset to Draft"
+ <button name="case_reset" string="Reset to Todo"
states="cancel" type="object"
icon="gtk-convert" />
</group>
@@ -183,7 +183,7 @@
<search string="Search Phonecalls">
<filter icon="terp-check" string="Current"
name="current"
- domain="[('state','in', ('draft','open','pending'))]"/>
+ domain="[('state','in', ('open','pending'))]"/>
<filter icon="terp-go-today" string="Today"
domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
=== modified file 'crm/wizard/crm_opportunity_to_phonecall.py'
--- crm/wizard/crm_opportunity_to_phonecall.py 2011-04-27 09:22:02 +0000
+++ crm/wizard/crm_opportunity_to_phonecall.py 2011-05-16 12:53:23 +0000
@@ -33,6 +33,7 @@
_columns = {
'name' : fields.char('Call summary', size=64, required=True, select=1),
'user_id' : fields.many2one('res.users', "Assign To"),
+ 'partner_id' : fields.many2one('res.partner', "Partner"),
'date': fields.datetime('Date'),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
@@ -71,6 +72,8 @@
res.update({'section_id': opp.section_id and opp.section_id.id or False})
if 'categ_id' in fields:
res.update({'categ_id': categ_id})
+ if 'partner_id' in fields:
+ res.update({'partner_id': opp.partner_id and opp.partner_id.id or False})
return res
def action_cancel(self, cr, uid, ids, context=None):
=== modified file 'crm/wizard/crm_opportunity_to_phonecall_view.xml'
--- crm/wizard/crm_opportunity_to_phonecall_view.xml 2011-04-27 09:22:02 +0000
+++ crm/wizard/crm_opportunity_to_phonecall_view.xml 2011-05-16 12:53:23 +0000
@@ -16,7 +16,8 @@
<field name="name"/>
<field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
<newline/>
- <field name="user_id" />
+ <field name="user_id" />
+ <field name="partner_id" readonly="True"/>
<field name="section_id" widget="selection" />
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
<separator string="" colspan="4"/>
Follow ups