diff --git a/README.rst b/README.rst index 65a79f1..db90287 100644 --- a/README.rst +++ b/README.rst @@ -153,6 +153,10 @@ currency are converted into the display currency of the parent cash book. Changes ======= -*7.0.0 - 30.11.2023* +*7.0.32 - 06.12.2023* -- compatibility tu Tryton 7.0 +- columns optional + +*7.0.31 - 30.11.2023* + +- compatibility to Tryton 7.0 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 diff --git a/tryton.cfg b/tryton.cfg index b522486..a630e41 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=7.0.0 +version=7.0.32 depends: res currency 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. --> - + - - - - + + + +