diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 092cf232fe2..589e26d5521 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -62,15 +62,15 @@ icon_lst = {
class crm_case_section(osv.osv):
_name = "crm.case.section"
- _description = "Case Section"
+ _description = "Sales Teams"
_order = "name"
_columns = {
- 'name': fields.char('Case Section',size=64, required=True, translate=True),
- 'code': fields.char('Section Code',size=8),
- 'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the case section without removing it."),
+ 'name': fields.char('Sales Team',size=64, required=True, translate=True),
+ 'code': fields.char('Code',size=8),
+ 'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the sales team without removing it."),
'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"),
'user_id': fields.many2one('res.users', 'Responsible User'),
- 'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by Open ERP about cases in this section"),
+ 'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by Open ERP about cases in this sales team"),
'parent_id': fields.many2one('crm.case.section', 'Parent Section'),
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Sections'),
}
@@ -112,7 +112,7 @@ class crm_case_categ(osv.osv):
_columns = {
'name': fields.char('Case Category Name', size=64, required=True, translate=True),
- 'section_id': fields.many2one('crm.case.section', 'Case Section'),
+ 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'object_id': fields.many2one('ir.model','Object Name'),
}
def _find_object_id(self, cr, uid, context=None):
@@ -131,7 +131,7 @@ class crm_case_resource_type(osv.osv):
_rec_name = "name"
_columns = {
'name': fields.char('Case Resource Type', size=64, required=True, translate=True),
- 'section_id': fields.many2one('crm.case.section', 'Case Section'),
+ 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'object_id': fields.many2one('ir.model','Object Name'),
}
def _find_object_id(self, cr, uid, context=None):
@@ -151,7 +151,7 @@ class crm_case_stage(osv.osv):
_order = "sequence"
_columns = {
'name': fields.char('Stage Name', size=64, required=True, translate=True),
- 'section_id': fields.many2one('crm.case.section', 'Case Section'),
+ 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
'object_id': fields.many2one('ir.model','Object Name'),
'probability': fields.float('Probability (%)', required=True),
@@ -221,7 +221,7 @@ class crm_case(osv.osv):
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the case without removing it."),
'description': fields.text('Description'),
'section_id': fields.many2one('crm.case.section', 'Sales Team', select=True, help='Sales team to which Case belongs to. Define Responsible user and Email account for mail gateway.'),
- 'email_from': fields.char('Partner Email', size=128, help="These people will receive email."),
+ 'email_from': fields.char('Email', size=128, help="These people will receive email."),
'email_cc': fields.text('Watchers Emails', size=252 , help="These people will receive a copy of the future" \
" communication between partner and users by email"),
'email_last': fields.function(_email_last, method=True,
@@ -278,6 +278,7 @@ class crm_case(osv.osv):
'state': lambda *a: 'draft',
'date_deadline': lambda *a:(datetime.today() + timedelta(days=3)).strftime('%Y-%m-%d %H:%M:%S'),
'section_id': _get_section,
+ 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c),
}
_order = 'date_deadline desc, date desc,id desc'
diff --git a/addons/crm/crm_claims_view.xml b/addons/crm/crm_claims_view.xml
index cfaaacb05ac..b82f57b88ca 100644
--- a/addons/crm/crm_claims_view.xml
+++ b/addons/crm/crm_claims_view.xml
@@ -8,25 +8,25 @@
Claim Categories
crm.case.categ
form
-
- [('object_id.model', '=', 'crm.claim')]
- {'object_id':'crm.claim'}
+
+ [('object_id.model', '=', 'crm.claim')]
+ {'object_id':'crm.claim'}
# ------------------------------------------------------
# Stages
# ------------------------------------------------------
-
- Claim Stages
- crm.case.stage
- form
-
- [('object_id.model', '=', 'crm.claim')]
- {'object_id':'crm.claim'}
-
-
+
+ Claim Stages
+ crm.case.stage
+ form
+
+ [('object_id.model', '=', 'crm.claim')]
+ {'object_id':'crm.claim'}
+
+
-
+
CRM - Claims Tree
crm.claim
@@ -59,35 +59,35 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -131,9 +131,9 @@
+ string="Add a CC"
+ name="%(crm.action_view_crm_email_add_cc_wizard)d"
+ icon="gtk-add" type="action"/>
@@ -167,17 +167,17 @@
-
- CRM -Graph
- crm.claim
- graph
-
-
-
-
-
-
-
+
+ CRM -Graph
+ crm.claim
+ graph
+
+
+
+
+
+
+
@@ -186,35 +186,32 @@
search
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
-
+
+
diff --git a/addons/crm/crm_helpdesk_view.xml b/addons/crm/crm_helpdesk_view.xml
index ec00259f9a9..06d072d6760 100644
--- a/addons/crm/crm_helpdesk_view.xml
+++ b/addons/crm/crm_helpdesk_view.xml
@@ -160,34 +160,31 @@
search
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 0edc0f3001b..da9f2ed7230 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -25,27 +25,22 @@ import crm
class crm_lead(osv.osv):
_name = "crm.lead"
_description = "Leads Cases"
- _order = "id desc"
+ _order = "priority desc, id desc"
_inherit = ['res.partner.address','crm.case']
_columns = {
- 'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
- 'type_id': fields.many2one('crm.case.resource.type', 'Lead Type Name', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]"),
+ 'categ_id': fields.many2one('crm.case.categ', 'Lead Source', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
+ 'type_id': fields.many2one('crm.case.resource.type', 'Lead Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]"),
'partner_name': fields.char("Lead Name", size=64),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
- 'probability': fields.float('Probability (%)'),
'date_closed': fields.datetime('Closed', readonly=True),
- 'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
- 'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
- 'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \
- " With each commercial opportunity, you can indicate the canall which is this opportunity source."),
'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]"),
- 'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \
- "the partner mentality in relation to our services.The scale has" \
- "to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
'opportunity_id': fields.many2one('crm.opportunity', 'Opportunity'),
'user_id': fields.many2one('res.users', 'Salesman'),
'referred': fields.char('Referred By', size=32),
}
+ _defaults = {
+ 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
+ }
crm_lead()
diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml
index 1a1b68cdbd9..ab2ad042bce 100644
--- a/addons/crm/crm_lead_demo.xml
+++ b/addons/crm/crm_lead_demo.xml
@@ -8,111 +8,111 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 0684a47c45a..9039f00381c 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -27,45 +27,59 @@
form
@@ -121,12 +152,18 @@
-
+
-
+
+
+
+
+
+
+
-
+
@@ -157,6 +194,18 @@
search
+
+
+
+
+
-
+
+
-
-
-
-
-
+
+
-
+
-
+
+
+
+
+
+
-
diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py
index b32686744e2..98ed99df376 100644
--- a/addons/crm/crm_opportunity.py
+++ b/addons/crm/crm_opportunity.py
@@ -60,5 +60,9 @@ class crm_opportunity(osv.osv):
return {'value':{}}
return {'value':{'probability':stage.probability}}
+ _defaults = {
+ 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.opportunity', context=c),
+ }
+
crm_opportunity()
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index 057a4a5a8ee..8f71bbf0558 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -206,7 +206,7 @@
default="1"
domain="[('state','in',('draft','open'))]"/>
-
+
diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py
index 223bb90db82..bd1cb8e4647 100644
--- a/addons/crm/crm_phonecall.py
+++ b/addons/crm/crm_phonecall.py
@@ -40,5 +40,8 @@ class crm_phonecall(osv.osv):
'date': fields.datetime('Date'),
'opportunity_id':fields.many2one ('crm.opportunity', 'Opportunity'),
}
+ _defaults = {
+ 'date': lambda *a: time.strftime('%Y-%m-%d')
+ }
crm_phonecall()
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index b82367b0f8f..ff79a289d34 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -404,7 +404,7 @@
-
+