From ee82a022a9c29ae1993bf41817f7791819a68da9 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 16 Mar 2010 15:39:58 +0100 Subject: [PATCH 1/6] bugfix default value bzr revid: fp@tinyerp.com-20100316143958-h9rcft2obcpngf0l --- addons/crm/crm_phonecall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py index 1c0f4e1df4a..6a65195a38b 100644 --- a/addons/crm/crm_phonecall.py +++ b/addons/crm/crm_phonecall.py @@ -42,7 +42,7 @@ class crm_phonecall(osv.osv): 'opportunity_id':fields.many2one ('crm.opportunity', 'Opportunity'), } _defaults = { - 'date': lambda *a: time.strftime('%Y-%m-%d') + 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S') } crm_phonecall() From 8d652b65211990a773f8178df2d495a79d9ab118 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 16 Mar 2010 16:00:17 +0100 Subject: [PATCH 2/6] improvement bzr revid: fp@tinyerp.com-20100316150017-5h1mmdi1ruv30qcy --- addons/account/invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 47561e57aaf..e79774e36e4 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -1136,7 +1136,8 @@ class account_invoice_line(osv.osv): 'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]), 'note': fields.text('Notes', translate=True), 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), - 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company',store=True) + 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company',store=True), + 'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True) } _defaults = { 'quantity': lambda *a: 1, From 2eca4b9e6646777109a9562baeef010098f670aa Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Tue, 16 Mar 2010 17:24:54 +0100 Subject: [PATCH 3/6] [FIX] crm: Add the function_name field in the crm.lead object, this field will contain a text instead of a function [IMP] project_issue: Add the worklogs (timesheet_lines) on the object and modify the layout of the screen bzr revid: stephane@openerp.com-20100316162454-q8oqs0hono5b2mvj --- addons/crm/crm_lead.py | 1 + addons/crm/crm_lead_view.xml | 2 +- .../crm/wizard/wizard_crm_new_send_email.py | 2 +- addons/product/__init__.py | 1 + addons/project_issue/__terp__.py | 6 +- addons/project_issue/project_issue.py | 29 +- addons/project_issue/project_issue_view.xml | 558 +++++++++--------- 7 files changed, 316 insertions(+), 283 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index da9f2ed7230..aaac80d5ba8 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -39,6 +39,7 @@ class crm_lead(osv.osv): 'user_id': fields.many2one('res.users', 'Salesman'), 'referred': fields.char('Referred By', size=32), + 'function_name' : fields.char('Function', size=64), } _defaults = { 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c), diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 61763ce41ce..3ea40e417f0 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -69,7 +69,7 @@ - + diff --git a/addons/crm/wizard/wizard_crm_new_send_email.py b/addons/crm/wizard/wizard_crm_new_send_email.py index 0114ac9408f..b9a43546132 100644 --- a/addons/crm/wizard/wizard_crm_new_send_email.py +++ b/addons/crm/wizard/wizard_crm_new_send_email.py @@ -74,7 +74,7 @@ def _mass_mail_send(self, cr, uid, data, context): case = case_pool.browse(cr,uid,data['ids'])[0] case_pool.write(cr, uid, [case.id], { - 'som': False, + #'som': False, 'canal_id': False, }) emails = [data['form']['to']] + (data['form']['cc'] or '').split(',') diff --git a/addons/product/__init__.py b/addons/product/__init__.py index 3052a02d212..620c480a036 100644 --- a/addons/product/__init__.py +++ b/addons/product/__init__.py @@ -24,5 +24,6 @@ import report import partner import wizard import company +import bug # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_issue/__terp__.py b/addons/project_issue/__terp__.py index 05a94ba809b..03ec9e22285 100644 --- a/addons/project_issue/__terp__.py +++ b/addons/project_issue/__terp__.py @@ -30,7 +30,11 @@ """, 'author': 'Tiny', 'website': 'http://www.openerp.com', - 'depends': ['crm','project'], + 'depends': [ + 'crm', + 'project', + 'hr_timesheet_sheet', + ], 'init_xml': [ 'project_issue_data.xml' ], diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 48492f44675..d9a4cffdcf9 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -39,8 +39,6 @@ class project_issue(osv.osv): _columns = { 'date_closed': fields.datetime('Closed', readonly=True), 'date': fields.datetime('Date'), - '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."), 'categ_id': fields.many2one('crm.case.categ','Category', domain="[('object_id.model', '=', 'crm.project.bug')]"), @@ -51,8 +49,13 @@ class project_issue(osv.osv): 'partner_phone': fields.char('Phone', size=32), 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"), 'project_id':fields.many2one('project.project', 'Project'), - 'duration': fields.float('Duration'), - 'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]") + 'duration': fields.float('Duration'), + 'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]"), + 'assigned_to' : fields.many2one('res.users', 'Assigned to'), + 'timesheet_ids' : fields.one2many('hr.analytic.timesheet', 'issue_id', 'Timesheets'), + 'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account', + domain="[('partner_id', '=', partner_id)]", + required=True), } def _get_project(self, cr, uid, context): user = self.pool.get('res.users').browse(cr,uid,uid, context=context) @@ -87,5 +90,23 @@ class project_issue(osv.osv): _defaults = { 'project_id':_get_project, } + project_issue() +class account_analytic_line(osv.osv): + _inherit = 'account.analytic.line' + _columns = { + 'create_date' : fields.datetime('Create Date', readonly=True), + } + +account_analytic_line() + +class hr_analytic_issue(osv.osv): + _inherit = 'hr.analytic.timesheet' + + _columns = { + 'issue_id' : fields.many2one('project.issue', 'Issue'), + } + +hr_analytic_issue() + diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 2a82ef783d3..b74e73efc8d 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -2,295 +2,301 @@ - # ------------------------------------------------------ - # Issue Categories - # ------------------------------------------------------ + + Issue Categories + crm.case.categ + form + + [('object_id.model', '=', 'project.issue')] + {'object_id':'project.issue'} + + + Issue Stages + crm.case.stage + form + + [('object_id.model', '=', 'project.issue')] + {'object_id':'project.issue'} + + - - Issue Categories - crm.case.categ - form - - [('object_id.model', '=', 'project.issue')] - {'object_id':'project.issue'} - - # ------------------------------------------------------ - # Stage - # ------------------------------------------------------ - - Issue Stages - crm.case.stage - form - - [('object_id.model', '=', 'project.issue')] - {'object_id':'project.issue'} - - - - - Project Issue Tracker Form - project.issue - form - -
- - - - - - - - -