Merge lp:~dreis-pt/department-mgmt/project-v7b into lp:~department-core-editors/department-mgmt/7.0

Proposed by Daniel Reis
Status: Merged
Merged at revision: 11
Proposed branch: lp:~dreis-pt/department-mgmt/project-v7b
Merge into: lp:~department-core-editors/department-mgmt/7.0
Prerequisite: lp:~dreis-pt/department-mgmt/analytic-v7
Diff against target: 375 lines (+156/-170)
8 files modified
hr_timesheet_department/LICENSE (+18/-0)
hr_timesheet_department/__init__.py (+1/-0)
hr_timesheet_department/__openerp__.py (+16/-0)
hr_timesheet_department/hr_timesheet_view.xml (+46/-0)
project_department/LICENSE (+18/-0)
project_department/__init__.py (+1/-32)
project_department/__openerp__.py (+10/-51)
project_department/project_view.xml (+46/-87)
To merge this branch: bzr merge lp:~dreis-pt/department-mgmt/project-v7b
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Pending
Review via email: mp+151562@code.launchpad.net

This proposal supersedes a proposal from 2013-02-28.

Description of the change

[Resubmitting with fixes and proper prerequisite branch info]:
Migrating "project_department" to v7.
Timesheet features were split into a separate module.
Both these modules will auto-install if "analytic_department" is also installed.

To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : Posted in a previous version of this proposal

Nitpicking:

l.299,314,326,338,350,429,441,453,702,714,729
The <field name="type">...</field> is now useless in v7, they can be removed.

Otherwise, it seems good to me, so I approve.

review: Approve (code review, no test)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : Posted in a previous version of this proposal

hmm, not noticed that before, can you remove the +x flag on some .py files ?

=== modified file 'analytic_department/__init__.py' (properties changed: -x to +x)
=== modified file 'analytic_department/__openerp__.py' (properties changed: -x to +x)
=== modified file 'analytic_department/analytic.py' (properties changed: -x to +x)

review: Needs Fixing
Revision history for this message
Daniel Reis (dreis-pt) wrote :

Prerequisite added and MP resubmited.

Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :

Daniel.

When it is useful?, why do you need department in timesheet friend?

Thanks in advance.

Regards

Revision history for this message
Daniel Reis (dreis-pt) wrote :

@nhomar: actually I don't, but Camp2Camp does (or at least it's in their codebase).
That's I'm separating it into a different module. I do need Departments in Projects and in Issues (MP on the way).

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

@ Nohmar, this is useful to sum spent hours by department for a same project, in our case for revenue splitting for example. But could just be to have a reporting on average repatition between department per project or such a thing we do need at least...

Hope this helps,

Joël

Le 18 mars 2013 à 15:04, Nhomar - Vauxoo <email address hidden> a écrit :

> Daniel.
>
> When it is useful?, why do you need department in timesheet friend?
>
> Thanks in advance.
>
> Regards
> --
> https://code.launchpad.net/~dreis-pt/department-mgmt/project-v7b/+merge/151562
> Your team Department Core Editors is subscribed to branch lp:department-mgmt.

--

Camptocamp
Innovative Solutions by Open Source Experts

Joël Grand-Guillaume
Division Manager - Business Solutions

www.camptocamp.com

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Sorry to bump into this a bit late but here are 2 things about this module I just figured out that should be fixed:

http://bazaar.launchpad.net/~department-core-editors/department-mgmt/7.0/view/head:/project_department/project.py
We need to remove it.

And an other module with the same name is in
https://code.launchpad.net/~project-core-editors/project-service/trunk

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'hr_timesheet_department'
2=== added file 'hr_timesheet_department/LICENSE'
3--- hr_timesheet_department/LICENSE 1970-01-01 00:00:00 +0000
4+++ hr_timesheet_department/LICENSE 2013-03-04 17:08:21 +0000
5@@ -0,0 +1,18 @@
6+OpenERP, Open Source Management Solution
7+
8+Original author: Joël Grand-Guillaume (in module project_department)
9+Copyright © 2011 Camptocamp SA (http://www.camptocamp.com)
10+Copyright © 2013 Daniel Reis (SECURITAS)
11+
12+This program is free software: you can redistribute it and/or modify
13+it under the terms of the GNU Affero General Public License as
14+published by the Free Software Foundation, either version 3 of the
15+License, or (at your option) any later version.
16+
17+This program is distributed in the hope that it will be useful,
18+but WITHOUT ANY WARRANTY; without even the implied warranty of
19+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+GNU Affero General Public License for more details.
21+
22+You should have received a copy of the GNU Affero General Public Lice
23+along with this program. If not, see <http://www.gnu.org/licenses/>.
24
25=== added file 'hr_timesheet_department/__init__.py'
26--- hr_timesheet_department/__init__.py 1970-01-01 00:00:00 +0000
27+++ hr_timesheet_department/__init__.py 2013-03-04 17:08:21 +0000
28@@ -0,0 +1,1 @@
29+#empty
30
31=== added file 'hr_timesheet_department/__openerp__.py'
32--- hr_timesheet_department/__openerp__.py 1970-01-01 00:00:00 +0000
33+++ hr_timesheet_department/__openerp__.py 2013-03-04 17:08:21 +0000
34@@ -0,0 +1,16 @@
35+# -*- coding: utf-8 -*-
36+{
37+ "name": "Analytic Accounts / Contracts Department Categorization",
38+ "version": "1.0",
39+ "author": "Camptocamp, Daniel Reis",
40+ "license": "AGPL-3",
41+ "category": "Generic Modules/Projects & Services",
42+ "description": """\
43+Add Department to Timesheets (hr.analytic.timesheet) and to corresponding tree,
44+search and form views.
45+""",
46+ "website": "http://camptocamp.com",
47+ "depends": ["hr_timesheet", "analytic_department"],
48+ "data": ["hr_timesheet_view.xml"],
49+ "auto_install": True,
50+}
51
52=== added file 'hr_timesheet_department/hr_timesheet_view.xml'
53--- hr_timesheet_department/hr_timesheet_view.xml 1970-01-01 00:00:00 +0000
54+++ hr_timesheet_department/hr_timesheet_view.xml 2013-03-04 17:08:21 +0000
55@@ -0,0 +1,46 @@
56+<openerp>
57+ <data>
58+
59+ <record id="hr_timesheet_line_tree" model="ir.ui.view">
60+ <field name="name">hr.analytic.timesheet.tree</field>
61+ <field name="model">hr.analytic.timesheet</field>
62+ <field name="type">tree</field>
63+ <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/>
64+ <field name="arch" type="xml">
65+ <field name="user_id" position="after">
66+ <field name="department_id"/>
67+ </field>
68+ </field>
69+ </record>
70+
71+ <record id="hr_timesheet_line_form" model="ir.ui.view">
72+ <field name="name">hr.analytic.timesheet.form</field>
73+ <field name="model">hr.analytic.timesheet</field>
74+ <field name="type">form</field>
75+ <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
76+ <field name="arch" type="xml">
77+ <field name="date" position="after">
78+ <field name="department_id"/>
79+ </field>
80+ </field>
81+ </record>
82+
83+ <record id="hr_timesheet_line_search" model="ir.ui.view">
84+ <field name="name">hr.analytic.timesheet.search</field>
85+ <field name="model">hr.analytic.timesheet</field>
86+ <field name="type">search</field>
87+ <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search"/>
88+ <field name="arch" type="xml">
89+ <field name="user_id" position="after">
90+ <field name="department_id"/>
91+ </field>
92+ <xpath expr="/search/group/filter[@string='Users']" position="after">
93+ <filter string="Department" icon="terp-folder-orange" domain="[]" context="{'group_by':'department_id'}"/>
94+ </xpath>
95+ </field>
96+
97+ </record>
98+
99+ </data>
100+</openerp>
101+
102
103=== added file 'project_department/LICENSE'
104--- project_department/LICENSE 1970-01-01 00:00:00 +0000
105+++ project_department/LICENSE 2013-03-04 17:08:21 +0000
106@@ -0,0 +1,18 @@
107+OpenERP, Open Source Management Solution
108+
109+Original author: Joël Grand-Guillaume
110+Copyright © 2011 Camptocamp SA (http://www.camptocamp.com)
111+Copyright © 2013 Daniel Reis (SECURITAS)
112+
113+This program is free software: you can redistribute it and/or modify
114+it under the terms of the GNU Affero General Public License as
115+published by the Free Software Foundation, either version 3 of the
116+License, or (at your option) any later version.
117+
118+This program is distributed in the hope that it will be useful,
119+but WITHOUT ANY WARRANTY; without even the implied warranty of
120+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
121+GNU Affero General Public License for more details.
122+
123+You should have received a copy of the GNU Affero General Public Lice
124+along with this program. If not, see <http://www.gnu.org/licenses/>.
125
126=== modified file 'project_department/__init__.py'
127--- project_department/__init__.py 2011-08-12 12:53:16 +0000
128+++ project_department/__init__.py 2013-03-04 17:08:21 +0000
129@@ -1,32 +1,1 @@
130-# -*- coding: utf-8 -*-
131-##############################################################################
132-#
133-# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
134-# All Right Reserved
135-#
136-# Author : Joel Grand-guillaume (Camptocamp)
137-#
138-# WARNING: This program as such is intended to be used by professional
139-# programmers who take the whole responsability of assessing all potential
140-# consequences resulting from its eventual inadequacies and bugs
141-# End users who are looking for a ready-to-use solution with commercial
142-# garantees and support are strongly adviced to contract a Free Software
143-# Service Company
144-#
145-# This program is Free Software; you can redistribute it and/or
146-# modify it under the terms of the GNU General Public License
147-# as published by the Free Software Foundation; either version 2
148-# of the License, or (at your option) any later version.
149-#
150-# This program is distributed in the hope that it will be useful,
151-# but WITHOUT ANY WARRANTY; without even the implied warranty of
152-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
153-# GNU General Public License for more details.
154-#
155-# You should have received a copy of the GNU General Public License
156-# along with this program; if not, write to the Free Software
157-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
158-#
159-##############################################################################
160-
161-import project
162+#empty
163
164=== modified file 'project_department/__openerp__.py'
165--- project_department/__openerp__.py 2013-01-04 10:32:58 +0000
166+++ project_department/__openerp__.py 2013-03-04 17:08:21 +0000
167@@ -1,56 +1,15 @@
168 # -*- coding: utf-8 -*-
169-##############################################################################
170-#
171-# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
172-# All Right Reserved
173-#
174-# Author : Joel Grand-guillaume (Camptocamp)
175-#
176-# WARNING: This program as such is intended to be used by professional
177-# programmers who take the whole responsability of assessing all potential
178-# consequences resulting from its eventual inadequacies and bugs
179-# End users who are looking for a ready-to-use solution with commercial
180-# garantees and support are strongly adviced to contract a Free Software
181-# Service Company
182-#
183-# This program is Free Software; you can redistribute it and/or
184-# modify it under the terms of the GNU General Public License
185-# as published by the Free Software Foundation; either version 2
186-# of the License, or (at your option) any later version.
187-#
188-# This program is distributed in the hope that it will be useful,
189-# but WITHOUT ANY WARRANTY; without even the implied warranty of
190-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
191-# GNU General Public License for more details.
192-#
193-# You should have received a copy of the GNU General Public License
194-# along with this program; if not, write to the Free Software
195-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
196-#
197-##############################################################################
198-
199 {
200- "name" : "Project and Timesheet Department Categorization",
201- "version" : "1.0",
202- "author" : "Camptocamp",
203- "category" : "Generic Modules/Projects & Services",
204- "description":
205-"""
206- Add the department on Project and Timesheet (hr.analytic.timesheet) as well as the related filter and button in the search form of
207- both object.
208-
209+ "name": "Project Department Categorization",
210+ "version": "1.0",
211+ "author": "Camptocamp, Daniel Reis",
212+ "license": "AGPL-3",
213+ "category": "Generic Modules/Projects & Services",
214+ "description": """\
215+Add Department to Projects and to corresponding tree, search and form views.
216 """,
217 "website": "http://camptocamp.com",
218- "depends" : [
219- "hr_timesheet",
220- "project",
221- "analytic_department",
222- ],
223- "init_xml" : [],
224- "demo_xml" : [],
225- "update_xml" : [
226- "project_view.xml",
227- ],
228- "active": False,
229- 'installable': False
230+ "depends": ["project", "analytic_department"],
231+ "data": ["project_view.xml"],
232+ "auto_install": True,
233 }
234
235=== removed directory 'project_department/i18n'
236=== modified file 'project_department/project_view.xml'
237--- project_department/project_view.xml 2011-08-12 12:53:16 +0000
238+++ project_department/project_view.xml 2013-03-04 17:08:21 +0000
239@@ -1,87 +1,46 @@
240-<openerp>
241- <data>
242-
243- <record id="edit_project" model="ir.ui.view">
244- <field name="name">project.project.form</field>
245- <field name="model">project.project</field>
246- <field name="inherit_id" ref="project.edit_project" />
247- <field name="type">form</field>
248- <field name="arch" type="xml">
249- <xpath expr="/form/notebook/page/group/field[@name='company_id']" position="after">
250- <field name="department_id" widget="selection"/>
251- </xpath>
252- </field>
253- </record>
254-
255- <record id="view_project_project_filter" model="ir.ui.view">
256- <field name="name">project.project.select</field>
257- <field name="model">project.project</field>
258- <field name="inherit_id" ref="project.view_project_project_filter" />
259- <field name="type">search</field>
260- <field name="arch" type="xml">
261- <xpath expr="/search/group/field[@name='partner_id']" position="before">
262- <field name="department_id" widget="selection" />
263- </xpath>
264- <xpath expr="/search/group/filter[@string='Manager']" position="after">
265- <filter string="Department" icon="terp-folder-orange" domain="[]" context="{'group_by':'department_id'}"/>
266- </xpath>
267- </field>
268- </record>
269-
270- <record id="view_project" model="ir.ui.view">
271- <field name="name">project.project.tree</field>
272- <field name="model">project.project</field>
273- <field name="inherit_id" ref="project.view_project" />
274- <field name="type">tree</field>
275- <field name="field_parent">child_ids</field>
276- <field name="arch" type="xml">
277- <xpath expr="/tree/field[@name='user_id']" position="after">
278- <field name="department_id" />
279- </xpath>
280- </field>
281- </record>
282-
283-
284- <record id="hr_timesheet_line_tree" model="ir.ui.view">
285- <field name="name">hr.analytic.timesheet.tree</field>
286- <field name="model">hr.analytic.timesheet</field>
287- <field name="type">tree</field>
288- <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" />
289- <field name="arch" type="xml">
290- <xpath expr="/tree/field[@name='user_id']" position="after">
291- <field name="department_id" />
292- </xpath>
293- </field>
294- </record>
295- <record id="hr_timesheet_line_form" model="ir.ui.view">
296- <field name="name">hr.analytic.timesheet.form</field>
297- <field name="model">hr.analytic.timesheet</field>
298- <field name="type">form</field>
299- <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form" />
300- <field name="arch" type="xml">
301- <xpath expr="/form/group/field[@name='user_id']" position="after">
302- <field name="department_id" widget="selection"/>
303- </xpath>
304- </field>
305- </record>
306-
307- <record id="hr_timesheet_line_search" model="ir.ui.view">
308- <field name="name">hr.analytic.timesheet.search</field>
309- <field name="model">hr.analytic.timesheet</field>
310- <field name="type">search</field>
311- <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search" />
312- <field name="arch" type="xml">
313- <xpath expr="/search/group/field[@name='user_id']" position="after">
314- <field name="department_id" widget="selection" />
315- </xpath>
316- <xpath expr="/search/group/filter[@string='Users']" position="after">
317- <filter string="Department" icon="terp-folder-orange" domain="[]" context="{'group_by':'department_id'}"/>
318- </xpath>
319- </field>
320-
321- </record>
322-
323-
324-
325- </data>
326-</openerp>
327\ No newline at end of file
328+<openerp>
329+ <data>
330+
331+ <record id="edit_project" model="ir.ui.view">
332+ <field name="name">project.project.form</field>
333+ <field name="model">project.project</field>
334+ <field name="inherit_id" ref="project.edit_project"/>
335+ <field name="type">form</field>
336+ <field name="arch" type="xml">
337+ <field name="partner_id" position="after">
338+ <field name="department_id"/>
339+ </field>
340+ </field>
341+ </record>
342+
343+ <record id="view_project_project_filter" model="ir.ui.view">
344+ <field name="name">project.project.select</field>
345+ <field name="model">project.project</field>
346+ <field name="inherit_id" ref="project.view_project_project_filter"/>
347+ <field name="type">search</field>
348+ <field name="arch" type="xml">
349+ <field name="partner_id" position="before">
350+ <field name="department_id"/>
351+ </field>
352+ <xpath expr="/search/group/filter[@string='Manager']" position="after">
353+ <filter string="Department" icon="terp-folder-orange" domain="[]" context="{'group_by':'department_id'}"/>
354+ </xpath>
355+ </field>
356+ </record>
357+
358+ <record id="view_project" model="ir.ui.view">
359+ <field name="name">project.project.tree</field>
360+ <field name="model">project.project</field>
361+ <field name="inherit_id" ref="project.view_project"/>
362+ <field name="type">tree</field>
363+ <field name="field_parent">child_ids</field>
364+ <field name="arch" type="xml">
365+ <field name="user_id" position="after">
366+ <field name="department_id"/>
367+ </field>
368+ </field>
369+ </record>
370+
371+ </data>
372+</openerp>
373+
374
375=== removed directory 'project_department/security'

Subscribers

People subscribed via source and target branches