Merge lp:~julie-w/unifield-server/US-6451 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5488
Proposed branch: lp:~julie-w/unifield-server/US-6451
Merge into: lp:unifield-server
Diff against target: 27 lines (+6/-4)
1 file modified
bin/addons/vertical_integration/report/hq_report_oca.py (+6/-4)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-6451
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+372873@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/vertical_integration/report/hq_report_oca.py'
2--- bin/addons/vertical_integration/report/hq_report_oca.py 2019-06-07 09:32:39 +0000
3+++ bin/addons/vertical_integration/report/hq_report_oca.py 2019-09-17 12:03:13 +0000
4@@ -259,8 +259,9 @@
5 first_result_lines.append(formatted_data)
6
7 # For the second report:
8- # exclude In-kind Donations and OD-Extra Accounting entries from the "formatted data" file
9- if move_line.journal_id.type not in ['inkind', 'extra']:
10+ # exclude In-kind Donations, OD-Extra Accounting entries, and lines with zero amount from the "formatted data" file
11+ zero_move_line = not move_line.debit_currency and not move_line.credit_currency and not move_line.debit and not move_line.credit
12+ if move_line.journal_id.type not in ['inkind', 'extra'] and not zero_move_line:
13 if not account.shrink_entries_for_hq:
14 # data for the "Employee Id" column
15 employee_id = ''
16@@ -378,8 +379,9 @@
17 analytic_line.functional_currency_id and analytic_line.functional_currency_id.name or ""]
18 first_result_lines.append(formatted_data)
19
20- # exclude In-kind Donations and OD-Extra Accounting entries from the "formatted data" file
21- if analytic_line.journal_id.type not in ['inkind', 'extra']:
22+ # exclude In-kind Donations, OD-Extra Accounting entries, and lines with zero amount from the "formatted data" file
23+ zero_analytic_line = not analytic_line.amount and not analytic_line.amount_currency
24+ if analytic_line.journal_id.type not in ['inkind', 'extra'] and not zero_analytic_line:
25 # format CC as: P + the 4 digits from the right
26 cost_center = formatted_data[11] and "P%s" % formatted_data[11][-4:] or ""
27 # data for the "Employee Id" column

Subscribers

People subscribed via source and target branches