Sebas 7 年之前
當前提交
e21b272c4e
共有 6 個文件被更改,包括 132 次插入0 次删除
  1. 25 0
      __init__.py
  2. 二進制
      __init__.pyc
  3. 40 0
      __openerp__.py
  4. 34 0
      crm_task.py
  5. 二進制
      crm_task.pyc
  6. 33 0
      crm_task_view.xml

+ 25 - 0
__init__.py

@@ -0,0 +1,25 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#    
+#    Odoo, Open Source Management Solution
+#
+#    Author: Andrius Laukavičius. Copyright: JSC NOD Baltic
+#
+#    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 crm_task
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

二進制
__init__.pyc


+ 40 - 0
__openerp__.py

@@ -0,0 +1,40 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#    
+#    Odoo, Open Source Management Solution
+#
+#    Author: Andrius Laukavičius. Copyright: JSC NOD Baltic
+#
+#    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/>.     
+#
+##############################################################################
+
+
+{
+    'name': 'Tasks on CRM',
+    'version': '1.0',
+    'category': 'Customer Relationship Management',
+    'description': """
+Todo list for CRM leads and opportunities. Similar Functionality as in v7 crm_todo
+==========================================
+    """,
+    'author': 'OERP',
+    'website': 'www.oerp.eu',
+    'depends': ['crm', 'project'],
+    'data': ['crm_task_view.xml'],
+    'installable': True,
+    'auto_install': False,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 34 - 0
crm_task.py

@@ -0,0 +1,34 @@
+# -*- 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/>.
+#
+##############################################################################
+
+from openerp import models, fields
+
+class project_task(models.Model):
+    _inherit = 'project.task'
+
+    lead_id = fields.Many2one('crm.lead', 'Lead / Opportunity')
+
+class crm_lead(models.Model):
+    _inherit = 'crm.lead'
+
+    task_ids = fields.One2many('project.task', 'lead_id', 'Tasks')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

二進制
crm_task.pyc


+ 33 - 0
crm_task_view.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" ?>
+<openerp>
+    <data>
+
+    <record id="crm_todo_opportunity_add" model="ir.ui.view">
+        <field name="name">Opportunities - Tasks</field>
+        <field name="model">crm.lead</field>
+        <field name="inherit_id" ref="crm.crm_case_form_view_oppor" />
+        <field name="arch" type="xml">
+            <data>
+            <page string="Lead" position="before">
+                <page string="Tasks">
+                    <field name="task_ids"/>
+                </page>
+            </page>
+            </data>
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="project_task_crm_form">
+        <field name="name">project.task.form.crm</field>
+        <field name="model">project.task</field>
+        <field name="priority">20</field>
+        <field name="inherit_id" ref="project.view_task_form2" />
+        <field name="arch" type="xml">
+            <field name="partner_id" position="after">
+                <field name="lead_id" attrs="{'invisible': [('lead_id', '=', False)]}" style="width: 80%%"/>
+            </field>
+        </field>
+    </record>
+
+    </data>
+</openerp>