From 36ebb4843ea27211dcf8eda8baa4c67342c385c8 Mon Sep 17 00:00:00 2001 From: David Harper Date: Wed, 6 Feb 2019 22:34:13 +0100 Subject: [PATCH] Rename informations to information issue7926 review54491002 --- CHANGELOG | 2 ++ statement.py | 13 +++++++++++-- view/statement_origin_form.xml | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2b9d09d37c..2734305ceb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Rename Origin field informations to information + Version 5.0.0 - 2018-10-01 * Bug fixes (see mercurial logs for details) * Use single account for statement journal diff --git a/statement.py b/statement.py index 50f4b33517..b5d3e57757 100644 --- a/statement.py +++ b/statement.py @@ -1008,8 +1008,17 @@ class Origin(origin_mixin(_states, _depends), ModelSQL, ModelView): digits=(16, Eval('_parent_statement', {}) .get('currency_digits', 2))), 'on_change_with_pending_amount', searcher='search_pending_amount') - informations = fields.Dict( - 'account.statement.origin.information', "Informations", readonly=True) + information = fields.Dict( + 'account.statement.origin.information', "Information", readonly=True) + + @classmethod + def __register__(cls, module_name): + table = cls.__table_handler__(module_name) + + # Migration from 5.0: rename informations into information + table.column_rename('informations', 'information') + + super(Origin, cls).__register__(module_name) @fields.depends('statement') def on_change_with_statement_id(self, name=None): diff --git a/view/statement_origin_form.xml b/view/statement_origin_form.xml index 947798116a..538487109b 100644 --- a/view/statement_origin_form.xml +++ b/view/statement_origin_form.xml @@ -20,6 +20,6 @@ this repository contains the full copyright notices and license terms. -->