uiview erstellen+test, context-view begonnen

This commit is contained in:
Frederik Jaeckel 2022-11-02 23:07:37 +01:00
parent 5809a7caba
commit 17ddfa12ca
7 changed files with 135 additions and 40 deletions

25
evaluation_context.py Normal file
View file

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# This file is part of the diagram-module from m-ds for Tryton.
# The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms.
from trytond.model import ModelView, fields
from trytond.transaction import Transaction
class EvaluationContext(ModelView):
'Evaluation Context'
__name__ = 'cashbook_report.evaluation.context'
evaluation = fields.Many2One(string='Evaluation', readonly=True,
model_name='cashbook_report.evaluation',
states={'invisible': True})
@classmethod
def default_evaluation(cls):
""" get default from context
"""
context = Transaction().context
return context.get('evaluation', None)
# end EvaluationContext