diff options
| author | Antony Lesuisse <al@openerp.com> | 2015-08-14 13:19:31 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2015-08-14 13:19:31 +0200 |
| commit | 3286dc2ec74e5be3e87e39114fad90068d2cb8fa (patch) | |
| tree | 48bda72c201e76db21a86f009b5a2e06af8b84e9 /addons/website_project_issue_sheet | |
| parent | f8357a1a605d1c74d09d7ea5d74ab53ce77aa085 (diff) | |
| parent | 60514d0d0d7254c17ecebad99423f26fd4138d8e (diff) | |
[MERGE] project_issue: website portal
- Remove portal_project move rules to project
- Add issues in the /my/home frontend portal
- Remove website_project, task access is backend only
Diffstat (limited to 'addons/website_project_issue_sheet')
5 files changed, 71 insertions, 0 deletions
diff --git a/addons/website_project_issue_sheet/__init__.py b/addons/website_project_issue_sheet/__init__.py new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/addons/website_project_issue_sheet/__init__.py diff --git a/addons/website_project_issue_sheet/__openerp__.py b/addons/website_project_issue_sheet/__openerp__.py new file mode 100644 index 00000000000..83db1d332af --- /dev/null +++ b/addons/website_project_issue_sheet/__openerp__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + + +{ + 'name': 'Timesheet on Website Project Issue', + 'version': '0.1', + 'category': 'Tools', + 'complexity': 'easy', + 'description': """ +Add timesheet support on issue in the frontend. +================================================================================================== + """, + 'author': 'OpenERP SA', + 'depends': ['website_project_issue', 'project_issue_sheet'], + 'data': [ + 'views/project_issue_templates.xml', + 'security/ir.model.access.csv', + 'security/portal_security.xml', + ], + 'installable': True, + 'auto_install': True, + 'category': 'Hidden', +} diff --git a/addons/website_project_issue_sheet/security/ir.model.access.csv b/addons/website_project_issue_sheet/security/ir.model.access.csv new file mode 100644 index 00000000000..02ea69acb45 --- /dev/null +++ b/addons/website_project_issue_sheet/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_timesheets_portal,access_timesheets_portal,analytic.model_account_analytic_line,base.group_portal,1,0,0,0 diff --git a/addons/website_project_issue_sheet/security/portal_security.xml b/addons/website_project_issue_sheet/security/portal_security.xml new file mode 100644 index 00000000000..eb7c7f7a660 --- /dev/null +++ b/addons/website_project_issue_sheet/security/portal_security.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data noupdate="1"> + + <record id="portal_issue_sheet_rule" model="ir.rule"> + <field name="name">Project/Issue Timesheets: frontend access</field> + <field name="model_id" ref="analytic.model_account_analytic_line"/> + <field name="domain_force">['|', + '&', + ('issue_id.project_id.privacy_visibility', '=', 'portal'), + ('issue_id.message_follower_ids', 'child_of', [user.partner_id.commercial_partner_id.id]), + '&', + ('issue_id.project_id.privacy_visibility', '=', 'followers'), + ('issue_id.message_follower_ids', 'in', [user.partner_id.id]), + ]</field> + <field name="groups" eval="[(4, ref('base.group_portal'))]"/> + </record> + </data> +</openerp> diff --git a/addons/website_project_issue_sheet/views/project_issue_templates.xml b/addons/website_project_issue_sheet/views/project_issue_templates.xml new file mode 100644 index 00000000000..4c27cd4b171 --- /dev/null +++ b/addons/website_project_issue_sheet/views/project_issue_templates.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="issues_followup_sheet" inherit_id="website_project_issue.issues_followup" name="Project Issues Timesheets"> + <xpath expr="//div[@class='panel-body']" position="inside"> + <t t-if="issue.timesheet_ids"> + <hr/> + <table class="table table-hover o_my_status_table"> + <thead> + <tr class="active"> + <th>Date</th> + <th>Description</th> + <th>Responsible</th> + <th>Duration</th> + </tr> + </thead> + <tr t-foreach="issue.timesheet_ids" t-as="timesheet"> + <td><span t-esc="timesheet.date"/></td> + <td><span t-esc="timesheet.name"/></td> + <td><span t-esc="timesheet.user_id.name"/></td> + <td><span t-field="timesheet.unit_amount" t-field-options='{"widget": "duration", "unit": "hour"}'/></td> + </tr> + </table> + </t> + </xpath> + </template> +</odoo> |
