diff --git a/addons/crm/crm.py b/addons/crm/crm.py index edf38c4fb90..092cf232fe2 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -219,10 +219,10 @@ class crm_case(osv.osv): 'id': fields.integer('ID', readonly=True), 'name': fields.char('Description', size=1024, required=True), '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('Your action'), + '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_cc': fields.char('Watchers Emails', size=252 , help="These people will receive a copy of the future" \ + '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, string='Latest E-Mail', type='text'), @@ -230,7 +230,6 @@ class crm_case(osv.osv): 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', domain="[('partner_id','=',partner_id)]"), 'create_date': fields.datetime('Creation Date' ,readonly=True), 'write_date': fields.datetime('Update Date' ,readonly=True), - 'partner_phone': fields.char('Phone', size=32), 'date_deadline': fields.date('Deadline'), 'user_id': fields.many2one('res.users', 'Responsible'), 'history_line': fields.function(_get_log_ids, method=True, type='one2many', multi="history_line", relation="crm.case.history", string="Communication"), @@ -427,8 +426,7 @@ class crm_case(osv.osv): if not part: return {'value':{'partner_address_id': False, 'email_from': False, - 'partner_phone': False, - 'partner_name2': False}} + }} addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact']) data = {'partner_address_id': addr['contact']} data.update(self.onchange_partner_address_id(cr, uid, ids, addr['contact'])['value']) @@ -440,8 +438,6 @@ class crm_case(osv.osv): return {'value': {'email_from': False, 'partner_name2': False}} address= self.pool.get('res.partner.address').browse(cr, uid, add) data['email_from'] = address.email - data['partner_phone'] = address.phone or '' - data['partner_name2'] = address.name or '' return {'value': data} def case_close(self, cr, uid, ids, *args): diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index c6b6b0df55c..0edc0f3001b 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -26,42 +26,26 @@ class crm_lead(osv.osv): _name = "crm.lead" _description = "Leads Cases" _order = "id desc" - _inherit = 'crm.case' + _inherit = ['res.partner.address','crm.case'] _columns = { - 'name': fields.char('Lead Subject', size=64), - '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', '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')]"), + 'partner_name': fields.char("Lead Name", size=64), - 'partner_name': fields.char("Lead Name", size=64), - 'function': fields.many2one('res.partner.function', 'Function'), - 'partner_address': fields.char("Address", size=64), - 'partner_contact': fields.char('Contact', size=64), - 'partner_phone': fields.char('Phone', size=32), - 'partner_mobile': fields.char('Mobile', size=32), + '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'), - 'street': fields.char('Street', size=128), - 'street2': fields.char('Street2', size=128), - 'zip': fields.char('Zip', change_default=True, size=24), - 'city': fields.char('City', size=128), - 'state_id': fields.many2one("res.country.state", 'Fed. State', domain="[('country_id','=',country_id)]"), - 'country_id': fields.many2one('res.country', 'Country'), - - '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."), - 'planned_revenue': fields.float('Planned Revenue'), - 'planned_cost': fields.float('Planned Costs'), - '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), + 'user_id': fields.many2one('res.users', 'Salesman'), + 'referred': fields.char('Referred By', size=32), } crm_lead() diff --git a/addons/project_gtd/project_gtd.py b/addons/project_gtd/project_gtd.py index e9fae81dd78..d53391d620b 100644 --- a/addons/project_gtd/project_gtd.py +++ b/addons/project_gtd/project_gtd.py @@ -192,9 +192,6 @@ class project_task(osv.osv): context_id_info['context_id']['selection'] = attrs_sel res['fields'].update(context_id_info) return res - - # Override read for using this method if context set !!! - #_order = "((55-ascii(coalesce(priority,'2')))*2 + coalesce((date_start::date-current_date)/2,8))" project_task() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_gtd/project_gtd_demo.xml b/addons/project_gtd/project_gtd_demo.xml index 73584a57c0f..06deb221f36 100644 --- a/addons/project_gtd/project_gtd_demo.xml +++ b/addons/project_gtd/project_gtd_demo.xml @@ -1,46 +1,46 @@ - + - - Office - 0 - - - - Travel - 2 - - - - Car - 1 - - - - Home - 3 - - + + Office + 0 + + + + Travel + 2 + + + + Car + 1 + + + + Home + 3 + + - - Daily - terp-hr - - - Weekly - terp-partner - - - Monthly - terp-product - - - Long Term - terp-project - - - + + Today + terp-hr + + + This Week + terp-partner + + + This Month + terp-product + + + Long Term + terp-project + + + 38.0 38.0 @@ -67,44 +67,44 @@ 24.0 24.0 - - - - Validation + latest modifications. - - - - 38.0 - 38.0 - - - - - - Specific adaptation to MRP - - - - 40 - 32.0 - 32.0 - - - - - In house training - - - - 50 - 24.0 - 24.0 - - + Validation + latest modifications. - + + 38.0 + 38.0 + + + + + + Specific adaptation to MRP + + + + 40 + 32.0 + 32.0 + + + + + In house training + + + + 50 + 24.0 + 24.0 + + + + + Validation + latest modifications. + + +