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

Proposed by Sylvain LE GAL (GRAP)
Status: Rejected
Rejected by: Sylvain LE GAL (GRAP)
Proposed branch: lp:~sylvain-legal/openupgrade-addons/7.0_l10n_fr
Merge into: lp:openupgrade-addons
Diff against target: 161 lines (+73/-43)
5 files modified
account/migrations/7.0.1.1/openupgrade_analysis_work.txt (+7/-22)
account/migrations/7.0.1.1/pre-migration.py (+0/-6)
account_accountant/migrations/7.0.1.1/openupgrade_analysis_work.txt (+0/-15)
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
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Needs Fixing
Stefan Rijnhart (Opener) Needs Information
Review via email: mp+183876@code.launchpad.net

Description of the change

[ADD] analysis and script migration for 'l10n_fr' module.

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

(reviewing only the l10n_fr module)

Account templates are a special case, I think. They are only used at the moment that a company's financial settings are configured. If the xml_id of a tax template changes, that should not influence an already configured account chart, nor should it influence the configuration of a company after the upgrade. So it seems to me that this module is a 'nothing to do'. What do you think?

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

I changed incorrect commit.

I think you're right about the special case of templates.

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

could you delete post-migration.py as it does nothing?

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

Sorry I lost me with bazaar command's.

I dit a new branch with merge proposal available here :
https://code.launchpad.net/~sylvain-legal/openupgrade-addons/7.0_l10n_fr_2/+merge/184754

So I reject my own merge proposal.

Sorry.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/migrations/7.0.1.1/openupgrade_analysis_work.txt'
2--- account/migrations/7.0.1.1/openupgrade_analysis_work.txt 2013-09-09 20:56:30 +0000
3+++ account/migrations/7.0.1.1/openupgrade_analysis_work.txt 2013-09-10 10:39:39 +0000
4@@ -1,37 +1,22 @@
5 ---Fields in module 'account'---
6-# 'opening_details_ids' replacing 'starting_details_ids' : one2many field based on account_cashbox_line.banck_statement_id (many2one) Nothing to do for the object account_banck_statement
7-account / account.bank.statement / starting_details_ids (one2many): DEL relation: account.cashbox.line
8-account / account.bank.statement / opening_details_ids (one2many): NEW relation: account.cashbox.line
9-
10-# 'closing_details_ids' replacing 'ending_details_ids' : one2many field based on account_cashbox_line.banck_statement_id (many2one) Nothing to do for the object account_banck_statement
11-account / account.bank.statement / ending_details_ids (one2many) : DEL relation: account.cashbox.line
12+### TODO: migrate cashbox opening and closing items
13 account / account.bank.statement / closing_details_ids (one2many): NEW relation: account.cashbox.line
14-
15-# new field one2many based on account_cashbox_line.banck_statement_id (many2one) Nothing to do for the object account_banck_statement
16 account / account.bank.statement / details_ids (one2many) : NEW relation: account.cashbox.line
17-
18-### The account_cashbox_line concept changes a lot.
19-# Use case : in the cashbox : at the opening state, there is 1 '1 euro coin' and at the closing state, 3 '1 euro coin'.
20-# in 6.1 : there is 2 lines in account_cashbox_line. One with starting_id linked to the account_bank_statement (number=1), the other with the ending_id linked to the account_bank_statement (number=3)
21-# in 7.0 : there is one line with number_opening = 1 and number_closing = 3
22-# -> Migration script will delete all the "ending" and merge the data to the "starting" line. (If the starting line exists)
23+account / account.bank.statement / ending_details_ids (one2many) : DEL relation: account.cashbox.line
24+account / account.bank.statement / opening_details_ids (one2many): NEW relation: account.cashbox.line
25+account / account.bank.statement / starting_details_ids (one2many): DEL relation: account.cashbox.line
26 account / account.cashbox.line / bank_statement_id (many2one) : NEW relation: account.bank.statement
27 account / account.cashbox.line / ending_id (many2one) : DEL relation: account.bank.statement
28-account / account.cashbox.line / starting_id (many2one) : DEL relation: account.bank.statement
29 account / account.cashbox.line / number (integer) : DEL
30 account / account.cashbox.line / number_closing (integer) : NEW
31 account / account.cashbox.line / number_opening (integer) : NEW
32-
33-### Ignore new fields
34+account / account.cashbox.line / starting_id (many2one) : DEL relation: account.bank.statement
35 account / account.journal / cash_control (boolean) : NEW
36+account / account.journal / cashbox_line_ids (one2many) : NEW relation: account.journal.cashbox.line
37 account / account.journal / with_last_closing_balance (boolean): NEW
38-account / account.journal / cashbox_line_ids (one2many) : NEW relation: account.journal.cashbox.line
39-account / account.journal / internal_account_id (many2one): NEW relation: account.account
40-
41-### Ignore new fields (new table)
42 account / account.journal.cashbox.line / journal_id (many2one) : NEW relation: account.journal, required: required
43 account / account.journal.cashbox.line / pieces (float) : NEW
44-
45+account / account.journal / internal_account_id (many2one): NEW relation: account.account
46
47 ### Ignore, no existing data to push as messages
48 account / account.bank.statement / message_ids (one2many) : NEW relation: mail.message
49
50=== modified file 'account/migrations/7.0.1.1/pre-migration.py'
51--- account/migrations/7.0.1.1/pre-migration.py 2013-09-09 20:56:30 +0000
52+++ account/migrations/7.0.1.1/pre-migration.py 2013-09-10 10:39:39 +0000
53@@ -32,12 +32,6 @@
54 [
55 ('name', None),
56 ('note', None),
57- ],
58- 'account_cashbox_line':
59- [
60- ('ending_id', None),
61- ('starting_id', None),
62- ('number', None),
63 ]
64 }
65
66
67=== removed file 'account_accountant/migrations/7.0.1.1/openupgrade_analysis_work.txt'
68--- account_accountant/migrations/7.0.1.1/openupgrade_analysis_work.txt 2013-09-04 11:17:44 +0000
69+++ account_accountant/migrations/7.0.1.1/openupgrade_analysis_work.txt 1970-01-01 00:00:00 +0000
70@@ -1,15 +0,0 @@
71----Fields in module 'account_accountant'---
72----XML records in module 'account_accountant'---
73-
74-### New xml_ids. OK.
75-NEW ir.actions.client: account_accountant.action_client_account_menu
76-NEW mail.message: account_accountant.module_install_notification
77-
78-### xml_id from other module. (New). OK
79-NEW ir.actions.todo: base.open_menu
80-NEW ir.ui.menu: account.menu_account_config
81-
82-### xml_id from other module. (Existing). OK
83-NEW ir.ui.menu: account.menu_finance
84-
85-
86
87=== added file 'l10n_fr/migrations/7.0.1.1/openupgrade_analysis_work.txt'
88--- l10n_fr/migrations/7.0.1.1/openupgrade_analysis_work.txt 1970-01-01 00:00:00 +0000
89+++ l10n_fr/migrations/7.0.1.1/openupgrade_analysis_work.txt 2013-09-10 10:39:39 +0000
90@@ -0,0 +1,32 @@
91+---Fields in module 'l10n_fr'---
92+# New fields for company. Nothing to do.
93+l10n_fr / res.company / ape (char) : NEW
94+l10n_fr / res.company / siret (char) : NEW
95+
96+---XML records in module 'l10n_fr'---
97+# 'tva_acq_normale_inclue' renamed by 'tva_acq_normale_TTC'. OK
98+DEL account.tax.template: l10n_fr.tva_acq_normale_inclue
99+NEW account.tax.template: l10n_fr.tva_acq_normale_TTC
100+
101+# 'tva_acq_specifique_inclue' renamed by 'tva_acq_specifique_TTC'. OK
102+DEL account.tax.template: l10n_fr.tva_acq_specifique_inclue
103+NEW account.tax.template: l10n_fr.tva_acq_specifique_TTC
104+
105+# 'tva_acq_specifique_1_inclue' renamed by 'tva_acq_specifique_1_TTC'. OK
106+DEL account.tax.template: l10n_fr.tva_acq_specifique_1_inclue
107+NEW account.tax.template: l10n_fr.tva_acq_specifique_1_TTC
108+
109+# 'tva_acq_reduite_inclue' renamed by 'tva_acq_reduite_TTC'. OK
110+DEL account.tax.template: l10n_fr.tva_acq_reduite_inclue
111+NEW account.tax.template: l10n_fr.tva_acq_reduite_TTC
112+
113+# 'tva_acq_super_reduite_inclue' renamed by 'tva_acq_super_reduite_TTC'. OK
114+DEL account.tax.template: l10n_fr.tva_acq_super_reduite_inclue
115+NEW account.tax.template: l10n_fr.tva_acq_super_reduite_TTC
116+
117+# New action.todo from 'account' module replacing the old actions.todo from 'l10n_fr' module. Nothing to do.
118+DEL ir.actions.todo: l10n_fr.config_call_account_template_fr
119+NEW ir.actions.todo: account.action_wizard_multi_chart_todo
120+
121+# New herited view for adding ape and siret field. OK.
122+NEW ir.ui.view: l10n_fr.res_company_form_l10n_fr
123
124=== added file 'l10n_fr/migrations/7.0.1.1/pre-migration.py'
125--- l10n_fr/migrations/7.0.1.1/pre-migration.py 1970-01-01 00:00:00 +0000
126+++ l10n_fr/migrations/7.0.1.1/pre-migration.py 2013-09-10 10:39:39 +0000
127@@ -0,0 +1,34 @@
128+# -*- coding: utf-8 -*-
129+##############################################################################
130+#
131+# OpenERP, Open Source Management Solution
132+# This module copyright (C) 2013 Sylvain LE GAL
133+#
134+# This program is free software: you can redistribute it and/or modify
135+# it under the terms of the GNU Affero General Public License as
136+# published by the Free Software Foundation, either version 3 of the
137+# License, or (at your option) any later version.
138+#
139+# This program is distributed in the hope that it will be useful,
140+# but WITHOUT ANY WARRANTY; without even the implied warranty of
141+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
142+# GNU Affero General Public License for more details.
143+#
144+# You should have received a copy of the GNU Affero General Public License
145+# along with this program. If not, see <http://www.gnu.org/licenses/>.
146+#
147+##############################################################################
148+
149+from openerp.openupgrade import openupgrade
150+
151+xmlid_renames = [
152+ ('l10n_fr.tva_acq_normale_inclue', 'l10n_fr.tva_acq_normale_TTC'),
153+ ('l10n_fr.tva_acq_specifique_inclue', 'l10n_fr.tva_acq_specifique_TTC'),
154+ ('l10n_fr.tva_acq_specifique_1_inclue', 'l10n_fr.tva_acq_specifique_1_TTC'),
155+ ('l10n_fr.tva_acq_reduite_inclue', 'l10n_fr.tva_acq_reduite_TTC'),
156+ ('l10n_fr.tva_acq_super_reduite_inclue', 'l10n_fr.tva_acq_super_reduite_TTC'),
157+]
158+
159+@openupgrade.migrate()
160+def migrate(cr, version):
161+ openupgrade.rename_xmlids(cr, xmlid_renames)

Subscribers

People subscribed via source and target branches