From 26d8ba8ef50478dcbc45930de60f2832bc8d869d Mon Sep 17 00:00:00 2001 From: David Blanco Bautista Date: Tue, 29 Jun 2021 00:32:12 +0200 Subject: [PATCH] Allow statement journals to be deactivated issue10497 review348761003 --- CHANGELOG | 2 ++ journal.py | 4 ++-- view/statement_journal_form.xml | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c59093810c..ac0222f36e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Allow statement journals to be deactivated + Version 6.0.0 - 2021-05-03 * Bug fixes (see mercurial logs for details) * Warn user when posting a statement with cancelled or paid invoices diff --git a/journal.py b/journal.py index ce6f2df212..2945063c5e 100644 --- a/journal.py +++ b/journal.py @@ -3,13 +3,13 @@ from sql import Table from trytond import backend -from trytond.model import ModelView, ModelSQL, fields, Unique +from trytond.model import ModelView, ModelSQL, DeactivableMixin, fields, Unique from trytond.transaction import Transaction from trytond.pool import Pool from trytond.pyson import Eval -class Journal(ModelSQL, ModelView): +class Journal(DeactivableMixin, ModelSQL, ModelView): 'Statement Journal' __name__ = 'account.statement.journal' name = fields.Char('Name', required=True) diff --git a/view/statement_journal_form.xml b/view/statement_journal_form.xml index 24a80efb28..3c91f07bd4 100644 --- a/view/statement_journal_form.xml +++ b/view/statement_journal_form.xml @@ -4,6 +4,8 @@ this repository contains the full copyright notices and license terms. -->