Compare commits

...

2 commits

Author SHA1 Message Date
Frederik Jaeckel
1bfa987746 Use 'irrulecontext' to add 'user_id' to context of ir.rule 2024-07-19 16:02:19 +02:00
Frederik Jaeckel
f7fee173d7 update gitignore 2024-07-19 16:01:44 +02:00
2 changed files with 5 additions and 4 deletions

View file

@ -1,4 +1,4 @@
syntax: glob
*.pyc
build/*
mds_cashbook_bookcategory.egg-info/*
dist/*

7
ir.py
View file

@ -3,7 +3,6 @@
# The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms.
from trytond.transaction import Transaction
from trytond.pool import PoolMeta
@ -14,7 +13,9 @@ class Rule(metaclass=PoolMeta):
def _context_modelnames(cls):
""" list of models to add 'user_id' to context
"""
return super(Rule, cls)._context_modelnames() + [
'cashbook.bookcategory']
result = super(Rule, cls)._context_modelnames()
return result | {
'cashbook.bookcategory',
}
# end Rule