Compare commits

..

26 commits
6.8 ... 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
17 changed files with 46 additions and 71 deletions

View file

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

View file

@ -9,7 +9,7 @@ pip install mds-cashbook
Requires
========
- Tryton 6.8
- Tryton 7.0
How to
======
@ -153,35 +153,6 @@ currency are converted into the display currency of the parent cash book.
Changes
=======
*6.8.35 - 01.06.2024*
*7.0.0 - 30.11.2023*
- add: config setting for fixate in booking-wizard
*6.8.34 - 30.05.2024*
- add: fixate of booking from booking-wizard
*6.8.33 - 31.12.2023*
- remove caching
- add worker-based precalculation of cashbook-values
*6.8.32 - 06.12.2023*
- columns optional
*6.8.31 - 30.11.2023*
- optimized ir.rule
*6.8.30 - 25.07.2023*
- updt: optimize code, add tests
*6.8.29 - 24.07.2023*
- fix: type of indexes
*6.8.28 - 05.06.2023*
- init
- compatibility to Tryton 7.0

View file

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

View file

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

View file

@ -145,7 +145,7 @@ full copyright notices and license terms. -->
</record>
<record model="ir.rule" id="rg_line_write-1">
<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', [])),
]" pyson="1"/>
<field name="rule_group" ref="rg_line_write"/>

View file

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

View file

@ -426,10 +426,6 @@ msgctxt "view:cashbook.book:"
msgid "Amount and Numbering"
msgstr "Amount and Numbering"
msgctxt "view:cashbook.book:"
msgid "Balance"
msgstr "Balance"
msgctxt "view:cashbook.book:"
msgid "Reconciliations"
msgstr "Reconciliations"
@ -746,14 +742,6 @@ msgctxt "model:cashbook.line,name:"
msgid "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:"
msgid "Cashbook Line"
msgstr "Cashbook Line"

View file

@ -96,7 +96,7 @@ full copyright notices and license terms. -->
</record>
<record model="ir.rule" id="rg_recon_write-1">
<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', [])),
]" pyson="1"/>
<field name="rule_group" ref="rg_recon_write"/>

View file

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

View file

@ -80,7 +80,7 @@ full copyright notices and license terms. -->
</record>
<record model="ir.rule" id="rg_split_write-1">
<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', [])),
]" pyson="1"/>
<field name="rule_group" ref="rg_split_write"/>

View file

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

View file

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

View file

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

View file

@ -9,8 +9,8 @@ full copyright notices and license terms. -->
<field name="payee"/>
<field name="category_view"/>
<field name="descr_short" expand="1"/>
<field name="credit" sum="Credit" optional="0"/>
<field name="debit" sum="Debit" optional="0"/>
<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"/>

View file

@ -9,8 +9,8 @@ full copyright notices and license terms. -->
<field name="payee" optional="0"/>
<field name="category_view" optional="0"/>
<field name="descr_short" expand="1" optional="0"/>
<field name="credit" sum="Credit" optional="0"/>
<field name="debit" sum="Debit" 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

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