From 51647e7515fee1b6e2131cf082ed91bae6c1fd3c Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 27 Mar 2012 12:39:40 +0530 Subject: [IMP] add bollean field in project.project for some module bzr revid: sgo@tinyerp.com-20120327070940-238ejuwcrmcz6ax3 --- addons/project/project.py | 1 + addons/project/project_view.xml | 3 ++- addons/project_issue/project_issue.py | 3 ++- addons/project_issue/project_issue_menu.xml | 2 +- addons/project_issue/project_issue_view.xml | 3 +++ addons/project_long_term/project_long_term.py | 1 + addons/project_long_term/project_long_term_view.xml | 11 +++++++++++ addons/project_timesheet/project_timesheet.py | 3 +++ addons/project_timesheet/project_timesheet_view.xml | 5 +++++ 9 files changed, 29 insertions(+), 3 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 9966ad02ee8..48dae1d9880 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -191,6 +191,7 @@ class project(osv.osv): 'warn_header': fields.text('Mail Header', help="Header added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), + 'task': fields.boolean('Task',help = "If you check this field tasks appears in kanban view"), } def _get_type_common(self, cr, uid, context): ids = self.pool.get('project.task.type').search(cr, uid, [('project_default','=',1)], context=context) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 249bb388117..2a6a7e0bfbc 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -19,11 +19,12 @@ form
- + + diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index b950bfd0b34..a69a944675c 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -489,7 +489,8 @@ class project(osv.osv): _inherit = "project.project" _columns = { 'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), - 'reply_to' : fields.char('Reply-To Email Address', size=256) + 'reply_to' : fields.char('Reply-To Email Address', size=256), + 'issues' : fields.boolean('Issues',help = "If you check this field issues are appears in kanban view") } def _check_escalation(self, cr, uid, ids, context=None): diff --git a/addons/project_issue/project_issue_menu.xml b/addons/project_issue/project_issue_menu.xml index 086a0c43de3..5023891f6ba 100644 --- a/addons/project_issue/project_issue_menu.xml +++ b/addons/project_issue/project_issue_menu.xml @@ -53,7 +53,7 @@ view_mode="tree,form,calendar,graph" view_type="form"/> - diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 7b753bb988d..e7230ccdaf6 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -370,6 +370,9 @@ form + + + diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 612bd784bb0..13efe602f79 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -217,6 +217,7 @@ class project(osv.osv): _inherit = "project.project" _columns = { 'phase_ids': fields.one2many('project.phase', 'project_id', "Project Phases"), + 'phase' : fields.boolean('Phase',help = "If you check this field Phases are appears in kanban view") } def schedule_phases(self, cr, uid, ids, context=None): context = context or {} diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 9800c209dd5..78e19b051ff 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -98,6 +98,17 @@ # Project Phase # ------------------------------------------------------ + + Inherit project form : Phase + project.project + form + + + + + + + project.phase.form project.phase diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index db7066505e1..30914410a82 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -29,6 +29,9 @@ from tools.translate import _ class project_project(osv.osv): _inherit = 'project.project' + _columns = { + 'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view") + } def onchange_partner_id(self, cr, uid, ids, part=False, context=None): res = super(project_project, self).onchange_partner_id(cr, uid, ids, part, context) if part and res and ('value' in res): diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 0412bdabb38..31c5b451fdf 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -7,6 +7,11 @@ form + + + + + -- cgit v1.2.3 From 92be2313a8f9218bf5971335fa0734e4bffb88b8 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 27 Mar 2012 17:47:34 +0530 Subject: [IMP]project menu changed,improved form view. bzr revid: kbh@tinyerp.com-20120327121734-92s8h2m1983u5a3t --- addons/project/project_view.xml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index e937b9225a7..9de8757b4fd 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -31,11 +31,20 @@ - + + + + + + + + - + + + @@ -43,12 +52,6 @@ - - - - - - @@ -630,10 +633,10 @@ - + - + -- cgit v1.2.3 From 284b6dc267c7081003121d7c6e8a949b6dc6dd65 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 10:25:31 +0530 Subject: [IMP]:improved kanban view bzr revid: apa@tinyerp.com-20120328045531-1cykq8x0gryefuv2 --- addons/project/__openerp__.py | 1 + addons/project/project_view.xml | 55 +++++++++++++++++++++++++++-- addons/project/static/src/css/project.css | 57 +++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 addons/project/static/src/css/project.css diff --git a/addons/project/__openerp__.py b/addons/project/__openerp__.py index 96a7dc4f28f..be4cc607b29 100644 --- a/addons/project/__openerp__.py +++ b/addons/project/__openerp__.py @@ -70,6 +70,7 @@ Dashboard for project members that includes: 'installable': True, 'auto_install': False, 'application': True, + 'css': ['static/src/css/project.css'], 'certificate': '0075116868317', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 8450dafa5f1..a48b394b1de 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -161,6 +161,57 @@ + + + project.project.kanban + project.project + kanban + + + + + + + +
+
+
+ + +
+ Manager
+
+ + Deadline
+
+
+
+
+

+ + + +
+
+ hrs + + hrs +
+
+ + + + +
+ +
+
+
+
+ +
+
+
project.project.gantt @@ -177,8 +228,8 @@ project.project form [] - tree,form,gantt - + kanban,tree,form,gantt + {} A project contains a set of tasks or issues that will be performed by your resources assigned to it. A project can be hierarchically structured, as a child of a Parent Project. This allows you to design large project structures with different phases spread over the project duration cycle. Each user can set his default project in his own preferences to automatically filter the tasks or issues he usually works on. If you choose to invoice the time spent on a project task, you can find project tasks to be invoiced in the billing section. diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css new file mode 100644 index 00000000000..e8ec4195add --- /dev/null +++ b/addons/project/static/src/css/project.css @@ -0,0 +1,57 @@ + +.oe_project_border{ + border-right: groove; +} + +.progress{ + text-align: le; + width: auto; +} +.oe_project_font{ + color: #000000; + +} +.sequence { +border-bottom: groove; +font-size: 20px; + +} + +.invoiced{ + font-size: 10px; + +} +.oe_project { +width: 70px; +} +.user { +color:rgb(192,192,192); +font-size: 10px; +} +.manager { +font-size: 9px; +} + +.oe_project_buttons { + display: inline-block; + padding: 0px 0px; + background-color: transparent; + border: hidden; + color: #0000FF; + +} + +.oe_project_buttons:hover { + cursor: pointer; + background-size: 100% 100%; +} + +.oe_project_font1{ + + -webkit-margin-before: 0em; +-webkit-margin-after: 0em; +} + +div.oe_fold_column{ + padding:0px !important; +} \ No newline at end of file -- cgit v1.2.3 From 5347fb2f2e3f140dcd9b8b26f7bd519119b8ca78 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 11:34:24 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328060424-layr7zdvr7lr04k3 --- addons/project/project_view.xml | 5 +---- addons/project/static/src/img/tasks.png | Bin 0 -> 2545 bytes 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 addons/project/static/src/img/tasks.png diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index a48b394b1de..8302c8a8f1f 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -188,9 +188,6 @@

- - -

hrs @@ -201,7 +198,7 @@
- + ()
diff --git a/addons/project/static/src/img/tasks.png b/addons/project/static/src/img/tasks.png new file mode 100644 index 00000000000..5c5073b1633 Binary files /dev/null and b/addons/project/static/src/img/tasks.png differ -- cgit v1.2.3 From bc1c67526b52a52e7d4d2863c34076d683632706 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 28 Mar 2012 11:35:42 +0530 Subject: [IMP]improve kanban view bzr revid: sgo@tinyerp.com-20120328060542-v1yizvsrujt0ane7 --- addons/project/project.py | 48 +++++++++++++++++++++++++++++++++++++++++ addons/project/project_view.xml | 13 ++++++++++- 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/addons/project/project.py b/addons/project/project.py index 48dae1d9880..21e0c8f6011 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -154,6 +154,14 @@ class project(osv.osv): if proj.tasks: raise osv.except_osv(_('Operation Not Permitted !'), _('You cannot delete a project containing tasks. I suggest you to desactivate it.')) return super(project, self).unlink(cr, uid, ids, *args, **kwargs) + + def _open_task(self, cr, uid, ids, field_name, arg, context=None): + open_task={} + task_pool=self.pool.get('project.task') + for id in ids: + task_ids = task_pool.search(cr, uid, [('project_id', '=', id)]) + open_task[id] = len(task_ids) + return open_task _columns = { 'complete_name': fields.function(_complete_name, string="Project Name", type='char', size=250), @@ -192,7 +200,47 @@ class project(osv.osv): 'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'task': fields.boolean('Task',help = "If you check this field tasks appears in kanban view"), + 'open_task': fields.function(_open_task , type='integer',string="Open Tasks"), } + + def open_tasks(self, cr, uid, ids, context=None): + #Open the View for the Tasks for the project + """ + This opens Tasks views + @return :Dictionary value for task view + """ + if context is None: + context = {} + value = {} + data_obj = self.pool.get('ir.model.data') + for project in self.browse(cr, uid, ids, context=context): + # Get Task views + tree_view = data_obj.get_object_reference(cr, uid, 'project', 'view_task_tree2') + form_view = data_obj.get_object_reference(cr, uid, 'project', 'view_task_form2') + calander_view = data_obj.get_object_reference(cr, uid, 'project', 'view_task_calendar') + search_view = data_obj.get_object_reference(cr, uid, 'project', 'view_task_search_form') + kanban_view = data_obj.get_object_reference(cr, uid, 'project', 'view_task_kanban') + context.update({ + #'search_default_user_id': uid, + 'search_default_project_id':project.id, + #'search_default_open':1, + }) + value = { + 'name': _('Task'), + 'context': context, + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': 'project.task', + 'view_id': False, + 'domain':[('project_id','in',ids)], + 'context': context, + 'views': [(kanban_view and kanban_view[1] or False, 'kanban'),(tree_view and tree_view[1] or False, 'tree'),(calander_view and calander_view[1] or False, 'calendar'),(form_view and form_view[1] or False, 'form')], + 'type': 'ir.actions.act_window', + 'search_view_id': search_view and search_view[1] or False, + 'nodestroy': True + } + return value + def _get_type_common(self, cr, uid, context): ids = self.pool.get('project.task.type').search(cr, uid, [('project_default','=',1)], context=context) return ids diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index a48b394b1de..f234f3cb072 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -171,6 +171,8 @@ + +
@@ -200,8 +202,17 @@
+
+ + + + - + + +
-- cgit v1.2.3 From c2e0268fad10175e9d0459a5ee189815c77a4e03 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 28 Mar 2012 11:38:12 +0530 Subject: [IMP]improved kanban view for project_issue. bzr revid: kbh@tinyerp.com-20120328060812-narvwer99g5ywqsa --- addons/project/project_view.xml | 3 +- addons/project_issue/project_issue.py | 49 ++++++++++++++++++++++++++++- addons/project_issue/project_issue_view.xml | 18 +++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index a48b394b1de..ad18981fd3b 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -171,6 +171,7 @@ +
@@ -200,7 +201,7 @@
- diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index a69a944675c..ec7b15881a6 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -487,12 +487,59 @@ project_issue() class project(osv.osv): _inherit = "project.project" + + def _compute_issue(self, cr, uid, ids, field_name, arg, context=None): + res={} + issue_pool=self.pool.get('project.issue') + for project in self.browse(cr, uid, ids, context=context): + issues = issue_pool.search(cr, uid, [('project_id','=',project.id)]) + res[project.id] = len(issues) + return res + _columns = { 'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'reply_to' : fields.char('Reply-To Email Address', size=256), - 'issues' : fields.boolean('Issues',help = "If you check this field issues are appears in kanban view") + 'issues' : fields.boolean('Issues',help = "If you check this field issues are appears in kanban view"), + 'open_issues': fields.function(_compute_issue , store=True,type='integer',string="Issue"), } + def open_issues(self, cr, uid, ids, context=None): + #Open the View for the Tasks for the project + """ + This opens Issues views + @return :Dictionary value for issue view + """ + if context is None: + context = {} + value = {} + data_obj = self.pool.get('ir.model.data') + for project in self.browse(cr, uid, ids, context=context): + # Get Task views + tree_view = data_obj.get_object_reference(cr, uid, 'project_issue', 'project_issue_tree_view') + form_view = data_obj.get_object_reference(cr, uid, 'project_issue', 'project_issue_form_view') + calander_view = data_obj.get_object_reference(cr, uid, 'project_issue', 'project_issue_calendar_view') + search_view = data_obj.get_object_reference(cr, uid, 'project_issue', 'view_project_issue_filter') + kanban_view = data_obj.get_object_reference(cr, uid, 'project_issue', 'project_issue_kanban_view') + context.update({ + #'search_default_user_id': uid, + 'search_default_project_id':project.id + }) + value = { + 'name': _('Issue'), + 'context': context, + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': 'project.issue', + 'view_id': False, + 'domain':[('project_id','in',ids)], + 'context': context, + 'views': [(kanban_view and kanban_view[1] or False, 'kanban'),(tree_view and tree_view[1] or False, 'tree'),(calander_view and calander_view[1] or False, 'calendar'),(form_view and form_view[1] or False, 'form')], + 'type': 'ir.actions.act_window', + 'search_view_id': search_view and search_view[1] or False, + 'nodestroy': True + } + return value + def _check_escalation(self, cr, uid, ids, context=None): project_obj = self.browse(cr, uid, ids[0], context=context) if project_obj.project_escalation_id: diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index fb3aba69f66..fb4d87b3da9 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -380,5 +380,23 @@ + + project.project.kanban.inherited + project.project + kanban + + + + + + + + -- cgit v1.2.3 From 99dceac2a6aaafd348e2d78d7f0bbbb44012d097 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 28 Mar 2012 11:55:32 +0530 Subject: [IMP]added image for issue. bzr revid: kbh@tinyerp.com-20120328062532-20i5yqodhtf6mkx9 --- addons/project/static/src/img/bug.png | Bin 0 -> 541 bytes addons/project_issue/project_issue_view.xml | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 addons/project/static/src/img/bug.png diff --git a/addons/project/static/src/img/bug.png b/addons/project/static/src/img/bug.png new file mode 100644 index 00000000000..a18278ff5c4 Binary files /dev/null and b/addons/project/static/src/img/bug.png differ diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index fb4d87b3da9..2a704a3b782 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -388,9 +388,9 @@ -- cgit v1.2.3 From 86c640bd3bcdef3665ae57fba02e9b8c8b98329a Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 12:09:18 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328063918-3g46mk5bz8kmhxw3 --- addons/project/project_view.xml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index a2067d54b60..b8e4bc7f910 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -173,13 +173,15 @@ +
- - + + +
Manager
@@ -200,14 +202,14 @@
+
+ + + + + + - + () - +
- - - + + + - - () - + + () +
-- cgit v1.2.3 From 0b24e4c532ee3af80491cae4ed0f487c92ec8e70 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 12:21:36 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328065136-lf3eczvgtiyr0hb7 --- addons/project/project_view.xml | 4 ++-- addons/project_issue/project_issue_menu.xml | 2 +- addons/project_issue/project_issue_view.xml | 11 ++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index b8e4bc7f910..5b6e5a2c302 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -206,9 +206,9 @@
- + - () + diff --git a/addons/project_issue/project_issue_menu.xml b/addons/project_issue/project_issue_menu.xml index 086a0c43de3..5023891f6ba 100644 --- a/addons/project_issue/project_issue_menu.xml +++ b/addons/project_issue/project_issue_menu.xml @@ -53,7 +53,7 @@ view_mode="tree,form,calendar,graph" view_type="form"/> - diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index e2715813488..5470581314c 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -386,16 +386,17 @@ kanban - + + - + + - () + - + - -- cgit v1.2.3 From 9eefd74b7b5e316de9fc92f5d54de58cb3418510 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 12:37:17 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328070717-z4hkm3ip526h73oj --- addons/project/project_view.xml | 2 +- addons/project_issue/project_issue_view.xml | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 5b6e5a2c302..0b2a01e76a8 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -206,7 +206,7 @@
- + diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 5470581314c..a1b3bf19782 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -386,18 +386,13 @@ kanban - - - - - - - - - + + + + -- cgit v1.2.3 From cce28758f59d2199fb377bec4c50e91815ca6478 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 28 Mar 2012 12:40:59 +0530 Subject: [imp] bzr revid: sgo@tinyerp.com-20120328071059-mrixwtuksf8ezfzq --- addons/project_long_term/project_long_term.py | 50 +++++++++++++++++++++- .../project_long_term/project_long_term_view.xml | 15 +++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 13efe602f79..d54072f1cc7 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -215,10 +215,58 @@ project_user_allocation() class project(osv.osv): _inherit = "project.project" + + def _open_phase(self, cr, uid, ids, field_name, arg, context=None): + open_phase={} + phase_pool=self.pool.get('project.phase') + for id in ids: + phase_ids = phase_pool.search(cr, uid, [('project_id', '=', id)]) + open_phase[id] = len(phase_ids) + return open_phase + _columns = { 'phase_ids': fields.one2many('project.phase', 'project_id', "Project Phases"), - 'phase' : fields.boolean('Phase',help = "If you check this field Phases are appears in kanban view") + 'phase' : fields.boolean('Phase',help = "If you check this field Phases are appears in kanban view"), + 'open_phases' : fields.function(_open_phase , type='integer',string="Open Phases"), + } + + def open_phase(self, cr, uid, ids, context=None): + #Open the View for the Tasks for the project + """ + This opens Tasks views + @return :Dictionary value for task view + """ + if context is None: + context = {} + value = {} + data_obj = self.pool.get('ir.model.data') + for project in self.browse(cr, uid, ids, context=context): + # Get Task views + tree_view = data_obj.get_object_reference(cr, uid, 'project_long_term', 'view_project_phase_list') + form_view = data_obj.get_object_reference(cr, uid, 'project_long_term', 'view_project_phase_form') + calander_view = data_obj.get_object_reference(cr, uid, 'project_long_term', 'view_project_phase_calendar') + search_view = data_obj.get_object_reference(cr, uid, 'project_long_term', 'view_project_phase_search') + context.update({ + #'search_default_user_id': uid, + 'search_default_project_id':project.id, + #'search_default_open':1, + }) + value = { + 'name': _('Phase'), + 'context': context, + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': 'project.phase', + 'view_id': False, + 'domain':[('project_id','in',ids)], + 'context': context, + 'views': [(tree_view and tree_view[1] or False, 'tree'),(calander_view and calander_view[1] or False, 'calendar'),(form_view and form_view[1] or False, 'form')], + 'type': 'ir.actions.act_window', + 'search_view_id': search_view and search_view[1] or False, + 'nodestroy': True + } + return value def schedule_phases(self, cr, uid, ids, context=None): context = context or {} if type(ids) in (long, int,): diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 7044fe7e635..fe91c4c54ea 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -109,6 +109,21 @@ + + + project.project.kanban.inherited + project.project + kanban + + + + + () + + + + + project.phase.form project.phase -- cgit v1.2.3 From 41adc81a05bf57d48149c8706dd1b7041cebba62 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 12:57:59 +0530 Subject: revert project_issue/project_issue_menu.xml bzr revid: apa@tinyerp.com-20120328072759-ery2p77v5rataym2 --- addons/project_issue/project_issue_menu.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_issue/project_issue_menu.xml b/addons/project_issue/project_issue_menu.xml index 5023891f6ba..086a0c43de3 100644 --- a/addons/project_issue/project_issue_menu.xml +++ b/addons/project_issue/project_issue_menu.xml @@ -53,7 +53,7 @@ view_mode="tree,form,calendar,graph" view_type="form"/> - -- cgit v1.2.3 From df11d7174a58c9a8bc343dc3fba8d19cefcb767c Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 14:29:27 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328085927-hzcw0p32tr94i07i --- addons/project/project_view.xml | 29 ++++++++++++---------- addons/project/static/src/css/project.css | 3 ++- addons/project_issue/project_issue_view.xml | 2 +- .../project_long_term/project_long_term_view.xml | 2 +- .../project_timesheet/project_timesheet_view.xml | 2 +- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 571f378b755..060a1777491 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -193,12 +193,15 @@

-
-
- hrs - - hrs -
+ + + + +
+ + + +
@@ -207,13 +210,13 @@ -
- - - - - - + +
+
+ hrs + + hrs +
diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index e8ec4195add..3d8ef752a18 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -38,7 +38,8 @@ font-size: 9px; background-color: transparent; border: hidden; color: #0000FF; - + min-height: 50px; + min-width: 50px;* } .oe_project_buttons:hover { diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index bcb57881e0e..89970f0a77b 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -391,7 +391,7 @@ - + diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index b297be4c2c8..810389da11e 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -121,7 +121,7 @@ - + diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index af5a9a45a3b..304147d7727 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -34,7 +34,7 @@ - + -- cgit v1.2.3 From a48a27a3bb0a1a212c868a175ea831368f02316f Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 15:08:19 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328093819-r7xnzw9o13uuvn58 --- addons/project/project_view.xml | 17 ++++++++--------- addons/project/static/src/css/project.css | 24 +++++++++++++----------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 060a1777491..324ac086227 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -191,19 +191,19 @@
-
+

- +
-
+ - +
- +
diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 3d8ef752a18..0c1140f0386 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -3,6 +3,10 @@ border-right: groove; } +.oe_project_desc{ + width: 270px; +} + .progress{ text-align: le; width: auto; @@ -12,24 +16,22 @@ } .sequence { -border-bottom: groove; -font-size: 20px; - + border-bottom: groove; + font-size: 20px; } .invoiced{ font-size: 10px; - } .oe_project { -width: 70px; + width: 70px; } .user { -color:rgb(192,192,192); -font-size: 10px; + color:rgb(192,192,192); + font-size: 10px; } .manager { -font-size: 9px; + font-size: 9px; } .oe_project_buttons { @@ -38,7 +40,7 @@ font-size: 9px; background-color: transparent; border: hidden; color: #0000FF; - min-height: 50px; + min-height: 45px; min-width: 50px;* } @@ -50,9 +52,9 @@ font-size: 9px; .oe_project_font1{ -webkit-margin-before: 0em; --webkit-margin-after: 0em; + -webkit-margin-after: 0em; } div.oe_fold_column{ - padding:0px !important; + padding:2px !important; } \ No newline at end of file -- cgit v1.2.3 From 25776d016280b54e2f2c247299c3090d346a5eae Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 28 Mar 2012 15:16:54 +0530 Subject: [IMP]add image and sequence bzr revid: sgo@tinyerp.com-20120328094654-d02ntcsu6ghbonva --- addons/project/project_view.xml | 2 +- addons/project/static/src/img/tasks_icon.png | Bin 0 -> 2545 bytes addons/project_issue/project_issue_view.xml | 2 +- addons/project_issue/static/src/img/issue_icon.png | Bin 0 -> 5841 bytes addons/project_long_term/project_long_term_view.xml | 2 +- addons/project_timesheet/project_timesheet_view.xml | 2 +- .../project_timesheet/static/src/img/timesheet_icon.png | Bin 0 -> 6712 bytes 7 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 addons/project/static/src/img/tasks_icon.png create mode 100644 addons/project_issue/static/src/img/issue_icon.png create mode 100644 addons/project_timesheet/static/src/img/timesheet_icon.png diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 44c902ff20c..2b18064d57f 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -197,7 +197,7 @@ diff --git a/addons/project/static/src/img/tasks_icon.png b/addons/project/static/src/img/tasks_icon.png new file mode 100644 index 00000000000..5c5073b1633 Binary files /dev/null and b/addons/project/static/src/img/tasks_icon.png differ diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 8e9cd432ff2..10dd8963dd0 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -391,7 +391,7 @@ - + diff --git a/addons/project_issue/static/src/img/issue_icon.png b/addons/project_issue/static/src/img/issue_icon.png new file mode 100644 index 00000000000..ce3ccf0f4bc Binary files /dev/null and b/addons/project_issue/static/src/img/issue_icon.png differ diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 810389da11e..ed93a7cda41 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -121,7 +121,7 @@ - + diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index b9e8816802f..50b209b7f46 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -34,7 +34,7 @@ - + diff --git a/addons/project_timesheet/static/src/img/timesheet_icon.png b/addons/project_timesheet/static/src/img/timesheet_icon.png new file mode 100644 index 00000000000..7d421231891 Binary files /dev/null and b/addons/project_timesheet/static/src/img/timesheet_icon.png differ -- cgit v1.2.3 From 089b6fd455269eb3d19b03a8cb03661ef579856a Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 17:26:08 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328115608-3js1g89dz510qqqr --- addons/project/project_view.xml | 2 +- addons/project_issue/project_issue_view.xml | 15 +++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 9e56a7fd7da..267a316ea22 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -178,7 +178,7 @@ -
    +
    • Total tasks:
    diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 52d034d9a06..128083836cc 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -389,25 +389,16 @@ - - - - - - - - -
      -
    • Total issues:
    • +
        +
      • Issues:
      - - + -- cgit v1.2.3 From 97ea27f53c1b542ad932849e62682f16eb4302ee Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 17:27:09 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328115709-z6fg5y02yvxh9f1g --- addons/project/project_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 267a316ea22..0afbb369c65 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -179,7 +179,7 @@
        -
      • Total tasks:
      • +
      • Tasks:
      -- cgit v1.2.3 From 50923b0da3f733afe26db91c9633cee28aa87cbf Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 17:31:00 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328120100-vgtcpiphknkrb6nk --- addons/project/static/src/css/project.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 0251c5a7167..5e6ac22ba9a 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -54,10 +54,11 @@ display: inline-block; padding: 0px 0px; background-color: transparent; - border: hidden; + /*border: hidden;*/ color: #0000FF; - min-height: 50px; - min-width: 50px;* + min-height: 45px; + min-width: 45px; + text-align: center; } .oe_project_buttons:hover { -- cgit v1.2.3 From b77d3e06bbe945fb17d2c1ba2adebbf81babd54d Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 17:39:14 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328120914-ukfrhnw03o0o659x --- addons/project/project_view.xml | 4 ++-- addons/project/static/src/css/project.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 0afbb369c65..22fac65c6f7 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -213,8 +213,8 @@
@@ -211,11 +211,10 @@ -
-
+
hrs - - hrs + + hrs
- +
-- cgit v1.2.3 From 1ac567d6b040ca551973d3e7e76469a1801ba64e Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 10:02:17 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329043217-2i8vxflhy6a0drix --- addons/project/project_view.xml | 6 +++--- addons/project/static/src/css/project.css | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index c030921cdcf..fa2e311e835 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -187,17 +187,17 @@
- +
Manager
- +

diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index c11f927d342..29f207540fb 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -17,7 +17,8 @@ } .sequence { border-bottom: groove; - font-size: 20px; + /*font-size: 20px;*/ + text-align: center; } .project_icon{ @@ -40,7 +41,7 @@ font-size: 10px; } .oe_project { - width: 70px; + width: 55px; } .user { color:rgb(192,192,192); -- cgit v1.2.3 From 6ee64ce686ddcc84fd83ecbc3411d5e0a4234f5a Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 10:14:50 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329044450-oirg4eoj0itpjb41 --- addons/project_long_term/project_long_term_view.xml | 21 +++++++++++---------- addons/project_timesheet/project_timesheet_view.xml | 12 ++++++------ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 4f05ccd9fa3..f3f9e132b1e 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -116,18 +116,19 @@ kanban - - - + + + + + +
    +
  • Phases
  • +
+
+
- +
diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 3bc4fe9c7a9..65162fae749 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -32,16 +32,16 @@ - + + - + -- cgit v1.2.3 From fbb16d2a1642750cccd687d5c88ed4e122869414 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 29 Mar 2012 11:49:55 +0530 Subject: [IMP]if click on manager avatar it opens form view bzr revid: sgo@tinyerp.com-20120329061955-fu3bhrj8cu137kvs --- addons/project/project.py | 32 ++++++++++++++++++++++++++++++++ addons/project/project_view.xml | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/addons/project/project.py b/addons/project/project.py index e03f80b54b2..c44af563d79 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -241,6 +241,38 @@ class project(osv.osv): } return value + def open_users(self, cr, uid, ids, context=None): + #Open the View for the Tasks for the project + """ + This opens Tasks views + @return :Dictionary value for task view + """ + if context is None: + context = {} + value = {} + data_obj = self.pool.get('ir.model.data') + for project in self.browse(cr, uid, ids, context=context): + # Get Task views + tree_view = data_obj.get_object_reference(cr, uid, 'base', 'view_users_tree') + form_view = data_obj.get_object_reference(cr, uid, 'base', 'view_users_form') + search_view = data_obj.get_object_reference(cr, uid, 'base', 'view_users_search') + + value = { + 'name': _('User'), + 'context': context, + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': 'res.users', + 'view_id': False, + 'context': context, + 'res_id': project.user_id.id, + 'views': [(form_view and form_view[1] or False, 'form'),(tree_view and tree_view[1] or False, 'tree')], + 'type': 'ir.actions.act_window', + 'search_view_id': search_view and search_view[1] or False, + 'nodestroy': True + } + return value + def _get_type_common(self, cr, uid, context): ids = self.pool.get('project.task.type').search(cr, uid, [('project_default','=',1)], context=context) return ids diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index fa2e311e835..ca7fba44713 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -187,7 +187,7 @@
- + -- cgit v1.2.3 From 80d32699f406e99a3e6a3cf564d889e413d46e56 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 11:58:07 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329062807-qprri6v7otjufmy3 --- addons/project/project_view.xml | 71 ++++++++++++++----------------- addons/project/static/src/css/project.css | 7 +-- 2 files changed, 37 insertions(+), 41 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index fa2e311e835..62347b81f76 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -176,50 +176,46 @@ - - -
    -
  • Tasks:
  • -
-
- + +
    +
  • Tasks:
  • +
+
-
-
- - - - -
- Manager
-
- -
-
-

-
- - + + diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 5e6ac22ba9a..c11f927d342 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -54,7 +54,7 @@ display: inline-block; padding: 0px 0px; background-color: transparent; - /*border: hidden;*/ + border: hidden; color: #0000FF; min-height: 45px; min-width: 45px; -- cgit v1.2.3 From 10d29e2eaa469c79a917fe9f7ea3ab1cf24ec11c Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 28 Mar 2012 19:05:08 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120328133508-7y2y7vvhwjrdah00 --- addons/project/project_view.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 22fac65c6f7..2a131408b9e 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -187,9 +187,10 @@
- - - + + + +
Manager
@@ -214,7 +215,8 @@
- + + -- cgit v1.2.3 From 10247a1af2e6ec35bc109b8e9338abd36ca91d53 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 09:41:16 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329041116-5gg4g6ckexwea575 --- addons/project/project_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 2a131408b9e..c030921cdcf 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -205,7 +205,7 @@
- +
- - - -
- - - -
-
- +
+ + + + + +
+ + +
+

+ + + + +
+ + + +
+
+
+ Manager
+
+
+ - - - - - - - - - -
+ - +
hrs @@ -231,7 +227,6 @@
- diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 29f207540fb..39e7d506686 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -4,11 +4,12 @@ } .oe_project_desc{ - width: 270px; + width: 250px; } .progress{ - text-align: le; + text-align: right; + vertical-align: middle; width: auto; } .oe_project_font{ @@ -38,7 +39,7 @@ .invoiced{ - font-size: 10px; + font-size: 9px; } .oe_project { width: 55px; -- cgit v1.2.3 From ec7413d1a544f4a24296e0df47afce5680af3f59 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 12:05:29 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329063529-a931d8yq6b0mjv6w --- addons/project/project_view.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 62347b81f76..2173ae620a6 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -186,7 +186,8 @@
- +
+
@@ -203,8 +204,10 @@
- Manager
-
+ + Deadline +
+
-- cgit v1.2.3 From b49496e2312afb20b8366d90aa1d8864121e84ec Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 12:50:29 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329072029-r1rpuaomkoba3z5v --- addons/project/project_view.xml | 29 ++++++++++++++++------------- addons/project/static/src/css/project.css | 13 ++++++------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 44535435d30..643b9212358 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -183,14 +183,14 @@
- +
- -
-
-
+
+
+
-
+

@@ -205,25 +205,28 @@
- Deadline -
+
+ Deadline +
+
- - +
- - - - +
hrs hrs
+ +
+ + +
diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 39e7d506686..9d674163a7c 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -8,8 +8,7 @@ } .progress{ - text-align: right; - vertical-align: middle; + text-align: left; width: auto; } .oe_project_font{ @@ -23,9 +22,9 @@ } .project_icon{ - width: 35px; + width: 30px; display: block; - height: 35px; + height: 30px; text-align: center; } @@ -49,7 +48,7 @@ font-size: 10px; } .manager { - font-size: 9px; + font-size: 8px; } .oe_project_buttons { @@ -58,8 +57,8 @@ background-color: transparent; border: hidden; color: #0000FF; - min-height: 45px; - min-width: 45px; + min-height: 40px; + min-width: 40px; text-align: center; } -- cgit v1.2.3 From 76a8424ceee9b3a43ae48d529a2394de0d67c28b Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 12:52:48 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329072248-dpars22nfcp401ci --- addons/project/project_view.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 643b9212358..a45eed3f33c 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -183,11 +183,11 @@
- +
-
+
-
+
-- cgit v1.2.3 From 100b279d3db2183dc8a071c6c98d6ac05141f302 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 29 Mar 2012 14:21:02 +0530 Subject: [IMP]add default values bzr revid: sgo@tinyerp.com-20120329085102-tnwh2wp4lrtn0vt0 --- addons/project_issue/project_issue.py | 4 ++++ addons/project_long_term/project_long_term.py | 4 +++- addons/project_timesheet/project_timesheet.py | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index ec7b15881a6..fabe4179da1 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -502,6 +502,10 @@ class project(osv.osv): 'issues' : fields.boolean('Issues',help = "If you check this field issues are appears in kanban view"), 'open_issues': fields.function(_compute_issue , store=True,type='integer',string="Issue"), } + + _defaults = { + 'issues' : True, + } def open_issues(self, cr, uid, ids, context=None): #Open the View for the Tasks for the project diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index b92449699a8..05605e38a03 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -230,7 +230,9 @@ class project(osv.osv): 'open_phases' : fields.function(_open_phase , type='integer',string="Open Phases"), } - + _defaults = { + 'phases' : True, + } def open_phase(self, cr, uid, ids, context=None): #Open the View for the Tasks for the project """ diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index be736c58986..c7c43f98bdd 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -32,6 +32,9 @@ class project_project(osv.osv): _columns = { 'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view") } + _defaults = { + 'timesheets' : True, + } def onchange_partner_id(self, cr, uid, ids, part=False, context=None): res = super(project_project, self).onchange_partner_id(cr, uid, ids, part, context) if part and res and ('value' in res): -- cgit v1.2.3 From 5ebf8f6da9424584667a83fe6b558828369649c3 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 14:26:45 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329085645-5104gkrxgu13ohhj --- addons/project/project_view.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index a45eed3f33c..02e2f1ab291 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -32,9 +32,7 @@ - - @@ -171,7 +169,7 @@ - + @@ -191,7 +189,10 @@
-

+

+
...
+ +

-- cgit v1.2.3 From 230408269ff20dfbd330866d7fc0956189337cc4 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 29 Mar 2012 14:28:29 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120329085829-7iedyzckkfcxfd2k --- addons/project_timesheet/project_timesheet_view.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 65162fae749..e762f9d3413 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -44,6 +44,10 @@ + + Amt to inv. +
+
-- cgit v1.2.3 From 8759b2eed364b0aed6e262400e5eb70ffd975c2a Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 29 Mar 2012 15:03:16 +0530 Subject: [IMP]add hours to invoice bzr revid: sgo@tinyerp.com-20120329093316-7jlbg3eqi8bexm8f --- addons/project_timesheet/project_timesheet_view.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 7d58bddac9f..43598ff2da1 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -31,6 +31,8 @@ + + @@ -47,7 +49,11 @@
To invoice -
+
+
+
+ Hours +
h
-- cgit v1.2.3 From 7c072af98f74530d0bdb047646127fc713022dde Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 16:12:58 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329104258-hrc0jn0ysuafzigl --- addons/project/project_view.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 2ee0bac76ab..535766fade0 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -215,15 +215,14 @@
- -
+
hrs hrs
-
+ -- cgit v1.2.3 From 829ec0a2d02dde8ce3b00f9564936a9b2ed83d85 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 16:25:52 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329105552-yf4edx77rzlleonn --- addons/project/static/src/css/project.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 9d674163a7c..62b97beadb2 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -74,5 +74,5 @@ } div.oe_fold_column{ - padding:2px !important; + padding:0px !important; } \ No newline at end of file -- cgit v1.2.3 From 2f042dc4330c86e6546c7c6f2b8250788d287573 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 16:53:07 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329112307-muo085udc4dh3oi5 --- addons/project/static/src/css/project.css | 10 ++++++++++ addons/project_timesheet/project_timesheet.py | 4 ++-- addons/project_timesheet/project_timesheet_view.xml | 15 +++++++++++---- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 62b97beadb2..28bc351df28 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -1,3 +1,13 @@ +.oe_to_invoice_buttons { + min-height: 30px; + min-width: 50px; + vertical-align: baseline; +} + +.oe_to_invoice_buttons:hover { + cursor: pointer; +} + .oe_project_border{ border-right: groove; diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index c7c43f98bdd..ff64e08c5e1 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -63,7 +63,7 @@ class project_project(osv.osv): search_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_search_account_inherit') context.update({ #'search_default_user_id': uid, - 'search_default_project_id':project.id, + 'search_default_account_id':project.id, #'search_default_open':1, }) value = { @@ -74,7 +74,7 @@ class project_project(osv.osv): 'res_model': 'account.analytic.line', 'view_id': False, # 'domain':[('project_id','=', context.get('active_id',False))], - 'context': context, + #'context': context, 'views': [(tree_view and tree_view[1] or False, 'tree'),(form_view and form_view[1] or False, 'form')], 'type': 'ir.actions.act_window', 'search_view_id': search_view and search_view[1] or False, diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 7d58bddac9f..c396935610f 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -45,10 +45,17 @@ -
- To invoice -
-
+ +
+ +
+
-- cgit v1.2.3 From 9aa3b59b2f1d0f471cfd27b6ca6e91c77b4e1881 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 17:49:31 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329121931-w3e4bclwmuhhzsg2 --- addons/project/project_view.xml | 12 +++++++----- addons/project/static/src/css/project.css | 6 ++++-- addons/project_timesheet/project_timesheet_view.xml | 7 +++---- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 535766fade0..b27e9dcbd1d 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -186,6 +186,10 @@

+ + Deadline +
+
@@ -204,12 +208,10 @@
- -
- Deadline -
+
+ +
-
diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 28bc351df28..7e5869d80fe 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -1,7 +1,8 @@ .oe_to_invoice_buttons { - min-height: 30px; + min-height: 60px; min-width: 50px; - vertical-align: baseline; + vertical-align: top; + } .oe_to_invoice_buttons:hover { @@ -26,6 +27,7 @@ } .sequence { + padding-bottom: 4px !important; border-bottom: groove; /*font-size: 20px;*/ text-align: center; diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index c396935610f..c945223cd10 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -44,14 +44,13 @@ - +
-- cgit v1.2.3 From f221ede36a34b83ff86fbcaf653c40b08f3f1313 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 29 Mar 2012 18:06:59 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120329123659-xun8tan1r0727wca --- addons/project/static/src/css/project.css | 4 ++-- addons/project_timesheet/project_timesheet_view.xml | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 7e5869d80fe..a17cadd45e3 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -1,6 +1,6 @@ .oe_to_invoice_buttons { - min-height: 60px; - min-width: 50px; + min-height: 50px; + min-width: 40px; vertical-align: top; } diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 2c586ace272..14924c2ce0f 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -56,7 +56,10 @@
- +
+ Hours +
+
-- cgit v1.2.3 From 2c152b00813557aaa10d2a1f98548f350f3b99c0 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Thu, 29 Mar 2012 18:16:11 +0530 Subject: [IMP]css changed bzr revid: kbh@tinyerp.com-20120329124611-l3j2zw8i3j9f1tcd --- addons/project/project_view.xml | 6 ++--- addons/project/static/src/css/project.css | 42 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index b27e9dcbd1d..cb90abb5c5c 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -215,16 +215,16 @@
- +
- - -
+
hrs hrs
+ diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index a17cadd45e3..627b0e951b7 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -48,7 +48,49 @@ text-align: center; } +.project_table{ + border:0; + width:350px; +} +.td_image{ + width:60px; + text-align:center; + vertical-align:top; +} +.avatar{ + height:40px; + width:40px; +} +.td_name{ + text-align:left; + vertical-align:middle; + width:220px; +} +.td_deadline{ + width:70px; + vertical-align:top; + text-align:right; +} +.td_member{ + text-align:right; + vertical-align:bottom; + width:130px; + height:20px; +} +.td_member_img{ + height:22px; + width:22px; +} +.td_hours{ + text-align:left; + vertical-align:bottom; + width:120px +} +.task{ + text-align:left; + vertical-align:middle; +} .invoiced{ font-size: 9px; } -- cgit v1.2.3 From adbc6474a4a83c1193e41c52fb8bd8edae94c619 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Thu, 29 Mar 2012 18:25:27 +0530 Subject: [IMP]css bzr revid: kbh@tinyerp.com-20120329125527-8ljx3njrkjvdes8c --- addons/project/project_view.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index cb90abb5c5c..0b3c04f1cd4 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -181,24 +181,24 @@
- +
- - - diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 627b0e951b7..1dc146d7463 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -82,6 +82,10 @@ height:22px; width:22px; } +.img_member{ + height:20px; + width:20px; +} .td_hours{ text-align:left; vertical-align:bottom; -- cgit v1.2.3 From 60db095a88197692bd07c8ea797eefc5346feb97 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 18:40:30 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329131030-vjfix4ygwcyrs90w --- addons/project/project_view.xml | 16 +++++++-------- addons/project/static/src/css/project.css | 3 +-- .../project_timesheet/project_timesheet_view.xml | 24 +++++++++++----------- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 53ccca7f0aa..1e3796d5e04 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -186,11 +186,7 @@ +
-
+
+
Deadline
+

...

- - +
+
@@ -207,7 +207,7 @@
+
-- cgit v1.2.3 From 6439f4cba7a101a4bcb70014bd492719681c5937 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Thu, 29 Mar 2012 18:30:38 +0530 Subject: [IMP]css bzr revid: kbh@tinyerp.com-20120329130038-2phw98jzf4arxxsk --- addons/project/project_view.xml | 2 +- addons/project/static/src/css/project.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 0b3c04f1cd4..53ccca7f0aa 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -226,7 +226,7 @@
- +

- - Deadline -
-
-

@@ -207,11 +203,13 @@

-
- - +
+ +
+ Deadline +
+
diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 1dc146d7463..54299eff356 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -69,8 +69,7 @@ } .td_deadline{ width:70px; - vertical-align:top; - text-align:right; + text-align:center; } .td_member{ text-align:right; diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 14924c2ce0f..d9ac00d4a7d 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -46,20 +46,20 @@ - + -
- -
+ + + + + + + +
- Hours -
-
+ Hours +
h
+
-- cgit v1.2.3 From 299d0463e958ba35d9b11a59df42cf3d88b2126b Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 29 Mar 2012 19:03:04 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120329133304-v225x3lbowhqyoad --- addons/project/project_view.xml | 27 ++++++++++++++-------- addons/project/static/src/css/project.css | 17 ++++++-------- .../project_timesheet/project_timesheet_view.xml | 21 +++++++++-------- 3 files changed, 37 insertions(+), 28 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 1e3796d5e04..9b3b3106fc5 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -184,8 +184,10 @@ + + +
-
-
+
+
+
+
@@ -200,10 +202,17 @@
+ + + +
+
Deadline @@ -215,18 +224,18 @@
- - + + + + +
+
hrs hrs
- - - -
diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 54299eff356..9657edf43ad 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -17,9 +17,7 @@ .oe_project_desc{ width: 250px; } - .progress{ - text-align: left; width: auto; } .oe_project_font{ @@ -28,6 +26,7 @@ } .sequence { padding-bottom: 4px !important; + padding-top: 3px !important; border-bottom: groove; /*font-size: 20px;*/ text-align: center; @@ -49,14 +48,12 @@ } .project_table{ - border:0; - width:350px; + width:350px; } .td_image{ - width:60px; - text-align:center; - vertical-align:top; - + width:60px; + text-align:center; + vertical-align:top; } .avatar{ height:40px; @@ -86,7 +83,7 @@ width:20px; } .td_hours{ - text-align:left; + text-align:right; vertical-align:bottom; width:120px } @@ -95,7 +92,7 @@ vertical-align:middle; } .invoiced{ - font-size: 9px; + font-size: 10px; } .oe_project { width: 55px; diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index d9ac00d4a7d..43868f69037 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -46,21 +46,24 @@
- + - - - - - - - - +
Hours
h
+ +
+ +
+
-- cgit v1.2.3 From 90065c1a88acab2ca031bae80dd0b5404612bb85 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 11:23:12 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330055312-b48taam1vr3l0d6s --- addons/project/project_view.xml | 4 ++-- addons/project/static/src/css/project.css | 5 +++-- addons/project_timesheet/project_timesheet_view.xml | 10 ++++------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 9b3b3106fc5..368e360021a 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -192,7 +192,7 @@

-
...
+
...

@@ -224,7 +224,7 @@
- - +
+
hrs diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 9657edf43ad..f49cb9133ec 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -12,6 +12,7 @@ .oe_project_border{ border-right: groove; + border-left: groove; } .oe_project_desc{ @@ -83,7 +84,7 @@ width:20px; } .td_hours{ - text-align:right; + text-align:center; vertical-align:bottom; width:120px } @@ -122,7 +123,7 @@ } .oe_project_font1{ - + padding-left: 2px !important; -webkit-margin-before: 0em; -webkit-margin-after: 0em; } diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 43868f69037..1acf42f22e6 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -47,12 +47,10 @@ - - -
- Hours -
h
-
+
+ Hours +
h
+
-- cgit v1.2.3 From 355f15b4560cd431bd617b53a7d20adfb1a61e01 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Fri, 30 Mar 2012 11:24:19 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120330055419-0h6vm6szysfn3fez --- addons/project_timesheet/project_timesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index ff64e08c5e1..2780f71271f 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -63,7 +63,7 @@ class project_project(osv.osv): search_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_search_account_inherit') context.update({ #'search_default_user_id': uid, - 'search_default_account_id':project.id, + 'search_default_account_id':project.analytic_account_id.id, #'search_default_open':1, }) value = { -- cgit v1.2.3 From f499855684def050a720649617739184ab2b456b Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 11:25:11 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330055511-q20cwqvs6w4owroy --- addons/project/project_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 368e360021a..869e169a9cd 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -190,7 +190,7 @@
-
+

...

-- cgit v1.2.3 From 2ba790b37ebcd1a202d1cc729fb9bbee3cb829af Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 11:30:38 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330060038-701xyjxjaqmg1v6t --- addons/project/project_view.xml | 2 +- addons/project/static/src/css/project.css | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 869e169a9cd..368e360021a 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -190,7 +190,7 @@
-
+

...

diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index f49cb9133ec..0ef0db96ed6 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -14,7 +14,9 @@ border-right: groove; border-left: groove; } - +.oe_project_font:hover{ + text-decoration: underline; +} .oe_project_desc{ width: 250px; } -- cgit v1.2.3 From 7b2b46b741a5fc1d4f34d4e1c428f8dc9018a103 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 11:54:13 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330062413-9i7xyo9yh63zrdst --- addons/project/project_view.xml | 2 +- addons/project/static/src/css/project.css | 6 +++--- addons/project_timesheet/project_timesheet_view.xml | 11 +++++------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 368e360021a..7ac3d1769d2 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -192,7 +192,7 @@

-
...
+
...

diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 0ef0db96ed6..cab3f404e17 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -1,6 +1,6 @@ .oe_to_invoice_buttons { - min-height: 50px; - min-width: 40px; + min-height: 30px; + min-width: 70px; vertical-align: top; } @@ -105,7 +105,7 @@ font-size: 10px; } .manager { - font-size: 8px; + font-size: 9px; } .oe_project_buttons { diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 1acf42f22e6..1a5a3da7e6b 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -54,12 +54,11 @@
- + To invoice +
+
+
+
-- cgit v1.2.3 From 21196f57edda8fe905a4e716e031e51ccacc5e51 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 12:40:00 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330071000-pbdqqj6pylvrghx6 --- addons/project/static/src/css/project.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index cab3f404e17..c5c0a243c9c 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -1,5 +1,5 @@ .oe_to_invoice_buttons { - min-height: 30px; + min-height: 33px; min-width: 70px; vertical-align: top; @@ -106,6 +106,7 @@ } .manager { font-size: 9px; + font: bold; } .oe_project_buttons { -- cgit v1.2.3 From 25268a28abbe33a7d7b7dbfb630b63e7ab01d4c6 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 12:41:44 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330071144-5xrfdzdx27342hxq --- addons/project/static/src/css/project.css | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index c5c0a243c9c..2e8fcca08e3 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -25,6 +25,7 @@ } .oe_project_font{ color: #000000; + padding-left: 5px !important; } .sequence { -- cgit v1.2.3 From 47ab29c93ca87183a770cdac0e126bac231b71c1 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 12:54:25 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330072425-7tf4uffzmxak8k19 --- addons/project/project_view.xml | 2 +- addons/project/static/src/css/project.css | 2 +- addons/project_timesheet/project_timesheet_view.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 7ac3d1769d2..bdd593f424b 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -216,7 +216,7 @@
Deadline -
+
diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 2e8fcca08e3..4078e3f01be 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -107,7 +107,7 @@ } .manager { font-size: 9px; - font: bold; + font: bolder; } .oe_project_buttons { diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 1a5a3da7e6b..f2a0581cc36 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -49,13 +49,13 @@
Hours -
h
+
h
To invoice -
+
-- cgit v1.2.3 From 5d628773b96ee5a60257f5b852d48b34abbf0983 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 12:56:39 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330072639-rum5zrqdskny157t --- addons/project_timesheet/project_timesheet_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index f2a0581cc36..53ef32ecd36 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -48,7 +48,7 @@
- Hours + Remaining Hours
h
-- cgit v1.2.3 From a5542944f94998434db1f75fd58845023d6ddb7e Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 12:59:33 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330072933-syjdkqs7excirqtn --- addons/project/static/src/css/project.css | 1 - addons/project_timesheet/project_timesheet_view.xml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 4078e3f01be..4e1b5e5ad3a 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -107,7 +107,6 @@ } .manager { font-size: 9px; - font: bolder; } .oe_project_buttons { diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 53ef32ecd36..11863c6507c 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -55,7 +55,7 @@
To invoice -
+
-- cgit v1.2.3 From f9398e1384d873b4311a4668e0e9b5dc0cc184ab Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 13:59:48 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330082948-d0wl0n1f64j80lo3 --- addons/project/static/src/css/project.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 4e1b5e5ad3a..d6ff6ef8695 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -132,5 +132,5 @@ } div.oe_fold_column{ - padding:0px !important; + padding:2px !important; } \ No newline at end of file -- cgit v1.2.3 From c39ec15984770913feefa7f17b81c8e0ac5b13d5 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Fri, 30 Mar 2012 14:10:59 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120330084059-d0vfd8s1c4sw0got --- addons/project_timesheet/project_timesheet.py | 6 +++++- addons/project_timesheet/project_timesheet_view.xml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 2780f71271f..e9e53b1a131 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -30,7 +30,7 @@ class project_project(osv.osv): _inherit = 'project.project' _columns = { - 'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view") + 'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view"), } _defaults = { 'timesheets' : True, @@ -56,6 +56,10 @@ class project_project(osv.osv): context = {} value = {} data_obj = self.pool.get('ir.model.data') + if context.get('btn'): + context.update({ + 'search_default_to_invoice':1, + }) for project in self.browse(cr, uid, ids, context=context): # Get Timesheet views tree_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_tree_inherit_account_id') diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 11863c6507c..3801b0dce81 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -58,7 +58,7 @@
- +
-- cgit v1.2.3 From 67255539f974d5d063f7addd85d875179b96c954 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 14:46:03 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330091603-c46u2zcdjiddpogq --- addons/project_timesheet/project_timesheet.py | 11 +++-------- addons/project_timesheet/project_timesheet_view.xml | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index e9e53b1a131..7fd6b9efb1b 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -56,19 +56,16 @@ class project_project(osv.osv): context = {} value = {} data_obj = self.pool.get('ir.model.data') - if context.get('btn'): - context.update({ - 'search_default_to_invoice':1, - }) + to_invoice = False + if context.get('invoice'):to_invoice = context.get('invoice') for project in self.browse(cr, uid, ids, context=context): # Get Timesheet views tree_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_tree_inherit_account_id') form_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_form_inherit_account_id') search_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_search_account_inherit') context.update({ - #'search_default_user_id': uid, + 'search_default_to_invoice': to_invoice, 'search_default_account_id':project.analytic_account_id.id, - #'search_default_open':1, }) value = { 'name': _('Bill Tasks Works'), @@ -77,8 +74,6 @@ class project_project(osv.osv): 'view_mode': 'form,tree', 'res_model': 'account.analytic.line', 'view_id': False, - # 'domain':[('project_id','=', context.get('active_id',False))], - #'context': context, 'views': [(tree_view and tree_view[1] or False, 'tree'),(form_view and form_view[1] or False, 'form')], 'type': 'ir.actions.act_window', 'search_view_id': search_view and search_view[1] or False, diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 3801b0dce81..fa59e2ee5e1 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -58,7 +58,7 @@
- +
-- cgit v1.2.3 From da2e47979e0b477285603798c5b9a40ce8e42699 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 16:32:14 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330110214-gy1g9fwt03dydcoh --- addons/project/project_view.xml | 20 +++++++++++++------- addons/project/static/src/css/project.css | 1 + addons/project_timesheet/project_timesheet_view.xml | 12 +++++------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index bdd593f424b..84045b2992b 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -188,9 +188,15 @@
+ +
+ Deadline +
+
+
-
+

...

@@ -213,12 +219,12 @@
- -
- Deadline -
-
-
+ + + + + +
diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index d6ff6ef8695..9aa559bfb13 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -36,6 +36,7 @@ text-align: center; } + .project_icon{ width: 30px; display: block; diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index fa59e2ee5e1..19e0316715c 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -46,20 +46,18 @@ - -
- Remaining Hours -
h
-
-
To invoice
- + Remaining Hours +
h
+ + +
-- cgit v1.2.3 From 45a71c9c35f0a93876215bff7e678652f483c32a Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 16:44:40 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330111440-fcrsgemdp53e8ocs --- addons/project/project_view.xml | 6 ++--- .../project_timesheet/project_timesheet_view.xml | 27 ++++++++++++++-------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 84045b2992b..0e01df8848d 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -198,7 +198,7 @@

-
...
+
...

@@ -218,14 +218,14 @@
+ -
diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 19e0316715c..20c5d67e081 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -41,20 +41,29 @@ + + +

+
...
+

+
+ - -
- To invoice -
-
-
- Remaining Hours -
h
-
+ +
-- cgit v1.2.3 From d0214c4e45f05833097ee90f6fdb0676874126bc Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Fri, 30 Mar 2012 17:17:05 +0530 Subject: [IMP]calculate amt to invoice and display on kanban view bzr revid: sgo@tinyerp.com-20120330114705-kgecxihkih0ftmvj --- addons/project_timesheet/project_timesheet.py | 16 ++++++++++++++++ addons/project_timesheet/project_timesheet_view.xml | 7 +++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index e9e53b1a131..b96d7b0471a 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -29,12 +29,28 @@ from tools.translate import _ class project_project(osv.osv): _inherit = 'project.project' + def _amt_to_invoiced(self, cr, uid, ids,field_name, arg, context=None): + res = {} + task_pool=self.pool.get('project.task') + for id in ids: + task_ids = task_pool.search(cr, uid, [('project_id', '=', id)]) + total = 0.0 + project_record = self.browse(cr,uid,id) + acc_model = self.pool.get("account.analytic.line") + acc_id = acc_model.search(cr, uid, [('account_id', '=', project_record.analytic_account_id.id),('to_invoice', '=', 1),('invoice_id', '=', False)]) + if acc_id: + for record in acc_model.browse(cr,uid,acc_id): + total += record.amount + res[id]= total + return res _columns = { 'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view"), + 'to_amt_invoice': fields.function(_amt_to_invoiced,string="Open Tasks") } _defaults = { 'timesheets' : True, } + def onchange_partner_id(self, cr, uid, ids, part=False, context=None): res = super(project_project, self).onchange_partner_id(cr, uid, ids, part, context) if part and res and ('value' in res): diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 3801b0dce81..d600611153e 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -8,7 +8,8 @@ - + + @@ -33,6 +34,7 @@ + @@ -45,6 +47,7 @@ +
@@ -55,7 +58,7 @@
To invoice -
+
-- cgit v1.2.3 From 573342ec062cceb7c20dc78838907f90ea183351 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 17:17:23 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330114723-0jkanie1x1vn148y --- addons/project_issue/project_issue.py | 2 +- addons/project_issue/project_issue_view.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 0c9b3079f25..2e426eb5f1e 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -500,7 +500,7 @@ class project(osv.osv): 'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'reply_to' : fields.char('Reply-To Email Address', size=256), 'issues' : fields.boolean('Issues',help = "If you check this field issues are appears in kanban view"), - 'total_issues': fields.function(_compute_issue , store=True,type='integer',string="Issue"), + 'total_issues': fields.function(_compute_issue , type='integer',string="Issue"), } _defaults = { diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index fa3a5ce9505..44a772b328b 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -388,6 +388,7 @@ + -- cgit v1.2.3 From e7db374b457b7c0d6632d385c2b3db811208d6d0 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 17:19:09 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330114909-3goa78ghbwtudsf1 --- addons/project_timesheet/project_timesheet_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 20c5d67e081..d4ac405c4e8 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -60,7 +60,7 @@
- Remaining Hours + Rem. Hours
h
-- cgit v1.2.3 From 53e1f2a4272a2f6db524ae4eaa54ea0c9da7325f Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 17:34:11 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330120411-ddorwd83ocdb2qsw --- addons/project_timesheet/project_timesheet.py | 24 ++++++++++------------ .../project_timesheet/project_timesheet_view.xml | 7 +++---- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 1783d871334..0a9cb910b45 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -29,23 +29,21 @@ from tools.translate import _ class project_project(osv.osv): _inherit = 'project.project' - def _amt_to_invoiced(self, cr, uid, ids,field_name, arg, context=None): + def _amt_to_invoice(self, cr, uid, ids,field_name, arg, context=None): res = {} - task_pool=self.pool.get('project.task') - for id in ids: - task_ids = task_pool.search(cr, uid, [('project_id', '=', id)]) - total = 0.0 - project_record = self.browse(cr,uid,id) - acc_model = self.pool.get("account.analytic.line") - acc_id = acc_model.search(cr, uid, [('account_id', '=', project_record.analytic_account_id.id),('to_invoice', '=', 1),('invoice_id', '=', False)]) - if acc_id: - for record in acc_model.browse(cr,uid,acc_id): - total += record.amount - res[id]= total + aal_pool = self.pool.get("account.analytic.line") + for project in self.browse(cr,uid,ids,context=context): + line_ids = aal_pool.search(cr, uid, [('account_id','=',project.analytic_account_id.id),('to_invoice','=',1),('invoice_id','=',False)]) + amt_to_invoice = 0.0 + if line_ids: + for line in aal_pool.browse(cr,uid,line_ids,context=context): + amt_to_invoice += line.amount + res[project.id] = (amt_to_invoice)*-1 return res + _columns = { 'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view"), - 'to_amt_invoice': fields.function(_amt_to_invoiced,string="Open Tasks") + 'amt_to_invoice': fields.function(_amt_to_invoice,string="Amount to Invoice") } _defaults = { 'timesheets' : True, diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 3be2a8437ac..a20400c6f2e 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -9,7 +9,7 @@ - + @@ -34,7 +34,7 @@ - + @@ -54,13 +54,12 @@ -
+
+ To invoice +
+
+
+ Remaining Hours +
h
+
+
To invoice -
+
Rem. Hours -- cgit v1.2.3 From 590e529d655dfa6662eb01e5923dec373d3433ed Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 17:39:41 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330120941-e7emkrpt6mzxyxu3 --- addons/project/project_view.xml | 13 ------------- addons/project_timesheet/project_timesheet.py | 4 +--- addons/project_timesheet/project_timesheet_view.xml | 7 +------ 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 0e01df8848d..7fe0ee5f6dc 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -218,14 +218,6 @@
@@ -237,11 +229,6 @@ hrs - - - - -
diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 0a9cb910b45..fa64f266f1e 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -70,15 +70,13 @@ class project_project(osv.osv): context = {} value = {} data_obj = self.pool.get('ir.model.data') - to_invoice = False - if context.get('invoice'):to_invoice = context.get('invoice') + for project in self.browse(cr, uid, ids, context=context): # Get Timesheet views tree_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_tree_inherit_account_id') form_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_form_inherit_account_id') search_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_search_account_inherit') context.update({ - 'search_default_to_invoice': to_invoice, 'search_default_account_id':project.analytic_account_id.id, }) value = { diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index a20400c6f2e..51933f9ff7f 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -43,13 +43,11 @@ -

...

- @@ -62,13 +60,10 @@
- Rem. Hours + Hr. to invoice
h
- - -
-- cgit v1.2.3 From c3651820db27125b038940311b4343e9e85ecf42 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 17:50:29 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330122029-gjnf3yz2za24n939 --- addons/project_timesheet/project_timesheet_view.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 51933f9ff7f..7366b3a5493 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -56,11 +56,14 @@
- To invoice + To invoice +
+
+ Amount
- Hr. to invoice + Hours
h
-- cgit v1.2.3 From f782026d24f1b50823255e9ac1710b1c19752eba Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Fri, 30 Mar 2012 18:13:12 +0530 Subject: [IMP]default project_id added. bzr revid: kbh@tinyerp.com-20120330124312-loiwpuur2hq8nivz --- addons/project/project.py | 1 + addons/project_issue/project_issue.py | 4 +++- addons/project_long_term/project_long_term.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/project/project.py b/addons/project/project.py index c44af563d79..d11c76ed9c9 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -758,6 +758,7 @@ class task(osv.osv): 'sequence': 10, 'active': True, 'user_id': lambda obj, cr, uid, context: uid, + 'project_id':lambda self, cr, uid, context: context.get('active_id',False), 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'project.task', context=c) } diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 2e426eb5f1e..07d4688ec13 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -255,7 +255,9 @@ class project_issue(crm.crm_case, osv.osv): user = self.pool.get('res.users').browse(cr, uid, uid, context=context) if user.context_project_id: return user.context_project_id.id - return False + else: + project_id = context.get('active_id',False) + return project_id def on_change_project(self, cr, uid, ids, project_id, context=None): return {} diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 05605e38a03..6cf7693d611 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -123,6 +123,7 @@ class project_phase(osv.osv): _defaults = { 'state': 'draft', 'sequence': 10, + 'project_id':lambda self, cr, uid, context: context.get('active_id',False), 'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Day'))], context=c)[0] } _order = "project_id, date_start, sequence" -- cgit v1.2.3 From 22ff6fd7f927032dc4ea656905a169d184565538 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 30 Mar 2012 18:42:52 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120330131252-zxfp4oy7p0bli5my --- addons/project_timesheet/project_timesheet_view.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 26be054180f..52aaa01b99b 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -33,6 +33,7 @@ + @@ -58,7 +59,7 @@
Amount -
+
Hours -- cgit v1.2.3 From 918dca99dcd7d136cf42fb45eac0b5f763dc7629 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Mon, 2 Apr 2012 11:19:51 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120402054951-kih10xe9hxrp1c5g --- addons/project/project_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index d210c590198..48055c625a2 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -208,7 +208,7 @@ - + -- cgit v1.2.3 From d35d6def03a1a50dea6972971798a6f1723a6b62 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Mon, 2 Apr 2012 12:00:45 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120402063045-gwpkxsd1tyuj5skh --- addons/project/project_view.xml | 2 +- addons/project/static/src/css/project.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 48055c625a2..21d3e3b6295 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -208,7 +208,7 @@ - + diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 9aa559bfb13..e62d37ac8b9 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -17,6 +17,10 @@ .oe_project_font:hover{ text-decoration: underline; } +.oe_project_members{ + padding-left: 6px !important; + text-align: left; +} .oe_project_desc{ width: 250px; } -- cgit v1.2.3 From 8a71a7c2b27b34df26297911181bd926a73062f7 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Mon, 2 Apr 2012 12:58:56 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120402072856-decyar52cmweu0l1 --- addons/project/static/src/css/project.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index e62d37ac8b9..840b0580033 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -18,7 +18,7 @@ text-decoration: underline; } .oe_project_members{ - padding-left: 6px !important; + padding-left: 5px !important; text-align: left; } .oe_project_desc{ -- cgit v1.2.3 From 67ae1b0b83762804c9222039e61c55786eed1fee Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Mon, 2 Apr 2012 19:00:48 +0530 Subject: [IMP]improve view bzr revid: sgo@tinyerp.com-20120402133048-6s9gseld1v7u0dq0 --- addons/project/project_view.xml | 69 +++++++++++++++++----- addons/project/static/src/css/project.css | 11 ++-- .../project_timesheet/project_timesheet_view.xml | 38 ++++++------ 3 files changed, 77 insertions(+), 41 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 21d3e3b6295..f8a7ec9001e 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -172,6 +172,7 @@ +
    @@ -180,10 +181,28 @@
    - + + + Click Here + + +
    -
    -
    + +

    ...

    - - +
    + - - -
    - - - -
    + + + + + + + + + + + +
    Deadline + + , + +
    Progress + / days +
    + + +
    + + + +
    - + diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 840b0580033..1a42c1d1061 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -33,9 +33,8 @@ } .sequence { - padding-bottom: 4px !important; - padding-top: 3px !important; - border-bottom: groove; + + border-right: groove; /*font-size: 20px;*/ text-align: center; } @@ -75,7 +74,7 @@ } .td_deadline{ width:70px; - text-align:center; + text-align:left; } .td_member{ text-align:right; @@ -88,8 +87,8 @@ width:22px; } .img_member{ - height:20px; - width:20px; + height:35px; + width:35px; } .td_hours{ text-align:center; diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 52aaa01b99b..78d49656e96 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -47,25 +47,25 @@
    ...
    - - - - - - - + + + + + + +
    -
    - To invoice -
    -
    - Amount -
    -
    -
    - Hours -
    h
    -
    -
    + + + + + + + +
    To invoiced + +
    To hours + h +
    -- cgit v1.2.3 From abf8934ff922e9d9b65567cf7469c14caf3b63f3 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Tue, 3 Apr 2012 14:29:56 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120403085956-00lj6epnjz3j5z7n --- addons/project/__openerp__.py | 1 + addons/project/project_view.xml | 39 ++++- addons/project/static/src/css/project.css | 256 +++++++++++++++--------------- addons/project/static/src/js/dropdown.js | 92 +++++++++++ 4 files changed, 256 insertions(+), 132 deletions(-) create mode 100644 addons/project/static/src/js/dropdown.js diff --git a/addons/project/__openerp__.py b/addons/project/__openerp__.py index be4cc607b29..f438102d599 100644 --- a/addons/project/__openerp__.py +++ b/addons/project/__openerp__.py @@ -71,6 +71,7 @@ Dashboard for project members that includes: 'auto_install': False, 'application': True, 'css': ['static/src/css/project.css'], + 'js': ['static/src/js/dropdown.js'], 'certificate': '0075116868317', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 21d3e3b6295..b635b4cc805 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -173,7 +173,42 @@ - + + + +
    +
  • + B + +

    Groupe S HRWeb

    +

    2 Tasks, 3 Issues, 1 Timesheet

    +
  • +
    + +
    + + + + + +
    diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 840b0580033..70d220fd322 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -1,141 +1,137 @@ -.oe_to_invoice_buttons { - min-height: 33px; - min-width: 70px; - vertical-align: top; - -} +.vignettes { + margin: 4px; } + .vignettes li { + float: left; } + .vignettes .avatar { + margin-right: 2px; + width: 32px; + height: 32px; } + .vignettes .fields { + width: 100%; } + .vignettes .fields th { + font-weight: normal; } + .vignettes .fields td { + color: #888888; } + .vignettes h4 a { + color: #4c4c4c; } -.oe_to_invoice_buttons:hover { - cursor: pointer; -} +.vignettes > li { + height: 160px; + width: 250px; + padding: 8px; + margin: 4px; } + .vignettes > li h4 { + margin-bottom: 2px; } -.oe_project_border{ - border-right: groove; - border-left: groove; -} -.oe_project_font:hover{ - text-decoration: underline; -} -.oe_project_members{ - padding-left: 5px !important; - text-align: left; -} -.oe_project_desc{ - width: 250px; -} -.progress{ - width: auto; -} -.oe_project_font{ - color: #000000; - padding-left: 5px !important; - -} -.sequence { - padding-bottom: 4px !important; - padding-top: 3px !important; - border-bottom: groove; - /*font-size: 20px;*/ - text-align: center; -} +.i { + font-family: "mnmliconsRegular" !important; + font-size: 21px; + font-weight: 300 !important; } +.dropdown-menu { + display: none; + position: absolute; } -.project_icon{ - width: 30px; - display: block; - height: 30px; - text-align: center; -} +.dropdown-toggle:after { + width: 0; + height: 0; + display: inline-block; + content: "&darr"; + text-indent: -99999px; + vertical-align: top; + margin-top: 8px; + margin-left: 4px; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid white; + filter: alpha(opacity=50); + -khtml-opacity: 0.5; + -moz-opacity: 0.5; + opacity: 0.5; } -.project_icon:hover { - cursor: pointer; - display: block; - height: 40px; - width: 40px; - text-align: center; -} +.open { + display: block; + background: #333333; } + .open .dropdown-menu { + display: block; } -.project_table{ - width:350px; -} -.td_image{ - width:60px; - text-align:center; - vertical-align:top; -} -.avatar{ - height:40px; - width:40px; -} -.td_name{ - text-align:left; - vertical-align:middle; - width:220px; -} -.td_deadline{ - width:70px; - text-align:center; -} -.td_member{ - text-align:right; - vertical-align:bottom; - width:130px; - height:20px; -} -.td_member_img{ - height:22px; - width:22px; -} -.img_member{ - height:20px; - width:20px; -} -.td_hours{ - text-align:center; - vertical-align:bottom; - width:120px -} -.task{ - text-align:left; - vertical-align:middle; -} -.invoiced{ - font-size: 10px; -} -.oe_project { - width: 55px; -} -.user { - color:rgb(192,192,192); - font-size: 10px; -} -.manager { - font-size: 9px; -} -.oe_project_buttons { - display: inline-block; - padding: 0px 0px; - background-color: transparent; - border: hidden; - color: #0000FF; - min-height: 40px; - min-width: 40px; - text-align: center; -} +a.oe_kanban_action { + position: absolute; + right: 0; + } + a.oe_kanban_action:hover { + text-decoration: none; + } + a.oe_kanban_action .i { + color: #4c4c4c; } -.oe_project_buttons:hover { - cursor: pointer; - background-size: 100% 100%; -} -.oe_project_font1{ - padding-left: 2px !important; - -webkit-margin-before: 0em; - -webkit-margin-after: 0em; -} +.oe_kanban_vignette { + position: relative; + display: block; + min-height: 50px; + background: white; + border: 1px solid #d8d8d8; + border-bottom-color: #b9b9b9; + padding: 6px; + margin: 6px 0; + display: block; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; } + .oe_kanban_vignette:last-child { + margin-bottom: 0; } + .oe_kanban_vignette:hover { + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); + -box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); } + .oe_kanban_vignette h4 { + margin: 0 0 2px; } + + +.oe_kanban_vignette .dropdown-menu { + top: 30px; + right: -140px; + padding: 4px; + border: 1px solid #afafb6; + width: 160px; + overflow-x: hidden; + z-index: 900; + background: white; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); } + .oe_kanban_vignette .dropdown-menu p { + margin-left: 12px; } + .oe_kanban_vignette .dropdown-menu li { + float: none; + display: block; + background-color: none; } + .oe_kanban_vignette .dropdown-menu li a { + display: block; + padding: 3px 6px; + clear: both; + font-weight: normal; + line-height: 14px; + color: #4c4c4c; + text-decoration: none; } + .oe_kanban_vignette .dropdown-menu li a:hover { + background: #f0f0fa; + background: -moz-linear-gradient(#f0f0fa, #eeeef6); + background: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6)); + background: -webkit-linear-gradient(#f0f0fa, #eeeef6); + -moz-box-shadow: none; + -webkit-box-shadow: none; + -box-shadow: none; } -div.oe_fold_column{ - padding:2px !important; -} \ No newline at end of file +.oe_kanban_vignette .dropdown-menu .color-chooser { + padding: 0 3px; } + .oe_kanban_vignette .dropdown-menu .color-chooser li { + float: left; } + .oe_kanban_vignette .dropdown-menu .color-chooser li a { + padding: 2px; } \ No newline at end of file diff --git a/addons/project/static/src/js/dropdown.js b/addons/project/static/src/js/dropdown.js new file mode 100644 index 00000000000..54b61c5e9d0 --- /dev/null +++ b/addons/project/static/src/js/dropdown.js @@ -0,0 +1,92 @@ +/* ============================================================ + * bootstrap-dropdown.js v2.0.2 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function( $ ){ + + "use strict" + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle="dropdown"]' + , Dropdown = function ( element ) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function ( e ) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + , isActive + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + $parent.length || ($parent = $this.parent()) + + isActive = $parent.hasClass('open') + + clearMenus() + !isActive && $parent.toggleClass('open') + + return false + } + + } + + function clearMenus() { + $(toggle).parent().removeClass('open') + } + + + /* DROPDOWN PLUGIN DEFINITION + * ========================== */ + + $.fn.dropdown = function ( option ) { + return this.each(function () { + var $this = $(this) + , data = $this.data('dropdown') + if (!data) $this.data('dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.dropdown.Constructor = Dropdown + + + /* APPLY TO STANDARD DROPDOWN ELEMENTS + * =================================== */ + + $(function () { + $('html').on('click.dropdown.data-api', clearMenus) + $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) + }) + +}( window.jQuery ); \ No newline at end of file -- cgit v1.2.3 From 777909e030b6bc43fb8d5df114e01a31885ec4a4 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 3 Apr 2012 16:06:58 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120403103658-mdkum0flrg2a40qf --- addons/project/project_view.xml | 87 ++++++++++--------------------- addons/project/static/src/css/project.css | 17 ++++++ 2 files changed, 45 insertions(+), 59 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 8723392331a..584a20925f0 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -198,17 +198,22 @@
-

Groupe S HRWeb

-

2 Tasks, 3 Issues, 1 Timesheet

+

+

+ +

+ + + +
Deadline + , +
Progress/ days
+
- - - - - + - + +

...

- - +
+ + + +
+ + + +
- - - - - - - - - - - -
Deadline - - , - -
Progress - / days -
- - -
- - - -
- + --> diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 70d220fd322..b87892c3951 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -22,6 +22,23 @@ margin: 4px; } .vignettes > li h4 { margin-bottom: 2px; } + +.oe_project_buttons { + display: inline-block; + padding: 0px 0px; + background-color: transparent; + border: hidden; + color: #8A89BA; + +} + +.avatar { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); } .i { -- cgit v1.2.3 From 8e782f55842b453c665164d2294c4cad7f98d3e6 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 3 Apr 2012 16:33:46 +0530 Subject: [IMP]change kanban view bzr revid: sgo@tinyerp.com-20120403110346-cy9ogts14lmxwa7t --- addons/project/project_view.xml | 2 +- addons/project_issue/project_issue_view.xml | 10 +++++---- .../project_long_term/project_long_term_view.xml | 12 +++++----- .../project_timesheet/project_timesheet_view.xml | 26 ++++++---------------- 4 files changed, 21 insertions(+), 29 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 584a20925f0..378ca69ab3a 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -200,7 +200,7 @@

- +

- + - - + -- cgit v1.2.3 From a71f2b9f1425452b3abd161a34fb8551f2f43085 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 3 Apr 2012 18:51:18 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120403132118-9w2mjhq3fr5qdmp7 --- addons/project/project_view.xml | 5 +++-- addons/project/static/src/css/project.css | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 02dcd360b27..26732d59642 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -184,14 +184,15 @@
  • - B + B
  • Deadline diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 40d8c459af8..fffc7b43a94 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -389,17 +389,19 @@ - + + + - + + diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index f3f9e132b1e..0b5f9fb00a5 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -119,17 +119,19 @@ - + + + + + + diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 78d49656e96..406f931c1b2 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -35,37 +35,25 @@ - - -
      -
    • Timesheets
    • -
    -
    -
    - -

    -
    ...
    -

    -
    - + + - + + - - - + + - + -
    To invoiced
    To invoiced
    To hoursTo hours h
    -- cgit v1.2.3 From f4bfc542029c46939a1501ce18664d1abdfef142 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 3 Apr 2012 18:38:52 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120403130852-w7809ri5tq805vay --- addons/project/project_view.xml | 12 ++--- addons/project/static/src/css/project.css | 58 ++++++++++++++++++++-- .../project_timesheet/project_timesheet_view.xml | 8 +-- 3 files changed, 64 insertions(+), 14 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 378ca69ab3a..02dcd360b27 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -184,10 +184,10 @@
  • - B + B
  • To invoiced +
    To invoiced
    To hours + To hours h
  • Edit...
  • Delete
    • -
    • +
    • diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 334f07bd0fb..c11db8f718a 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -68,10 +68,14 @@ table { display: none; position: absolute; } +.dropdown { + position: relative; } + .dropdown-toggle:after { width: 0; height: 0; display: inline-block; + content: "&darr"; text-indent: -99999px; vertical-align: top; margin-top: 8px; @@ -84,6 +88,7 @@ table { -moz-opacity: 0.5; opacity: 0.5; } + .oe_kanban_vignette .dropdown-menu .color-chooser { padding: 0 3px; } .oe_kanban_vignette .dropdown-menu .color-chooser li { @@ -93,7 +98,7 @@ table { a.oe_kanban_action { position: absolute; right: 0; - display: none; } + } a.oe_kanban_action:hover { text-decoration: none; } a.oe_kanban_action .i { -- cgit v1.2.3 From 96c334b5acd8ef17d9458bea9f20c93097fb4c71 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 3 Apr 2012 18:57:53 +0530 Subject: [IMP]remove extra spaces from kanban view bzr revid: sgo@tinyerp.com-20120403132753-jv1n4kyaxwh0yxtm --- addons/project/project_view.xml | 5 ++--- addons/project_issue/project_issue_view.xml | 2 +- addons/project_long_term/project_long_term_view.xml | 2 +- addons/project_timesheet/project_timesheet_view.xml | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 26732d59642..d1bdf281cc5 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -186,7 +186,6 @@
    • B
  • Edit...
  • Delete
  • @@ -200,9 +199,9 @@
  • -

    +

    -

    +

    - +
    Deadline , diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index fffc7b43a94..8ca57ed6b4a 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -396,7 +396,7 @@ --> - + diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 0b5f9fb00a5..914e1b8d600 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -126,7 +126,7 @@ --> - + diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 7d05ae6a732..ad85b22cd51 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -35,7 +35,7 @@ - + -- cgit v1.2.3 From fddbe738810ed4b80f2423f33c8d2e8a918e16c1 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 4 Apr 2012 11:12:04 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120404054204-vlkhhvrxp0ka15d7 --- addons/project/project_view.xml | 10 ++-- addons/project/static/src/css/project.css | 68 +++++++++++----------- .../project_timesheet/project_timesheet_view.xml | 2 +- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index d1bdf281cc5..8ef5306fb79 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -182,9 +182,9 @@ } -
    -
  • - B +
    +
  • + B
  • diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index c11db8f718a..2f6957f2c12 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -1,11 +1,11 @@ -.fields { +.project_fields { margin-top: 1px; margin-bottom: 1px; } -.fields td { +.project_fields td { border: none; padding: 2px 0 2px 8px; } -.fields th { +.project_fields th { padding: 0; border-right: 1px solid #dddddd; vertical-align: top; @@ -16,29 +16,29 @@ table { font-size: 13px; border-collapse: collapse; } -.vignettes { +.project_vignettes { margin: 4px; } - .vignettes li { + .project_vignettes li { float: left; } - .vignettes .avatar { + .project_vignettes .project_avatar { margin-right: 2px; width: 32px; height: 32px; } - .vignettes .fields { + .project_vignettes .project_fields { width: 100%; } - .vignettes .fields th { + .project_vignettes .project_fields th { font-weight: normal; } - .vignettes .fields td { + .project_vignettes .project_fields td { color: #888888; } - .vignettes h4 a { + .project_vignettes h4 a { color: #4c4c4c; } -.vignettes > li { +.project_vignettes > li { height: 160px; width: 250px; padding: 8px; margin: 4px; } - .vignettes > li h4 { + .project_vignettes > li h4 { margin-bottom: 2px; } .oe_project_buttons { @@ -50,7 +50,7 @@ table { } -.avatar { +.project_avatar { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; @@ -89,19 +89,19 @@ table { opacity: 0.5; } - .oe_kanban_vignette .dropdown-menu .color-chooser { + .oe_project_kanban_vignette .dropdown-menu .color-chooser { padding: 0 3px; } - .oe_kanban_vignette .dropdown-menu .color-chooser li { + .oe_project_kanban_vignette .dropdown-menu .color-chooser li { float: left; } - .oe_kanban_vignette .dropdown-menu .color-chooser li a { + .oe_project_kanban_vignette .dropdown-menu .color-chooser li a { padding: 2px; } -a.oe_kanban_action { +a.oe_project_kanban_action { position: absolute; right: 0; } - a.oe_kanban_action:hover { + a.oe_project_kanban_action:hover { text-decoration: none; } - a.oe_kanban_action .i { + a.oe_project_kanban_action .i { color: #4c4c4c; } .square { display: inline-block; @@ -129,18 +129,18 @@ a.oe_kanban_action { display: block; } -a.oe_kanban_action { +a.oe_project_kanban_action { position: absolute; right: 0; } - a.oe_kanban_action:hover { + a.oe_project_kanban_action:hover { text-decoration: none; } - a.oe_kanban_action .i { + a.oe_project_kanban_action .i { color: #4c4c4c; } -.oe_kanban_vignette { +.oe_project_kanban_vignette { position: relative; display: block; min-height: 50px; @@ -153,17 +153,17 @@ a.oe_kanban_action { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } - .oe_kanban_vignette:last-child { + .oe_project_kanban_vignette:last-child { margin-bottom: 0; } - .oe_kanban_vignette:hover { + .oe_project_kanban_vignette:hover { -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); -box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); } - .oe_kanban_vignette h4 { + .oe_project_kanban_vignette h4 { margin: 0 0 2px; } -.oe_kanban_vignette .dropdown-menu { +.oe_project_kanban_vignette .dropdown-menu { top: 30px; right: -140px; padding: 4px; @@ -178,13 +178,13 @@ a.oe_kanban_action { -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); } - .oe_kanban_vignette .dropdown-menu p { + .oe_project_kanban_vignette .dropdown-menu p { margin-left: 12px; } - .oe_kanban_vignette .dropdown-menu li { + .oe_project_kanban_vignette .dropdown-menu li { float: none; display: block; background-color: none; } - .oe_kanban_vignette .dropdown-menu li a { + .oe_project_kanban_vignette .dropdown-menu li a { display: block; padding: 3px 6px; clear: both; @@ -192,7 +192,7 @@ a.oe_kanban_action { line-height: 14px; color: #4c4c4c; text-decoration: none; } - .oe_kanban_vignette .dropdown-menu li a:hover { + .oe_project_kanban_vignette .dropdown-menu li a:hover { background: #f0f0fa; background: -moz-linear-gradient(#f0f0fa, #eeeef6); background: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6)); @@ -201,9 +201,9 @@ a.oe_kanban_action { -webkit-box-shadow: none; -box-shadow: none; } -.oe_kanban_vignette .dropdown-menu .color-chooser { +.oe_project_kanban_vignette .dropdown-menu .color-chooser { padding: 0 3px; } - .oe_kanban_vignette .dropdown-menu .color-chooser li { + .oe_project_kanban_vignette .dropdown-menu .color-chooser li { float: left; } - .oe_kanban_vignette .dropdown-menu .color-chooser li a { + .oe_project_kanban_vignette .dropdown-menu .color-chooser li a { padding: 2px; } \ No newline at end of file diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index ad85b22cd51..6fbec2d84f2 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -42,7 +42,7 @@
    - +
    To invoiced -- cgit v1.2.3 From f898722cc219b8c8991747f85ca97317aaf4b24a Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 4 Apr 2012 11:12:35 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120404054235-3cqyxav0b6l5blxb --- addons/project/static/src/css/project.css | 10 ++ .../static/src/font/mnmliconsv21-webfont.eot | Bin 0 -> 24173 bytes .../static/src/font/mnmliconsv21-webfont.svg | 149 +++++++++++++++++++++ .../static/src/font/mnmliconsv21-webfont.ttf | Bin 0 -> 39912 bytes .../static/src/font/mnmliconsv21-webfont.woff | Bin 0 -> 26348 bytes 5 files changed, 159 insertions(+) create mode 100755 addons/project/static/src/font/mnmliconsv21-webfont.eot create mode 100755 addons/project/static/src/font/mnmliconsv21-webfont.svg create mode 100755 addons/project/static/src/font/mnmliconsv21-webfont.ttf create mode 100755 addons/project/static/src/font/mnmliconsv21-webfont.woff diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index c11db8f718a..4b715428c2c 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -1,3 +1,13 @@ +@font-face { + font-family: "mnmliconsRegular"; + src: url("../font/mnmliconsv21-webfont.eot") format("eot"); + src: url("../font/mnmliconsv21-webfont.woff") format("woff"); + src: url("../font/mnmliconsv21-webfont.ttf") format("truetype"); + src: url("../font/mnmliconsv21-webfont.svg") format("svg") active; + font-weight: normal; + font-style: normal; } + + .fields { margin-top: 1px; margin-bottom: 1px; diff --git a/addons/project/static/src/font/mnmliconsv21-webfont.eot b/addons/project/static/src/font/mnmliconsv21-webfont.eot new file mode 100755 index 00000000000..433ebb82e4b Binary files /dev/null and b/addons/project/static/src/font/mnmliconsv21-webfont.eot differ diff --git a/addons/project/static/src/font/mnmliconsv21-webfont.svg b/addons/project/static/src/font/mnmliconsv21-webfont.svg new file mode 100755 index 00000000000..34b20ff992f --- /dev/null +++ b/addons/project/static/src/font/mnmliconsv21-webfont.svg @@ -0,0 +1,149 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : MIT License +Designer : Carlos Elas +Foundry : Carlos Elias +Foundry URL : httpcarloseliascl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/project/static/src/font/mnmliconsv21-webfont.ttf b/addons/project/static/src/font/mnmliconsv21-webfont.ttf new file mode 100755 index 00000000000..c38e59cf138 Binary files /dev/null and b/addons/project/static/src/font/mnmliconsv21-webfont.ttf differ diff --git a/addons/project/static/src/font/mnmliconsv21-webfont.woff b/addons/project/static/src/font/mnmliconsv21-webfont.woff new file mode 100755 index 00000000000..3ddf14fb814 Binary files /dev/null and b/addons/project/static/src/font/mnmliconsv21-webfont.woff differ -- cgit v1.2.3 From e21bf1fd8633a6baff08d87a5d048f3c494dd890 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 4 Apr 2012 11:26:18 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120404055618-lbd3oh70smsrcr47 --- addons/project/project_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 8ef5306fb79..de52d171473 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -206,7 +206,7 @@
    Deadline ,
    Progress/ days
    Progress/ days
    -- cgit v1.2.3 From 43b46a1623afa8d17601e0bd7965048e16db1f0f Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 4 Apr 2012 11:39:33 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120404060933-ejaapcvswhrisoou --- addons/project/project_view.xml | 70 +++++++++++++--------- addons/project/static/src/css/project.css | 14 +++-- addons/project_issue/project_issue_view.xml | 17 ++---- .../project_long_term/project_long_term_view.xml | 17 ++---- .../project_timesheet/project_timesheet_view.xml | 27 +++++---- 5 files changed, 75 insertions(+), 70 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 8ef5306fb79..227eb754e2f 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -181,37 +181,51 @@ } -
    -
  • - B -
  • - - - - - - + + + + +
    diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 914e1b8d600..6951aee790a 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -119,19 +119,12 @@ - - - - - - + + + + + diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 6fbec2d84f2..7630f91fd8b 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -35,25 +35,26 @@ - - - - - - - + + + + + + + - To invoiced - + + To invoice + - - - + + + To hours h - + -- cgit v1.2.3 From e9cd2230b91bc26268e72454f2eefd8c285ea65d Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 4 Apr 2012 11:42:19 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120404061219-ly96wkv9gv6ojlm5 --- addons/project_issue/project_issue_view.xml | 2 +- addons/project_long_term/project_long_term_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index afe31603619..5e58ad8a709 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -392,7 +392,7 @@ - + diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 6951aee790a..ff5cc6f9653 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -122,7 +122,7 @@ - + -- cgit v1.2.3 From 66daeff7746180dce5f38d1defcc24e3b381879a Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 4 Apr 2012 11:46:17 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120404061617-r463yhakhd49ren7 --- addons/project_timesheet/project_timesheet.py | 11 ++++++++++- addons/project_timesheet/project_timesheet_view.xml | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 5e5285b1816..85231fe6f2c 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -47,11 +47,20 @@ class project_project(osv.osv): res[project.id]['hrs_to_invoice'] = hrs_to_invoice return res + + def _compute_timesheet(self, cr, uid, ids, field_name, arg, context=None): + res={} + aal_pool=self.pool.get('account.analytic.line') + for project in self.browse(cr, uid, ids, context=context): + timesheet = aal_pool.search(cr, uid, [("account_id","=", project.analytic_account_id.id)]) + res[project.id] = len(timesheet) + return res _columns = { 'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view"), 'amt_to_invoice': fields.function(_to_invoice,string="Amount to Invoice",multi="sums"), - 'hrs_to_invoice': fields.function(_to_invoice,string="Hours to Invoice",multi="sums") + 'hrs_to_invoice': fields.function(_to_invoice,string="Hours to Invoice",multi="sums"), + 'total_timesheet': fields.function(_compute_timesheet , type='integer',string="Issue"), } _defaults = { 'timesheets' : True, diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 6fbec2d84f2..efe8edb9808 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -38,7 +38,7 @@ - + -- cgit v1.2.3 From 0d201ad04be4e54e3bd3e037281cae5d63ee33f6 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 4 Apr 2012 12:00:11 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120404063011-0dduyosdzckpzt39 --- addons/project/project_view.xml | 2 +- addons/project/static/src/css/project.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index e9a825b94b8..0778c0f9571 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -222,7 +222,7 @@ - + diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 4d695424e45..7e67f12b594 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -30,7 +30,7 @@ table { .project_vignettes li { float: left; } .project_vignettes .project_avatar { - margin-top: 20px; + /*margin-top: 20px;*/ width: 30px; height: 30px; } .project_vignettes .project_fields { -- cgit v1.2.3 From 5e8bf6b506a807356a6bbd17ccc6a14c02297dc6 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 4 Apr 2012 12:22:08 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120404065208-iab1fi19ceo0l4mc --- addons/project/project_view.xml | 14 +++++++++++--- addons/project/static/src/css/project.css | 19 ++++++++++++++----- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 0778c0f9571..4a6b8a43145 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -221,9 +221,17 @@ - - - + + + + + + +

    + + + +
    diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 7e67f12b594..60548cb578d 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -30,7 +30,10 @@ table { .project_vignettes li { float: left; } .project_vignettes .project_avatar { - /*margin-top: 20px;*/ + width: 30px; + height: 30px; } + .project_vignettes .project_avatar1 { + padding-top: 4px; width: 30px; height: 30px; } .project_vignettes .project_fields { @@ -64,14 +67,20 @@ table { } .project_avatar { - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); } - +.project_avatar1 { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); } .i { font-family: "mnmliconsRegular" !important; font-size: 21px; -- cgit v1.2.3 From a26daf0d129855bdf332c3602afc5b4afa21020f Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Wed, 4 Apr 2012 12:37:21 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120404070721-vwv7bn696x73s3ci --- addons/project/project_view.xml | 2 +- addons/project/static/src/css/project.css | 19 +++++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 4a6b8a43145..f85b0faa594 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -229,7 +229,7 @@

    - +
    diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 60548cb578d..b17094902ca 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -8,8 +8,9 @@ font-style: normal; } .project_fields { - margin-top: 10px; + margin-top: 1px; margin-bottom: 1px; + font-size: 11px; } .project_fields td { border: none; @@ -30,12 +31,8 @@ table { .project_vignettes li { float: left; } .project_vignettes .project_avatar { - width: 30px; - height: 30px; } - .project_vignettes .project_avatar1 { - padding-top: 4px; - width: 30px; - height: 30px; } + width: 28px; + height: 28px; } .project_vignettes .project_fields { width: 100%; } .project_vignettes .project_fields th { @@ -56,6 +53,7 @@ table { .oe_project_buttons { display: inline-block; padding: 0px 0px; + font-size: 13px; background-color: transparent; border: hidden; color: #8A89BA; @@ -74,13 +72,6 @@ table { -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); } -.project_avatar1 { - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); - -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); } .i { font-family: "mnmliconsRegular" !important; font-size: 21px; -- cgit v1.2.3 From 196564ffa2c87c7125301c5617355b483a3da5bf Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 4 Apr 2012 12:38:09 +0530 Subject: [IMP] bzr revid: sgo@tinyerp.com-20120404070809-lntog45xrxy8g3xs --- addons/project/project_view.xml | 4 ++-- addons/project_timesheet/project_timesheet_view.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 4a6b8a43145..967c094edc3 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -206,7 +206,7 @@ - + - + diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 222031d52b9..4e2d90aabc1 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -43,7 +43,7 @@ - +
    Deadline @@ -215,7 +215,7 @@
    ProgressProgress / days
    To invoice -- cgit v1.2.3 From 5c5edd965f7db39e8657cde66a5d3393cda2c829 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 4 Apr 2012 14:11:44 +0530 Subject: [IMP]kannban view extends bzr revid: kbh@tinyerp.com-20120404084144-1t9fs970zbztpv7p --- addons/project/__openerp__.py | 2 +- addons/project/static/src/js/project.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 addons/project/static/src/js/project.js diff --git a/addons/project/__openerp__.py b/addons/project/__openerp__.py index f438102d599..eb55e552259 100644 --- a/addons/project/__openerp__.py +++ b/addons/project/__openerp__.py @@ -71,7 +71,7 @@ Dashboard for project members that includes: 'auto_install': False, 'application': True, 'css': ['static/src/css/project.css'], - 'js': ['static/src/js/dropdown.js'], + 'js': ['static/src/js/dropdown.js','static/src/js/project.js'], 'certificate': '0075116868317', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js new file mode 100644 index 00000000000..ba9372ba937 --- /dev/null +++ b/addons/project/static/src/js/project.js @@ -0,0 +1,11 @@ +openerp.project = function(openerp) { + openerp.web_kanban.ProjectKanban = openerp.web_kanban.KanbanRecord.include({ + bind_events: function() { + self = this + self._super() + if(this.view.dataset.model == 'project.project') { + console.log("this"); + } + } + }); +} -- cgit v1.2.3 From 7a42d939a34a5252cbe0e94ecc82ba03524ad111 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 4 Apr 2012 14:25:52 +0530 Subject: [IMP]dropdown menu bzr revid: kbh@tinyerp.com-20120404085552-5ykkcivzdpowarnn --- addons/project/project_view.xml | 8 +------- addons/project/static/src/js/project.js | 9 ++++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index f070082378c..db4f2a78c7e 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -175,15 +175,9 @@ -
  • - B + B
  • + +

    + -- cgit v1.2.3 From 27dd8054fad88f64112478fc118b2dbe35534de6 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 4 Apr 2012 14:31:14 +0530 Subject: [IMP]improve bzr revid: sgo@tinyerp.com-20120404090114-qhq64kye343ahw7r --- addons/project/project_view.xml | 3 ++- addons/project_issue/project_issue_view.xml | 2 +- addons/project_long_term/project_long_term_view.xml | 3 ++- addons/project_timesheet/project_timesheet_view.xml | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index f070082378c..6cbbe39c3c1 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -173,6 +173,7 @@ + diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index a1cb503af59..e2384d50d27 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -4,17 +4,11 @@ openerp.project = function(openerp) { self = this; self._super(); if(this.view.dataset.model == 'project.project') { - //open dropdwon when click on the icon. - $('.dropdown-toggle').dropdown(); - - //show and hide the dropdown icon when mouseover and mouseour. - $('.oe_project_kanban_vignette').mouseover(function() { - return $(this).find('.oe_project_kanban_action').show(); - }).mouseout(function() { - return $(this).find('.oe_project_kanban_action').hide(); - }); - - //set avatar title for members. + + /*set avatar title for members. + In many2many fields, returns only list of ids. + we can implement return value of m2m fields like [(1,"Adminstration"),...]. + */ _.each($(this.$element).find('.project_avatar'),function(avatar){ var dataset = new openerp.web.DataSetSearch(this, 'res.users', self.session.context, [['id','=',avatar.id]]); dataset.read_slice(['name']).then(function(result){ @@ -35,7 +29,9 @@ openerp.project = function(openerp) { }); $('#list').replaceWith(my_list); - // set background color + /* set background color. + we can do other way to implement new widget. + */ this.$element.find('.bgcolor').click(function(){ color = parseInt($(this).find('span').attr('class').split(' ')[0].substring(16)) color_class = $(this).find('span').attr('class').split(' ')[0] diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 90423032324..f9290e5c7e1 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -366,11 +366,9 @@ - - - - - + + IssueIssues() + diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 9cb4bb0ba41..2e90659126b 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -121,11 +121,9 @@ - - - - - + + PhasePhases() + diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index af335bd5384..6f7277f4aea 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -37,11 +37,9 @@ - - - - - + + TimesheetTimesheets() + -- cgit v1.2.3 From 49eb72d417485457c9ec93570ae3e82739563a30 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 27 Apr 2012 12:01:52 +0530 Subject: [IMP]:improved code. bzr revid: apa@tinyerp.com-20120427063152-9qp4k3mz6dhgz7ho --- addons/project/static/src/js/project.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index e2384d50d27..5365e0b0942 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -31,6 +31,7 @@ openerp.project = function(openerp) { /* set background color. we can do other way to implement new widget. + because we need to rpc call for that. */ this.$element.find('.bgcolor').click(function(){ color = parseInt($(this).find('span').attr('class').split(' ')[0].substring(16)) -- cgit v1.2.3 From d2b70d38c34a4a30f02c8de1c221765d15a153e1 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Mon, 30 Apr 2012 16:19:34 +0530 Subject: [IMP]change color and improved as per said bzr revid: sgo@tinyerp.com-20120430104934-34tsnkf24rms9izx --- addons/project/static/src/css/project.css | 3 ++- addons/project_long_term/project_long_term_view.xml | 2 +- addons/project_timesheet/project_timesheet.py | 11 ++++++++++- addons/project_timesheet/project_timesheet_view.xml | 6 +++--- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index be87c7c0e17..cfe0559b6ad 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -24,6 +24,7 @@ .project_vignettes .project_fields { width: 100%; } .project_vignettes .project_fields th { + width: 120px; font-weight: normal; } .project_vignettes .project_fields td { color: #888888; } @@ -117,7 +118,7 @@ a.oe_project_kanban_action { background: #B1DCFE; } .oe_kanban_color_2 { - background: firebrick; + background: #FFB8B8; } .oe_kanban_color_3 { background: khaki; diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 2e90659126b..1f258ff2ead 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -308,7 +308,7 @@ - + diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 64b9c7f298b..cd2821e9487 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -76,6 +76,15 @@ class project_project(osv.osv): factor_id = data_obj.browse(cr, uid, data_id).res_id res['value'].update({'to_invoice': factor_id}) return res + + def getAnalyticJournal(self, cr, uid, context=None): + md = self.pool.get('ir.model.data') + try: + result = md.get_object_reference(cr, uid, 'hr_timesheet', 'analytic_journal') + return result[1] + except ValueError: + pass + return False def open_timesheets(self, cr, uid, ids, context=None): #Open the View for the Timesheet of the project @@ -87,7 +96,7 @@ class project_project(osv.osv): context = {} if ids: project = self.browse(cr, uid, ids[0], context=context) - context = dict(context, search_default_account_id=project.analytic_account_id.id) + context = dict(context, search_default_account_id=project.analytic_account_id.id,default_account_id=project.analytic_account_id.id,default_journal_id=self.getAnalyticJournal(cr, uid, context)) return { 'name': _('Bill Tasks Works'), 'context': context, diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 6f7277f4aea..0efc228136d 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -32,7 +32,7 @@ - + @@ -44,13 +44,13 @@ - To invoice + Amount to invoice - To hours + Hours to Invoice h -- cgit v1.2.3 From c43e5dfe7e57e73d60d5e3ca2320ea52958726b2 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Thu, 3 May 2012 14:32:02 +0530 Subject: [IMP] bzr revid: apa@tinyerp.com-20120503090202-w2ciwyb22endil26 --- addons/project/static/src/css/project.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 08ee57655f5..93437c878ba 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -67,6 +67,11 @@ font-size: 11px; -webkit-box-align: baseline; } + + +.click_button:hover { + cursor: default !important; +} .dropdown-menu { display: none; position: absolute; } -- cgit v1.2.3 From bfd96de42bc942fa24158a8c87b9e905c2460b72 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Mon, 7 May 2012 12:50:49 +0530 Subject: [IMP]rename all fields which r required in project and another module and improve code and bzr revid: sgo@tinyerp.com-20120507072049-u00lsqra9x34nf73 --- addons/project/project.py | 18 +++++------------- addons/project/project_view.xml | 12 ++++++------ addons/project/static/src/js/project.js | 4 ++-- addons/project_issue/project_issue.py | 8 ++++---- addons/project_issue/project_issue_view.xml | 17 +++++++---------- addons/project_issue/static/src/js/project_issue.js | 4 ++-- addons/project_long_term/project_long_term.py | 8 ++++---- addons/project_long_term/project_long_term_view.xml | 14 +++++++------- addons/project_timesheet/project_timesheet.py | 8 ++++---- addons/project_timesheet/project_timesheet_view.xml | 14 +++++++------- .../static/src/js/project_timesheet.js | 4 ++-- 11 files changed, 50 insertions(+), 61 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 27370363140..29816f5f922 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -155,7 +155,7 @@ class project(osv.osv): raise osv.except_osv(_('Operation Not Permitted !'), _('You cannot delete a project containing tasks. I suggest you to desactivate it.')) return super(project, self).unlink(cr, uid, ids, *args, **kwargs) - def _open_task(self, cr, uid, ids, field_name, arg, context=None): + def _task_count(self, cr, uid, ids, field_name, arg, context=None): open_task={} task_pool=self.pool.get('project.task') for id in ids: @@ -163,14 +163,6 @@ class project(osv.osv): open_task[id] = len(task_ids) return open_task - def company_uom_id(self, cr, uid, ids, field_name, arg, context=None): - uom_company = {} - for project in self.browse(cr,uid,ids): - user_browse = self.pool.get('res.users').browse(cr,uid,project.user_id.id) - uom_company[project.id] = project.company_id.project_time_mode_id.name or user_browse.company_id.project_time_mode_id.name - return uom_company - - _columns = { 'complete_name': fields.function(_complete_name, string="Project Name", type='char', size=250), 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the project without removing it."), @@ -207,10 +199,10 @@ class project(osv.osv): 'warn_header': fields.text('Mail Header', help="Header added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), - 'task': fields.boolean('Task',help = "If you check this field tasks appears in kanban view"), - 'open_task': fields.function(_open_task , type='integer',string="Open Tasks"), + 'use_tasks': fields.boolean('Task',help = "If you check this field tasks appears in kanban view"), + 'task_count': fields.function(_task_count , type='integer',string="Open Tasks"), 'color': fields.integer('Color Index'), - 'company_uom_id': fields.function(company_uom_id,type="char"), + 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'), } def dummy(self, cr, uid, ids, context=None): return False @@ -247,7 +239,7 @@ class project(osv.osv): 'priority': 1, 'sequence': 10, 'type_ids': _get_type_common, - 'task' : True, + 'use_tasks' : True, } # TODO: Why not using a SQL contraints ? diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 1b317d671ca..a9886e3b1c7 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -45,7 +45,7 @@ - + @@ -172,11 +172,11 @@ - + - +
    @@ -198,8 +198,8 @@

    ...


    @@ -216,7 +216,7 @@ Progress - / s + / diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index 5365e0b0942..001777103d6 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -17,8 +17,8 @@ openerp.project = function(openerp) { }); //if task is true , then open the task when click on the anywhere in the box. - if(this.record.task.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks'); - if(!this.record.task.raw_value)$(this.$element).find('.click_button').attr('data-name','dummy'); + if(this.record.use_tasks.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks'); + if(!this.record.use_tasks.raw_value)$(this.$element).find('.click_button').attr('data-name','dummy'); // set sequence like Tasks,Issues,Timesheets and Phases my_list = $("#list a") diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 575d51e7b1c..db2ad97b414 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -517,7 +517,7 @@ project_issue() class project(osv.osv): _inherit = "project.project" - def _compute_issue(self, cr, uid, ids, field_name, arg, context=None): + def _issue_count(self, cr, uid, ids, field_name, arg, context=None): res={} issue_pool=self.pool.get('project.issue') for project in self.browse(cr, uid, ids, context=context): @@ -528,12 +528,12 @@ class project(osv.osv): _columns = { 'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'reply_to' : fields.char('Reply-To Email Address', size=256), - 'issues' : fields.boolean('Issues',help = "If you check this field issues are appears in kanban view"), - 'total_issues': fields.function(_compute_issue , type='integer',string="Issue"), + 'use_issues' : fields.boolean('Issues',help = "If you check this field issues are appears in kanban view"), + 'issue_count': fields.function(_issue_count , type='integer'), } _defaults = { - 'issues' : True, + 'use_issues' : True, } def open_issues(self, cr, uid, ids, context=None): diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index f9290e5c7e1..66ad9c04e30 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -345,8 +345,8 @@ form - - + + @@ -361,19 +361,16 @@ kanban - - - + + + - - IssueIssues() + + IssueIssues() - - - diff --git a/addons/project_issue/static/src/js/project_issue.js b/addons/project_issue/static/src/js/project_issue.js index 61ee078bd0d..b0433055160 100644 --- a/addons/project_issue/static/src/js/project_issue.js +++ b/addons/project_issue/static/src/js/project_issue.js @@ -4,8 +4,8 @@ openerp.project_issue = function(openerp) { self = this; self._super(); if(this.view.dataset.model == 'project.project') { - if(this.record.task.raw_value && this.record.issues.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks'); - if(!this.record.task.raw_value && this.record.issues.raw_value)$(this.$element).find('.click_button').attr('data-name','open_issues'); + if(this.record.use_tasks.raw_value && this.record.use_issues.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks'); + if(!this.record.use_tasks.raw_value && this.record.use_issues.raw_value)$(this.$element).find('.click_button').attr('data-name','open_issues'); }; } diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 7806bc0abb9..582a5ed8ef0 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -217,7 +217,7 @@ project_user_allocation() class project(osv.osv): _inherit = "project.project" - def _open_phase(self, cr, uid, ids, field_name, arg, context=None): + def _phase_count(self, cr, uid, ids, field_name, arg, context=None): open_phase={} phase_pool=self.pool.get('project.phase') for id in ids: @@ -227,12 +227,12 @@ class project(osv.osv): _columns = { 'phase_ids': fields.one2many('project.phase', 'project_id', "Project Phases"), - 'phases' : fields.boolean('Phase',help = "If you check this field Phases are appears in kanban view"), - 'open_phases' : fields.function(_open_phase , type='integer',string="Open Phases"), + 'use_phases' : fields.boolean('Phase',help = "If you check this field Phases are appears in kanban view"), + 'phase_count' : fields.function(_phase_count , type='integer',string="Open Phases"), } _defaults = { - 'phases' : True, + 'use_phases' : True, } def open_phase(self, cr, uid, ids, context=None): #Open the View for the Tasks for the project diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 1f258ff2ead..f5dcb48576d 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -104,8 +104,8 @@ form - - + + @@ -116,13 +116,13 @@ kanban - - - + + + - - PhasePhases() + + PhasePhases() diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 59cb4be9321..9a718e08acc 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -48,7 +48,7 @@ class project_project(osv.osv): return res - def _compute_timesheet(self, cr, uid, ids, field_name, arg, context=None): + def _timesheet_count(self, cr, uid, ids, field_name, arg, context=None): res={} aal_pool=self.pool.get('account.analytic.line') for project in self.browse(cr, uid, ids, context=context): @@ -57,13 +57,13 @@ class project_project(osv.osv): return res _columns = { - 'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view"), + 'use_timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view"), 'amt_to_invoice': fields.function(_to_invoice,string="Amount to Invoice",multi="sums"), 'hrs_to_invoice': fields.function(_to_invoice,string="Hours to Invoice",multi="sums"), - 'total_timesheet': fields.function(_compute_timesheet , type='integer',string="Issue"), + 'timesheet_count': fields.function(_timesheet_count , type='integer',string="Issue"), } _defaults = { - 'timesheets' : True, + 'use_timesheets' : True, } def onchange_partner_id(self, cr, uid, ids, part=False, context=None): diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 0efc228136d..6ac8afcfaf8 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -7,8 +7,8 @@ form - - + + @@ -31,14 +31,14 @@ kanban - - - + + + - - TimesheetTimesheets() + + TimesheetTimesheets() diff --git a/addons/project_timesheet/static/src/js/project_timesheet.js b/addons/project_timesheet/static/src/js/project_timesheet.js index ef8bbc02f2e..3eff53a8651 100644 --- a/addons/project_timesheet/static/src/js/project_timesheet.js +++ b/addons/project_timesheet/static/src/js/project_timesheet.js @@ -11,9 +11,9 @@ openerp.project_timesheet = function(openerp) { } if(include(this.view.fields_keys,"issues")) { - if(!this.record.task.raw_value && !this.record.issues.raw_value && this.record.timesheets.raw_value)$(this.$element).find('.click_button').attr('data-name','open_timesheets'); + if(!this.record.use_tasks.raw_value && !this.record.use_issues.raw_value && this.record.use_timesheets.raw_value)$(this.$element).find('.click_button').attr('data-name','open_timesheets'); }; - if(this.record.task.raw_value && this.record.timesheets.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks'); + if(this.record.use_tasks.raw_value && this.record.use_timesheets.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks'); }; } }); -- cgit v1.2.3 From cb30916a6a3f62f6db86ad96507ed8f98002ec15 Mon Sep 17 00:00:00 2001 From: "apa-tiny (apa@tinyerp.com)" <> Date: Mon, 7 May 2012 14:53:28 +0530 Subject: [IMP]:project:In kanban view, simply use . removed hardcoded. bzr revid: apa@tinyerp.com-20120507092328-t03v7kosvjg8omrz --- addons/project/project_view.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index a9886e3b1c7..3a9a825e950 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -169,7 +169,6 @@ - @@ -207,11 +206,7 @@ - + -- cgit v1.2.3 From a72ea59bd634e2c5fac1ed2242f1c491f7b25265 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Mon, 7 May 2012 15:37:42 +0530 Subject: [IMP]improve count method of model improve code bzr revid: sgo@tinyerp.com-20120507100742-gy5e5ur5b93h1zty --- addons/project/project.py | 11 +++++------ addons/project_issue/project_issue.py | 10 +++++----- addons/project_long_term/project_long_term.py | 12 ++++++------ 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 29816f5f922..7916b85bcc2 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -156,12 +156,11 @@ class project(osv.osv): return super(project, self).unlink(cr, uid, ids, *args, **kwargs) def _task_count(self, cr, uid, ids, field_name, arg, context=None): - open_task={} - task_pool=self.pool.get('project.task') - for id in ids: - task_ids = task_pool.search(cr, uid, [('project_id', '=', id)]) - open_task[id] = len(task_ids) - return open_task + res = dict.fromkeys(ids, 0) + task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)]) + for task in self.pool.get('project.task').browse(cr, uid, task_ids, context): + res[task.project_id.id] += 1 + return res _columns = { 'complete_name': fields.function(_complete_name, string="Project Name", type='char', size=250), diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index db2ad97b414..ad870b08106 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -518,11 +518,11 @@ class project(osv.osv): _inherit = "project.project" def _issue_count(self, cr, uid, ids, field_name, arg, context=None): - res={} - issue_pool=self.pool.get('project.issue') - for project in self.browse(cr, uid, ids, context=context): - issues = issue_pool.search(cr, uid, [('project_id','=',project.id)]) - res[project.id] = len(issues) + res = dict.fromkeys(ids, 0) + issue_pool = self.pool.get('project.issue') + issue_ids = issue_pool.search(cr, uid, [('project_id', 'in', ids)]) + for issue in issue_pool.browse(cr, uid, issue_ids, context): + res[issue.project_id.id] += 1 return res _columns = { diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 582a5ed8ef0..85e821703fc 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -218,12 +218,12 @@ class project(osv.osv): _inherit = "project.project" def _phase_count(self, cr, uid, ids, field_name, arg, context=None): - open_phase={} - phase_pool=self.pool.get('project.phase') - for id in ids: - phase_ids = phase_pool.search(cr, uid, [('project_id', '=', id)]) - open_phase[id] = len(phase_ids) - return open_phase + res = dict.fromkeys(ids, 0) + phase_pool = self.pool.get('project.phase') + phase_ids = phase_pool.search(cr, uid, [('project_id', 'in', ids)]) + for phase in phase_pool.browse(cr, uid, phase_ids, context): + res[phase.project_id.id] += 1 + return res _columns = { 'phase_ids': fields.one2many('project.phase', 'project_id', "Project Phases"), -- cgit v1.2.3 From 38fd7fa19df5d752c05eb21fad9f07daccca4395 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Mon, 7 May 2012 18:27:08 +0530 Subject: [IMP]:project:Used a relate action like 'project.act_project_project_2_project_task_all' instead (easier to configure and maintain) and remove default value for project_id. bzr revid: apa@tinyerp.com-20120507125708-7gcxl8915us0xoio --- addons/project/project.py | 25 ------------------------- addons/project/project_view.xml | 26 +++++++++++++------------- addons/project/static/src/js/project.js | 6 +++--- 3 files changed, 16 insertions(+), 41 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 7916b85bcc2..3a65449ff69 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -203,31 +203,7 @@ class project(osv.osv): 'color': fields.integer('Color Index'), 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'), } - def dummy(self, cr, uid, ids, context=None): - return False - def open_tasks(self, cr, uid, ids, context=None): - #Open the View for the Tasks for the project - """ - This opens Tasks views - @return :Dictionary value for task view - """ - if context is None: - context = {} - if ids: - context = dict(context, search_default_project_id=ids[0]) - return { - 'name': _('Task'), - 'context': context, - 'view_type': 'form', - 'view_mode': 'kanban,tree,calendar,form', - 'res_model': 'project.task', - 'view_id': False, - 'domain':[('project_id','in',ids)], - 'type': 'ir.actions.act_window', - 'nodestroy': True - } - def _get_type_common(self, cr, uid, context): ids = self.pool.get('project.task.type').search(cr, uid, [('project_default','=',1)], context=context) return ids @@ -757,7 +733,6 @@ class task(osv.osv): 'sequence': 10, 'active': True, 'user_id': lambda obj, cr, uid, context: uid, - 'project_id':lambda self, cr, uid, context: context.get('active_id',False), 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'project.task', context=c) } diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 3a9a825e950..1e8b6ce77bc 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -161,6 +161,16 @@ + + + project.project.kanban project.project @@ -198,11 +208,11 @@

    ...


    -
    Deadline - - , - -
    Progress
    @@ -397,8 +407,7 @@ - - + project.task.kanban @@ -717,15 +726,6 @@ - - res.company.task.config res.company diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index 001777103d6..27874b24f25 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -16,9 +16,6 @@ openerp.project = function(openerp) { }); }); - //if task is true , then open the task when click on the anywhere in the box. - if(this.record.use_tasks.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks'); - if(!this.record.use_tasks.raw_value)$(this.$element).find('.click_button').attr('data-name','dummy'); // set sequence like Tasks,Issues,Timesheets and Phases my_list = $("#list a") @@ -29,6 +26,9 @@ openerp.project = function(openerp) { }); $('#list').replaceWith(my_list); + //if task is true , then open the task when click on the anywhere in the box. + if(this.record.use_tasks.raw_value)$(this.$element).find('.click_button').attr('data-name',my_list[0].getAttribute('data-name')); + /* set background color. we can do other way to implement new widget. because we need to rpc call for that. -- cgit v1.2.3 From a6a7276d890488085bc2eec46f57e44425df3a4b Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 8 May 2012 14:51:43 +0530 Subject: [IMP]remove open_model method from project related module and add action as per required bzr revid: sgo@tinyerp.com-20120508092143-ah3siaudwp7jixc8 --- addons/project/project.py | 3 +++ addons/project/static/src/js/project.js | 13 +++++++++--- addons/project_issue/__openerp__.py | 1 - addons/project_issue/project_issue.py | 22 -------------------- addons/project_issue/project_issue_menu.xml | 10 --------- addons/project_issue/project_issue_view.xml | 11 +++++++++- addons/project_issue/static/src/img/issue_icon.png | Bin 5841 -> 0 bytes .../project_issue/static/src/js/project_issue.js | 13 ------------ addons/project_long_term/project_long_term.py | 23 +-------------------- .../project_long_term/project_long_term_view.xml | 22 ++++++++++---------- .../static/src/img/phases_icon.jpg | Bin 19688 -> 0 bytes addons/project_timesheet/__openerp__.py | 1 - .../static/src/img/timesheet_icon.png | Bin 6712 -> 0 bytes .../static/src/js/project_timesheet.js | 20 ------------------ 14 files changed, 35 insertions(+), 104 deletions(-) delete mode 100644 addons/project_issue/static/src/img/issue_icon.png delete mode 100644 addons/project_issue/static/src/js/project_issue.js delete mode 100644 addons/project_long_term/static/src/img/phases_icon.jpg delete mode 100644 addons/project_timesheet/static/src/img/timesheet_icon.png delete mode 100644 addons/project_timesheet/static/src/js/project_timesheet.js diff --git a/addons/project/project.py b/addons/project/project.py index 3a65449ff69..6f662b519a2 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -203,6 +203,9 @@ class project(osv.osv): 'color': fields.integer('Color Index'), 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'), } + + def dummy(self, cr, uid,ids,context): + return False def _get_type_common(self, cr, uid, context): ids = self.pool.get('project.task.type').search(cr, uid, [('project_default','=',1)], context=context) diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index 27874b24f25..d841734bacf 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -16,7 +16,6 @@ openerp.project = function(openerp) { }); }); - // set sequence like Tasks,Issues,Timesheets and Phases my_list = $("#list a") my_list.sort(function (a, b) { @@ -26,8 +25,16 @@ openerp.project = function(openerp) { }); $('#list').replaceWith(my_list); - //if task is true , then open the task when click on the anywhere in the box. - if(this.record.use_tasks.raw_value)$(this.$element).find('.click_button').attr('data-name',my_list[0].getAttribute('data-name')); + //it opens action in sequence which ever is first. + if (my_list.length!=0){ + $(this.$element).find('.click_button').attr('data-name',my_list[0].getAttribute('data-name')); + } + else{ + $(this.$element).find('.click_button').attr('data-name','dummy'); + } + if(isNaN(parseInt($(this.$element).find('.click_button').attr('data-name')))){ + $(this.$element).find('.click_button').attr('data-type',"object") + } /* set background color. we can do other way to implement new widget. diff --git a/addons/project_issue/__openerp__.py b/addons/project_issue/__openerp__.py index dfb40c82ce1..6ddbfb07ea4 100644 --- a/addons/project_issue/__openerp__.py +++ b/addons/project_issue/__openerp__.py @@ -64,7 +64,6 @@ and decide on their status as they evolve. 'installable': True, 'auto_install': False, 'application': True, - 'js': ['static/src/js/project_issue.js'], 'certificate' : '001236490750848623845', } diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index ad870b08106..ffc6017adaf 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -536,28 +536,6 @@ class project(osv.osv): 'use_issues' : True, } - def open_issues(self, cr, uid, ids, context=None): - #Open the View for the Tasks for the project - """ - This opens Issues views - @return :Dictionary value for issue view - """ - if context is None: - context = {} - if ids: - context = dict(context, search_default_project_id=ids[0]) - return { - 'name': _('Issue'), - 'view_type': 'form', - 'view_mode': 'kanban,tree,calendar,form', - 'res_model': 'project.issue', - 'view_id': False, - 'domain':[('project_id','in',ids)], - 'context': context, - 'type': 'ir.actions.act_window', - 'nodestroy': True - } - def _check_escalation(self, cr, uid, ids, context=None): project_obj = self.browse(cr, uid, ids[0], context=context) if project_obj.project_escalation_id: diff --git a/addons/project_issue/project_issue_menu.xml b/addons/project_issue/project_issue_menu.xml index 3be4cb0f0f9..1c4cecfe439 100644 --- a/addons/project_issue/project_issue_menu.xml +++ b/addons/project_issue/project_issue_menu.xml @@ -45,16 +45,6 @@ - - - diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 66ad9c04e30..c2db50e8584 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -334,6 +334,15 @@ + + # ------------------------------------------------------ # Project @@ -367,7 +376,7 @@ - IssueIssues() + IssueIssues() diff --git a/addons/project_issue/static/src/img/issue_icon.png b/addons/project_issue/static/src/img/issue_icon.png deleted file mode 100644 index ce3ccf0f4bc..00000000000 Binary files a/addons/project_issue/static/src/img/issue_icon.png and /dev/null differ diff --git a/addons/project_issue/static/src/js/project_issue.js b/addons/project_issue/static/src/js/project_issue.js deleted file mode 100644 index b0433055160..00000000000 --- a/addons/project_issue/static/src/js/project_issue.js +++ /dev/null @@ -1,13 +0,0 @@ -openerp.project_issue = function(openerp) { - openerp.web_kanban.ProjectIssueKanban = openerp.web_kanban.KanbanRecord.include({ - bind_events: function() { - self = this; - self._super(); - if(this.view.dataset.model == 'project.project') { - if(this.record.use_tasks.raw_value && this.record.use_issues.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks'); - if(!this.record.use_tasks.raw_value && this.record.use_issues.raw_value)$(this.$element).find('.click_button').attr('data-name','open_issues'); - }; - - } - }); -} diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 85e821703fc..0e7fcee25fb 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -234,28 +234,7 @@ class project(osv.osv): _defaults = { 'use_phases' : True, } - def open_phase(self, cr, uid, ids, context=None): - #Open the View for the Tasks for the project - """ - This opens Tasks views - @return :Dictionary value for task view - """ - if context is None: - context = {} - if ids: - context = dict(context, search_default_project_id=ids[0]) - return { - 'name': _('Phase'), - 'view_type': 'form', - 'view_mode': 'tree,calendar,form', - 'res_model': 'project.phase', - 'view_id': False, - 'domain':[('project_id','in',ids)], - 'context': context, - 'type': 'ir.actions.act_window', - 'nodestroy': True - } - + def schedule_phases(self, cr, uid, ids, context=None): context = context or {} if type(ids) in (long, int,): diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index f5dcb48576d..5747ebba5e7 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -110,6 +110,16 @@ + + project.project.kanban.inherited project.project @@ -122,7 +132,7 @@ - PhasePhases() + PhasePhases() @@ -357,16 +367,6 @@ view_mode="tree,form" /> - - # ------------------------------------------------------ # Menu Items # ------------------------------------------------------ diff --git a/addons/project_long_term/static/src/img/phases_icon.jpg b/addons/project_long_term/static/src/img/phases_icon.jpg deleted file mode 100644 index df58a827b11..00000000000 Binary files a/addons/project_long_term/static/src/img/phases_icon.jpg and /dev/null differ diff --git a/addons/project_timesheet/__openerp__.py b/addons/project_timesheet/__openerp__.py index 465702917ff..2dccbb2e38b 100644 --- a/addons/project_timesheet/__openerp__.py +++ b/addons/project_timesheet/__openerp__.py @@ -44,7 +44,6 @@ the Timesheet line entries for particular date and particular user with the eff ], 'installable': True, 'auto_install': False, - 'js': ['static/src/js/project_timesheet.js'], 'certificate': '0075123647453', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_timesheet/static/src/img/timesheet_icon.png b/addons/project_timesheet/static/src/img/timesheet_icon.png deleted file mode 100644 index 7d421231891..00000000000 Binary files a/addons/project_timesheet/static/src/img/timesheet_icon.png and /dev/null differ diff --git a/addons/project_timesheet/static/src/js/project_timesheet.js b/addons/project_timesheet/static/src/js/project_timesheet.js deleted file mode 100644 index 3eff53a8651..00000000000 --- a/addons/project_timesheet/static/src/js/project_timesheet.js +++ /dev/null @@ -1,20 +0,0 @@ -openerp.project_timesheet = function(openerp) { - openerp.web_kanban.ProjectTimeSheetKanban = openerp.web_kanban.KanbanRecord.include({ - bind_events: function() { - self = this; - self._super(); - if(this.view.dataset.model == 'project.project') { - function include(arr, obj) { - for(var i=0; i Date: Tue, 8 May 2012 16:13:02 +0530 Subject: [IMP]:forgot to remove def dummy in project.py bzr revid: apa@tinyerp.com-20120508104302-muuplhcl44u55rjl --- addons/project/project.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 6f662b519a2..f1f6c5f285f 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -204,9 +204,7 @@ class project(osv.osv): 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'), } - def dummy(self, cr, uid,ids,context): - return False - + def _get_type_common(self, cr, uid, context): ids = self.pool.get('project.task.type').search(cr, uid, [('project_default','=',1)], context=context) return ids -- cgit v1.2.3 From 5e1413aca654901cdabb93c72e9a32e4da0320da Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Tue, 8 May 2012 16:16:07 +0530 Subject: [IMP]:improved js code. bzr revid: apa@tinyerp.com-20120508104607-w3q12gphejt3zauw --- addons/project/static/src/js/project.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index cc228e5e931..d00b0762f86 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -26,10 +26,12 @@ openerp.project = function(openerp) { $('#list').replaceWith(my_list); //it opens action in sequence which ever is first. + if (my_list.length!=0){ - $(this.$element).find('.click_button').attr('data-name',my_list[0].getAttribute('data-name')); - if(isNaN(parseInt($(this.$element).find('.click_button').attr('data-name')))){ - $(this.$element).find('.click_button').attr('data-type',"object") + click_button = $(this.$element).find('.click_button') + click_button.attr('data-name',my_list[0].getAttribute('data-name')); + if(isNaN(parseInt(click_button.attr('data-name')))){ + click_button.attr('data-type',"object") } } /* set background color. -- cgit v1.2.3 From 645d2437e0a3897c9731ba22152c7351c4c5ff52 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Tue, 8 May 2012 16:17:05 +0530 Subject: [IMP]:set indentation in js file. bzr revid: apa@tinyerp.com-20120508104705-zri4xvoc4k1d4e9q --- addons/project/static/src/js/project.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index d00b0762f86..f5e6bdd99d6 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -31,7 +31,7 @@ openerp.project = function(openerp) { click_button = $(this.$element).find('.click_button') click_button.attr('data-name',my_list[0].getAttribute('data-name')); if(isNaN(parseInt(click_button.attr('data-name')))){ - click_button.attr('data-type',"object") + click_button.attr('data-type',"object") } } /* set background color. -- cgit v1.2.3 From abdc6e0383c795190ccffc226a536504d67e9271 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Tue, 8 May 2012 16:25:21 +0530 Subject: [IMP]:added def dummy bzr revid: apa@tinyerp.com-20120508105521-1mqur1isvkw0j5n7 --- addons/project/project.py | 2 ++ addons/project/static/src/js/project.js | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index f1f6c5f285f..826cc43c780 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -204,6 +204,8 @@ class project(osv.osv): 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'), } + def dummy(self, cr, uid,ids, context): + return False def _get_type_common(self, cr, uid, context): ids = self.pool.get('project.task.type').search(cr, uid, [('project_default','=',1)], context=context) diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index f5e6bdd99d6..b7c37d9671e 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -26,14 +26,15 @@ openerp.project = function(openerp) { $('#list').replaceWith(my_list); //it opens action in sequence which ever is first. - + click_button = $(this.$element).find('.click_button') if (my_list.length!=0){ - click_button = $(this.$element).find('.click_button') click_button.attr('data-name',my_list[0].getAttribute('data-name')); - if(isNaN(parseInt(click_button.attr('data-name')))){ - click_button.attr('data-type',"object") - } } + else{ + click_button.attr('data-name','dummy'); + } + if(isNaN(parseInt(click_button.attr('data-name'))))click_button.attr('data-type',"object"); + /* set background color. we can do other way to implement new widget. because we need to rpc call for that. -- cgit v1.2.3 From e9d359a7ed408b886012c021357a8e328586e1c9 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 8 May 2012 16:13:05 +0200 Subject: [IMP] analytic: do clean type check with isinstance bzr revid: rco@openerp.com-20120508141305-m96be66gtw1lztik --- addons/analytic/analytic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index 67034f4420b..248eee3d103 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -96,7 +96,7 @@ class account_analytic_account(osv.osv): return self._compute_level_tree(cr, uid, ids, child_ids, res, fields, context) def name_get(self, cr, uid, ids, context=None): - if type(ids) != type([]): + if isinstance(ids, (int, long)): ids=[ids] if not ids: return [] @@ -134,7 +134,7 @@ class account_analytic_account(osv.osv): return accounts def _set_company_currency(self, cr, uid, ids, name, value, arg, context=None): - if type(ids) != type([]): + if isinstance(ids, (int, long)): ids=[ids] for account in self.browse(cr, uid, ids, context=context): if account.company_id: -- cgit v1.2.3 From 7dab19c32b6a8303711cdfb6d5da5d96d177e43d Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 9 May 2012 08:55:22 +0200 Subject: [IMP] project: small code cleanup for project kanban view bzr revid: rco@openerp.com-20120509065522-16ouzxqiwqgjdcyd --- addons/project/project.py | 14 +++++++------- addons/project/project_view.xml | 8 ++++---- addons/project/static/src/js/project.js | 23 ++++++++++------------- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 826cc43c780..a25e55d12e5 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -154,14 +154,14 @@ class project(osv.osv): if proj.tasks: raise osv.except_osv(_('Operation Not Permitted !'), _('You cannot delete a project containing tasks. I suggest you to desactivate it.')) return super(project, self).unlink(cr, uid, ids, *args, **kwargs) - + def _task_count(self, cr, uid, ids, field_name, arg, context=None): res = dict.fromkeys(ids, 0) task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)]) for task in self.pool.get('project.task').browse(cr, uid, task_ids, context): res[task.project_id.id] += 1 return res - + _columns = { 'complete_name': fields.function(_complete_name, string="Project Name", type='char', size=250), 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the project without removing it."), @@ -198,14 +198,14 @@ class project(osv.osv): 'warn_header': fields.text('Mail Header', help="Header added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), - 'use_tasks': fields.boolean('Task',help = "If you check this field tasks appears in kanban view"), - 'task_count': fields.function(_task_count , type='integer',string="Open Tasks"), + 'use_tasks': fields.boolean('Use Tasks', help="Check this field if this project is aimed at managing tasks"), + 'task_count': fields.function(_task_count, type='integer', string="Open Tasks"), 'color': fields.integer('Color Index'), 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'), } - def dummy(self, cr, uid,ids, context): - return False + def dummy(self, cr, uid, ids, context): + return True def _get_type_common(self, cr, uid, context): ids = self.pool.get('project.task.type').search(cr, uid, [('project_default','=',1)], context=context) @@ -217,7 +217,7 @@ class project(osv.osv): 'priority': 1, 'sequence': 10, 'type_ids': _get_type_common, - 'use_tasks' : True, + 'use_tasks': True, } # TODO: Why not using a SQL contraints ? diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 1e8b6ce77bc..19a1d0d4454 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -207,12 +207,12 @@

    ...


    -
    Deadline
    diff --git a/addons/project/static/src/js/project.js b/addons/project/static/src/js/project.js index b7c37d9671e..09a7c9eb256 100644 --- a/addons/project/static/src/js/project.js +++ b/addons/project/static/src/js/project.js @@ -1,7 +1,7 @@ openerp.project = function(openerp) { openerp.web_kanban.ProjectKanban = openerp.web_kanban.KanbanRecord.include({ bind_events: function() { - self = this; + var self = this; self._super(); if(this.view.dataset.model == 'project.project') { @@ -17,7 +17,7 @@ openerp.project = function(openerp) { }); // set sequence like Tasks,Issues,Timesheets and Phases - my_list = $("#list a") + var my_list = $("#list a") my_list.sort(function (a, b) { var aValue = parseInt(a.id); var bValue = parseInt(b.id); @@ -25,27 +25,24 @@ openerp.project = function(openerp) { }); $('#list').replaceWith(my_list); - //it opens action in sequence which ever is first. - click_button = $(this.$element).find('.click_button') - if (my_list.length!=0){ - click_button.attr('data-name',my_list[0].getAttribute('data-name')); + // when vignette is clicked, it opens the first action in sequence + if (my_list.length != 0) { + var click_button = $(this.$element).find('.click_button') + click_button.attr('data-name', my_list[0].getAttribute('data-name')); + click_button.attr('data-type', "action"); } - else{ - click_button.attr('data-name','dummy'); - } - if(isNaN(parseInt(click_button.attr('data-name'))))click_button.attr('data-type',"object"); /* set background color. we can do other way to implement new widget. because we need to rpc call for that. */ this.$element.find('.bgcolor').click(function(){ - color = parseInt($(this).find('span').attr('class').split(' ')[0].substring(16)) - color_class = $(this).find('span').attr('class').split(' ')[0] + var color = parseInt($(this).find('span').attr('class').split(' ')[0].substring(16)) + var color_class = $(this).find('span').attr('class').split(' ')[0] $(this).closest('#oe_project_kanban_vignette').removeClass().addClass(color_class + ' oe_project_kanban_vignette'); self.view.dataset.write(parseInt(this.id), {color:color}); }); - }; + } } }); } -- cgit v1.2.3 From 0c1334bd62a2054dc304d0464f8b10539fbee140 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 9 May 2012 08:56:44 +0200 Subject: [IMP] project_issue: small code cleanup for project kanban view bzr revid: rco@openerp.com-20120509065644-5piwp0fw4qqy434c --- addons/project_issue/project_issue.py | 21 ++++++--------------- addons/project_issue/project_issue_view.xml | 19 +++++++++---------- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index ffc6017adaf..5a792ac4d28 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -222,14 +222,6 @@ class project_issue(crm.crm_case, osv.osv): }), } - def _get_project(self, cr, uid, context=None): - user = self.pool.get('res.users').browse(cr, uid, uid, context=context) - if user.context_project_id: - return user.context_project_id.id - else: - project_id = context.get('active_id',False) - return project_id - def on_change_project(self, cr, uid, ids, project_id, context=None): return {} @@ -519,21 +511,20 @@ class project(osv.osv): def _issue_count(self, cr, uid, ids, field_name, arg, context=None): res = dict.fromkeys(ids, 0) - issue_pool = self.pool.get('project.issue') - issue_ids = issue_pool.search(cr, uid, [('project_id', 'in', ids)]) - for issue in issue_pool.browse(cr, uid, issue_ids, context): + issue_ids = self.pool.get('project.issue').search(cr, uid, [('project_id', 'in', ids)]) + for issue in self.pool.get('project.issue').browse(cr, uid, issue_ids, context): res[issue.project_id.id] += 1 return res _columns = { 'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'reply_to' : fields.char('Reply-To Email Address', size=256), - 'use_issues' : fields.boolean('Issues',help = "If you check this field issues are appears in kanban view"), - 'issue_count': fields.function(_issue_count , type='integer'), + 'use_issues' : fields.boolean('Use Issues', help="Check this field if this project manages issues"), + 'issue_count': fields.function(_issue_count, type='integer'), } - + _defaults = { - 'use_issues' : True, + 'use_issues': True, } def _check_escalation(self, cr, uid, ids, context=None): diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index c2db50e8584..35a256be17e 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -335,14 +335,13 @@ - + context="{'search_default_project_id': [active_id], 'default_project_id': active_id}"/> # ------------------------------------------------------ # Project @@ -354,9 +353,9 @@ form - + - + @@ -375,9 +374,9 @@ - - IssueIssues() - + + Issues() -- cgit v1.2.3 From 479d6009864daf4fff69e7dbcc84a2c9d3098949 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 9 May 2012 09:26:54 +0200 Subject: [IMP] project_long_term: small code cleanup for project kanban view bzr revid: rco@openerp.com-20120509072654-mp3uxp2qo8m7qlhi --- addons/project_long_term/project_long_term.py | 18 ++++++------ .../project_long_term/project_long_term_view.xml | 32 ++++++++++------------ 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 0e7fcee25fb..11656b4bebd 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -216,25 +216,23 @@ project_user_allocation() class project(osv.osv): _inherit = "project.project" - + def _phase_count(self, cr, uid, ids, field_name, arg, context=None): res = dict.fromkeys(ids, 0) - phase_pool = self.pool.get('project.phase') - phase_ids = phase_pool.search(cr, uid, [('project_id', 'in', ids)]) - for phase in phase_pool.browse(cr, uid, phase_ids, context): + phase_ids = self.pool.get('project.phase').search(cr, uid, [('project_id', 'in', ids)]) + for phase in self.pool.get('project.phase').browse(cr, uid, phase_ids, context): res[phase.project_id.id] += 1 return res - + _columns = { 'phase_ids': fields.one2many('project.phase', 'project_id', "Project Phases"), - 'use_phases' : fields.boolean('Phase',help = "If you check this field Phases are appears in kanban view"), - 'phase_count' : fields.function(_phase_count , type='integer',string="Open Phases"), - + 'use_phases': fields.boolean('Use Phases', help="Check this field if project manages phases"), + 'phase_count': fields.function(_phase_count, type='integer', string="Open Phases"), } _defaults = { - 'use_phases' : True, + 'use_phases': True, } - + def schedule_phases(self, cr, uid, ids, context=None): context = context or {} if type(ids) in (long, int,): diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 5747ebba5e7..b4042fc42e7 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -84,12 +84,12 @@ - + Planning of Users project.user.allocation form gantt,tree,form,calendar - {} + {} @@ -104,22 +104,21 @@ form - + - + - - - + project.project.kanban.inherited project.project @@ -131,9 +130,8 @@ - - PhasePhases() - + Phases() -- cgit v1.2.3 From 85e4f9c4f239590cfd2e9e09ca7349da1c30d22f Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 9 May 2012 10:19:55 +0200 Subject: [IMP] project_timesheet: code cleanup for project kanban view bzr revid: rco@openerp.com-20120509081955-2p5u2z4xkycbmpdd --- addons/project_timesheet/project_timesheet.py | 92 +++++++++------------- .../project_timesheet/project_timesheet_view.xml | 58 +++++++------- 2 files changed, 65 insertions(+), 85 deletions(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 9a718e08acc..85ffc99807c 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -29,41 +29,34 @@ from tools.translate import _ class project_project(osv.osv): _inherit = 'project.project' - def _to_invoice(self, cr, uid, ids,field_name, arg, context=None): + def _to_invoice(self, cr, uid, ids, field_name, arg, context=None): + account_analytic_line = self.pool.get("account.analytic.line") res = {} - aal_pool = self.pool.get("account.analytic.line") for project in self.browse(cr,uid,ids,context=context): - line_ids = aal_pool.search(cr, uid, [('account_id','=',project.analytic_account_id.id),('to_invoice','=',1),('invoice_id','=',False)]) + line_ids = account_analytic_line.search(cr, uid, [('account_id', '=', project.analytic_account_id.id), ('to_invoice','=',1), ('invoice_id','=',False)]) + lines = account_analytic_line.browse(cr, uid, line_ids, context) res[project.id] = { - 'amt_to_invoice': 0.0, - 'hrs_to_invoice': 0.0, - } - if line_ids: - amt_to_invoice,hrs_to_invoice = 0.0,0.0 - for line in aal_pool.browse(cr,uid,line_ids,context=context): - amt_to_invoice += line.amount - hrs_to_invoice += line.unit_amount - res[project.id]['amt_to_invoice'] = (amt_to_invoice)*-1 - res[project.id]['hrs_to_invoice'] = hrs_to_invoice - + 'amt_to_invoice': sum(line.amount for line in lines), + 'hrs_to_invoice': sum(line.unit_amount for line in lines), + } return res - + def _timesheet_count(self, cr, uid, ids, field_name, arg, context=None): - res={} - aal_pool=self.pool.get('account.analytic.line') - for project in self.browse(cr, uid, ids, context=context): - timesheet = aal_pool.search(cr, uid, [("account_id","=", project.analytic_account_id.id)]) - res[project.id] = len(timesheet) + account_analytic_line = self.pool.get('account.analytic.line') + res = {} + for project in self.browse(cr, uid, ids, context): + line_ids = account_analytic_line.search(cr, uid, [('account_id', '=', project.analytic_account_id.id)]) + res[project.id] = len(line_ids) return res _columns = { - 'use_timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view"), - 'amt_to_invoice': fields.function(_to_invoice,string="Amount to Invoice",multi="sums"), - 'hrs_to_invoice': fields.function(_to_invoice,string="Hours to Invoice",multi="sums"), - 'timesheet_count': fields.function(_timesheet_count , type='integer',string="Issue"), + 'use_timesheets': fields.boolean('Timesheets', help="Check this field if this project manages timesheets"), + 'amt_to_invoice': fields.function(_to_invoice, string="Amount to Invoice", multi="sums"), + 'hrs_to_invoice': fields.function(_to_invoice, string="Time to Invoice", multi="sums"), + 'timesheet_count': fields.function(_timesheet_count, type='integer', string="Issue"), } _defaults = { - 'use_timesheets' : True, + 'use_timesheets': True, } def onchange_partner_id(self, cr, uid, ids, part=False, context=None): @@ -77,40 +70,27 @@ class project_project(osv.osv): res['value'].update({'to_invoice': factor_id}) return res - def getAnalyticJournal(self, cr, uid, context=None): - md = self.pool.get('ir.model.data') + def open_timesheets(self, cr, uid, ids, context=None): + """ open Timesheets view """ + project = self.browse(cr, uid, ids[0], context) try: - result = md.get_object_reference(cr, uid, 'hr_timesheet', 'analytic_journal') - return result[1] + journal_id = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_timesheet', 'analytic_journal').id except ValueError: - pass - return False - - def open_timesheets(self, cr, uid, ids, context=None): - #Open the View for the Timesheet of the project - """ - This opens Timesheets views - @return :Dictionary value for timesheet view - """ - if context is None: - context = {} - if ids: - project = self.browse(cr, uid, ids[0], context=context) - context = dict(context, - search_default_account_id = project.analytic_account_id.id, - default_account_id = project.analytic_account_id.id, - default_journal_id = self.getAnalyticJournal(cr, uid, context) - ) + journal_id = False + view_context = { + 'search_default_account_id': [project.analytic_account_id.id], + 'default_account_id': project.analytic_account_id.id, + 'default_journal_id': journal_id, + } return { - 'name': _('Bill Tasks Works'), - 'context': context, - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'account.analytic.line', - 'view_id': False, - 'type': 'ir.actions.act_window', - 'nodestroy': True - } + 'type': 'ir.actions.act_window', + 'name': _('Bill Tasks Works'), + 'res_model': 'account.analytic.line', + 'view_type': 'form', + 'view_mode': 'tree,form', + 'context': view_context, + 'nodestroy': True, + } project_project() diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 6ac8afcfaf8..8e3d2d7fcd6 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -7,12 +7,11 @@ form - - - - - - + + + + + @@ -31,31 +30,32 @@ kanban - - + + - + + - - - TimesheetTimesheets() - - - - - - - - - - - - - + + Timesheets() + + + + + + + + + + + + + -- cgit v1.2.3 From 36346f081ee6a0732b4d4e19d6942259d8b69630 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 9 May 2012 10:24:51 +0200 Subject: [IMP] project_timesheet: improve field names for project kanban view bzr revid: rco@openerp.com-20120509082451-jfsd0pgn7o4vddf5 --- addons/project_timesheet/project_timesheet.py | 8 ++++---- addons/project_timesheet/project_timesheet_view.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 85ffc99807c..585b3cd6ec8 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -36,8 +36,8 @@ class project_project(osv.osv): line_ids = account_analytic_line.search(cr, uid, [('account_id', '=', project.analytic_account_id.id), ('to_invoice','=',1), ('invoice_id','=',False)]) lines = account_analytic_line.browse(cr, uid, line_ids, context) res[project.id] = { - 'amt_to_invoice': sum(line.amount for line in lines), - 'hrs_to_invoice': sum(line.unit_amount for line in lines), + 'amount_to_invoice': sum(line.amount for line in lines), + 'time_to_invoice': sum(line.unit_amount for line in lines), } return res @@ -51,8 +51,8 @@ class project_project(osv.osv): _columns = { 'use_timesheets': fields.boolean('Timesheets', help="Check this field if this project manages timesheets"), - 'amt_to_invoice': fields.function(_to_invoice, string="Amount to Invoice", multi="sums"), - 'hrs_to_invoice': fields.function(_to_invoice, string="Time to Invoice", multi="sums"), + 'amount_to_invoice': fields.function(_to_invoice, string="Amount to Invoice", multi="sums"), + 'time_to_invoice': fields.function(_to_invoice, string="Time to Invoice", multi="sums"), 'timesheet_count': fields.function(_timesheet_count, type='integer', string="Issue"), } _defaults = { diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index 8e3d2d7fcd6..f0b2e2abc20 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -9,8 +9,8 @@ - - + + @@ -45,13 +45,13 @@ -- cgit v1.2.3 From 700061a30a4dea502d6e73f623d4704bdce0e8b0 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 9 May 2012 12:08:51 +0200 Subject: [FIX] project_long_term: remove inappropriate (and useless) default value bzr revid: rco@openerp.com-20120509100851-zd29xff7jk9pzuld --- addons/project_long_term/project_long_term.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 11656b4bebd..925e4258ed9 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -123,7 +123,6 @@ class project_phase(osv.osv): _defaults = { 'state': 'draft', 'sequence': 10, - 'project_id':lambda self, cr, uid, context: context.get('active_id',False), 'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Day'))], context=c)[0] } _order = "project_id, date_start, sequence" -- cgit v1.2.3
    Deadline
    Amount to invoice - -
    Hours to Invoice - h -
    Amount to invoice + +
    Time to Invoice + +
    Amount to invoice - +
    Time to Invoice - +