From 370ca4d72b27c0cb3e91393ab2ce66a45297907f Mon Sep 17 00:00:00 2001 From: Frederik Jaeckel Date: Thu, 30 Nov 2023 13:29:42 +0100 Subject: [PATCH 1/6] Version 7.0.31 --- README.rst | 2 +- tryton.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 65a79f1..08f1433 100644 --- a/README.rst +++ b/README.rst @@ -153,6 +153,6 @@ currency are converted into the display currency of the parent cash book. Changes ======= -*7.0.0 - 30.11.2023* +*7.0.31 - 30.11.2023* - compatibility tu Tryton 7.0 diff --git a/tryton.cfg b/tryton.cfg index b522486..98a19c7 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=7.0.0 +version=7.0.31 depends: res currency From dac3d679e9fa7fd9f455536d958eb42b18d42326 Mon Sep 17 00:00:00 2001 From: Frederik Jaeckel Date: Mon, 4 Dec 2023 20:06:02 +0100 Subject: [PATCH 3/6] allow extension of context-models --- ir.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ir.py b/ir.py index 7aa9aca..1456371 100644 --- a/ir.py +++ b/ir.py @@ -10,17 +10,23 @@ from trytond.pool import PoolMeta class Rule(metaclass=PoolMeta): __name__ = 'ir.rule' + @classmethod + def _context_modelnames(cls): + """ list of models to add 'user_id' to context + """ + return ['cashbook.book', 'cashbook.line', 'cashbook.recon'] + @classmethod def _get_context(cls, model_name): context = super()._get_context(model_name) - if model_name in {'cashbook.book', 'cashbook.line', 'cashbook.recon'}: + if model_name in cls._context_modelnames(): context['user_id'] = Transaction().user return context @classmethod def _get_cache_key(cls, model_name): key = super()._get_cache_key(model_name) - if model_name in {'cashbook.book', 'cashbook.line', 'cashbook.recon'}: + if model_name in cls._context_modelnames(): key = (*key, Transaction().user) return key From 9d8515ac10a32f8d396bcf3f6015389cdca0e5c4 Mon Sep 17 00:00:00 2001 From: Frederik Jaeckel Date: Thu, 30 Nov 2023 13:53:13 +0100 Subject: [PATCH 4/6] readme --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 08f1433..18d79f8 100644 --- a/README.rst +++ b/README.rst @@ -155,4 +155,4 @@ Changes *7.0.31 - 30.11.2023* -- compatibility tu Tryton 7.0 +- compatibility to Tryton 7.0 From d5d09d6c5bd347509b6806f85ed10b6c89fbc5c3 Mon Sep 17 00:00:00 2001 From: Frederik Jaeckel Date: Wed, 6 Dec 2023 20:20:13 +0100 Subject: [PATCH 5/6] columns optional --- view/book_list.xml | 2 +- view/book_tree.xml | 2 +- view/line_list.xml | 10 +++++----- view/line_recon_list.xml | 16 ++++++++-------- view/recon_list.xml | 14 +++++++------- view/split_list.xml | 6 +++--- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/view/book_list.xml b/view/book_list.xml index 31479c1..487c2d3 100644 --- a/view/book_list.xml +++ b/view/book_list.xml @@ -5,5 +5,5 @@ full copyright notices and license terms. --> - + diff --git a/view/book_tree.xml b/view/book_tree.xml index f3cfcb1..1ba5c32 100644 --- a/view/book_tree.xml +++ b/view/book_tree.xml @@ -5,7 +5,7 @@ full copyright notices and license terms. --> - + diff --git a/view/line_list.xml b/view/line_list.xml index 4264a57..ab1ddde 100644 --- a/view/line_list.xml +++ b/view/line_list.xml @@ -4,14 +4,14 @@ The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. --> - + - - - - + + + +