diff options
| author | Rucha (Open ERP) <rpa@tinyerp.com> | 2011-11-02 10:58:27 +0530 |
|---|---|---|
| committer | Rucha (Open ERP) <rpa@tinyerp.com> | 2011-11-02 10:58:27 +0530 |
| commit | 2fdecf4717080ea98a514b67dedefc27d76c6727 (patch) | |
| tree | bb54dd0e81af0bbf999fee1110fecb9e507f51e1 /addons/pad_project/models | |
| parent | 9fe0f6fa83b84d0806359bdc2a3ae31dfb7e997a (diff) | |
| parent | 3d22bb8b55d48e5ee8226f023555f003288b157a (diff) | |
[MERGE]: Merge with latest trunk
bzr revid: rpa@tinyerp.com-20111102052827-0bctjrhb4amyg6pl
Diffstat (limited to 'addons/pad_project/models')
| -rw-r--r-- | addons/pad_project/models/__init__.py | 24 | ||||
| -rw-r--r-- | addons/pad_project/models/project_task.py | 17 | ||||
| -rw-r--r-- | addons/pad_project/models/project_task.xml | 17 |
3 files changed, 58 insertions, 0 deletions
diff --git a/addons/pad_project/models/__init__.py b/addons/pad_project/models/__init__.py new file mode 100644 index 00000000000..098de31a5a4 --- /dev/null +++ b/addons/pad_project/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +import project_task + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/pad_project/models/project_task.py b/addons/pad_project/models/project_task.py new file mode 100644 index 00000000000..c215aed1325 --- /dev/null +++ b/addons/pad_project/models/project_task.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +from tools.translate import _ +from osv import fields, osv + +class task(osv.osv): + _inherit = "project.task" + + def pad_get(self, cr, uid, ids, context=None): + """Get pad action + """ + url = self.pool.get("ir.attachment").pad_get(cr, uid, self._name, ids[0]) + return { + 'type': 'ir.actions.act_url', + 'url': url + } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/pad_project/models/project_task.xml b/addons/pad_project/models/project_task.xml new file mode 100644 index 00000000000..de944b603b5 --- /dev/null +++ b/addons/pad_project/models/project_task.xml @@ -0,0 +1,17 @@ +<openerp> + <data> + <record id="view_task_kanban_with_pad" model="ir.ui.view"> + <field name="name">project.task.kanban.pad</field> + <field name="model">project.task</field> + <field name="type">kanban</field> + <field name="inherit_id" ref="project.view_task_kanban"/> + <field name="arch" type="xml"> + <xpath expr="//a[@type='color']" position="after"> + <a name="pad_get" string="Pad" type="object"> + <img src="/pad/static/src/img/pad-icon.png" border="0" width="16" height="16"/> + </a> + </xpath> + </field> + </record> + </data> +</openerp> |
