Compare commits

...

6 commits

Author SHA1 Message Date
Frederik Jaeckel
826cd9df91 Version 7.0.32 2023-12-06 20:44:41 +01:00
Frederik Jaeckel
d5d09d6c5b columns optional 2023-12-06 20:20:13 +01:00
Frederik Jaeckel
9d8515ac10 readme 2023-11-30 13:53:13 +01:00
Frederik Jaeckel
dac3d679e9 allow extension of context-models 2023-12-04 20:06:02 +01:00
Frederik Jaeckel
7399c26a29 Etikett ver 7.0.31 zum Änderungssatz e40433ff9fdc hinzugefügt 2023-11-30 13:29:56 +01:00
Frederik Jaeckel
370ca4d72b Version 7.0.31 2023-11-30 13:29:42 +01:00
9 changed files with 40 additions and 30 deletions

View file

@ -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

10
ir.py
View file

@ -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

View file

@ -1,5 +1,5 @@
[tryton]
version=7.0.0
version=7.0.32
depends:
res
currency

View file

@ -5,5 +5,5 @@ full copyright notices and license terms. -->
<tree keyword_open="1">
<field name="rec_name" expand="1"/>
<field name="balance" sum="1" symbol="currency"/>
<field name="state"/>
<field name="state" optional="0"/>
</tree>

View file

@ -5,7 +5,7 @@ full copyright notices and license terms. -->
<tree keyword_open="1" tree_state="1">
<field name="name" expand="1"/>
<field name="balance" symbol="currency"/>
<field name="state"/>
<field name="state" optional="0"/>
<field name="parent" tree_invisible="1"/>
<field name="childs" tree_invisible="1"/>
</tree>

View file

@ -4,14 +4,14 @@ The COPYRIGHT file at the top level of this repository contains the
full copyright notices and license terms. -->
<tree>
<field name="cashbook" tree_invisible="1"/>
<field name="number"/>
<field name="number" optional="0"/>
<field name="date"/>
<field name="payee"/>
<field name="category_view"/>
<field name="descr_short" expand="1"/>
<field name="credit" sum="1"/>
<field name="debit" sum="1"/>
<field name="balance"/>
<field name="state"/>
<field name="credit" sum="1" optional="0"/>
<field name="debit" sum="1" optional="0"/>
<field name="balance" optional="0"/>
<field name="state" optional="0"/>
<button name="wfcheck"/>
</tree>

View file

@ -4,13 +4,13 @@ The COPYRIGHT file at the top level of this repository contains the
full copyright notices and license terms. -->
<tree>
<field name="cashbook" tree_invisible="1"/>
<field name="number"/>
<field name="date"/>
<field name="payee"/>
<field name="category_view"/>
<field name="descr_short" expand="1"/>
<field name="credit" sum="1"/>
<field name="debit" sum="1"/>
<field name="state"/>
<field name="number" optional="0"/>
<field name="date" optional="0"/>
<field name="payee" optional="0"/>
<field name="category_view" optional="0"/>
<field name="descr_short" expand="1" optional="0"/>
<field name="credit" sum="1" optional="0"/>
<field name="debit" sum="1" optional="0"/>
<field name="state" optional="0"/>
<button name="wfrecon"/>
</tree>

View file

@ -4,11 +4,11 @@ The COPYRIGHT file at the top level of this repository contains the
full copyright notices and license terms. -->
<tree>
<field name="cashbook"/>
<field name="date"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="start_amount"/>
<field name="end_amount"/>
<field name="lines"/>
<field name="state"/>
<field name="date" optional="0"/>
<field name="date_from" optional="0"/>
<field name="date_to" optional="0"/>
<field name="start_amount" optional="0"/>
<field name="end_amount" optional="0"/>
<field name="lines" optional="0"/>
<field name="state" optional="0"/>
</tree>

View file

@ -8,7 +8,7 @@ full copyright notices and license terms. -->
<field name="splittype"/>
<field name="category"/>
<field name="booktransf"/>
<field name="description" expand="1"/>
<field name="amount" sum="1" symbol="currency"/>
<field name="amount_2nd_currency" symbol="currency2nd"/>
<field name="description" expand="1" optional="0"/>
<field name="amount" sum="1" symbol="currency" optional="0"/>
<field name="amount_2nd_currency" symbol="currency2nd" optional="0"/>
</tree>