Compare commits
3 commits
fef3138313
...
93af84690d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
93af84690d | ||
![]() |
531c6b1537 | ||
![]() |
9cb4b15c45 |
5 changed files with 15 additions and 21 deletions
2
.hgignore → .gitignore
vendored
2
.hgignore → .gitignore
vendored
|
@ -1,4 +1,4 @@
|
||||||
syntax: glob
|
*.pyc
|
||||||
build/*
|
build/*
|
||||||
dist/*
|
dist/*
|
||||||
mds_cashbook.egg-info/*
|
mds_cashbook.egg-info/*
|
|
@ -153,6 +153,10 @@ currency are converted into the display currency of the parent cash book.
|
||||||
Changes
|
Changes
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
*7.0.36 - 19.07.2024*
|
||||||
|
|
||||||
|
- updt: optimize check of permissions
|
||||||
|
|
||||||
*7.0.35 - 01.06.2024*
|
*7.0.35 - 01.06.2024*
|
||||||
|
|
||||||
- add: config setting for fixate in booking-wizard
|
- add: config setting for fixate in booking-wizard
|
||||||
|
|
25
ir.py
25
ir.py
|
@ -3,7 +3,6 @@
|
||||||
# The COPYRIGHT file at the top level of this repository contains the
|
# The COPYRIGHT file at the top level of this repository contains the
|
||||||
# full copyright notices and license terms.
|
# full copyright notices and license terms.
|
||||||
|
|
||||||
from trytond.transaction import Transaction
|
|
||||||
from trytond.pool import PoolMeta
|
from trytond.pool import PoolMeta
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,22 +13,12 @@ class Rule(metaclass=PoolMeta):
|
||||||
def _context_modelnames(cls):
|
def _context_modelnames(cls):
|
||||||
""" list of models to add 'user_id' to context
|
""" list of models to add 'user_id' to context
|
||||||
"""
|
"""
|
||||||
return [
|
result = super(Rule, cls)._context_modelnames()
|
||||||
'cashbook.book', 'cashbook.line', 'cashbook.recon',
|
return result | {
|
||||||
'cashbook.split']
|
'cashbook.book',
|
||||||
|
'cashbook.line',
|
||||||
@classmethod
|
'cashbook.recon',
|
||||||
def _get_context(cls, model_name):
|
'cashbook.split'
|
||||||
context = super()._get_context(model_name)
|
}
|
||||||
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 cls._context_modelnames():
|
|
||||||
key = (*key, Transaction().user)
|
|
||||||
return key
|
|
||||||
|
|
||||||
# end Rule
|
# end Rule
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=7.0.35
|
version=7.0.36
|
||||||
depends:
|
depends:
|
||||||
res
|
res
|
||||||
currency
|
currency
|
||||||
party
|
party
|
||||||
company
|
company
|
||||||
|
irrulecontext
|
||||||
xml:
|
xml:
|
||||||
icon.xml
|
icon.xml
|
||||||
group.xml
|
group.xml
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
|
irrulecontext;7.0.1;7.0.999;mds
|
||||||
|
|
Loading…
Reference in a new issue