diff options
| author | Sanjay Gohel (Open ERP) <sgo@tinyerp.com> | 2012-03-28 15:07:42 +0530 |
|---|---|---|
| committer | Sanjay Gohel (Open ERP) <sgo@tinyerp.com> | 2012-03-28 15:07:42 +0530 |
| commit | aeb4e50fe630928a4fdf5156910303eb16ff47d5 (patch) | |
| tree | 1f1ae0f00449cd60cea399ac0c3857fef7d1f777 | |
| parent | 4dc00e8ccf75cb1046660d033be2ff6a62210ce7 (diff) | |
| parent | df11d7174a58c9a8bc343dc3fba8d19cefcb767c (diff) | |
[MERGE]improve and merge
bzr revid: sgo@tinyerp.com-20120328093742-yqfl03g0fwzn91vi
| -rw-r--r-- | addons/project/project.py | 3 | ||||
| -rw-r--r-- | addons/project/project_view.xml | 27 | ||||
| -rw-r--r-- | addons/project/static/src/css/project.css | 3 | ||||
| -rw-r--r-- | addons/project/static/src/img/bug.png | bin | 541 -> 0 bytes | |||
| -rw-r--r-- | addons/project/static/src/img/tasks.png | bin | 2545 -> 0 bytes | |||
| -rw-r--r-- | addons/project_issue/project_issue_menu.xml | 2 | ||||
| -rw-r--r-- | addons/project_issue/project_issue_view.xml | 2 | ||||
| -rw-r--r-- | addons/project_long_term/project_long_term_view.xml | 4 | ||||
| -rw-r--r-- | addons/project_long_term/static/src/img/phases_icon.jpg | bin | 0 -> 19688 bytes | |||
| -rw-r--r-- | addons/project_timesheet/project_timesheet.py | 36 | ||||
| -rw-r--r-- | addons/project_timesheet/project_timesheet_view.xml | 17 | ||||
| -rw-r--r-- | addons/project_timesheet/static/src/img/timesheet.png | bin | 0 -> 888 bytes |
12 files changed, 78 insertions, 16 deletions
diff --git a/addons/project/project.py b/addons/project/project.py index 21e0c8f6011..e03f80b54b2 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -250,7 +250,8 @@ class project(osv.osv): 'active': True, 'priority': 1, 'sequence': 10, - 'type_ids': _get_type_common + 'type_ids': _get_type_common, + 'task' : True, } # TODO: Why not using a SQL contraints ? diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index f4237945866..44c902ff20c 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -171,6 +171,7 @@ <field name="effective_hours"/> <field name="total_hours"/> <field name="date"/> + <field name="members"/> <field name="task"/> <field name="user_id"/> @@ -192,12 +193,15 @@ </div> <div class="oe_module_desc"> <h4 class="oe_project_font1"><a type="edit"><div class="oe_project_font"><field name="name"/></div></a></h4> - <div class="progress invoiced"> - <br/> - <t t-esc="Math.round(record.effective_hours.raw_value)"/> hrs - <progress t-att-value="record.effective_hours.raw_value" t-att-max="record.total_hours.raw_value"></progress> - <t t-esc="Math.round(record.total_hours.raw_value)"/> hrs - </div> + <table border="0" width="350px"> + <tr> + <td align="left" valign="bottom" class="buttons"> + <t t-if="record.task.raw_value"> + <button name="open_tasks" class="oe_project_buttons" type="object"><img src="/project/static/src/img/tasks_icon.png" width="50" height="50" align="center"/></button> + </t> + </td> + </tr> + </table> </div> <table border="0" width="350px"> <tr> @@ -206,10 +210,13 @@ <a type="edit"><img class="oe_topbar_avatar" data-default-src="/web/static/src/img/topbar-avatar.png" src="/web/static/src/img/topbar-avatar.png"/></a> </t> </td> - <td align="right" valign="bottom" class="buttons"> - <t t-if="record.task.raw_value"> - <button name="open_tasks" class="oe_project_buttons" type="object"><img src="/project/static/src/img/tasks.png" width="20" height="20" align="top"/></button> - </t> + <td align="right" valign="bottom"> + <div class="progress invoiced"> + <br/> + <t t-esc="Math.round(record.effective_hours.raw_value)"/> hrs + <progress t-att-value="record.effective_hours.raw_value" t-att-max="record.total_hours.raw_value"></progress> + <t t-esc="Math.round(record.total_hours.raw_value)"/> hrs + </div> </td> </tr> </table> 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/static/src/img/bug.png b/addons/project/static/src/img/bug.png Binary files differdeleted file mode 100644 index a18278ff5c4..00000000000 --- a/addons/project/static/src/img/bug.png +++ /dev/null diff --git a/addons/project/static/src/img/tasks.png b/addons/project/static/src/img/tasks.png Binary files differdeleted file mode 100644 index 5c5073b1633..00000000000 --- a/addons/project/static/src/img/tasks.png +++ /dev/null diff --git a/addons/project_issue/project_issue_menu.xml b/addons/project_issue/project_issue_menu.xml index 5023891f6ba..82bc44b9d16 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"/> - <menuitem name="Issues" id="menu_project_issue_track" + <menuitem name="Issues" id="menu_project_issue_track" action="project_issue_categ_act0" sequence="15"/> </data> </openerp> diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index a1b3bf19782..8e9cd432ff2 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -391,7 +391,7 @@ </field> <xpath expr="//td[@class='buttons']" position="inside"> <t t-if="record.issues.raw_value"> - <button name="open_issues" class="oe_project_buttons" type="object"><img src="/project/static/src/img/bug.png" width="18" height="18" align="top"/></button> + <button name="open_issues" class="oe_project_buttons" type="object"><img src="/project_issue/static/src/img/issue_icon.png" width="50" height="50" align="center"/></button> </t> </xpath> </field> diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 12245814240..810389da11e 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -121,8 +121,8 @@ </field> <xpath expr="//td[@class='buttons']" position="inside"> <t t-if="record.phases.raw_value"> - <button name="open_phase" class="oe_project_buttons" type="object">Phases</button> - </t> + <button name="open_phase" class="oe_project_buttons" type="object"><img src="/project_long_term/static/src/img/phases_icon.jpg" width="50" height="50" align="center"/></button> + </t> </xpath> </field> </record> diff --git a/addons/project_long_term/static/src/img/phases_icon.jpg b/addons/project_long_term/static/src/img/phases_icon.jpg Binary files differnew file mode 100644 index 00000000000..df58a827b11 --- /dev/null +++ b/addons/project_long_term/static/src/img/phases_icon.jpg diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 30914410a82..be736c58986 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -43,6 +43,42 @@ class project_project(osv.osv): res['value'].update({'to_invoice': factor_id}) return res + 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 = {} + value = {} + data_obj = self.pool.get('ir.model.data') + 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_project_id':project.id, + #'search_default_open':1, + }) + value = { + 'name': _('Bill Tasks Works'), + 'context': context, + 'view_type': 'form', + '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, + 'nodestroy': True + } + return value + project_project() class project_work(osv.osv): diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml index c7d2ea2d4fc..b9e8816802f 100644 --- a/addons/project_timesheet/project_timesheet_view.xml +++ b/addons/project_timesheet/project_timesheet_view.xml @@ -23,6 +23,23 @@ </field> </record> + <record id="view_project_kanban_inherited" model="ir.ui.view"> + <field name="name">project.project.kanban.inherited</field> + <field name="model">project.project</field> + <field name="type">kanban</field> + <field name="inherit_id" ref="project.view_project_kanban"/> + <field name="arch" type="xml"> + <field name="task" position="after"> + <field name="timesheets"/> + </field> + <xpath expr="//td[@class='buttons']" position="inside"> + <t t-if="record.timesheets.raw_value"> + <button name="open_timesheets" class="oe_project_buttons" type="object"><img src="/project_timesheet/static/src/img/timesheet_icon.png" width="50" height="50" align="center"/></button> + </t> + </xpath> + </field> + </record> + <record id="project_invoice_form_cutomer" model="ir.ui.view"> <field name="name">Inherit project form : Customer</field> <field name="model">project.project</field> diff --git a/addons/project_timesheet/static/src/img/timesheet.png b/addons/project_timesheet/static/src/img/timesheet.png Binary files differnew file mode 100644 index 00000000000..2adc25dc45b --- /dev/null +++ b/addons/project_timesheet/static/src/img/timesheet.png |
