Skip to content

Commit 788857b

Browse files
committed
Merge branch 'release/1.3.0'
2 parents b45fb9f + dbdc738 commit 788857b

19 files changed

+430
-167
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.3.0] - 2023-11-08
6+
- Implement Slick reporting media override feature + docs
7+
- Add `Integrating reports into your Admin site` section to the docs
8+
- Group by and crosstab reports do not need date_field set anymore. Only time series do.
9+
- Fix in FirstBalance Computation field if no date is supplied
10+
- Add `REPORT_VIEW_ACCESS_FUNCTION` to control access to the report view
11+
12+
513
## [1.2.0] - 2023-10-10
614
- Add ``get_slick_reporting_media`` and ``get_charts_media`` templatetags
715
- Add `get_group_by_custom_querysets` hook to ReportView
@@ -75,7 +83,7 @@ All notable changes to this project will be documented in this file.
7583
- Breaking: [Only if you use Crosstab reports] renamed crosstab_compute_reminder to crosstab_compute_remainder
7684
- Breaking : [Only if you set the templates statics by hand] renamed slick_reporting to ra.hightchart.js and ra.chartjs.js to
7785
erp_framework.highchart.js and erp_framework.chartjs.js respectively
78-
- Fix an issue with Crosstab when there crosstab_compute_remainder = False
86+
- Fix an issue with Crosstab when there crosstab_compute_remainder = False
7987

8088
## [0.7.0]
8189

demo_proj/demo_app/reports.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ class TotalProductSalesByCountry(ReportView):
8989

9090

9191
class SumValueComputationField(ComputationField):
92-
computation_method = Sum
93-
computation_field = "value"
92+
calculation_method = Sum
93+
calculation_field = "value"
9494
verbose_name = _("Sales Value")
9595
name = "my_value_sum"
9696

@@ -198,7 +198,7 @@ class TotalProductSalesWithCustomForm(TotalProductSales):
198198
class GroupByReport(ReportView):
199199
report_model = SalesTransaction
200200
report_title = _("Group By Report")
201-
date_field = "date"
201+
# date_field = "date"
202202
group_by = "product"
203203

204204
columns = [
@@ -487,7 +487,7 @@ class CrosstabReport(ReportView):
487487
report_title = _("Cross tab Report")
488488
report_model = SalesTransaction
489489
group_by = "client"
490-
date_field = "date"
490+
# date_field = "date"
491491

492492
columns = [
493493
"name",

docs/source/ref/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ Below are links to the reference documentation for the various components of the
1010
:caption: Components:
1111

1212
settings
13+
view_options
1314
computation_field
1415
report_generator
15-
view_options
16+
1617

1718

docs/source/ref/settings.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,26 @@ Below are the default settings for django-slick-reporting. You can override them
2020
datetime.now().year, 1, 1, 0, 0, 0, tzinfo=timezone.utc
2121
), # Default: 1st Jan of current year
2222
"DEFAULT_END_DATE_TIME": datetime.datetime.today(), # Default to today
23+
"DEFAULT_CHARTS_ENGINE": SLICK_REPORTING_DEFAULT_CHARTS_ENGINE,
24+
"MEDIA": {
25+
"override": False, # set it to True to override the media files,
26+
# False will append the media files to the existing ones.
27+
"js": (
28+
"https://cdn.jsdelivr.net/momentjs/latest/moment.min.js",
29+
"https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js",
30+
"https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js",
31+
"https://cdn.datatables.net/1.13.4/js/dataTables.bootstrap5.min.js",
32+
"slick_reporting/slick_reporting.js",
33+
"slick_reporting/slick_reporting.report_loader.js",
34+
"slick_reporting/slick_reporting.datatable.js",
35+
),
36+
"css": {
37+
"all": (
38+
"https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css",
39+
"https://cdn.datatables.net/1.13.4/css/dataTables.bootstrap5.min.css",
40+
)
41+
},
42+
},
2343
"FONT_AWESOME": {
2444
"CSS_URL": "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css",
2545
"ICONS": {

0 commit comments

Comments
 (0)