Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Accounting Reports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo modules
Accounting Reports
Merge requests
!13
Topic/11.0/statement 3570
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Topic/11.0/statement 3570
topic/11.0/statement-3570
into
branch/11.0
Overview
0
Commits
6
Pipelines
6
Changes
29
Merged
Houzefa Abbasbhay
requested to merge
topic/11.0/statement-3570
into
branch/11.0
2 years ago
Overview
0
Commits
6
Pipelines
6
Changes
1
Expand
https://project.orus.io/project/gle-jal/us/3570
Edited
2 years ago
by
Houzefa Abbasbhay
0
0
Merge request reports
Compare
version 5
version 5
fd20719e
2 years ago
version 4
8cf4522a
2 years ago
version 3
7a825834
2 years ago
version 2
13dbc9bf
2 years ago
version 1
f9e3b65c
2 years ago
branch/11.0 (base)
and
latest version
latest version
f9748f68
6 commits,
2 years ago
version 5
fd20719e
6 commits,
2 years ago
version 4
8cf4522a
5 commits,
2 years ago
version 3
7a825834
5 commits,
2 years ago
version 2
13dbc9bf
5 commits,
2 years ago
version 1
f9e3b65c
5 commits,
2 years ago
Show latest version
1 file
+
26
−
6
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
reports/monthly_statement_excel.py
+
26
−
6
Options
@@ -51,6 +51,8 @@
@@ -51,6 +51,8 @@
self
.
_write_data_header
()
self
.
_write_data_header
()
self
.
_write_data
()
self
.
_write_data
()
self
.
_write_totals
(
self
.
_get_totals
())
def
_declare_formats
(
self
):
def
_declare_formats
(
self
):
"""
Declare cell formats usable by this report.
"""
"""
Declare cell formats usable by this report.
"""
@@ -131,6 +133,13 @@
@@ -131,6 +133,13 @@
),
),
)
)
def
_get_totals
(
self
):
"""
Define totals shown below the table, as a list of
(label, value, style) tuples.
"""
return
((
_
(
"
Total
"
),
self
.
batch
.
amount
,
self
.
format_amount
),)
def
_read_data
(
self
,
record
,
path
,
cell_type
):
def
_read_data
(
self
,
record
,
path
,
cell_type
):
"""
Read data from an Odoo record.
"""
"""
Read data from an Odoo record.
"""
@@ -198,12 +207,6 @@
@@ -198,12 +207,6 @@
width
=
14
,
width
=
14
,
type
=
"
amount
"
,
type
=
"
amount
"
,
)
)
addCol
(
header
=
_
(
"
Total
"
),
field
=
"
reporting_balance
"
,
width
=
14
,
type
=
"
amount
"
,
)
def
_write_data_header
(
self
):
def
_write_data_header
(
self
):
"""
Write 1 row with titles of columns set in self._set_columns.
"""
"""
Write 1 row with titles of columns set in self._set_columns.
"""
@@ -303,3 +306,20 @@
@@ -303,3 +306,20 @@
)
)
self
.
row_pos
+=
1
self
.
row_pos
+=
1
self
.
row_pos
+=
2
self
.
row_pos
+=
2
def
_write_totals
(
self
,
totals
):
"""
Write 1 row per total, starting with the current row.
"""
col_name
=
0
col_value
=
col_name
+
len
(
self
.
colspecs
)
-
1
for
label
,
value
,
style
in
totals
:
self
.
sheet
.
merge_range
(
self
.
row_pos
,
col_name
,
self
.
row_pos
,
col_name
+
len
(
self
.
colspecs
)
-
2
,
label
,
self
.
format_header_left
,
)
self
.
sheet
.
write
(
self
.
row_pos
,
col_value
,
value
,
style
)
self
.
row_pos
+=
1
Loading