diff --git a/.hgignore b/.hgignore
index 19a5745..c840977 100644
--- a/.hgignore
+++ b/.hgignore
@@ -2,3 +2,5 @@ syntax: glob
build/*
dist/*
mds_cashbook_report.egg-info/*
+locale/convert_de2en.py
+__pycache__/*
diff --git a/__init__.py b/__init__.py
index 44a5c18..04b3213 100644
--- a/__init__.py
+++ b/__init__.py
@@ -4,7 +4,9 @@
# full copyright notices and license terms.
from trytond.pool import Pool
+from .evaluation import Evaluation
def register():
Pool.register(
+ Evaluation,
module='cashbook_report', type_='model')
diff --git a/colors.py b/colors.py
new file mode 100644
index 0000000..6b6600a
--- /dev/null
+++ b/colors.py
@@ -0,0 +1,141 @@
+# -*- 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.
+
+sel_color = [
+ ('default', 'Default'),
+ ("#000000", "Black"),
+ ("#111111", "Gray - Dark 4"),
+ ('#1c1c1c', 'Gray - Dark 3'),
+ ('#333333', 'Gray - Dark 2'),
+ ('#666666', 'Gray - Dark 1'),
+ ('#808080', 'Gray'),
+ ('#999999', 'Gray - Light 1'),
+ ('#b2b2b2', 'Gray - Light 2'),
+ ('#cccccc', 'Gray - Light 3'),
+ ('#dddddd', 'Gray - Light 4'),
+ ('#eeeeee', 'Gray - Light 5'),
+ ('#ffffff', 'White'),
+
+ ('#fff200', 'Yellow'),
+ ('#ffffc0', 'Yellow - Light 5'),
+ ('#fffbcc', 'Yellow - Light 4'),
+ ('#FFF9AE', 'Yellow - Light 3'),
+ ('#fff685', 'Yellow - Light 2'),
+ ('#fff450', 'Yellow - Light 1'),
+ ('#e3d200', 'Yellow - Dark 1'),
+ ('#ccbe00', 'Yellow - Dark 2'),
+ ('#a09600', 'Yellow - Dark 3'),
+ ('#6b6400', 'Yellow - Dark 4'),
+
+ ('#faa61a', 'Gold'),
+ ('#ffe5ca', 'Gold - Light 4'),
+ ('#ffdaa2', 'Gold - Light 3'),
+ ('#fdc578', 'Gold - Light 2'),
+ ('#fdb94d', 'Gold - Light 1'),
+ ('#d99116', 'Gold - Dark 1'),
+ ('#c38312', 'Gold - Dark 2'),
+ ('#9a6704', 'Gold - Dark 3'),
+ ('#684703', 'Gold - Dark 4'),
+
+ ('#f58220', 'Orange'),
+ ('#fedcc6', 'Orange - Light 4'),
+ ('#fcc79b', 'Orange - Light 3'),
+ ('#f9a870', 'Orange - Light 2'),
+ ('#f79448', 'Orange - Light 1'),
+ ('#d4711a', 'Orange - Dark 1'),
+ ('#c06616', 'Orange - Dark 2'),
+ ('#985006', 'Orange - Dark 3'),
+ ('#673604', 'Orange - Dark 4'),
+
+ ('#ef413d', 'Brick'),
+ ('#fcd3c1', 'Brick - Light 4'),
+ ('#f8aa97', 'Brick - Light 3'),
+ ('#f68e76', 'Brick - Light 2'),
+ ('#f3715a', 'Brick - Light 1'),
+ ('#cf3834', 'Brick - Dark 1'),
+ ('#bc312e', 'Brick - Dark 2'),
+ ('#95231f', 'Brick - Dark 3'),
+ ('#6a1816', 'Brick - Dark 4'),
+
+ ('#ed1c24', 'Red'),
+ ('#fcd4d1', 'Red - Light 4'),
+ ('#f7a19a', 'Red - Light 3'),
+ ('#f37b70', 'Red - Light 2'),
+ ('#f04e4d', 'Red - Light 1'),
+ ('#ce181e', 'Red - Dark 1'),
+ ('#ba131a', 'Red - Dark 2'),
+ ('#94070a', 'Red - Dark 3'),
+ ('#610506', 'Red - Dark 4'),
+
+ ('#a3238e', 'Violet'),
+ ('#dfcce4', 'Violet - Light 4'),
+ ('#c7a0cb', 'Violet - Light 3'),
+ ('#bd7cb5', 'Violet - Light 2'),
+ ('#aa55a1', 'Violet - Light 1'),
+ ('#8f187c', 'Violet - Dark 1'),
+ ('#820f71', 'Violet - Dark 2'),
+ ('#680059', 'Violet - Dark 3'),
+ ('#33002b', 'Violet - Dark 4'),
+
+ ('#5c2d91', 'Purple'),
+ ('#bcaed5', 'Purple - Light 4'),
+ ('#9d85be', 'Purple - Light 3'),
+ ('#826aaf', 'Purple - Light 2'),
+ ('#74489d', 'Purple - Light 1'),
+ ('#512480', 'Purple - Dark 1'),
+ ('#491d74', 'Purple - Dark 2'),
+ ('#390a5d', 'Purple - Dark 3'),
+ ('#1c052e', 'Purple - Dark 4'),
+
+ ('#21409a', 'Indigo'),
+ ('#454fa1', 'Indigo - Light 1'),
+ ('#5565af', 'Indigo - Light 2'),
+ ('#7477b8', 'Indigo - Light 3'),
+ ('#8f93c7', 'Indigo - Light 4'),
+ ('#1c3687', 'Indigo - Dark 1'),
+ ('#182f7c', 'Indigo - Dark 2'),
+ ('#0d1f63', 'Indigo - Dark 3'),
+ ('#071136', 'Indigo - Dark 4'),
+
+ ('#0066b3', 'Blue'),
+ ('#adc5e7', 'Blue - Light 4'),
+ ('#7da7d8', 'Blue - Light 3'),
+ ('#5e8ac7', 'Blue - Light 2'),
+ ('#1b75bc', 'Blue - Light 1'),
+ ('#00599d', 'Blue - Dark 1'),
+ ('#00508f', 'Blue - Dark 2'),
+ ('#003d73', 'Blue - Dark 3'),
+ ('#002342', 'Blue - Dark 4'),
+
+ ('#00aaad', 'Teal'),
+ ('#bce4e5', 'Teal - Light 4'),
+ ('#87d1d1', 'Teal - Light 3'),
+ ('#59c5c7', 'Teal - Light 2'),
+ ('#00b6bd', 'Teal - Light 1'),
+ ('#009598', 'Teal - Dark 1'),
+ ('#00888a', 'Teal - Dark 2'),
+ ('#006d6f', 'Teal - Dark 3'),
+ ('#003c3d', 'Teal - Dark 4'),
+
+ ('#00a65d', 'Green'),
+ ('#bee3d3', 'Green - Light 4'),
+ ('#8ccfb7', 'Green - Light 3'),
+ ('#65c295', 'Green - Light 2'),
+ ('#00b274', 'Green - Light 1'),
+ ('#009353', 'Green - Dark 1'),
+ ('#00864b', 'Green - Dark 2'),
+ ('#006c3b', 'Green - Dark 3'),
+ ('#00381f', 'Green - Dark 4'),
+
+ ('#72bf44', 'Lime'),
+ ('#e0efd4', 'Lime - Light 4'),
+ ('#c2e0ae', 'Lime - Light 3'),
+ ('#add58a', 'Lime - Light 2'),
+ ('#89c765', 'Lime - Light 1'),
+ ('#62a73b', 'Lime - Dark 1'),
+ ('#579835', 'Lime - Dark 2'),
+ ('#407927', 'Lime - Dark 3'),
+ ('#2b511a', 'Lime - Dark 4'),
+]
diff --git a/evaluation.py b/evaluation.py
new file mode 100644
index 0000000..ab2536f
--- /dev/null
+++ b/evaluation.py
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+# This file is part of the cashbook-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, ModelSQL, fields, Check
+from trytond.pyson import Eval, Or, Bool, Id, Len
+from trytond.transaction import Transaction
+from .colors import sel_color as sel_bgcolor
+
+
+sel_etype = [
+ ('book', 'Cashbooks'),
+ ('type', 'Types of Cashbooks'),
+ ('currency', 'Currencys'),
+ ]
+
+sel_chart = [
+ ('vbar', 'Vertical Bars'),
+ ('hbar', 'Horizontal Bars'),
+ ('pie', 'Pie'),
+ ('line', 'Line'),
+ ]
+
+
+sel_maincolor = [
+ ('default', 'Default'),
+ ('red', 'Red'),
+ ('green', 'Green'),
+ ('grey', 'Grey'),
+ ('black', 'Black'),
+ ('darkcyan', 'Dark Cyan'),
+]
+
+
+class Evaluation(ModelSQL, ModelView):
+ 'Evaluation'
+ __name__ = 'cashbook_report.evaluation'
+
+ company = fields.Many2One(string='Company', model_name='company.company',
+ required=True, ondelete="RESTRICT")
+ name = fields.Char(string='Name', required=True)
+ dtype = fields.Selection(string='Data type', required=True,
+ sort=False, selection=sel_etype,
+ help='Type of data displayed')
+ chart = fields.Selection(string='Chart type', required=True,
+ sort=False, selection=sel_chart,
+ help='Type of graphical presentation.')
+ legend = fields.Boolean(string='Legend')
+ maincolor = fields.Selection(string='Color scheme', required=True,
+ help='The color scheme determines the hue of all components of the chart.',
+ selection=sel_maincolor, sort=False)
+ bgcolor = fields.Selection(string='Background Color', required=True,
+ help='Background color of the chart area.', sort=False,
+ selection=sel_bgcolor)
+
+ @staticmethod
+ def default_company():
+ return Transaction().context.get('company') or None
+
+ @classmethod
+ def default_bgcolor(cls):
+ """ default: Yellow 5
+ """
+ return '#ffffc0'
+
+ @classmethod
+ def default_maincolor(cls):
+ """ default: 'default'
+ """
+ return 'default'
+
+ @classmethod
+ def default_legend(cls):
+ """ default True
+ """
+ return True
+
+ @classmethod
+ def default_etype(cls):
+ """ default 'book'
+ """
+ return 'book'
+
+ @classmethod
+ def default_chart(cls):
+ """ default 'pir'
+ """
+ return 'pie'
+
+# end Evaluation
diff --git a/evaluation.xml b/evaluation.xml
new file mode 100644
index 0000000..848f7c6
--- /dev/null
+++ b/evaluation.xml
@@ -0,0 +1,122 @@
+
+
+