Merge lp:~invitu/openerp-mgmtsystem/7-0_noreload_data into lp:openerp-mgmtsystem

Proposed by invitu on 2014-02-25
Status: Merged
Approved by: Guewen Baconnier @ Camptocamp on 2014-02-28
Approved revision: 93
Merged at revision: 93
Proposed branch: lp:~invitu/openerp-mgmtsystem/7-0_noreload_data
Merge into: lp:openerp-mgmtsystem
Diff against target: 91 lines (+16/-16)
1 file modified
mgmtsystem_hazard/mgmtsystem_hazard_data.xml (+16/-16)
To merge this branch: bzr merge lp:~invitu/openerp-mgmtsystem/7-0_noreload_data
Reviewer Review Type Date Requested Status
Daniel Reis Approve on 2014-02-26
Maxime Chambreuil (http://www.savoirfairelinux.com) Approve on 2014-02-25
Pedro Manuel Baeza code review 2014-02-25 Approve on 2014-02-25
Review via email: mp+208236@code.launchpad.net

Description of the change

Some sample data should not be recreated if deleted

To post a comment you must log in.
93. By invitu on 2014-02-25

[IMP] some demo data should not be recreated if we delete them

Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, thanks for the change, but if you set noupdate flag, I think forcecreate="0" is redundant, doesn't it?

Regards.

review: Needs Information
invitu (invitu) wrote :

Hello, thanks for your comment
noupdate="1" flag means "data are not updated but they might be recreated if they are deleted"
forcecreate="0" flag means "date are not recreated if they are deleted"

(cf Olivier Dony : http://help.openerp.com/question/13546/data-noupdate0-1-in-securityxml/)

Pedro Manuel Baeza (pedro.baeza) wrote :

Thank you very much for the clarification. One thing more that I learn on the reviews!

About the MP itself, I consider that the approach of no recreating deleted samples are OK to clean data, so I approve it.

Regards.

review: Approve (code review)
Daniel Reis (dreis-pt) wrote :

Just learned something new today.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mgmtsystem_hazard/mgmtsystem_hazard_data.xml'
2--- mgmtsystem_hazard/mgmtsystem_hazard_data.xml 2012-03-09 23:47:59 +0000
3+++ mgmtsystem_hazard/mgmtsystem_hazard_data.xml 2014-02-25 21:54:44 +0000
4@@ -1,52 +1,52 @@
5 <?xml version="1.0" encoding="utf-8"?>
6 <openerp>
7- <data>
8+ <data noupdate="1">
9
10 <!-- hazard hazard -->
11
12- <record id="hazard_spilling" model="mgmtsystem.hazard.hazard">
13+ <record id="hazard_spilling" model="mgmtsystem.hazard.hazard" forcecreate="0">
14 <field name="name">Spilling</field>
15 </record>
16
17- <record id="hazard_fire_explosion" model="mgmtsystem.hazard.hazard">
18+ <record id="hazard_fire_explosion" model="mgmtsystem.hazard.hazard" forcecreate="0">
19 <field name="name">Fire / Explosion</field>
20 </record>
21
22- <record id="hazard_intoxication" model="mgmtsystem.hazard.hazard">
23+ <record id="hazard_intoxication" model="mgmtsystem.hazard.hazard" forcecreate="0">
24 <field name="name">Intoxication</field>
25 </record>
26
27- <record id="hazard_breakage" model="mgmtsystem.hazard.hazard">
28+ <record id="hazard_breakage" model="mgmtsystem.hazard.hazard" forcecreate="0">
29 <field name="name">Breakage</field>
30 </record>
31
32- <record id="hazard_electric_bilge" model="mgmtsystem.hazard.hazard">
33+ <record id="hazard_electric_bilge" model="mgmtsystem.hazard.hazard" forcecreate="0">
34 <field name="name">Electric Bilge</field>
35 </record>
36
37 <!-- origin -->
38
39- <record id="origin_ignition_gas" model="mgmtsystem.hazard.origin">
40+ <record id="origin_ignition_gas" model="mgmtsystem.hazard.origin" forcecreate="0">
41 <field name="name">Ignition of Flammable Gas</field>
42 </record>
43
44- <record id="origin_panic" model="mgmtsystem.hazard.origin">
45+ <record id="origin_panic" model="mgmtsystem.hazard.origin" forcecreate="0">
46 <field name="name">Panic</field>
47 </record>
48
49- <record id="origin_exposure" model="mgmtsystem.hazard.origin">
50+ <record id="origin_exposure" model="mgmtsystem.hazard.origin" forcecreate="0">
51 <field name="name">Exposure to Hazardous Materials</field>
52 </record>
53
54- <record id="origin_containment" model="mgmtsystem.hazard.origin">
55+ <record id="origin_containment" model="mgmtsystem.hazard.origin" forcecreate="0">
56 <field name="name">Containment Failure</field>
57 </record>
58
59- <record id="origin_leak" model="mgmtsystem.hazard.origin">
60+ <record id="origin_leak" model="mgmtsystem.hazard.origin" forcecreate="0">
61 <field name="name">Gas Leak</field>
62 </record>
63
64- <record id="origin_aging" model="mgmtsystem.hazard.origin">
65+ <record id="origin_aging" model="mgmtsystem.hazard.origin" forcecreate="0">
66 <field name="name">Materials Aging</field>
67 </record>
68
69@@ -102,19 +102,19 @@
70
71 <!-- risk_type -->
72
73- <record id="risk_type_physical" model="mgmtsystem.hazard.risk.type">
74+ <record id="risk_type_physical" model="mgmtsystem.hazard.risk.type" forcecreate="0">
75 <field name="name">Physical</field>
76 </record>
77
78- <record id="risk_type_chemical" model="mgmtsystem.hazard.risk.type">
79+ <record id="risk_type_chemical" model="mgmtsystem.hazard.risk.type" forcecreate="0">
80 <field name="name">Chemical</field>
81 </record>
82
83- <record id="risk_type_fire" model="mgmtsystem.hazard.risk.type">
84+ <record id="risk_type_fire" model="mgmtsystem.hazard.risk.type" forcecreate="0">
85 <field name="name">Fire</field>
86 </record>
87
88- <record id="risk_type_environment" model="mgmtsystem.hazard.risk.type">
89+ <record id="risk_type_environment" model="mgmtsystem.hazard.risk.type" forcecreate="0">
90 <field name="name">Environment</field>
91 </record>
92