Merge lp:~savoirfairelinux-openerp/openerp-manufacturing/dont-delete-report into lp:openerp-manufacturing

Proposed by Joao Alfredo Gama Batista
Status: Merged
Merged at revision: 6
Proposed branch: lp:~savoirfairelinux-openerp/openerp-manufacturing/dont-delete-report
Merge into: lp:openerp-manufacturing
Diff against target: 73 lines (+11/-13)
3 files modified
mrp_industrial_design_bom/__openerp__.py (+3/-1)
mrp_industrial_design_bom/industrial_design.py (+4/-3)
mrp_industrial_design_bom/mrp_industrial_design.xml (+4/-9)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/openerp-manufacturing/dont-delete-report
Reviewer Review Type Date Requested Status
Niels Huylebroeck Approve
Pedro Manuel Baeza code review and test Approve
Maxime Chambreuil (http://www.savoirfairelinux.com) code review Approve
Review via email: mp+191493@code.launchpad.net

Description of the change

Don't delete the original report id, just update the rml location.

To post a comment you must log in.
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve (code review)
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Everything is OK.

Thank you.

Regards.

review: Approve (code review and test)
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Everything is OK.

Thank you.

Regards.

review: Approve (code review and test)
Revision history for this message
Niels Huylebroeck (red15) wrote :

lgtm, a replacement of certain ir.actions.report.xml fields is certainly better than a delete (cause delete with such a fuzzy search could easily target the wrong action + prevents the module on it's own to update)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mrp_industrial_design_bom/__openerp__.py'
2--- mrp_industrial_design_bom/__openerp__.py 2013-04-08 15:44:53 +0000
3+++ mrp_industrial_design_bom/__openerp__.py 2013-10-16 19:58:45 +0000
4@@ -30,7 +30,9 @@
5 'depends' : ['mrp'],
6 "data" : ['mrp_industrial_design.xml'],
7 'description': """
8-Add the fields 'Bubble Number' and 'RefDes' (reference description) to a component in BoM view.
9+This module adds the fields 'Bubble Number' and 'RefDes' (reference description) to a component in BoM view.
10+
11+It also point the BOM Structure report to a new version that uses the new fields.
12 """,
13 'auto_install': False,
14 'installable': True
15
16=== modified file 'mrp_industrial_design_bom/industrial_design.py'
17--- mrp_industrial_design_bom/industrial_design.py 2013-04-08 15:44:53 +0000
18+++ mrp_industrial_design_bom/industrial_design.py 2013-10-16 19:58:45 +0000
19@@ -2,7 +2,7 @@
20 ##############################################################################
21 #
22 # OpenERP, Open Source Management Solution
23-# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
24+# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
25 #
26 # This program is free software: you can redistribute it and/or modify
27 # it under the terms of the GNU General Public License as
28@@ -15,18 +15,19 @@
29 # GNU General Public License for more details.
30 #
31 # You should have received a copy of the GNU General Public License
32-# along with this program. If not, see <http://www.gnu.org/licenses/>.
33+# along with this program. If not, see <http://www.gnu.org/licenses/>.
34 #
35 ##############################################################################
36
37 from openerp.osv import fields, orm
38
39+
40 class mrp_bom(orm.Model):
41 _inherit = 'mrp.bom'
42 _columns = {
43 'bubble_number': fields.integer('No'),
44 'refdes': fields.text('Notes'),
45 }
46-
47+
48 _order = "bubble_number"
49 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
50
51=== modified file 'mrp_industrial_design_bom/mrp_industrial_design.xml'
52--- mrp_industrial_design_bom/mrp_industrial_design.xml 2013-04-26 13:44:37 +0000
53+++ mrp_industrial_design_bom/mrp_industrial_design.xml 2013-10-16 19:58:45 +0000
54@@ -1,15 +1,10 @@
55 <?xml version="1.0" ?>
56 <openerp>
57 <data>
58- <delete model="ir.actions.report.xml" search="[('name', '=', 'bom.structure')]" />
59- <report auto="True"
60- header="False"
61- id="report_industrial_design_bom_structure"
62- model="mrp.bom"
63- name="industrialdesign.bom.structure"
64- rml="mrp_industrial_design_bom/report/bom_structure_industrial_design.rml"
65- string="BOM Structure"/>
66-
67+ <record model="ir.actions.report.xml" id="mrp.report_bom_structure">
68+ <field name="report_file">mrp_industrial_design_bom/report/bom_structure_industrial_design.rml</field>
69+ <field name="report_rml">mrp_industrial_design_bom/report/bom_structure_industrial_design.rml</field>
70+ </record>
71 <record model="ir.ui.view" id="mrp_bom_form_view_inherit">
72 <field name="name">mrp.bom.form.inherit</field>
73 <field name="model">mrp.bom</field>