Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-crm_lead-mma
into lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-crm_lead-mma/+merge/101072
Hello,
crm: I have improved state filed based on stage for kanban view
Thanks.
mma
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-crm_lead-mma/+merge/101072
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-crm_lead-mma
into lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban.
=== modified file 'crm/crm.py'
--- crm/crm.py 2012-03-21 06:53:19 +0000
+++ crm/crm.py 2012-04-06 09:24:20 +0000
@@ -71,12 +71,18 @@
'on_change': fields.boolean('Change Probability Automatically', help="Setting this stage will change the probability automatically on the opportunity."),
'requirements': fields.text('Requirements'),
'section_ids':fields.many2many('crm.case.section', 'section_stage_rel', 'stage_id', 'section_id', 'Sections'),
+ 'state': fields.selection(AVAILABLE_STATES, 'State', size=16,
+ help='The state is set to \'Draft\', 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\'.'),
'case_default': fields.boolean('Common to All Teams', help="If you check this field, this stage will be proposed by default on each sales team. It will not assign this stage to existing teams."),
}
_defaults = {
'sequence': lambda *args: 1,
'probability': lambda *args: 0.0,
+ 'state': lambda *a: 'draft',
}
class crm_case_section(osv.osv):
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2012-03-30 09:08:37 +0000
+++ crm/crm_lead.py 2012-04-06 09:24:20 +0000
@@ -175,11 +175,7 @@
multi='day_open', type="float", store=True),
'day_close': fields.function(_compute_day, string='Days to Close', \
multi='day_close', type="float", store=True),
- 'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
- help='The state is set to \'Draft\', 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\'.'),
+ 'state': fields.related('stage_id','state', type='char', selection=crm.AVAILABLE_STATES, string="State", store=True, readonly=True),
'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
'subjects': fields.function(_get_email_subject, fnct_search=_history_search, string='Subject of Email', type='char', size=64),
=== modified file 'crm/crm_lead_view.xml'
--- crm/crm_lead_view.xml 2012-03-30 12:28:48 +0000
+++ crm/crm_lead_view.xml 2012-04-06 09:24:20 +0000
@@ -503,8 +503,8 @@
<separator colspan="4" string="Details"/>
<field name="description" nolabel="1" colspan="4"/>
- <separator colspan="4"/>
- <group col="10" colspan="4">
+ <separator colspan="4" groups="base.group_no_one"/>
+ <group col="10" colspan="4" groups="base.group_no_one">
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel" states="draft" type="object" icon="gtk-cancel" />
<button name="case_mark_lost" string="Mark Lost" states="open,pending" type="object" icon="gtk-cancel" />
@@ -618,7 +618,7 @@
<field name="user_id"/>
<field name="priority" invisible="1"/>
<field name="categ_id" invisible="1"/>
- <field name="state"/>
+ <field name="state" groups="base.group_no_one"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" />
<button name="case_pending" string="Pending" states="open,draft" type="object" icon="gtk-media-pause" />
<button name="case_mark_lost" string="Lost" states="open,pending" type="object" icon="gtk-cancel" />
@@ -638,15 +638,15 @@
<filter icon="terp-check"
string="New" help="New Opportunities"
name="new"
- domain="[('state','=','draft')]"/>
+ domain="[('state','=','draft')]" groups="base.group_no_one"/>
<filter icon="terp-camera_test"
string="Open" help="Open Opportunities"
name="open"
- domain="[('state','=','open')]"/>
+ domain="[('state','=','open')]" groups="base.group_no_one"/>
<filter icon="terp-gtk-media-pause"
string="Pending" help="Pending Opportunities"
name="pending"
- domain="[('state','=','pending')]"/>
+ domain="[('state','=','pending')]" groups="base.group_no_one"/>
<separator orientation="vertical"/>
<field name="name" string="Opportunity / Customer"
filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/>
@@ -679,7 +679,7 @@
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}" />
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}" groups="base.group_extended"/>
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
- <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+ <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
<separator orientation="vertical" />
<filter string="Creation" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
<filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}" />
=== modified file 'crm/crm_view.xml'
--- crm/crm_view.xml 2012-03-26 11:48:47 +0000
+++ crm/crm_view.xml 2012-04-06 09:24:20 +0000
@@ -162,6 +162,7 @@
<field name="on_change"/>
<field name="case_default"/>
<field name="sequence"/>
+ <field name="state"/>
</group>
<separator string="Requirements" colspan="4"/>
<field name="requirements" nolabel="1" colspan="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