changeset 4e87346ae295 in modules/account_statement:default
details: 
https://hg.tryton.org/modules/account_statement?cmd=changeset&node=4e87346ae295
description:
        Allow statement journals to be deactivated

        issue10497
        review348761003
diffstat:

 CHANGELOG                       |  2 ++
 journal.py                      |  4 ++--
 view/statement_journal_form.xml |  2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r f7e204d9b4db -r 4e87346ae295 CHANGELOG
--- a/CHANGELOG Thu Jun 17 09:25:40 2021 +0200
+++ b/CHANGELOG Tue Jun 29 00:32:12 2021 +0200
@@ -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 -r f7e204d9b4db -r 4e87346ae295 journal.py
--- a/journal.py        Thu Jun 17 09:25:40 2021 +0200
+++ b/journal.py        Tue Jun 29 00:32:12 2021 +0200
@@ -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 -r f7e204d9b4db -r 4e87346ae295 view/statement_journal_form.xml
--- a/view/statement_journal_form.xml   Thu Jun 17 09:25:40 2021 +0200
+++ b/view/statement_journal_form.xml   Tue Jun 29 00:32:12 2021 +0200
@@ -4,6 +4,8 @@
 <form>
     <label name="name"/>
     <field name="name"/>
+    <label name="active"/>
+    <field name="active"/>
     <label name="journal"/>
     <field name="journal"/>
     <label name="currency"/>

Reply via email to