Skip to content

Commit

Permalink
Merge branch 'release/1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
RamezIssac committed Nov 8, 2023
2 parents b45fb9f + dbdc738 commit 788857b
Show file tree
Hide file tree
Showing 19 changed files with 430 additions and 167 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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

## [1.3.0] - 2023-11-08
- Implement Slick reporting media override feature + docs
- Add `Integrating reports into your Admin site` section to the docs
- Group by and crosstab reports do not need date_field set anymore. Only time series do.
- Fix in FirstBalance Computation field if no date is supplied
- Add `REPORT_VIEW_ACCESS_FUNCTION` to control access to the report view


## [1.2.0] - 2023-10-10
- Add ``get_slick_reporting_media`` and ``get_charts_media`` templatetags
- Add `get_group_by_custom_querysets` hook to ReportView
Expand Down Expand Up @@ -75,7 +83,7 @@ All notable changes to this project will be documented in this file.
- Breaking: [Only if you use Crosstab reports] renamed crosstab_compute_reminder to crosstab_compute_remainder
- Breaking : [Only if you set the templates statics by hand] renamed slick_reporting to ra.hightchart.js and ra.chartjs.js to
erp_framework.highchart.js and erp_framework.chartjs.js respectively
- Fix an issue with Crosstab when there crosstab_compute_remainder = False
- Fix an issue with Crosstab when there crosstab_compute_remainder = False

## [0.7.0]

Expand Down
8 changes: 4 additions & 4 deletions demo_proj/demo_app/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ class TotalProductSalesByCountry(ReportView):


class SumValueComputationField(ComputationField):
computation_method = Sum
computation_field = "value"
calculation_method = Sum
calculation_field = "value"
verbose_name = _("Sales Value")
name = "my_value_sum"

Expand Down Expand Up @@ -198,7 +198,7 @@ class TotalProductSalesWithCustomForm(TotalProductSales):
class GroupByReport(ReportView):
report_model = SalesTransaction
report_title = _("Group By Report")
date_field = "date"
# date_field = "date"
group_by = "product"

columns = [
Expand Down Expand Up @@ -487,7 +487,7 @@ class CrosstabReport(ReportView):
report_title = _("Cross tab Report")
report_model = SalesTransaction
group_by = "client"
date_field = "date"
# date_field = "date"

columns = [
"name",
Expand Down
3 changes: 2 additions & 1 deletion docs/source/ref/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ Below are links to the reference documentation for the various components of the
:caption: Components:

settings
view_options
computation_field
report_generator
view_options



20 changes: 20 additions & 0 deletions docs/source/ref/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ Below are the default settings for django-slick-reporting. You can override them
datetime.now().year, 1, 1, 0, 0, 0, tzinfo=timezone.utc
), # Default: 1st Jan of current year
"DEFAULT_END_DATE_TIME": datetime.datetime.today(), # Default to today
"DEFAULT_CHARTS_ENGINE": SLICK_REPORTING_DEFAULT_CHARTS_ENGINE,
"MEDIA": {
"override": False, # set it to True to override the media files,
# False will append the media files to the existing ones.
"js": (
"https://cdn.jsdelivr.net/momentjs/latest/moment.min.js",
"https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js",
"https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js",
"https://cdn.datatables.net/1.13.4/js/dataTables.bootstrap5.min.js",
"slick_reporting/slick_reporting.js",
"slick_reporting/slick_reporting.report_loader.js",
"slick_reporting/slick_reporting.datatable.js",
),
"css": {
"all": (
"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css",
"https://cdn.datatables.net/1.13.4/css/dataTables.bootstrap5.min.css",
)
},
},
"FONT_AWESOME": {
"CSS_URL": "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css",
"ICONS": {
Expand Down
Loading

0 comments on commit 788857b

Please sign in to comment.