Compare commits

..

113 commits
6.0 ... main

Author SHA1 Message Date
Frederik Jaeckel
08d8121f57 Use 'irrulecontext' to add 'user_id' to context of ir.rule 2024-07-19 15:41:25 +02:00
Frederik Jaeckel
6aca58bcc2 update gitignore 2024-07-19 15:33:50 +02:00
Frederik Jaeckel
400ebed692 Config: setting for booking-wizard - 'fixate' 2024-06-01 11:13:47 +02:00
Frederik Jaeckel
865a2c7fa6 hgignore 2024-05-30 12:44:27 +02:00
Frederik Jaeckel
852ff6871d Allow to fixate a booking from Booking-Wizard 2024-05-30 12:44:11 +02:00
Frederik Jaeckel
65437bc52e re-calculate values @ module install 2024-01-20 18:09:03 +01:00
Frederik Jaeckel
206cd1e0e5 tests valuestore: allow add of data to cashbook-line 2023-12-31 13:17:47 +01:00
Frederik Jaeckel
d0f5b0aa38 add license 2023-12-31 11:20:00 +01:00
Frederik Jaeckel
52011f5166 cashbook: optimize for speed for checking rows 2023-12-29 22:55:41 +01:00
Frederik Jaeckel
f9e55fab77 valuestore: fix test for number of fields 2023-12-29 22:53:27 +01:00
Frederik Jaeckel
0442591d52 cashbook: add (optional) balance_all + balance_ref to list-view 2023-12-29 14:52:50 +01:00
Frederik Jaeckel
5ef3a52fdc optimize searcher/sort, add search/sort to balance_ref 2023-12-29 14:51:39 +01:00
Frederik Jaeckel
5d8f924960 add worker-based precalculation of cashbook-values 2023-12-27 15:49:02 +01:00
Frederik Jaeckel
9ef465f40f remove caching 2023-12-23 10:36:58 +01:00
Frederik Jaeckel
d2ad96db35 add user_id to context of ir.rule for cashbook.split 2023-12-13 21:52:27 +01:00
Frederik Jaeckel
e79bcca989 columns optional 2023-12-06 20:20:13 +01:00
Frederik Jaeckel
52e788db17 readme 2023-11-30 13:53:13 +01:00
Frederik Jaeckel
72f0325a71 allow extension of context-models 2023-12-04 20:06:02 +01:00
Frederik Jaeckel
7e6d2660ad Tryton 7.0 2023-11-30 13:28:00 +01:00
Frederik Jaeckel
cf92b2d7b5 Tryton 7.0: list-views - sum="1" 2023-11-30 13:19:09 +01:00
Frederik Jaeckel
7062399319 Tryton 7.0: ir.rule: Eval('user', ...) --> Eval('user_id', -1) 2023-11-30 13:18:14 +01:00
Frederik Jaeckel
fbdc68c642 ir.rule: Eval('user').get('groups') --> Eval('groups') 2023-11-30 13:14:54 +01:00
Frederik Jaeckel
7220cff5ac formatting, indexes optimized 2023-11-29 15:19:38 +01:00
Frederik Jaeckel
77ee7d15b7 splitline: add tests 2023-07-25 21:11:32 +02:00
Frederik Jaeckel
90298d3eb8 optimize search-queries, line: fix state-selection 2023-07-24 17:31:34 +02:00
Frederik Jaeckel
e605d5f0d3 line, type: fix index 2023-06-08 17:08:47 +02:00
Frederik Jaeckel
2b6731d071 Tryton 6.8: indexe neu, tests angepaßt 2023-06-03 19:13:05 +02:00
Frederik Jaeckel
2cf42eb9f6 fix tests 2023-06-02 21:08:56 +02:00
Frederik Jaeckel
3467c08895 prepare test for porting 2023-06-02 20:40:12 +02:00
Frederik Jaeckel
619a17bcd6 formatting, line: test for delete of party 2023-05-18 12:15:53 +02:00
Frederik Jaeckel
78f160bf0b remove logging, add config-settings for caching, add docs 2023-03-05 10:20:02 +01:00
Frederik Jaeckel
03324d5944 book/line: logging, model: cache-write skip existing values 2023-03-04 21:24:19 +01:00
Frederik Jaeckel
179543bcf0 sync 2023-03-02 16:53:43 +01:00
Frederik Jaeckel
befa1db235 cache: deepcopy for store/recall values 2023-03-02 14:12:18 +01:00
Frederik Jaeckel
39309783b6 book: add caching for line 2023-02-27 20:37:38 +01:00
Frederik Jaeckel
624a5bff55 speedup: indexes, caching 2023-02-26 22:49:21 +01:00
Frederik Jaeckel
86e6c33cc1 book: optimize form 2023-02-23 10:35:49 +01:00
Frederik Jaeckel
971dbc4520 book: 6x columns for 'Balance' 2023-02-22 20:32:00 +01:00
Frederik Jaeckel
dbc570bdbf fix: deny invalid 'date' in context 2023-02-14 10:16:03 +01:00
Frederik Jaeckel
610532f6a5 remove left/right from category 2023-02-10 19:38:32 +01:00
Frederik Jaeckel
2d6f034a17 menü: updt settings-icon 2023-02-10 19:04:06 +01:00
Frederik Jaeckel
1f92b15756 line: fix write() - dont rewrite values if not given 2023-02-05 11:34:18 +01:00
Frederik Jaeckel
984aab168a book: remove lef/right-fields 2023-01-26 23:07:01 +01:00
Frederik Jaeckel
f5eef66f78 splitline: optimize list-view 2023-01-21 18:46:05 +01:00
Frederik Jaeckel
cace9ea751 line: splitline-param for counterpart 2023-01-18 22:57:21 +01:00
Frederik Jaeckel
8f180cfaf7 splitline: add 'feature' of counterpart 2023-01-16 22:01:49 +01:00
Frederik Jaeckel
3b289b7944 line/splitline: optimize value-update on create/write 2023-01-15 23:05:43 +01:00
Frederik Jaeckel
82ae7d7bca splitline: add-2nd-unit-values extendable, new field 'feature' 2023-01-15 17:21:34 +01:00
Frederik Jaeckel
11d6183d65 line: omit calculation of balance if credit/debit = None
remove unused imports
2023-01-15 11:03:50 +01:00
Frederik Jaeckel
a9773a42df line: fremd-währungs(und andere)-daten extern erweiterbar 2023-01-15 00:34:44 +01:00
Frederik Jaeckel
f2ecd3e174 mixin: unbenutzten code entfernt 2023-01-12 23:36:55 +01:00
Frederik Jaeckel
0138269ea8 book: tree/list optimiert 2023-01-02 21:46:39 +01:00
Frederik Jaeckel
2b4d69736b reconciliation: wf-values ausgelagert 2022-12-31 16:07:50 +01:00
Frederik Jaeckel
b809d51fe0 line: balance-berechnung ausgelagert,
reconciliation: Feld 'feature'
2022-12-31 14:46:06 +01:00
Frederik Jaeckel
e0a6d39bdb line: 'values' für counterpart-buchung als funktion 2022-12-25 12:50:04 +01:00
Frederik Jaeckel
7a715d5ea1 line: Feld 'booktransf_feature' + tests 2022-12-25 12:08:07 +01:00
Frederik Jaeckel
a051a249e4 setup.py 2022-12-24 12:38:47 +01:00
Frederik Jaeckel
7591c7568d setup.py 2022-12-23 19:15:10 +01:00
Frederik Jaeckel
8a563e2d7f sql ergänzt 2022-12-23 18:59:05 +01:00
Frederik Jaeckel
63390df9ca cashbook: abfragen für Felder 'balance*' optimiert + suche + sortierung + test
cashbook-liste: verbergen von Kassenbücher ohne Type
2022-12-23 18:01:02 +01:00
Frederik Jaeckel
3a0e8f290d book: form optimiert 2022-12-22 18:59:23 +01:00
Frederik Jaeckel
29193fc0f1 line: Feld 'feature' 2022-12-21 21:55:08 +01:00
Frederik Jaeckel
82afd24c20 kassenbuchtyp: Feld 'feature' 2022-12-21 19:12:39 +01:00
Frederik Jaeckel
db84bf7097 readme 2022-11-30 10:17:22 +01:00
Frederik Jaeckel
a16618bf22 readme 2022-11-29 16:57:45 +01:00
Frederik Jaeckel
46e82ce73f line: knopf 'reconcile' auf form entfernt 2022-11-17 20:21:54 +01:00
Frederik Jaeckel
1ab987d532 status 'abgeglichen' ok + test 2022-11-16 21:56:02 +01:00
Frederik Jaeckel
63a3f8f020 state reconcile begonnen 2022-11-16 18:02:58 +01:00
Frederik Jaeckel
fc3ddba3ab delete() korrigiert 2022-10-15 13:28:46 +02:00
Frederik Jaeckel
a521064ddf book: berechnung des saldo gefixt, fehler bei ungültigem 'date' im context 2022-10-11 11:08:23 +02:00
Frederik Jaeckel
ef32bd79f9 line/book: kassenbuch öffnen/anzeige optimiert 2022-10-11 10:21:11 +02:00
Frederik Jaeckel
557a8b47ba line: datum in zukunft --> zeile grau 2022-10-10 13:50:35 +02:00
Frederik Jaeckel
94d51b4ee2 line: negativer saldo färbt zeile blass-rot 2022-10-08 16:20:59 +02:00
Frederik Jaeckel
5794a4ccb7 book: tree-ansicht speichert baumzustand + öffnet inhalt bei dppelklick 2022-10-08 15:32:35 +02:00
Frederik Jaeckel
5136189386 line: in form feld 'booktransf' mit colspan=3 2022-10-07 16:23:24 +02:00
Frederik Jaeckel
8910f26c99 book: öffnet inhalt per aktionsknopf 2022-10-06 13:28:42 +02:00
Frederik Jaeckel
3073ce6f8d book: saldo bis heute/alle 2022-10-04 19:17:47 +02:00
Frederik Jaeckel
25dcdde09b line/splitline: fremdwährung ok+test+migration 2022-10-04 16:47:14 +02:00
Frederik Jaeckel
0f6180ebdb amount/rate/amount_2nd - ok+test 2022-10-03 23:36:04 +02:00
Frederik Jaeckel
517e2c5ad3 Feld 'rate_2nd_currency' + 'amount_2nd_currency' ok + test 2022-10-03 08:47:55 +02:00
Frederik Jaeckel
59dfb94bee book: view zeigt in listansicht bei unterkonten in fremdwährung
den korrekten wert,
book-form: feld für saldo in unternehmens-währung
2022-10-02 15:04:10 +02:00
Frederik Jaeckel
4a7ee23e2c splitline: parameter fix 2022-09-29 21:10:15 +02:00
Frederik Jaeckel
b6799e355f splitline: create gefixt 2022-09-28 16:02:24 +02:00
Frederik Jaeckel
3db6822f26 line: felder löschen bei änderung von bookingtype 2022-09-27 17:54:28 +02:00
Frederik Jaeckel
7999440de7 book/category: hierarchische sortierung, form optimiert 2022-09-22 15:40:23 +02:00
Frederik Jaeckel
1c22aac197 book: sichtbarkeit des 'beitrag und nummerierung'-reiters korrigiert 2022-09-21 17:01:14 +02:00
Frederik Jaeckel
99abc069d8 konfig/buchung eingeben: ausgewählte kassenbücher 2022-09-18 12:52:31 +02:00
Frederik Jaeckel
2acdc55efb book: neues Feld 'description', sperrt btype-->None mit Zeilen + Test
line: verwendet nur kassenbücher mit typ
2022-09-16 10:15:51 +02:00
Frederik Jaeckel
a2e7f192f8 book: hierarchie + test
book: Feld 'start_balance' entfernt
2022-09-15 23:49:54 +02:00
Frederik Jaeckel
e10616e847 line: buchungstyp für gegenbuchung bei splitbuchung korrigiert 2022-09-13 22:18:31 +02:00
Frederik Jaeckel
0c099b11b3 line: test korrigiert 2022-09-12 00:16:06 +02:00
Frederik Jaeckel
165612a627 line: splitbuchung mit transfer 2022-09-10 21:21:17 +02:00
Frederik Jaeckel
86922aecef line: suche in splitline (kategorie+beschreibung) 2022-09-09 22:50:12 +02:00
Frederik Jaeckel
2a44c67ccf lne: zeilenumbruch in beschreibung korrigiert 2022-09-08 17:27:14 +02:00
Frederik Jaeckel
9732fe11e9 line: amount darf negativ sein + test, constrain gelöscht 2022-09-08 12:13:30 +02:00
Frederik Jaeckel
e3887debe9 Wizardform optimiert 2022-09-07 16:33:58 +02:00
Frederik Jaeckel
953bf248a4 konfig: kassenbuch-default für buchungswizard
buchungswizard: ok + test
2022-09-07 11:36:37 +02:00
Frederik Jaeckel
326d87f758 wizard: buchungseingabe begonnen 2022-09-06 17:26:53 +02:00
Frederik Jaeckel
d6ea1b31a6 line: suche optimiert (jetzt: kategorie, payee, beschreibung)
line: kontext-form optimiert,
abstimmung: anzeige-sortierung umgedreht,
kassenbuch: weniger spalten
2022-09-06 16:10:25 +02:00
Frederik Jaeckel
98ed1ceb6e line: spalte 'kategorie' ergänzt 2022-09-05 13:12:08 +02:00
Frederik Jaeckel
d1bb86ada3 line: contraint für line>=0 2022-09-05 12:39:09 +02:00
Frederik Jaeckel
acf3ca7ce5 book: felder in tab verlegt 2022-09-05 12:05:26 +02:00
Frederik Jaeckel
adb472dc87 line: darstellung beschleunigt 2022-09-03 20:39:20 +02:00
Frederik Jaeckel
8abe8fc164 line: zeilen-saldo optimiert 2022-09-02 16:04:31 +02:00
Frederik Jaeckel
ba3892aa03 line: 'number' bei check->done schreiben korrigert + test 2022-09-02 15:18:28 +02:00
Frederik Jaeckel
b78ff02500 übersetzung 2022-09-01 13:25:09 +02:00
Frederik Jaeckel
24c0e2678e book: summieren des saldo in listenansicht 2022-09-01 09:38:23 +02:00
Frederik Jaeckel
4615c04bce book: digits für startbalance/balance ergänzt 2022-08-31 10:17:29 +02:00
Frederik Jaeckel
64e9bab592 kategorie: hierarchische sortierung, sequence-spalte entfernt 2022-08-30 11:56:27 +02:00
Frederik Jaeckel
7fd42c0b42 kategory: sortierung begnnen 2022-08-29 23:34:36 +02:00
Frederik Jaeckel
937124bcaf kategorie: constraint gegen gleiche Namen auf toplevel,
importer: list/erstellt kategorie, list transaktionen
2022-08-28 12:24:25 +02:00
Frederik Jaeckel
532d9cc7c8 kategorie: domain-views, importer ergänzt 2022-08-27 09:32:17 +02:00
Frederik Jaeckel
d383b8f9c1 importer begonnen 2022-08-26 23:47:51 +02:00
30 changed files with 211 additions and 259 deletions

View file

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

View file

@ -9,7 +9,7 @@ pip install mds-cashbook
Requires Requires
======== ========
- Tryton 6.0 - Tryton 7.0
How to How to
====== ======
@ -153,148 +153,6 @@ currency are converted into the display currency of the parent cash book.
Changes Changes
======= =======
*6.0.35 - 01.06.2024* *7.0.0 - 30.11.2023*
- add: config setting for fixate in booking-wizard - compatibility to Tryton 7.0
*6.0.34 - 30.05.2024*
- add: fixate of booking from booking-wizard
*6.0.33 - 31.12.2023*
- remove caching
- add worker-based precalculation of cashbook-values
*6.0.31 - 30.11.2023*
- optimized ir.rule
*6.0.30 - 25.07.2023*
- updt: optimize code, add tests
*6.0.28 - 05.06.2023*
- code optimized
*6.0.27 - 05.03.2023*
- updt: optimize caching
- add: settings for trytond.conf
*6.0.26 - 27.02.2023*
- updt: cashbook-form optimized
- add: caching
*6.0.25 - 14.02.2023*
- fix: possible exception by invalid date in context
- updt: optimize table + icon
*6.0.24 - 05.02.2023*
- fix: rewrite of line-values
*6.0.23 - 28.01.2023*
- fix: selection of subordinate cash books for calculations
*6.0.22 - 21.01.2023*
- add: enable extension by investment-module
- updt: optimize form/list-views
*6.0.21 - 29.11.2022*
- updt: remove 'reconcile' button from line-form
- add: how to
*6.0.20 - 16.11.2022*
- add: new state 'reconciled' at line
*6.0.19 - 19.10.2022*
- fix: delete()
*6.0.18 - 11.10.2022*
- updt: optimized open/view of cashbook
*6.0.17 - 10.10.2022*
- add: colors for cashbook-lines
- add: client stores tree-state of cashbook
*6.0.16 - 07.10.2022*
- add: open cashbook-lines from cashbook
*6.0.15 - 04.10.2022*
- updt: second-currency support optimized
*6.0.14 - 30.09.2022*
- fix: parameter
*6.0.13 - 28.09.2022*
- hierarchical ordering for cashbook
- forms optimzed
*6.0.12 - 18.09.2022*
- add: selected cashbooks in 'enter-booking-dialog'
*6.0.11 - 16.09.2022*
- add: hierarchy for cashbooks
*6.0.10 - 13.09.2022*
- add: split-booking with transfer
*6.0.9 - 08.09.2022*
- updt: allow negative amounts
*6.0.8 - 07.09.2022*
- updt: enter-booking form optimized
*6.0.7 - 07.09.2022*
- add: enter-booking-wizard
*6.0.6 - 06.09.2022*
- updt: optimized form - line, line-context
- updt: extended search in cashbook-lines
*6.0.5 - 05.09.2022*
- updt: view of book + line optimized
*6.0.4 - 05.09.2022*
- fix: write number at state-change 'check' -> 'done'
- updt: speedup transaction view
*6.0.3 - 31.08.2022*
- updt: checks, sorting
*6.0.2 - 25.08.2022*
- add: split-booking
*6.0.1 - 23.08.2022*
- works
*6.0.0 - 05.08.2022*
- init

View file

@ -17,6 +17,7 @@ from .reconciliation import Reconciliation
from .cbreport import ReconciliationReport from .cbreport import ReconciliationReport
from .currency import CurrencyRate from .currency import CurrencyRate
from .valuestore import ValueStore from .valuestore import ValueStore
from .ir import Rule
from .cron import Cron from .cron import Cron
@ -36,6 +37,7 @@ def register():
RunCbReportStart, RunCbReportStart,
EnterBookingStart, EnterBookingStart,
ValueStore, ValueStore,
Rule,
Cron, Cron,
module='cashbook', type_='model') module='cashbook', type_='model')
Pool.register( Pool.register(

38
book.py
View file

@ -3,7 +3,8 @@
# 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.model import Workflow, ModelView, ModelSQL, fields, Check, tree from trytond.model import (
Workflow, ModelView, ModelSQL, fields, Check, tree, Index)
from trytond.pyson import Eval, Or, Bool, Id from trytond.pyson import Eval, Or, Bool, Id
from trytond.exceptions import UserError from trytond.exceptions import UserError
from trytond.i18n import gettext from trytond.i18n import gettext
@ -49,13 +50,13 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
company = fields.Many2One( company = fields.Many2One(
string='Company', model_name='company.company', string='Company', model_name='company.company',
required=True, select=True, ondelete="RESTRICT") required=True, ondelete="RESTRICT")
name = fields.Char( name = fields.Char(
string='Name', required=True, states=STATES, depends=DEPENDS) string='Name', required=True, states=STATES, depends=DEPENDS)
description = fields.Text( description = fields.Text(
string='Description', states=STATES, depends=DEPENDS) string='Description', states=STATES, depends=DEPENDS)
btype = fields.Many2One( btype = fields.Many2One(
string='Type', select=True, string='Type',
help='A cash book with type can contain postings. ' + help='A cash book with type can contain postings. ' +
'Without type is a view.', 'Without type is a view.',
model_name='cashbook.type', ondelete='RESTRICT', model_name='cashbook.type', ondelete='RESTRICT',
@ -68,16 +69,16 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
string='Feature', readonly=True, string='Feature', readonly=True,
states={'invisible': True}), 'on_change_with_feature') states={'invisible': True}), 'on_change_with_feature')
owner = fields.Many2One( owner = fields.Many2One(
string='Owner', required=True, select=True, string='Owner', required=True,
model_name='res.user', ondelete='SET NULL', model_name='res.user', ondelete='SET NULL',
states=STATES, depends=DEPENDS) states=STATES, depends=DEPENDS)
reviewer = fields.Many2One( reviewer = fields.Many2One(
string='Reviewer', select=True, string='Reviewer',
help='Group of users who have write access to the cashbook.', help='Group of users who have write access to the cashbook.',
model_name='res.group', ondelete='SET NULL', model_name='res.group', ondelete='SET NULL',
states=STATES, depends=DEPENDS) states=STATES, depends=DEPENDS)
observer = fields.Many2One( observer = fields.Many2One(
string='Observer', select=True, string='Observer',
help='Group of users who have read-only access to the cashbook.', help='Group of users who have read-only access to the cashbook.',
model_name='res.group', ondelete='SET NULL', model_name='res.group', ondelete='SET NULL',
states=STATES, depends=DEPENDS) states=STATES, depends=DEPENDS)
@ -152,7 +153,7 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
'on_change_with_currency_digits') 'on_change_with_currency_digits')
currency = fields.Many2One( currency = fields.Many2One(
string='Currency', select=True, string='Currency',
model_name='currency.currency', model_name='currency.currency',
states={ states={
'readonly': Or( 'readonly': Or(
@ -189,6 +190,29 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
cls._order.insert(0, ('rec_name', 'ASC')) cls._order.insert(0, ('rec_name', 'ASC'))
cls._order.insert(0, ('state', 'ASC')) cls._order.insert(0, ('state', 'ASC'))
t = cls.__table__() t = cls.__table__()
cls._sql_indexes.update({
Index(
t,
(t.btype, Index.Equality())),
Index(
t,
(t.company, Index.Equality())),
Index(
t,
(t.currency, Index.Equality())),
Index(
t,
(t.state, Index.Equality())),
Index(
t,
(t.owner, Index.Equality())),
Index(
t,
(t.reviewer, Index.Equality())),
Index(
t,
(t.observer, Index.Equality())),
})
cls._sql_constraints.extend([ cls._sql_constraints.extend([
('state_val', ('state_val',
Check(t, t.state.in_(['open', 'closed', 'archive'])), Check(t, t.state.in_(['open', 'closed', 'archive'])),

View file

@ -121,7 +121,7 @@ full copyright notices and license terms. -->
</record> </record>
<record model="ir.rule" id="rg_book_rw_owner-1"> <record model="ir.rule" id="rg_book_rw_owner-1">
<field name="domain" eval="[ <field name="domain" eval="[
('owner.id', '=', Eval('user', {}).get('id', -1)), ('owner.id', '=', Eval('user_id', -1)),
]" pyson="1"/> ]" pyson="1"/>
<field name="rule_group" ref="rg_book_rw_owner"/> <field name="rule_group" ref="rg_book_rw_owner"/>
</record> </record>

24
ir.py Normal file
View file

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# This file is part of the cashbook-module from m-ds.de for Tryton.
# The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms.
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
"""
result = super(Rule, cls)._context_modelnames()
return result | {
'cashbook.book',
'cashbook.line',
'cashbook.recon',
'cashbook.split'
}
# end Rule

39
line.py
View file

@ -3,7 +3,7 @@
# 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.model import ModelView, ModelSQL, Workflow, fields, Check from trytond.model import ModelView, ModelSQL, Workflow, fields, Check, Index
from trytond.pool import Pool from trytond.pool import Pool
from trytond.pyson import Eval, If, Or, Bool, Date from trytond.pyson import Eval, If, Or, Bool, Date
from trytond.transaction import Transaction from trytond.transaction import Transaction
@ -54,24 +54,24 @@ class Line(SecondCurrencyMixin, Workflow, ModelSQL, ModelView):
__name__ = 'cashbook.line' __name__ = 'cashbook.line'
cashbook = fields.Many2One( cashbook = fields.Many2One(
string='Cashbook', required=True, select=True, string='Cashbook', required=True,
model_name='cashbook.book', ondelete='CASCADE', readonly=True, model_name='cashbook.book', ondelete='CASCADE', readonly=True,
domain=[('btype', '!=', None)]) domain=[('btype', '!=', None)])
date = fields.Date( date = fields.Date(
string='Date', required=True, select=True, string='Date', required=True,
states=STATES, depends=DEPENDS) states=STATES, depends=DEPENDS)
month = fields.Function(fields.Integer( month = fields.Function(fields.Integer(
string='Month', readonly=True), string='Month', readonly=True),
'on_change_with_month', searcher='search_month') 'on_change_with_month', searcher='search_month')
number = fields.Char(string='Number', readonly=True) number = fields.Char(string='Number', readonly=True)
description = fields.Text( description = fields.Text(
string='Description', select=True, string='Description',
states=STATES, depends=DEPENDS) states=STATES, depends=DEPENDS)
descr_short = fields.Function(fields.Char( descr_short = fields.Function(fields.Char(
string='Description', readonly=True), string='Description', readonly=True),
'on_change_with_descr_short', searcher='search_descr_short') 'on_change_with_descr_short', searcher='search_descr_short')
category = fields.Many2One( category = fields.Many2One(
string='Category', select=True, string='Category',
model_name='cashbook.category', ondelete='RESTRICT', model_name='cashbook.category', ondelete='RESTRICT',
states={ states={
'readonly': Or( 'readonly': Or(
@ -98,7 +98,7 @@ class Line(SecondCurrencyMixin, Workflow, ModelSQL, ModelView):
bookingtype = fields.Selection( bookingtype = fields.Selection(
string='Type', required=True, string='Type', required=True,
help='Type of Booking', selection=sel_bookingtype, select=True, help='Type of Booking', selection=sel_bookingtype,
states=STATES, depends=DEPENDS) states=STATES, depends=DEPENDS)
bookingtype_string = bookingtype.translated('bookingtype') bookingtype_string = bookingtype.translated('bookingtype')
amount = fields.Numeric( amount = fields.Numeric(
@ -145,7 +145,7 @@ class Line(SecondCurrencyMixin, Workflow, ModelSQL, ModelView):
# link to lines created by this record # link to lines created by this record
reference = fields.Many2One( reference = fields.Many2One(
string='Reference', readonly=True, select=True, string='Reference', readonly=True,
states={ states={
'invisible': ~Bool(Eval('reference')), 'invisible': ~Bool(Eval('reference')),
}, model_name='cashbook.line', ondelete='CASCADE', }, model_name='cashbook.line', ondelete='CASCADE',
@ -198,7 +198,7 @@ class Line(SecondCurrencyMixin, Workflow, ModelSQL, ModelView):
state = fields.Selection( state = fields.Selection(
string='State', required=True, readonly=True, string='State', required=True, readonly=True,
select=True, selection=sel_linestate) selection=sel_linestate)
state_string = state.translated('state') state_string = state.translated('state')
state_cashbook = fields.Function(fields.Selection( state_cashbook = fields.Function(fields.Selection(
string='State of Cashbook', string='State of Cashbook',
@ -224,6 +224,27 @@ class Line(SecondCurrencyMixin, Workflow, ModelSQL, ModelView):
cls._order.insert(0, ('date', 'ASC')) cls._order.insert(0, ('date', 'ASC'))
cls._order.insert(0, ('state', 'ASC')) cls._order.insert(0, ('state', 'ASC'))
t = cls.__table__() t = cls.__table__()
cls._sql_indexes.update({
Index(
t,
(t.date, Index.Range(order='ASC'))),
Index(
t,
(t.description, Index.Similarity())),
Index(
t,
(t.category, Index.Equality())),
Index(
t,
(t.bookingtype, Index.Equality())),
Index(
t,
(t.state, Index.Equality())),
Index(
t,
(t.reference, Index.Equality())),
})
cls._sql_constraints.extend([ cls._sql_constraints.extend([
('state_val2', ('state_val2',
Check(t, t.state.in_(['edit', 'check', 'done', 'recon'])), Check(t, t.state.in_(['edit', 'check', 'done', 'recon'])),
@ -658,7 +679,7 @@ class Line(SecondCurrencyMixin, Workflow, ModelSQL, ModelView):
@fields.depends('category') @fields.depends('category')
def on_change_with_category_view(self, name=None): def on_change_with_category_view(self, name=None):
""" show optimizef form of category for list-view """ show optimized form of category for list-view
""" """
Configuration = Pool().get('cashbook.configuration') Configuration = Pool().get('cashbook.configuration')

View file

@ -145,7 +145,7 @@ full copyright notices and license terms. -->
</record> </record>
<record model="ir.rule" id="rg_line_write-1"> <record model="ir.rule" id="rg_line_write-1">
<field name="domain" eval="['OR', <field name="domain" eval="['OR',
('cashbook.owner.id', '=', Eval('user', {}).get('id', -1)), ('cashbook.owner.id', '=', Eval('user_id', -1)),
('cashbook.reviewer.id', 'in', Eval('groups', [])), ('cashbook.reviewer.id', 'in', Eval('groups', [])),
]" pyson="1"/> ]" pyson="1"/>
<field name="rule_group" ref="rg_line_write"/> <field name="rule_group" ref="rg_line_write"/>

View file

@ -466,10 +466,6 @@ msgctxt "view:cashbook.book:"
msgid "Amount and Numbering" msgid "Amount and Numbering"
msgstr "Betrag und Nummerierung" msgstr "Betrag und Nummerierung"
msgctxt "view:cashbook.book:"
msgid "Balance"
msgstr "Saldo"
msgctxt "view:cashbook.book:" msgctxt "view:cashbook.book:"
msgid "Reconciliations" msgid "Reconciliations"
msgstr "Abstimmungen" msgstr "Abstimmungen"
@ -794,14 +790,6 @@ msgctxt "model:cashbook.line,name:"
msgid "Cashbook Line" msgid "Cashbook Line"
msgstr "Kassenbuchzeile" msgstr "Kassenbuchzeile"
msgctxt "view:cashbook.line:"
msgid "Credit"
msgstr "Einnahme"
msgctxt "view:cashbook.line:"
msgid "Debit"
msgstr "Ausgabe"
msgctxt "view:cashbook.line:" msgctxt "view:cashbook.line:"
msgid "Cashbook Line" msgid "Cashbook Line"
msgstr "Kassenbuchzeile" msgstr "Kassenbuchzeile"

View file

@ -426,10 +426,6 @@ msgctxt "view:cashbook.book:"
msgid "Amount and Numbering" msgid "Amount and Numbering"
msgstr "Amount and Numbering" msgstr "Amount and Numbering"
msgctxt "view:cashbook.book:"
msgid "Balance"
msgstr "Balance"
msgctxt "view:cashbook.book:" msgctxt "view:cashbook.book:"
msgid "Reconciliations" msgid "Reconciliations"
msgstr "Reconciliations" msgstr "Reconciliations"
@ -746,14 +742,6 @@ msgctxt "model:cashbook.line,name:"
msgid "Cashbook Line" msgid "Cashbook Line"
msgstr "Cashbook Line" msgstr "Cashbook Line"
msgctxt "view:cashbook.line:"
msgid "Credit"
msgstr "Credit"
msgctxt "view:cashbook.line:"
msgid "Debit"
msgstr "Debit"
msgctxt "view:cashbook.line:" msgctxt "view:cashbook.line:"
msgid "Cashbook Line" msgid "Cashbook Line"
msgstr "Cashbook Line" msgstr "Cashbook Line"

View file

@ -3,7 +3,8 @@
# 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.model import MultiValueMixin, ValueMixin, fields, Unique, Model from trytond.model import (
MultiValueMixin, ValueMixin, fields, Unique, Index)
from trytond.transaction import Transaction from trytond.transaction import Transaction
from trytond.pool import Pool from trytond.pool import Pool
from sql import With from sql import With
@ -122,12 +123,17 @@ def order_name_hierarchical(model_name, tables):
class UserValueMixin(ValueMixin): class UserValueMixin(ValueMixin):
iduser = fields.Many2One( iduser = fields.Many2One(
model_name='res.user', string="User", model_name='res.user', string="User",
select=True, ondelete='CASCADE', required=True) ondelete='CASCADE', required=True)
@classmethod @classmethod
def __setup__(cls): def __setup__(cls):
super(UserValueMixin, cls).__setup__() super(UserValueMixin, cls).__setup__()
tab_val = cls.__table__() tab_val = cls.__table__()
cls._sql_indexes.update({
Index(
tab_val,
(tab_val.iduser, Index.Equality())),
})
cls._sql_constraints.extend([ cls._sql_constraints.extend([
('val_uniq', ('val_uniq',
Unique(tab_val, tab_val.iduser), Unique(tab_val, tab_val.iduser),

View file

@ -3,7 +3,7 @@
# 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.model import Workflow, ModelView, ModelSQL, fields from trytond.model import Workflow, ModelView, ModelSQL, fields, Index
from trytond.pyson import Eval, If, Or from trytond.pyson import Eval, If, Or
from trytond.pool import Pool from trytond.pool import Pool
from trytond.report import Report from trytond.report import Report
@ -34,10 +34,10 @@ class Reconciliation(Workflow, ModelSQL, ModelView):
__name__ = 'cashbook.recon' __name__ = 'cashbook.recon'
cashbook = fields.Many2One( cashbook = fields.Many2One(
string='Cashbook', required=True, select=True, string='Cashbook', required=True,
model_name='cashbook.book', ondelete='CASCADE', readonly=True) model_name='cashbook.book', ondelete='CASCADE', readonly=True)
date = fields.Date( date = fields.Date(
string='Date', required=True, select=True, string='Date', required=True,
states=STATES, depends=DEPENDS) states=STATES, depends=DEPENDS)
feature = fields.Function(fields.Char( feature = fields.Function(fields.Char(
string='Feature', readonly=True, string='Feature', readonly=True,
@ -54,7 +54,7 @@ class Reconciliation(Workflow, ModelSQL, ModelView):
states=STATES, depends=DEPENDS+['date_to']) states=STATES, depends=DEPENDS+['date_to'])
date_to = fields.Date( date_to = fields.Date(
string='End Date', string='End Date',
required=True, select=True, required=True,
domain=[ domain=[
If(Eval('date_to') & Eval('date_from'), If(Eval('date_to') & Eval('date_from'),
('date_from', '<=', Eval('date_to')), ('date_from', '<=', Eval('date_to')),
@ -98,7 +98,7 @@ class Reconciliation(Workflow, ModelSQL, ModelView):
state = fields.Selection( state = fields.Selection(
string='State', required=True, readonly=True, string='State', required=True, readonly=True,
select=True, selection=sel_reconstate) selection=sel_reconstate)
state_string = state.translated('state') state_string = state.translated('state')
state_cashbook = fields.Function(fields.Selection( state_cashbook = fields.Function(fields.Selection(
string='State of Cashbook', string='State of Cashbook',
@ -109,6 +109,7 @@ class Reconciliation(Workflow, ModelSQL, ModelView):
def __setup__(cls): def __setup__(cls):
super(Reconciliation, cls).__setup__() super(Reconciliation, cls).__setup__()
cls._order.insert(0, ('date_from', 'DESC')) cls._order.insert(0, ('date_from', 'DESC'))
t = cls.__table__()
cls._transitions |= set(( cls._transitions |= set((
('edit', 'check'), ('edit', 'check'),
('check', 'done'), ('check', 'done'),
@ -128,6 +129,23 @@ class Reconciliation(Workflow, ModelSQL, ModelView):
'depends': ['state'], 'depends': ['state'],
}, },
}) })
cls._sql_indexes.update({
Index(
t,
(t.cashbook, Index.Equality())),
Index(
t,
(t.date, Index.Range())),
Index(
t,
(t.date_to, Index.Range())),
Index(
t,
(t.date_from, Index.Range(order='DESC'))),
Index(
t,
(t.state, Index.Equality())),
})
def check_overlap_dates(self): def check_overlap_dates(self):
""" deny overlap of date_from/date_to between records of same cashbook """ deny overlap of date_from/date_to between records of same cashbook

View file

@ -96,7 +96,7 @@ full copyright notices and license terms. -->
</record> </record>
<record model="ir.rule" id="rg_recon_write-1"> <record model="ir.rule" id="rg_recon_write-1">
<field name="domain" eval="['OR', <field name="domain" eval="['OR',
('cashbook.owner.id', '=', Eval('user', {}).get('id', -1)), ('cashbook.owner.id', '=', Eval('user_id', -1)),
('cashbook.reviewer.id', 'in', Eval('groups', [])), ('cashbook.reviewer.id', 'in', Eval('groups', [])),
]" pyson="1"/> ]" pyson="1"/>
<field name="rule_group" ref="rg_recon_write"/> <field name="rule_group" ref="rg_recon_write"/>

View file

@ -39,7 +39,7 @@ with open(path.join(here, 'versiondep.txt'), encoding='utf-8') as f:
modversion[l2[0]] = {'min': l2[1], 'max': l2[2], 'prefix': l2[3]} modversion[l2[0]] = {'min': l2[1], 'max': l2[2], 'prefix': l2[3]}
# tryton-version # tryton-version
major_version = 6 major_version = 7
minor_version = 0 minor_version = 0
requires = ['python-slugify'] requires = ['python-slugify']
@ -91,6 +91,7 @@ setup(
'License :: OSI Approved :: GNU General Public License (GPL)', 'License :: OSI Approved :: GNU General Public License (GPL)',
'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
], ],
keywords='tryton cashbook', keywords='tryton cashbook',

View file

@ -4,7 +4,7 @@
# full copyright notices and license terms. # full copyright notices and license terms.
from trytond.model import ModelView, ModelSQL, fields from trytond.model import ModelView, ModelSQL, fields, Index
from trytond.pool import Pool from trytond.pool import Pool
from trytond.pyson import Eval, If from trytond.pyson import Eval, If
from trytond.report import Report from trytond.report import Report
@ -31,16 +31,16 @@ class SplitLine(SecondCurrencyMixin, ModelSQL, ModelView):
line = fields.Many2One( line = fields.Many2One(
string='Line', required=True, string='Line', required=True,
select=True, ondelete='CASCADE', model_name='cashbook.line', ondelete='CASCADE', model_name='cashbook.line',
readonly=True) readonly=True)
description = fields.Text( description = fields.Text(
string='Description', states=STATES, depends=DEPENDS) string='Description', states=STATES, depends=DEPENDS)
splittype = fields.Selection( splittype = fields.Selection(
string='Type', required=True, string='Type', required=True,
help='Type of split booking line', selection=sel_linetype, help='Type of split booking line', selection=sel_linetype,
states=STATES, depends=DEPENDS, select=True) states=STATES, depends=DEPENDS)
category = fields.Many2One( category = fields.Many2One(
string='Category', select=True, string='Category',
model_name='cashbook.category', ondelete='RESTRICT', model_name='cashbook.category', ondelete='RESTRICT',
states={ states={
'readonly': STATES['readonly'], 'readonly': STATES['readonly'],
@ -63,7 +63,7 @@ class SplitLine(SecondCurrencyMixin, ModelSQL, ModelView):
('owner.id', '=', Eval('owner_cashbook', -1)), ('owner.id', '=', Eval('owner_cashbook', -1)),
('id', '!=', Eval('cashbook', -1)), ('id', '!=', Eval('cashbook', -1)),
('btype', '!=', None), ('btype', '!=', None),
], select=True, ],
states={ states={
'readonly': STATES['readonly'], 'readonly': STATES['readonly'],
'invisible': Eval('splittype', '') != 'tr', 'invisible': Eval('splittype', '') != 'tr',
@ -110,6 +110,25 @@ class SplitLine(SecondCurrencyMixin, ModelSQL, ModelView):
states={'invisible': True}, model_name='res.user'), states={'invisible': True}, model_name='res.user'),
'on_change_with_owner_cashbook') 'on_change_with_owner_cashbook')
@classmethod
def __setup__(cls):
super(SplitLine, cls).__setup__()
t = cls.__table__()
cls._sql_indexes.update({
Index(
t,
(t.line, Index.Equality())),
Index(
t,
(t.splittype, Index.Equality())),
Index(
t,
(t.category, Index.Equality())),
Index(
t,
(t.booktransf, Index.Equality())),
})
@classmethod @classmethod
def default_splittype(cls): def default_splittype(cls):
""" default category """ default category

View file

@ -80,7 +80,7 @@ full copyright notices and license terms. -->
</record> </record>
<record model="ir.rule" id="rg_split_write-1"> <record model="ir.rule" id="rg_split_write-1">
<field name="domain" eval="['OR', <field name="domain" eval="['OR',
('line.cashbook.owner.id', '=', Eval('user', {}).get('id', -1)), ('line.cashbook.owner.id', '=', Eval('user_id', -1)),
('line.cashbook.reviewer.id', 'in', Eval('groups', [])), ('line.cashbook.reviewer.id', 'in', Eval('groups', [])),
]" pyson="1"/> ]" pyson="1"/>
<field name="rule_group" ref="rg_split_write"/> <field name="rule_group" ref="rg_split_write"/>

View file

@ -1,16 +1,4 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of # -*- coding: utf-8 -*-
# this repository contains the full copyright notices and license terms. # 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
import trytond.tests.test_tryton # full copyright notices and license terms.
import unittest
from .test_module import CashbookTestCase
__all__ = ['suite']
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(CashbookTestCase))
return suite

View file

@ -119,8 +119,8 @@ class CategoryTestCase(object):
self.assertRaisesRegex( self.assertRaisesRegex(
UserError, UserError,
'The value for field "Type" in "Category" is not valid ' + 'The value "out" for field "Type" in "Level 1/Level 2" of ' +
'according to its domain.', '"Category" is not valid according to its domain.',
Category.write, Category.write,
*[ *[
[category.childs[0]], [category.childs[0]],

View file

@ -895,8 +895,8 @@ class LineTestCase(object):
self.assertRaisesRegex( self.assertRaisesRegex(
UserError, UserError,
'The value for field "Cashbook" in "Cashbook Line" is not ' + r'The value "Book 1" for field "Cashbook" in "\d+" of ' +
'valid according to its domain.', r'"Cashbook Line" is not valid according to its domain.',
Line.create, Line.create,
[{ [{
'cashbook': book.id, 'cashbook': book.id,

View file

@ -267,10 +267,10 @@ class ValuestoreTestCase(object):
# check write of too much digits # check write of too much digits
self.assertRaisesRegex( self.assertRaisesRegex(
UserError, UserError,
r"The number of digits in the value " + r'The number of digits in the value ' +
r'"Decimal\(' + r'"' + r"'12.345'" +
r"'12\.345'\)" + r'" for field "Value" in "[Book 1 | 10\.00 usd | ' +
r'" for field "Value" in "Value Store" exceeds ' + r'Open]|balance|12\.35|2" of "Value Store" exceeds ' +
r'the limit of "2".', r'the limit of "2".',
ValueStore.write, ValueStore.write,
*[ *[

View file

@ -1,10 +1,11 @@
[tryton] [tryton]
version=6.0.35 version=7.0.0
depends: depends:
res res
currency currency
party party
company company
irrulecontext
xml: xml:
icon.xml icon.xml
group.xml group.xml

View file

@ -3,7 +3,7 @@
# 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.model import ModelView, ModelSQL, fields, Unique from trytond.model import ModelView, ModelSQL, fields, Unique, Index
from trytond.transaction import Transaction from trytond.transaction import Transaction
from trytond.i18n import gettext from trytond.i18n import gettext
@ -19,7 +19,7 @@ class Type(ModelSQL, ModelView):
required=True, ondelete="RESTRICT") required=True, ondelete="RESTRICT")
feature = fields.Selection( feature = fields.Selection(
string='Feature', required=True, string='Feature', required=True,
selection='get_sel_feature', select=True, selection='get_sel_feature',
help='Select feature set of the Cashbook.') help='Select feature set of the Cashbook.')
@classmethod @classmethod
@ -32,6 +32,11 @@ class Type(ModelSQL, ModelView):
Unique(t, t.short), Unique(t, t.short),
'cashbook.msg_type_short_unique'), 'cashbook.msg_type_short_unique'),
]) ])
cls._sql_indexes.update({
Index(
t,
(t.feature, Index.Equality())),
})
@classmethod @classmethod
def default_feature(cls): def default_feature(cls):

View file

@ -7,7 +7,7 @@
from sql.functions import CurrentTimestamp, DateTrunc from sql.functions import CurrentTimestamp, DateTrunc
from sql.aggregate import Count from sql.aggregate import Count
from sql.conditionals import Coalesce from sql.conditionals import Coalesce
from trytond.model import ModelSQL, fields, Unique from trytond.model import ModelSQL, fields, Unique, Index
from trytond.pool import Pool from trytond.pool import Pool
from trytond.transaction import Transaction from trytond.transaction import Transaction
from trytond.pyson import Eval, PYSON, PYSONEncoder, PYSONDecoder from trytond.pyson import Eval, PYSON, PYSONEncoder, PYSONDecoder
@ -22,7 +22,7 @@ class ValueStore(ModelSQL):
cashbook = fields.Many2One( cashbook = fields.Many2One(
string='Cashbook', required=True, model_name='cashbook.book', string='Cashbook', required=True, model_name='cashbook.book',
ondelete='CASCADE') ondelete='CASCADE')
field_name = fields.Char(string='Field Name', required=True, select=True) field_name = fields.Char(string='Field Name', required=True)
numvalue = fields.Numeric( numvalue = fields.Numeric(
string='Value', digits=(16, Eval('valuedigits', 6)), string='Value', digits=(16, Eval('valuedigits', 6)),
depends=['valuedigits']) depends=['valuedigits'])
@ -49,6 +49,11 @@ class ValueStore(ModelSQL):
Unique(t, t.cashbook, t.field_name), Unique(t, t.cashbook, t.field_name),
'cashbook.msg_value_exists_in_store'), 'cashbook.msg_value_exists_in_store'),
]) ])
cls._sql_indexes.update({
Index(
t,
(t.field_name, Index.Equality())),
})
def get_rec_name(self, name): def get_rec_name(self, name):
""" name, balance, state """ name, balance, state

View file

@ -1 +1 @@
irrulecontext;7.0.1;7.0.999;mds

View file

@ -4,6 +4,8 @@ The COPYRIGHT file at the top level of this repository contains the
full copyright notices and license terms. --> full copyright notices and license terms. -->
<tree keyword_open="1"> <tree keyword_open="1">
<field name="rec_name" expand="1"/> <field name="rec_name" expand="1"/>
<field name="balance" sum="Balance" symbol="currency"/> <field name="balance" sum="1" symbol="currency"/>
<field name="state"/> <field name="balance_all" symbol="currency" optional="1"/>
<field name="balance_ref" symbol="company_currency" optional="1"/>
<field name="state" optional="0"/>
</tree> </tree>

View file

@ -5,7 +5,9 @@ full copyright notices and license terms. -->
<tree keyword_open="1" tree_state="1"> <tree keyword_open="1" tree_state="1">
<field name="name" expand="1"/> <field name="name" expand="1"/>
<field name="balance" symbol="currency"/> <field name="balance" symbol="currency"/>
<field name="state"/> <field name="balance_all" symbol="currency" optional="1"/>
<field name="balance_ref" symbol="company_currency" optional="1"/>
<field name="state" optional="0"/>
<field name="parent" tree_invisible="1"/> <field name="parent" tree_invisible="1"/>
<field name="childs" tree_invisible="1"/> <field name="childs" tree_invisible="1"/>
</tree> </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. --> full copyright notices and license terms. -->
<tree> <tree>
<field name="cashbook" tree_invisible="1"/> <field name="cashbook" tree_invisible="1"/>
<field name="number"/> <field name="number" optional="0"/>
<field name="date"/> <field name="date"/>
<field name="payee"/> <field name="payee"/>
<field name="category_view"/> <field name="category_view"/>
<field name="descr_short" expand="1"/> <field name="descr_short" expand="1"/>
<field name="credit" sum="Credit"/> <field name="credit" sum="1" optional="0"/>
<field name="debit" sum="Debit"/> <field name="debit" sum="1" optional="0"/>
<field name="balance"/> <field name="balance" optional="0"/>
<field name="state"/> <field name="state" optional="0"/>
<button name="wfcheck"/> <button name="wfcheck"/>
</tree> </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. --> full copyright notices and license terms. -->
<tree> <tree>
<field name="cashbook" tree_invisible="1"/> <field name="cashbook" tree_invisible="1"/>
<field name="number"/> <field name="number" optional="0"/>
<field name="date"/> <field name="date" optional="0"/>
<field name="payee"/> <field name="payee" optional="0"/>
<field name="category_view"/> <field name="category_view" optional="0"/>
<field name="descr_short" expand="1"/> <field name="descr_short" expand="1" optional="0"/>
<field name="credit" sum="Credit"/> <field name="credit" sum="1" optional="0"/>
<field name="debit" sum="Debit"/> <field name="debit" sum="1" optional="0"/>
<field name="state"/> <field name="state" optional="0"/>
<button name="wfrecon"/> <button name="wfrecon"/>
</tree> </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. --> full copyright notices and license terms. -->
<tree> <tree>
<field name="cashbook"/> <field name="cashbook"/>
<field name="date"/> <field name="date" optional="0"/>
<field name="date_from"/> <field name="date_from" optional="0"/>
<field name="date_to"/> <field name="date_to" optional="0"/>
<field name="start_amount"/> <field name="start_amount" optional="0"/>
<field name="end_amount"/> <field name="end_amount" optional="0"/>
<field name="lines"/> <field name="lines" optional="0"/>
<field name="state"/> <field name="state" optional="0"/>
</tree> </tree>

View file

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