Compare commits

...

4 commits

Author SHA1 Message Date
Frederik Jaeckel
982a83a5d4 Version 7.0.9 2023-12-10 15:00:29 +01:00
Frederik Jaeckel
94ad921fd0 replace 'domain' with 'context_domain' in 'ir.action.act_window' 2023-12-10 14:58:38 +01:00
Frederik Jaeckel
c71dacf948 Etikett ver 7.0.8 zum Änderungssatz d55d7c206b3b hinzugefügt 2023-12-06 22:16:37 +01:00
Frederik Jaeckel
d2c5436aad Version 7.0.8 2023-12-06 22:16:18 +01:00
6 changed files with 38 additions and 5 deletions

View file

@ -29,7 +29,11 @@ so that you can display several evaluations at the same time.
Changes
=======
*7.0.0 - 06.12.2023*
*7.0.9 - 10.12.2023*
- fix: selection of lines in dashboard-view
*7.0.8 - 06.12.2023*
- compatibility to Tryton 7.0

View file

@ -10,7 +10,7 @@ from .currency import Currency
from .evaluation_context import EvaluationContext
from .evaluation_wizard import OpenChartWizard
from .investment import InvestmentEvaluation, InvestmentLine
from .ir import Rule
from .ir import Rule, IrActWindow
def register():
@ -20,6 +20,7 @@ def register():
EvaluationLine,
EvaluationContext,
Rule,
IrActWindow,
module='cashbook_report', type_='model')
Pool.register(
OpenChartWizard,

View file

@ -221,7 +221,7 @@ class Evaluation(sequence_ordered(), ModelSQL, ModelView):
'name': evaluation.name,
'res_model': 'cashbook_report.eval_line',
'usage': 'dashboard',
'domain': '[["evaluation", "=", %d]]' % evaluation.id,
'context_domain': '[["evaluation", "=", %d]]' % evaluation.id,
}])
dashb_actview, = ActView.create([{

27
ir.py
View file

@ -18,3 +18,30 @@ class Rule(metaclass=PoolMeta):
'ir.action.act_window', 'cashbook_report.evaluation']
# end Rule
class IrActWindow(metaclass=PoolMeta):
__name__ = 'ir.action.act_window'
@classmethod
def __register__(cls, module_name):
super(IrActWindow, cls).__register__(module_name)
# migrate (6.0 --> 7.0): domain --> context_domain
records = cls.search([
('res_model', '=', 'cashbook_report.eval_line'),
('domain', '!=', None),
('context_domain', '=', None),
('context_model', '=', None)])
if records:
to_write = []
for record in records:
to_write.extend([
[record],
{
'context_domain': record.domain,
'domain': None,
}])
cls.write(*to_write)
# end IrActWindow

View file

@ -788,8 +788,9 @@ class ReportTestCase(CashbookInvestmentTestCase):
self.assertEqual(
evaluation.dashb_actwin.usage,
'dashboard')
self.assertEqual(evaluation.dashb_actwin.domain, None)
self.assertEqual(
evaluation.dashb_actwin.domain,
evaluation.dashb_actwin.context_domain,
'[["evaluation", "=", %d]]' % evaluation.id)
# action-view
self.assertEqual(evaluation.dashb_actview.sequence, 10)

View file

@ -1,5 +1,5 @@
[tryton]
version=7.0.0
version=7.0.9
depends:
res
cashbook