clearcorp team mailing list archive
-
clearcorp team
-
Mailing list archive
-
Message #00628
[Merge] lp:~rr.clearcorp/openerp-ccorp-addons/6.1-project_extended into lp:openerp-ccorp-addons
Ronald Rubi has proposed merging lp:~rr.clearcorp/openerp-ccorp-addons/6.1-project_extended into lp:openerp-ccorp-addons.
Requested reviews:
CLEARCORP drivers (clearcorp-drivers)
For more details, see:
https://code.launchpad.net/~rr.clearcorp/openerp-ccorp-addons/6.1-project_extended/+merge/146916
[MRG] Move module project_name_shortcut to project_extended\n[ADD] Add id task in project.task in project_extended
--
https://code.launchpad.net/~rr.clearcorp/openerp-ccorp-addons/6.1-project_extended/+merge/146916
Your team CLEARCORP development team is subscribed to branch lp:openerp-ccorp-addons.
=== renamed directory 'project_project_name_shortcut' => 'project_extended'
=== modified file 'project_extended/__init__.py'
--- project_project_name_shortcut/__init__.py 2012-06-30 22:41:06 +0000
+++ project_extended/__init__.py 2013-02-06 17:46:21 +0000
@@ -20,4 +20,4 @@
#
##############################################################################
-import project_name_shortcut
+import project_extended
=== modified file 'project_extended/__openerp__.py'
--- project_project_name_shortcut/__openerp__.py 2012-06-30 22:41:06 +0000
+++ project_extended/__openerp__.py 2013-02-06 17:46:21 +0000
@@ -28,6 +28,7 @@
'complexity': 'normal',
"description": """
This module changes de reference name of the project by a concatenated name using the project code.
+This module added id_task in project task
""",
"category": 'Project Management',
"sequence": 4,
@@ -37,10 +38,10 @@
"depends" : ['project'],
"init_xml" : [],
"demo_xml" : [],
- "update_xml" : ["project_name_view.xml"],
+ "update_xml" : ["project_extended_view.xml"],
"test" : [],
"auto_install": False,
"application": False,
"installable": True,
'license': 'AGPL-3',
-}
\ No newline at end of file
+}
=== added file 'project_extended/project_extended.py'
--- project_extended/project_extended.py 1970-01-01 00:00:00 +0000
+++ project_extended/project_extended.py 2013-02-06 17:46:21 +0000
@@ -0,0 +1,74 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Addons modules by CLEARCORP S.A.
+# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
+#
+# 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 osv import osv, fields
+#from tools import #debug
+
+
+class project_name_shortcut(osv.osv):
+ _name = 'project.project'
+ _inherit = 'project.project'
+
+ def name_get(self, cr, uid, ids, context=None):
+ if not ids:
+ return []
+ res = []
+ for project in self.browse(cr, uid, ids, context=context):
+ data = []
+ proj = project.parent_id
+ while proj :
+ if proj.code != '' and proj.code != False:
+ data.insert(0,(proj.name))
+ proj = proj.parent_id
+ continue
+ else:
+ data.insert(0,(proj.name))
+ proj = proj.parent_id
+
+
+
+ data.append(project.name)
+ data = ' / '.join(data)
+ res.append((project.id, data))
+ return res
+
+ def _shortcut_name(self, cr, uid, ids,field_name,arg, context=None):
+ res ={}
+ #debug(ids)
+ for m in self.browse(cr,uid,ids,context=context):
+ res = self.name_get(cr, uid, ids)
+ return dict(res)
+
+ return res
+
+ _columns = {
+ 'shortcut_name': fields.function(_shortcut_name, method=True, string='Project Name', type='char', size=350),
+ 'shortcut': fields.char('shortcut',size=16),
+ }
+
+
+class Task(osv.osv):
+ _inherit = 'project.task'
+
+ _columns = {
+ 'id_task': fields.char('ID task',size=16),
+ }
=== added file 'project_extended/project_extended_view.xml'
--- project_extended/project_extended_view.xml 1970-01-01 00:00:00 +0000
+++ project_extended/project_extended_view.xml 2013-02-06 17:46:21 +0000
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="view_project" model="ir.ui.view">
+ <field name="name">project.view_project1</field>
+ <field name="model">project.project</field>
+ <field name="type">tree</field>
+ <field name="inherit_id" ref="project.view_project"/>
+ <field name="arch" type="xml">
+ <data>
+ <xpath expr="//tree/field[@name='name']" position="replace">
+ <field name="shortcut_name"/>
+ </xpath>
+ </data>
+ </field>
+ </record>
+
+ <record id="view_task_form2_extended" model="ir.ui.view">
+ <field name="name">view.task.form2.extended</field>
+ <field name="model">project.task</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="project.view_task_form2"/>
+ <field name="arch" type="xml">
+ <data>
+ <xpath expr="//form/group/field[@name='total_hours']" position="after">
+ <field name="id_task"/>
+ </xpath>
+ </data>
+ </field>
+ </record>
+
+ </data>
+</openerp>
=== removed file 'project_project_name_shortcut/project_name_shortcut.py'
--- project_project_name_shortcut/project_name_shortcut.py 2012-06-30 22:41:06 +0000
+++ project_project_name_shortcut/project_name_shortcut.py 1970-01-01 00:00:00 +0000
@@ -1,66 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Addons modules by CLEARCORP S.A.
-# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
-#
-# 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 osv import osv, fields
-#from tools import #debug
-
-
-class project_name_shortcut(osv.osv):
- _name = 'project.project'
- _inherit = 'project.project'
-
- def name_get(self, cr, uid, ids, context=None):
- if not ids:
- return []
- res = []
- for project in self.browse(cr, uid, ids, context=context):
- data = []
- proj = project.parent_id
- while proj :
- if proj.code != '' and proj.code != False:
- data.insert(0,(proj.name))
- proj = proj.parent_id
- continue
- else:
- data.insert(0,(proj.name))
- proj = proj.parent_id
-
-
-
- data.append(project.name)
- data = ' / '.join(data)
- res.append((project.id, data))
- return res
-
- def _shortcut_name(self, cr, uid, ids,field_name,arg, context=None):
- res ={}
- #debug(ids)
- for m in self.browse(cr,uid,ids,context=context):
- res = self.name_get(cr, uid, ids)
- return dict(res)
-
- return res
-
- _columns = {
- 'shortcut_name': fields.function(_shortcut_name, method=True, string='Project Name', type='char', size=350),
- 'shortcut': fields.char('shortcut',size=16),
- }
\ No newline at end of file
=== removed file 'project_project_name_shortcut/project_name_view.xml'
--- project_project_name_shortcut/project_name_view.xml 2012-06-30 22:41:06 +0000
+++ project_project_name_shortcut/project_name_view.xml 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
- <data>
- <record id="view_project" model="ir.ui.view">
- <field name="name">project.view_project1</field>
- <field name="model">project.project</field>
- <field name="type">tree</field>
- <field name="inherit_id" ref="project.view_project"/>
- <field name="arch" type="xml">
- <data>
- <xpath expr="//tree/field[@name='name']" position="replace">
- <field name="shortcut_name"/>
- </xpath>
- </data>
- </field>
- </record>
- </data>
-</openerp>
Follow ups