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
=== added directory 'hr_timesheet_department'
=== added file 'hr_timesheet_department/LICENSE'
--- hr_timesheet_department/LICENSE 1970-01-01 00:00:00 +0000
+++ hr_timesheet_department/LICENSE 2013-03-04 17:08:21 +0000
@@ -0,0 +1,18 @@
1OpenERP, Open Source Management Solution
2
3Original author: Joël Grand-Guillaume (in module project_department)
4Copyright © 2011 Camptocamp SA (http://www.camptocamp.com)
5Copyright © 2013 Daniel Reis (SECURITAS)
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU Affero General Public License as
9published by the Free Software Foundation, either version 3 of the
10License, or (at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU Affero General Public License for more details.
16
17You should have received a copy of the GNU Affero General Public Lice
18along with this program. If not, see <http://www.gnu.org/licenses/>.
019
=== added file 'hr_timesheet_department/__init__.py'
--- hr_timesheet_department/__init__.py 1970-01-01 00:00:00 +0000
+++ hr_timesheet_department/__init__.py 2013-03-04 17:08:21 +0000
@@ -0,0 +1,1 @@
1#empty
02
=== added file 'hr_timesheet_department/__openerp__.py'
--- hr_timesheet_department/__openerp__.py 1970-01-01 00:00:00 +0000
+++ hr_timesheet_department/__openerp__.py 2013-03-04 17:08:21 +0000
@@ -0,0 +1,16 @@
1# -*- coding: utf-8 -*-
2{
3 "name": "Analytic Accounts / Contracts Department Categorization",
4 "version": "1.0",
5 "author": "Camptocamp, Daniel Reis",
6 "license": "AGPL-3",
7 "category": "Generic Modules/Projects & Services",
8 "description": """\
9Add Department to Timesheets (hr.analytic.timesheet) and to corresponding tree,
10search and form views.
11""",
12 "website": "http://camptocamp.com",
13 "depends": ["hr_timesheet", "analytic_department"],
14 "data": ["hr_timesheet_view.xml"],
15 "auto_install": True,
16}
017
=== added file 'hr_timesheet_department/hr_timesheet_view.xml'
--- hr_timesheet_department/hr_timesheet_view.xml 1970-01-01 00:00:00 +0000
+++ hr_timesheet_department/hr_timesheet_view.xml 2013-03-04 17:08:21 +0000
@@ -0,0 +1,46 @@
1<openerp>
2 <data>
3
4 <record id="hr_timesheet_line_tree" model="ir.ui.view">
5 <field name="name">hr.analytic.timesheet.tree</field>
6 <field name="model">hr.analytic.timesheet</field>
7 <field name="type">tree</field>
8 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/>
9 <field name="arch" type="xml">
10 <field name="user_id" position="after">
11 <field name="department_id"/>
12 </field>
13 </field>
14 </record>
15
16 <record id="hr_timesheet_line_form" model="ir.ui.view">
17 <field name="name">hr.analytic.timesheet.form</field>
18 <field name="model">hr.analytic.timesheet</field>
19 <field name="type">form</field>
20 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
21 <field name="arch" type="xml">
22 <field name="date" position="after">
23 <field name="department_id"/>
24 </field>
25 </field>
26 </record>
27
28 <record id="hr_timesheet_line_search" model="ir.ui.view">
29 <field name="name">hr.analytic.timesheet.search</field>
30 <field name="model">hr.analytic.timesheet</field>
31 <field name="type">search</field>
32 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search"/>
33 <field name="arch" type="xml">
34 <field name="user_id" position="after">
35 <field name="department_id"/>
36 </field>
37 <xpath expr="/search/group/filter[@string='Users']" position="after">
38 <filter string="Department" icon="terp-folder-orange" domain="[]" context="{'group_by':'department_id'}"/>
39 </xpath>
40 </field>
41
42 </record>
43
44 </data>
45</openerp>
46
047
=== added file 'project_department/LICENSE'
--- project_department/LICENSE 1970-01-01 00:00:00 +0000
+++ project_department/LICENSE 2013-03-04 17:08:21 +0000
@@ -0,0 +1,18 @@
1OpenERP, Open Source Management Solution
2
3Original author: Joël Grand-Guillaume
4Copyright © 2011 Camptocamp SA (http://www.camptocamp.com)
5Copyright © 2013 Daniel Reis (SECURITAS)
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU Affero General Public License as
9published by the Free Software Foundation, either version 3 of the
10License, or (at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU Affero General Public License for more details.
16
17You should have received a copy of the GNU Affero General Public Lice
18along with this program. If not, see <http://www.gnu.org/licenses/>.
019
=== modified file 'project_department/__init__.py'
--- project_department/__init__.py 2011-08-12 12:53:16 +0000
+++ project_department/__init__.py 2013-03-04 17:08:21 +0000
@@ -1,32 +1,1 @@
1# -*- coding: utf-8 -*-1#empty
2##############################################################################
3#
4# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
5# All Right Reserved
6#
7# Author : Joel Grand-guillaume (Camptocamp)
8#
9# WARNING: This program as such is intended to be used by professional
10# programmers who take the whole responsability of assessing all potential
11# consequences resulting from its eventual inadequacies and bugs
12# End users who are looking for a ready-to-use solution with commercial
13# garantees and support are strongly adviced to contract a Free Software
14# Service Company
15#
16# This program is Free Software; you can redistribute it and/or
17# modify it under the terms of the GNU General Public License
18# as published by the Free Software Foundation; either version 2
19# of the License, or (at your option) any later version.
20#
21# This program is distributed in the hope that it will be useful,
22# but WITHOUT ANY WARRANTY; without even the implied warranty of
23# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24# GNU General Public License for more details.
25#
26# You should have received a copy of the GNU General Public License
27# along with this program; if not, write to the Free Software
28# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29#
30##############################################################################
31
32import project
332
=== modified file 'project_department/__openerp__.py'
--- project_department/__openerp__.py 2013-01-04 10:32:58 +0000
+++ project_department/__openerp__.py 2013-03-04 17:08:21 +0000
@@ -1,56 +1,15 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
5# All Right Reserved
6#
7# Author : Joel Grand-guillaume (Camptocamp)
8#
9# WARNING: This program as such is intended to be used by professional
10# programmers who take the whole responsability of assessing all potential
11# consequences resulting from its eventual inadequacies and bugs
12# End users who are looking for a ready-to-use solution with commercial
13# garantees and support are strongly adviced to contract a Free Software
14# Service Company
15#
16# This program is Free Software; you can redistribute it and/or
17# modify it under the terms of the GNU General Public License
18# as published by the Free Software Foundation; either version 2
19# of the License, or (at your option) any later version.
20#
21# This program is distributed in the hope that it will be useful,
22# but WITHOUT ANY WARRANTY; without even the implied warranty of
23# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24# GNU General Public License for more details.
25#
26# You should have received a copy of the GNU General Public License
27# along with this program; if not, write to the Free Software
28# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29#
30##############################################################################
31
32{2{
33 "name" : "Project and Timesheet Department Categorization",3 "name": "Project Department Categorization",
34 "version" : "1.0",4 "version": "1.0",
35 "author" : "Camptocamp",5 "author": "Camptocamp, Daniel Reis",
36 "category" : "Generic Modules/Projects & Services",6 "license": "AGPL-3",
37 "description":7 "category": "Generic Modules/Projects & Services",
38"""8 "description": """\
39 Add the department on Project and Timesheet (hr.analytic.timesheet) as well as the related filter and button in the search form of9Add Department to Projects and to corresponding tree, search and form views.
40 both object.
41
42""",10""",
43 "website": "http://camptocamp.com",11 "website": "http://camptocamp.com",
44 "depends" : [12 "depends": ["project", "analytic_department"],
45 "hr_timesheet",13 "data": ["project_view.xml"],
46 "project",14 "auto_install": True,
47 "analytic_department",
48 ],
49 "init_xml" : [],
50 "demo_xml" : [],
51 "update_xml" : [
52 "project_view.xml",
53 ],
54 "active": False,
55 'installable': False
56}15}
5716
=== removed directory 'project_department/i18n'
=== modified file 'project_department/project_view.xml'
--- project_department/project_view.xml 2011-08-12 12:53:16 +0000
+++ project_department/project_view.xml 2013-03-04 17:08:21 +0000
@@ -1,87 +1,46 @@
1<openerp>
2 <data>
3
4 <record id="edit_project" model="ir.ui.view">
5 <field name="name">project.project.form</field>
6 <field name="model">project.project</field>
7 <field name="inherit_id" ref="project.edit_project" />
8 <field name="type">form</field>
9 <field name="arch" type="xml">
10 <xpath expr="/form/notebook/page/group/field[@name='company_id']" position="after">
11 <field name="department_id" widget="selection"/>
12 </xpath>
13 </field>
14 </record>
15
16 <record id="view_project_project_filter" model="ir.ui.view">
17 <field name="name">project.project.select</field>
18 <field name="model">project.project</field>
19 <field name="inherit_id" ref="project.view_project_project_filter" />
20 <field name="type">search</field>
21 <field name="arch" type="xml">
22 <xpath expr="/search/group/field[@name='partner_id']" position="before">
23 <field name="department_id" widget="selection" />
24 </xpath>
25 <xpath expr="/search/group/filter[@string='Manager']" position="after">
26 <filter string="Department" icon="terp-folder-orange" domain="[]" context="{'group_by':'department_id'}"/>
27 </xpath>
28 </field>
29 </record>
30
31 <record id="view_project" model="ir.ui.view">
32 <field name="name">project.project.tree</field>
33 <field name="model">project.project</field>
34 <field name="inherit_id" ref="project.view_project" />
35 <field name="type">tree</field>
36 <field name="field_parent">child_ids</field>
37 <field name="arch" type="xml">
38 <xpath expr="/tree/field[@name='user_id']" position="after">
39 <field name="department_id" />
40 </xpath>
41 </field>
42 </record>
43
44
45 <record id="hr_timesheet_line_tree" model="ir.ui.view">
46 <field name="name">hr.analytic.timesheet.tree</field>
47 <field name="model">hr.analytic.timesheet</field>
48 <field name="type">tree</field>
49 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" />
50 <field name="arch" type="xml">
51 <xpath expr="/tree/field[@name='user_id']" position="after">
52 <field name="department_id" />
53 </xpath>
54 </field>
55 </record>
56 <record id="hr_timesheet_line_form" model="ir.ui.view">
57 <field name="name">hr.analytic.timesheet.form</field>
58 <field name="model">hr.analytic.timesheet</field>
59 <field name="type">form</field>
60 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form" />
61 <field name="arch" type="xml">
62 <xpath expr="/form/group/field[@name='user_id']" position="after">
63 <field name="department_id" widget="selection"/>
64 </xpath>
65 </field>
66 </record>
67
68 <record id="hr_timesheet_line_search" model="ir.ui.view">
69 <field name="name">hr.analytic.timesheet.search</field>
70 <field name="model">hr.analytic.timesheet</field>
71 <field name="type">search</field>
72 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search" />
73 <field name="arch" type="xml">
74 <xpath expr="/search/group/field[@name='user_id']" position="after">
75 <field name="department_id" widget="selection" />
76 </xpath>
77 <xpath expr="/search/group/filter[@string='Users']" position="after">
78 <filter string="Department" icon="terp-folder-orange" domain="[]" context="{'group_by':'department_id'}"/>
79 </xpath>
80 </field>
81
82 </record>
83
84
85
86 </data>
87</openerp>
88\ No newline at end of file1\ No newline at end of file
2<openerp>
3 <data>
4
5 <record id="edit_project" model="ir.ui.view">
6 <field name="name">project.project.form</field>
7 <field name="model">project.project</field>
8 <field name="inherit_id" ref="project.edit_project"/>
9 <field name="type">form</field>
10 <field name="arch" type="xml">
11 <field name="partner_id" position="after">
12 <field name="department_id"/>
13 </field>
14 </field>
15 </record>
16
17 <record id="view_project_project_filter" model="ir.ui.view">
18 <field name="name">project.project.select</field>
19 <field name="model">project.project</field>
20 <field name="inherit_id" ref="project.view_project_project_filter"/>
21 <field name="type">search</field>
22 <field name="arch" type="xml">
23 <field name="partner_id" position="before">
24 <field name="department_id"/>
25 </field>
26 <xpath expr="/search/group/filter[@string='Manager']" position="after">
27 <filter string="Department" icon="terp-folder-orange" domain="[]" context="{'group_by':'department_id'}"/>
28 </xpath>
29 </field>
30 </record>
31
32 <record id="view_project" model="ir.ui.view">
33 <field name="name">project.project.tree</field>
34 <field name="model">project.project</field>
35 <field name="inherit_id" ref="project.view_project"/>
36 <field name="type">tree</field>
37 <field name="field_parent">child_ids</field>
38 <field name="arch" type="xml">
39 <field name="user_id" position="after">
40 <field name="department_id"/>
41 </field>
42 </field>
43 </record>
44
45 </data>
46</openerp>
47
8948
=== removed directory 'project_department/security'

Subscribers

People subscribed via source and target branches