Merge lp:~sylvain-legal/openupgrade-addons/7.0_l10n_fr_2 into lp:openupgrade-addons

Proposed by Sylvain LE GAL (GRAP)
Status: Merged
Merge reported by: Stefan Rijnhart (Opener)
Merged at revision: not available
Proposed branch: lp:~sylvain-legal/openupgrade-addons/7.0_l10n_fr_2
Merge into: lp:openupgrade-addons
Diff against target: 75 lines (+66/-0)
2 files modified
l10n_fr/migrations/7.0.1.1/openupgrade_analysis_work.txt (+32/-0)
l10n_fr/migrations/7.0.1.1/pre-migration.py (+34/-0)
To merge this branch: bzr merge lp:~sylvain-legal/openupgrade-addons/7.0_l10n_fr_2
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Approve
Review via email: mp+184754@code.launchpad.net

Description of the change

New merge proposal replacing : https://code.launchpad.net/~sylvain-legal/openupgrade-addons/7.0_l10n_fr/+merge/183876

According to Holger's comment :
-> Deleting void post-migration.py script

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thanks! My point here [1] was: an OpenERP migration does not have to take care of any record from an account template or a tax template because it does not affect the chart of accounts installed. So it seems to me that the migration script is not necessary.

[1] https://code.launchpad.net/~sylvain-legal/openupgrade-addons/7.0_l10n_fr/+merge/183876/comments/417847

review: Needs Fixing
Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

Hi.

regarding Stefan's comment :
My point of view is :
- in most cases, migrate or not migrate template object will not change nothing because it's not possible by interface to change template values ;

- As stefan said, if we create tax for a company before migration, the migration script will not change tax object. (only tax.template)

- Maybe in a specific case, if a developper did a change in the database in a tax.template record (or by specific module), the result will not be se same during migration ;

- It's "more right" to migrate template (i.e : change xml_id instead of delete and recreate) because this is the same object. It's conceptually the same that base.user_admin renamed by base.user_root or other ;

- It's really not important for me. If OpenUpgrade commiters prefere not to migrate template, I'll change my code.

My 2 cents.

Thanks for your reviews and your helpfull comments.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Agreed. It does not hurt to migrate the existing entries and it might even help some of the less likely setups that you mention.

review: Approve
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

I had to merge this manually, because the branch undoes some of your earlier changes that were merged before. I think you reverted manually when these changes showed up in this proposal too. Not a big problem though.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'l10n_fr/migrations/7.0.1.1/openupgrade_analysis_work.txt'
2--- l10n_fr/migrations/7.0.1.1/openupgrade_analysis_work.txt 1970-01-01 00:00:00 +0000
3+++ l10n_fr/migrations/7.0.1.1/openupgrade_analysis_work.txt 2013-09-10 11:13:45 +0000
4@@ -0,0 +1,32 @@
5+---Fields in module 'l10n_fr'---
6+# New fields for company. Nothing to do.
7+l10n_fr / res.company / ape (char) : NEW
8+l10n_fr / res.company / siret (char) : NEW
9+
10+---XML records in module 'l10n_fr'---
11+# 'tva_acq_normale_inclue' renamed by 'tva_acq_normale_TTC'. OK
12+DEL account.tax.template: l10n_fr.tva_acq_normale_inclue
13+NEW account.tax.template: l10n_fr.tva_acq_normale_TTC
14+
15+# 'tva_acq_specifique_inclue' renamed by 'tva_acq_specifique_TTC'. OK
16+DEL account.tax.template: l10n_fr.tva_acq_specifique_inclue
17+NEW account.tax.template: l10n_fr.tva_acq_specifique_TTC
18+
19+# 'tva_acq_specifique_1_inclue' renamed by 'tva_acq_specifique_1_TTC'. OK
20+DEL account.tax.template: l10n_fr.tva_acq_specifique_1_inclue
21+NEW account.tax.template: l10n_fr.tva_acq_specifique_1_TTC
22+
23+# 'tva_acq_reduite_inclue' renamed by 'tva_acq_reduite_TTC'. OK
24+DEL account.tax.template: l10n_fr.tva_acq_reduite_inclue
25+NEW account.tax.template: l10n_fr.tva_acq_reduite_TTC
26+
27+# 'tva_acq_super_reduite_inclue' renamed by 'tva_acq_super_reduite_TTC'. OK
28+DEL account.tax.template: l10n_fr.tva_acq_super_reduite_inclue
29+NEW account.tax.template: l10n_fr.tva_acq_super_reduite_TTC
30+
31+# New action.todo from 'account' module replacing the old actions.todo from 'l10n_fr' module. Nothing to do.
32+DEL ir.actions.todo: l10n_fr.config_call_account_template_fr
33+NEW ir.actions.todo: account.action_wizard_multi_chart_todo
34+
35+# New herited view for adding ape and siret field. OK.
36+NEW ir.ui.view: l10n_fr.res_company_form_l10n_fr
37
38=== added file 'l10n_fr/migrations/7.0.1.1/pre-migration.py'
39--- l10n_fr/migrations/7.0.1.1/pre-migration.py 1970-01-01 00:00:00 +0000
40+++ l10n_fr/migrations/7.0.1.1/pre-migration.py 2013-09-10 11:13:45 +0000
41@@ -0,0 +1,34 @@
42+# -*- coding: utf-8 -*-
43+##############################################################################
44+#
45+# OpenERP, Open Source Management Solution
46+# This module copyright (C) 2013 Sylvain LE GAL
47+#
48+# This program is free software: you can redistribute it and/or modify
49+# it under the terms of the GNU Affero General Public License as
50+# published by the Free Software Foundation, either version 3 of the
51+# License, or (at your option) any later version.
52+#
53+# This program is distributed in the hope that it will be useful,
54+# but WITHOUT ANY WARRANTY; without even the implied warranty of
55+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56+# GNU Affero General Public License for more details.
57+#
58+# You should have received a copy of the GNU Affero General Public License
59+# along with this program. If not, see <http://www.gnu.org/licenses/>.
60+#
61+##############################################################################
62+
63+from openerp.openupgrade import openupgrade
64+
65+xmlid_renames = [
66+ ('l10n_fr.tva_acq_normale_inclue', 'l10n_fr.tva_acq_normale_TTC'),
67+ ('l10n_fr.tva_acq_specifique_inclue', 'l10n_fr.tva_acq_specifique_TTC'),
68+ ('l10n_fr.tva_acq_specifique_1_inclue', 'l10n_fr.tva_acq_specifique_1_TTC'),
69+ ('l10n_fr.tva_acq_reduite_inclue', 'l10n_fr.tva_acq_reduite_TTC'),
70+ ('l10n_fr.tva_acq_super_reduite_inclue', 'l10n_fr.tva_acq_super_reduite_TTC'),
71+]
72+
73+@openupgrade.migrate()
74+def migrate(cr, version):
75+ openupgrade.rename_xmlids(cr, xmlid_renames)

Subscribers

People subscribed via source and target branches