Merge lp:~akretion-team/project-service/project-service-port-functionnal-block into lp:~project-core-editors/project-service/trunk
- project-service-port-functionnal-block
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 34 |
Proposed branch: | lp:~akretion-team/project-service/project-service-port-functionnal-block |
Merge into: | lp:~project-core-editors/project-service/trunk |
Diff against target: |
376 lines (+122/-76) 8 files modified
project_functional_block/__init__.py (+2/-2) project_functional_block/__openerp__.py (+21/-17) project_functional_block/project.py (+49/-22) project_functional_block/project_demo.xml (+21/-0) project_functional_block/project_view.xml (+23/-20) project_functional_block/security/ir.model.access.csv (+2/-2) project_issue_service/project_issue.py (+1/-1) project_task_service/project_task.py (+3/-12) |
To merge this branch: | bzr merge lp:~akretion-team/project-service/project-service-port-functionnal-block |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Reis | lgtm | Approve | |
Raphaël Valyi - http://www.akretion.com | Approve | ||
Review via email: mp+211984@code.launchpad.net |
Commit message
Description of the change
Port project functionnal block to 7 version.
- 36. By Sébastien BEAU - http://www.akretion.com
-
[REF] port view on 7
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote : | # |
I clean the view
- 37. By Sébastien BEAU - http://www.akretion.com
-
[IMP] add demo data
- 38. By Sébastien BEAU - http://www.akretion.com
-
[REF] rename project_
functional_ blocks into project_ functional_ block
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote : | # |
I add some demo data and also I rename the module (remove the useless "s")
Regarding the name of the object "project.
Thanks
Daniel Reis (dreis-pt) wrote : | # |
Good question.
I grepped the addons, and IMHO it would be more consistent to use "project.
- 39. By Sébastien BEAU - http://www.akretion.com
-
[REF] rename project.
functional_ block into project. functional. block
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote : | # |
Done ;)
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : | # |
Thanks Seb, seems all right; tested.
- 40. By David BEAL (ak)
-
[FIX] replace project.
functional_ block by project. functional. block - 41. By David BEAL (ak)
-
[FIX] rename project.
functional_ block in project. functional. block in roject_task_service - 42. By David BEAL (ak)
-
[FIX] rename project.
functional_ block in project. functional. block in project_ issue_service
Daniel Reis (dreis-pt) : | # |
Preview Diff
1 | === renamed directory '__unported__/project_functional_blocks' => 'project_functional_block' | |||
2 | === modified file 'project_functional_block/__init__.py' | |||
3 | --- __unported__/project_functional_blocks/__init__.py 2012-07-12 07:42:28 +0000 | |||
4 | +++ project_functional_block/__init__.py 2014-03-25 15:51:09 +0000 | |||
5 | @@ -3,7 +3,7 @@ | |||
6 | 3 | # | 3 | # |
7 | 4 | # OpenERP, Open Source Management Solution | 4 | # OpenERP, Open Source Management Solution |
8 | 5 | # Copyright (C) 2010 Akretion LDTA (<http://www.akretion.com>). | 5 | # Copyright (C) 2010 Akretion LDTA (<http://www.akretion.com>). |
10 | 6 | # | 6 | # |
11 | 7 | # | 7 | # |
12 | 8 | # This program is free software: you can redistribute it and/or modify | 8 | # This program is free software: you can redistribute it and/or modify |
13 | 9 | # it under the terms of the GNU Affero General Public License as | 9 | # it under the terms of the GNU Affero General Public License as |
14 | @@ -20,6 +20,6 @@ | |||
15 | 20 | # | 20 | # |
16 | 21 | ############################################################################## | 21 | ############################################################################## |
17 | 22 | 22 | ||
19 | 23 | import project | 23 | from . import project |
20 | 24 | 24 | ||
21 | 25 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 25 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
22 | 26 | 26 | ||
23 | === modified file 'project_functional_block/__openerp__.py' (properties changed: +x to -x) | |||
24 | --- __unported__/project_functional_blocks/__openerp__.py 2013-03-04 16:16:31 +0000 | |||
25 | +++ project_functional_block/__openerp__.py 2014-03-25 15:51:09 +0000 | |||
26 | @@ -18,22 +18,26 @@ | |||
27 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
28 | 19 | # | 19 | # |
29 | 20 | ############################################################################## | 20 | ############################################################################## |
38 | 21 | { | 21 | |
39 | 22 | "name": "Project requiring functional blocks", | 22 | {'name': 'Project requiring functional blocks', |
40 | 23 | "version": "1.1dr", | 23 | 'version': '1.2', |
41 | 24 | "author": "Akretion", | 24 | 'author': 'Akretion', |
42 | 25 | "website": "http://www.openerp.com", | 25 | 'website': 'www.akretion.com', |
43 | 26 | "category": "project Management", | 26 | 'license': 'AGPL-3', |
44 | 27 | "depends": ["project"], | 27 | 'category': 'Generic Modules', |
45 | 28 | "description": """\ | 28 | 'description': """ |
46 | 29 | Adds functional blocks to organize the projects tasks. | 29 | Adds functional blocks to organize the projects tasks. |
55 | 30 | (fork from lp:~akretion-team/+junk/advanced-project-management) | 30 | """, |
56 | 31 | """, | 31 | 'depends': [ |
57 | 32 | "demo_xml": [], | 32 | 'project', |
58 | 33 | "update_xml": [ | 33 | ], |
59 | 34 | "security/ir.model.access.csv", | 34 | 'data': [ |
60 | 35 | "project_view.xml", | 35 | 'security/ir.model.access.csv', |
61 | 36 | ], | 36 | 'project_view.xml', |
62 | 37 | 'installable': False, | 37 | ], |
63 | 38 | 'demo': [ | ||
64 | 39 | 'project_demo.xml', | ||
65 | 40 | ], | ||
66 | 41 | 'installable': True, | ||
67 | 42 | 'application': True, | ||
68 | 38 | } | 43 | } |
69 | 39 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
70 | 40 | 44 | ||
71 | === modified file 'project_functional_block/project.py' (properties changed: +x to -x) | |||
72 | --- __unported__/project_functional_blocks/project.py 2012-11-22 13:15:34 +0000 | |||
73 | +++ project_functional_block/project.py 2014-03-25 15:51:09 +0000 | |||
74 | @@ -1,40 +1,67 @@ | |||
75 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
80 | 2 | from osv import fields, osv | 2 | ############################################################################## |
81 | 3 | 3 | # | |
82 | 4 | class project_functional_block(osv.osv): | 4 | # OpenERP, Open Source Management Solution |
83 | 5 | _name = 'project.functional_block' | 5 | # Copyright (C) 2010 Akretion LDTA (<http://www.akretion.com>). |
84 | 6 | # | ||
85 | 7 | # | ||
86 | 8 | # This program is free software: you can redistribute it and/or modify | ||
87 | 9 | # it under the terms of the GNU Affero General Public License as | ||
88 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
89 | 11 | # License, or (at your option) any later version. | ||
90 | 12 | # | ||
91 | 13 | # This program is distributed in the hope that it will be useful, | ||
92 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
93 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
94 | 16 | # GNU Affero General Public License for more details. | ||
95 | 17 | # | ||
96 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
97 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
98 | 20 | # | ||
99 | 21 | ############################################################################## | ||
100 | 22 | |||
101 | 23 | from openerp.osv import fields, orm | ||
102 | 24 | |||
103 | 25 | |||
104 | 26 | class project_functional_block(orm.Model): | ||
105 | 27 | _name = 'project.functional.block' | ||
106 | 6 | _description = 'Functional block to organize projects tasks' | 28 | _description = 'Functional block to organize projects tasks' |
107 | 7 | 29 | ||
108 | 8 | def name_get(self, cr, uid, ids, context=None): | 30 | def name_get(self, cr, uid, ids, context=None): |
109 | 9 | res = [] | 31 | res = [] |
111 | 10 | for row in self.read(cr, uid, ids, ['name','parent_id'], context=context): | 32 | for row in self.read(cr, uid, ids, ['name', 'parent_id'], context=context): |
112 | 11 | parent = row['parent_id'] and (row['parent_id'][1]+' / ') or '' | 33 | parent = row['parent_id'] and (row['parent_id'][1]+' / ') or '' |
113 | 12 | res.append((row['id'], parent + row['name'])) | 34 | res.append((row['id'], parent + row['name'])) |
114 | 13 | return res | 35 | return res |
116 | 14 | 36 | ||
117 | 15 | def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): | 37 | def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): |
119 | 16 | return dict( self.name_get(cr, uid, ids, context=context) ) | 38 | return dict(self.name_get(cr, uid, ids, context=context)) |
120 | 17 | 39 | ||
121 | 18 | _columns = { | 40 | _columns = { |
122 | 19 | 'name': fields.char('Name', size=64, required=True, translate=True), | 41 | 'name': fields.char('Name', size=64, required=True, translate=True), |
123 | 42 | 'sequence': fields.integer('Sequence'), | ||
124 | 20 | 'description': fields.text('Description', translate=True), | 43 | 'description': fields.text('Description', translate=True), |
128 | 21 | 'parent_id': fields.many2one('project.functional_block', 'Parent block', select=True), | 44 | 'parent_id': fields.many2one( |
129 | 22 | 'child_id': fields.one2many('project.functional_block', 'parent_id', 'Child block'), | 45 | 'project.functional.block', |
130 | 23 | 'complete_name': fields.function(_name_get_fnc, method=True, type='char', string='Name'), | 46 | 'Parent block'), |
131 | 47 | 'child_id': fields.one2many( | ||
132 | 48 | 'project.functional.block', | ||
133 | 49 | 'parent_id', | ||
134 | 50 | 'Child block'), | ||
135 | 51 | 'complete_name': fields.function( | ||
136 | 52 | _name_get_fnc, | ||
137 | 53 | method=True, | ||
138 | 54 | type='char', | ||
139 | 55 | string='Name'), | ||
140 | 24 | 'code': fields.char('Code', size=10), | 56 | 'code': fields.char('Code', size=10), |
141 | 25 | } | 57 | } |
148 | 26 | _order = 'parent_id,name' | 58 | _order = 'parent_id, sequence, name' |
149 | 27 | 59 | ||
150 | 28 | 60 | ||
151 | 29 | project_functional_block() | 61 | class project_task(orm.Model): |
146 | 30 | |||
147 | 31 | class project_task(osv.osv): | ||
152 | 32 | _inherit = 'project.task' | 62 | _inherit = 'project.task' |
153 | 33 | _columns = { | 63 | _columns = { |
155 | 34 | 'functional_block_id': fields.many2one('project.functional_block', 'Functional Block'), | 64 | 'functional_block_id': fields.many2one( |
156 | 65 | 'project.functional.block', | ||
157 | 66 | 'Functional Block'), | ||
158 | 35 | } | 67 | } |
159 | 36 | _constraints = [ | ||
160 | 37 | (osv.osv._check_recursion, 'Error! Cannot create recursive cycle.', ['parent_id']) | ||
161 | 38 | ] | ||
162 | 39 | |||
163 | 40 | project_task() | ||
164 | 41 | 68 | ||
165 | === added file 'project_functional_block/project_demo.xml' | |||
166 | --- project_functional_block/project_demo.xml 1970-01-01 00:00:00 +0000 | |||
167 | +++ project_functional_block/project_demo.xml 2014-03-25 15:51:09 +0000 | |||
168 | @@ -0,0 +1,21 @@ | |||
169 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
170 | 2 | <openerp> | ||
171 | 3 | <data> | ||
172 | 4 | |||
173 | 5 | <record id="functional_block_1" model="project.functional.block"> | ||
174 | 6 | <field name="name">WMS</field> | ||
175 | 7 | <field name="description">Warehouse Management System</field> | ||
176 | 8 | </record> | ||
177 | 9 | |||
178 | 10 | <record id="functional_block_2" model="project.functional.block"> | ||
179 | 11 | <field name="name">CRM</field> | ||
180 | 12 | <field name="description">Customer Relationship Management</field> | ||
181 | 13 | </record> | ||
182 | 14 | |||
183 | 15 | <record id="functional_block_3" model="project.functional.block"> | ||
184 | 16 | <field name="name">Accounting</field> | ||
185 | 17 | <field name="description">Accounting</field> | ||
186 | 18 | </record> | ||
187 | 19 | |||
188 | 20 | </data> | ||
189 | 21 | </openerp> | ||
190 | 0 | 22 | ||
191 | === modified file 'project_functional_block/project_view.xml' | |||
192 | --- __unported__/project_functional_blocks/project_view.xml 2012-07-12 07:42:28 +0000 | |||
193 | +++ project_functional_block/project_view.xml 2014-03-25 15:51:09 +0000 | |||
194 | @@ -7,8 +7,8 @@ | |||
195 | 7 | <field name="type">form</field> | 7 | <field name="type">form</field> |
196 | 8 | <field name="inherit_id" ref="project.view_task_form2"/> | 8 | <field name="inherit_id" ref="project.view_task_form2"/> |
197 | 9 | <field name="arch" type="xml"> | 9 | <field name="arch" type="xml"> |
200 | 10 | <xpath expr="/form/group/field[@name='progress']" position="after"> | 10 | <xpath expr="/form/sheet/group/group/field[@name='progress']" position="after"> |
201 | 11 | <field name="functional_block_id" select="1"/> | 11 | <field name="functional_block_id"/> |
202 | 12 | </xpath> | 12 | </xpath> |
203 | 13 | </field> | 13 | </field> |
204 | 14 | </record> | 14 | </record> |
205 | @@ -20,7 +20,7 @@ | |||
206 | 20 | <field name="inherit_id" ref="project.view_task_tree2"/> | 20 | <field name="inherit_id" ref="project.view_task_tree2"/> |
207 | 21 | <field name="arch" type="xml"> | 21 | <field name="arch" type="xml"> |
208 | 22 | <field name="user_id" position="after"> | 22 | <field name="user_id" position="after"> |
210 | 23 | <field name="functional_block_id" select="1"/> | 23 | <field name="functional_block_id"/> |
211 | 24 | </field> | 24 | </field> |
212 | 25 | </field> | 25 | </field> |
213 | 26 | </record> | 26 | </record> |
214 | @@ -31,10 +31,10 @@ | |||
215 | 31 | <field name="type">search</field> | 31 | <field name="type">search</field> |
216 | 32 | <field name="inherit_id" ref="project.view_task_search_form"/> | 32 | <field name="inherit_id" ref="project.view_task_search_form"/> |
217 | 33 | <field name="arch" type="xml"> | 33 | <field name="arch" type="xml"> |
219 | 34 | <xpath expr="/search/group/field[@name='name']" position="after"> | 34 | <xpath expr="//field[@name='name']" position="after"> |
220 | 35 | <field name="functional_block_id" select="1"/> | 35 | <field name="functional_block_id" select="1"/> |
221 | 36 | </xpath> | 36 | </xpath> |
223 | 37 | <xpath expr="/search/group[@string='Group By...']/filter[@string='Project']" position="after"> | 37 | <xpath expr="//filter[@string='Project']" position="after"> |
224 | 38 | <separator orientation="vertical"/> | 38 | <separator orientation="vertical"/> |
225 | 39 | <filter string="Functional Block" icon="terp-gtk-jump-to-ltr" domain="[]" context="{'group_by':'functional_block_id'}"/> | 39 | <filter string="Functional Block" icon="terp-gtk-jump-to-ltr" domain="[]" context="{'group_by':'functional_block_id'}"/> |
226 | 40 | </xpath> | 40 | </xpath> |
227 | @@ -44,8 +44,8 @@ | |||
228 | 44 | <!-- FUNCTIONAL BLOCK --> | 44 | <!-- FUNCTIONAL BLOCK --> |
229 | 45 | <!-- Search view for software module --> | 45 | <!-- Search view for software module --> |
230 | 46 | <record id="funct_block_search_view" model="ir.ui.view"> | 46 | <record id="funct_block_search_view" model="ir.ui.view"> |
233 | 47 | <field name="name">project.functional_block.search</field> | 47 | <field name="name">project.functional.block.search</field> |
234 | 48 | <field name="model">project.functional_block</field> | 48 | <field name="model">project.functional.block</field> |
235 | 49 | <field name="type">search</field> | 49 | <field name="type">search</field> |
236 | 50 | <field name="arch" type="xml"> | 50 | <field name="arch" type="xml"> |
237 | 51 | <search string="Search software's module"> | 51 | <search string="Search software's module"> |
238 | @@ -64,28 +64,31 @@ | |||
239 | 64 | 64 | ||
240 | 65 | <!-- tree view for functional block --> | 65 | <!-- tree view for functional block --> |
241 | 66 | <record model="ir.ui.view" id="funct_block_list_view"> | 66 | <record model="ir.ui.view" id="funct_block_list_view"> |
244 | 67 | <field name="name">project.functional_block.list</field> | 67 | <field name="name">project.functional.block.list</field> |
245 | 68 | <field name="model">project.functional_block</field> | 68 | <field name="model">project.functional.block</field> |
246 | 69 | <field name="type">tree</field> | 69 | <field name="type">tree</field> |
247 | 70 | <field name="arch" type="xml"> | 70 | <field name="arch" type="xml"> |
248 | 71 | <tree string="Functionality categories" > | 71 | <tree string="Functionality categories" > |
251 | 72 | <field name="name"/> | 72 | <field name="name"/> |
252 | 73 | <field name="parent_id"/> | 73 | <field name="parent_id"/> |
253 | 74 | <field name="sequence" invisible="True"/> | ||
254 | 74 | </tree> | 75 | </tree> |
255 | 75 | </field> | 76 | </field> |
256 | 76 | </record> | 77 | </record> |
257 | 77 | 78 | ||
258 | 78 | <!-- Form view for functional block --> | 79 | <!-- Form view for functional block --> |
259 | 79 | <record model="ir.ui.view" id="funct_categ_form_view"> | 80 | <record model="ir.ui.view" id="funct_categ_form_view"> |
262 | 80 | <field name="name">project.functional_block.form</field> | 81 | <field name="name">project.functional.block.form</field> |
263 | 81 | <field name="model">project.functional_block</field> | 82 | <field name="model">project.functional.block</field> |
264 | 82 | <field name="type">form</field> | 83 | <field name="type">form</field> |
265 | 83 | <field name="arch" type="xml"> | 84 | <field name="arch" type="xml"> |
271 | 84 | <form string="Functional block"> | 85 | <form string="Functional block" version="7.0"> |
272 | 85 | <field name="name" select="1" /> | 86 | <group> |
273 | 86 | <field name="parent_id"/> | 87 | <field name="name"/> |
274 | 87 | <separator colspan="4" string="Block description"/> | 88 | <field name="parent_id"/> |
275 | 88 | <field name="category_description" colspan="4" nolabel="1" widget="text_wiki"/> | 89 | </group> |
276 | 90 | <separator string="Block description"/> | ||
277 | 91 | <field name="description"/> | ||
278 | 89 | </form> | 92 | </form> |
279 | 90 | </field> | 93 | </field> |
280 | 91 | </record> | 94 | </record> |
281 | @@ -93,14 +96,14 @@ | |||
282 | 93 | <!-- OPEN BLOCK LIST --> | 96 | <!-- OPEN BLOCK LIST --> |
283 | 94 | <record model="ir.actions.act_window" id="action_funct_block_list"> | 97 | <record model="ir.actions.act_window" id="action_funct_block_list"> |
284 | 95 | <field name="name">Functional block list</field> | 98 | <field name="name">Functional block list</field> |
286 | 96 | <field name="res_model">project.functional_block</field> | 99 | <field name="res_model">project.functional.block</field> |
287 | 97 | <field name="view_type">form</field> | 100 | <field name="view_type">form</field> |
288 | 98 | <field name="view_mode">tree,form</field> | 101 | <field name="view_mode">tree,form</field> |
289 | 99 | <field name="view_id" ref="funct_block_list_view"/> | 102 | <field name="view_id" ref="funct_block_list_view"/> |
290 | 100 | <field name="search_view_id" ref="funct_block_search_view"/> | 103 | <field name="search_view_id" ref="funct_block_search_view"/> |
291 | 101 | </record> | 104 | </record> |
292 | 102 | 105 | ||
294 | 103 | <menuitem name="Functional blocks" parent="project.menu_definitions" id="menu_functional_blocks"/> | 106 | <menuitem name="Functional blocks" id="menu_functional_blocks" parent="base.menu_main_pm" sequence="50"/> |
295 | 104 | <menuitem name="Functional blocks" parent="menu_functional_blocks" id="menu_functional_blocks_list" action="action_funct_block_list" sequence="10"/> | 107 | <menuitem name="Functional blocks" parent="menu_functional_blocks" id="menu_functional_blocks_list" action="action_funct_block_list" sequence="10"/> |
296 | 105 | 108 | ||
297 | 106 | </data> | 109 | </data> |
298 | 107 | 110 | ||
299 | === modified file 'project_functional_block/security/ir.model.access.csv' | |||
300 | --- __unported__/project_functional_blocks/security/ir.model.access.csv 2012-07-12 07:42:28 +0000 | |||
301 | +++ project_functional_block/security/ir.model.access.csv 2014-03-25 15:51:09 +0000 | |||
302 | @@ -1,3 +1,3 @@ | |||
303 | 1 | "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" | 1 | "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
306 | 2 | "access_project_functional_block_manager","project.functional_block","model_project_functional_block","project.group_project_manager",1,1,1,1 | 2 | "access_project_functional_block_manager","project.functional.block","model_project_functional_block","project.group_project_manager",1,1,1,1 |
307 | 3 | "access_project_functional_block_user","project.functional_block","model_project_functional_block","project.group_project_user",1,0,0,0 | 3 | "access_project_functional_block_user","project.functional.block","model_project_functional_block","project.group_project_user",1,0,0,0 |
308 | 4 | 4 | ||
309 | === modified file 'project_issue_service/project_issue.py' | |||
310 | --- project_issue_service/project_issue.py 2013-01-03 11:34:54 +0000 | |||
311 | +++ project_issue_service/project_issue.py 2014-03-25 15:51:09 +0000 | |||
312 | @@ -28,7 +28,7 @@ | |||
313 | 28 | _inherit = 'project.issue' | 28 | _inherit = 'project.issue' |
314 | 29 | _columns = { | 29 | _columns = { |
315 | 30 | #added fields: | 30 | #added fields: |
317 | 31 | 'functional_block_id': fields.many2one('project.functional_block', 'Component', help = "Component (system, module, function) to be adressed"), | 31 | 'functional_block_id': fields.many2one('project.functional.block', 'Component', help = "Component (system, module, function) to be adressed"), |
318 | 32 | 'assigned_to': fields.related('task_id', 'user_id', string = 'Task Assigned to', type="many2one", relation="res.users", store=True, help='This is the current user to whom the related task was assigned'), | 32 | 'assigned_to': fields.related('task_id', 'user_id', string = 'Task Assigned to', type="many2one", relation="res.users", store=True, help='This is the current user to whom the related task was assigned'), |
319 | 33 | 'tasks': fields.one2many('project.task', 'issue_id', 'Related tasks', help="Task history for the issue"), | 33 | 'tasks': fields.one2many('project.task', 'issue_id', 'Related tasks', help="Task history for the issue"), |
320 | 34 | 'create_uid': fields.many2one('res.users', 'Created by', help = "Person who reported the issue"), | 34 | 'create_uid': fields.many2one('res.users', 'Created by', help = "Person who reported the issue"), |
321 | 35 | 35 | ||
322 | === modified file 'project_task_service/project_task.py' | |||
323 | --- project_task_service/project_task.py 2012-11-22 13:29:38 +0000 | |||
324 | +++ project_task_service/project_task.py 2014-03-25 15:51:09 +0000 | |||
325 | @@ -21,13 +21,14 @@ | |||
326 | 21 | from osv import fields, osv | 21 | from osv import fields, osv |
327 | 22 | from datetime import datetime, timedelta | 22 | from datetime import datetime, timedelta |
328 | 23 | 23 | ||
329 | 24 | |||
330 | 24 | class task(osv.osv): | 25 | class task(osv.osv): |
331 | 25 | #FUTURE: use task recurrency, to generate maintenance plans | 26 | #FUTURE: use task recurrency, to generate maintenance plans |
332 | 26 | #FUTURE: Apply maintenance plan templates (use Project templates?) | 27 | #FUTURE: Apply maintenance plan templates (use Project templates?) |
333 | 27 | _inherit = "project.task" | 28 | _inherit = "project.task" |
334 | 28 | _columns = { | 29 | _columns = { |
335 | 29 | #modified fields: | 30 | #modified fields: |
337 | 30 | 'functional_block_id': fields.many2one('project.functional_block', 'Component', | 31 | 'functional_block_id': fields.many2one('project.functional.block', 'Component', |
338 | 31 | help = "Component (system, module, function) to be addressed"), | 32 | help = "Component (system, module, function) to be addressed"), |
339 | 32 | #added fields: | 33 | #added fields: |
340 | 33 | 'ref': fields.char('Code', 20, help="Service Order number"), | 34 | 'ref': fields.char('Code', 20, help="Service Order number"), |
341 | @@ -54,8 +55,6 @@ | |||
342 | 54 | vals = {'date_start': task_dts, 'date_end': task_dte} | 55 | vals = {'date_start': task_dts, 'date_end': task_dte} |
343 | 55 | self.write(cr, uid, [t.id],vals, context=context) | 56 | self.write(cr, uid, [t.id],vals, context=context) |
344 | 56 | return super(task, self).do_close(cr, uid, ids, context) | 57 | return super(task, self).do_close(cr, uid, ids, context) |
345 | 57 | |||
346 | 58 | task() | ||
347 | 59 | 58 | ||
348 | 60 | 59 | ||
349 | 61 | class project_work(osv.osv): | 60 | class project_work(osv.osv): |
350 | @@ -64,7 +63,6 @@ | |||
351 | 64 | _defaults = { | 63 | _defaults = { |
352 | 65 | 'date': lambda *a: datetime.now().strftime('%Y-%m-%d'), | 64 | 'date': lambda *a: datetime.now().strftime('%Y-%m-%d'), |
353 | 66 | } | 65 | } |
354 | 67 | project_work() | ||
355 | 68 | 66 | ||
356 | 69 | 67 | ||
357 | 70 | class project_task_type(osv.osv): | 68 | class project_task_type(osv.osv): |
358 | @@ -72,17 +70,10 @@ | |||
359 | 72 | _columns = { | 70 | _columns = { |
360 | 73 | 'code': fields.char('Code', size=10), | 71 | 'code': fields.char('Code', size=10), |
361 | 74 | } | 72 | } |
362 | 75 | project_task_type() | ||
363 | 76 | 73 | ||
364 | 77 | 74 | ||
365 | 78 | class project_functional_block(osv.osv): | 75 | class project_functional_block(osv.osv): |
367 | 79 | _inherit = 'project.functional_block' | 76 | _inherit = 'project.functional.block' |
368 | 80 | _columns = { | 77 | _columns = { |
369 | 81 | 'code': fields.char('Code', size=10), | 78 | 'code': fields.char('Code', size=10), |
370 | 82 | } | 79 | } |
371 | 83 | project_functional_block() | ||
372 | 84 | |||
373 | 85 | |||
374 | 86 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
375 | 87 | |||
376 | 88 |
In L203, `colspan="4"`: I can be wrong, but I think in v7 this is ignored.
Otherwise, LGTM.