odoo-addon-account-financial-report 15.0.1.1.0.1__py3-none-any.whl → 18.0.1.4.4.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. odoo/addons/account_financial_report/README.rst +131 -74
  2. odoo/addons/account_financial_report/__manifest__.py +6 -9
  3. odoo/addons/account_financial_report/i18n/account_financial_report.pot +313 -188
  4. odoo/addons/account_financial_report/i18n/ar.po +579 -433
  5. odoo/addons/account_financial_report/i18n/ca.po +474 -289
  6. odoo/addons/account_financial_report/i18n/{fr_FR.po → ca_AD.po} +539 -491
  7. odoo/addons/account_financial_report/i18n/ca_ES.po +1891 -0
  8. odoo/addons/account_financial_report/i18n/de.po +455 -295
  9. odoo/addons/account_financial_report/i18n/es.po +458 -394
  10. odoo/addons/account_financial_report/i18n/es_AR.po +464 -283
  11. odoo/addons/account_financial_report/i18n/es_MX.po +315 -220
  12. odoo/addons/account_financial_report/i18n/fr.po +620 -435
  13. odoo/addons/account_financial_report/i18n/fr_CH.po +616 -462
  14. odoo/addons/account_financial_report/i18n/hr.po +506 -355
  15. odoo/addons/account_financial_report/i18n/hr_HR.po +331 -232
  16. odoo/addons/account_financial_report/i18n/it.po +538 -356
  17. odoo/addons/account_financial_report/i18n/ja.po +339 -240
  18. odoo/addons/account_financial_report/i18n/nl.po +462 -324
  19. odoo/addons/account_financial_report/i18n/nl_NL.po +318 -220
  20. odoo/addons/account_financial_report/i18n/pt.po +429 -242
  21. odoo/addons/account_financial_report/i18n/pt_BR.po +588 -438
  22. odoo/addons/account_financial_report/i18n/ro.po +499 -342
  23. odoo/addons/account_financial_report/i18n/sl.po +1945 -0
  24. odoo/addons/account_financial_report/i18n/sv.po +1997 -0
  25. odoo/addons/account_financial_report/i18n/tr.po +1947 -0
  26. odoo/addons/account_financial_report/menuitems.xml +1 -1
  27. odoo/addons/account_financial_report/models/__init__.py +2 -0
  28. odoo/addons/account_financial_report/models/account_age_report_configuration.py +49 -0
  29. odoo/addons/account_financial_report/models/account_group.py +62 -23
  30. odoo/addons/account_financial_report/models/account_move_line.py +33 -3
  31. odoo/addons/account_financial_report/models/ir_actions_report.py +6 -4
  32. odoo/addons/account_financial_report/models/res_config_settings.py +36 -0
  33. odoo/addons/account_financial_report/readme/CONFIGURE.md +26 -0
  34. odoo/addons/account_financial_report/readme/CONTRIBUTORS.md +38 -0
  35. odoo/addons/account_financial_report/readme/CREDITS.md +1 -0
  36. odoo/addons/account_financial_report/readme/DESCRIPTION.md +21 -0
  37. odoo/addons/account_financial_report/readme/HISTORY.md +16 -0
  38. odoo/addons/account_financial_report/readme/ROADMAP.md +6 -0
  39. odoo/addons/account_financial_report/report/abstract_report.py +73 -23
  40. odoo/addons/account_financial_report/report/abstract_report_xlsx.py +28 -23
  41. odoo/addons/account_financial_report/report/aged_partner_balance.py +131 -30
  42. odoo/addons/account_financial_report/report/aged_partner_balance_xlsx.py +158 -118
  43. odoo/addons/account_financial_report/report/general_ledger.py +421 -340
  44. odoo/addons/account_financial_report/report/general_ledger_xlsx.py +127 -75
  45. odoo/addons/account_financial_report/report/journal_ledger.py +84 -68
  46. odoo/addons/account_financial_report/report/journal_ledger_xlsx.py +14 -8
  47. odoo/addons/account_financial_report/report/open_items.py +113 -70
  48. odoo/addons/account_financial_report/report/open_items_xlsx.py +152 -19
  49. odoo/addons/account_financial_report/report/templates/aged_partner_balance.xml +408 -311
  50. odoo/addons/account_financial_report/report/templates/general_ledger.xml +273 -213
  51. odoo/addons/account_financial_report/report/templates/journal_ledger.xml +70 -76
  52. odoo/addons/account_financial_report/report/templates/layouts.xml +12 -1
  53. odoo/addons/account_financial_report/report/templates/open_items.xml +181 -55
  54. odoo/addons/account_financial_report/report/templates/trial_balance.xml +304 -195
  55. odoo/addons/account_financial_report/report/templates/vat_report.xml +10 -10
  56. odoo/addons/account_financial_report/report/trial_balance.py +463 -211
  57. odoo/addons/account_financial_report/report/trial_balance_xlsx.py +37 -38
  58. odoo/addons/account_financial_report/report/vat_report.py +36 -25
  59. odoo/addons/account_financial_report/report/vat_report_xlsx.py +1 -1
  60. odoo/addons/account_financial_report/security/ir.model.access.csv +2 -0
  61. odoo/addons/account_financial_report/security/security.xml +8 -0
  62. odoo/addons/account_financial_report/static/description/index.html +106 -55
  63. odoo/addons/account_financial_report/static/src/css/report.css +77 -42
  64. odoo/addons/account_financial_report/static/src/css/report_html.css +10 -0
  65. odoo/addons/account_financial_report/static/src/js/report.esm.js +72 -0
  66. odoo/addons/account_financial_report/static/src/js/report_action.esm.js +39 -0
  67. odoo/addons/account_financial_report/static/src/xml/report.xml +10 -9
  68. odoo/addons/account_financial_report/tests/__init__.py +1 -0
  69. odoo/addons/account_financial_report/tests/test_age_report_configuration.py +42 -0
  70. odoo/addons/account_financial_report/tests/test_aged_partner_balance.py +99 -9
  71. odoo/addons/account_financial_report/tests/test_general_ledger.py +19 -9
  72. odoo/addons/account_financial_report/tests/test_journal_ledger.py +18 -9
  73. odoo/addons/account_financial_report/tests/test_open_items.py +42 -2
  74. odoo/addons/account_financial_report/tests/test_trial_balance.py +114 -223
  75. odoo/addons/account_financial_report/tests/test_vat_report.py +17 -9
  76. odoo/addons/account_financial_report/view/account_age_report_configuration_views.xml +41 -0
  77. odoo/addons/account_financial_report/view/res_config_settings_views.xml +51 -0
  78. odoo/addons/account_financial_report/wizard/abstract_wizard.py +23 -0
  79. odoo/addons/account_financial_report/wizard/aged_partner_balance_wizard.py +22 -8
  80. odoo/addons/account_financial_report/wizard/aged_partner_balance_wizard_view.xml +2 -3
  81. odoo/addons/account_financial_report/wizard/general_ledger_wizard.py +42 -36
  82. odoo/addons/account_financial_report/wizard/general_ledger_wizard_view.xml +26 -41
  83. odoo/addons/account_financial_report/wizard/journal_ledger_wizard.py +19 -7
  84. odoo/addons/account_financial_report/wizard/journal_ledger_wizard_view.xml +15 -14
  85. odoo/addons/account_financial_report/wizard/open_items_wizard.py +34 -8
  86. odoo/addons/account_financial_report/wizard/open_items_wizard_view.xml +16 -14
  87. odoo/addons/account_financial_report/wizard/trial_balance_wizard.py +68 -45
  88. odoo/addons/account_financial_report/wizard/trial_balance_wizard_view.xml +40 -39
  89. odoo/addons/account_financial_report/wizard/vat_report_wizard.py +9 -3
  90. odoo/addons/account_financial_report/wizard/vat_report_wizard_view.xml +14 -14
  91. odoo_addon_account_financial_report-18.0.1.4.4.3.dist-info/METADATA +234 -0
  92. odoo_addon_account_financial_report-18.0.1.4.4.3.dist-info/RECORD +107 -0
  93. {odoo_addon_account_financial_report-15.0.1.1.0.1.dist-info → odoo_addon_account_financial_report-18.0.1.4.4.3.dist-info}/WHEEL +1 -1
  94. odoo_addon_account_financial_report-18.0.1.4.4.3.dist-info/top_level.txt +1 -0
  95. odoo/addons/account_financial_report/readme/CONTRIBUTORS.rst +0 -35
  96. odoo/addons/account_financial_report/readme/DESCRIPTION.rst +0 -16
  97. odoo/addons/account_financial_report/readme/HISTORY.rst +0 -19
  98. odoo/addons/account_financial_report/readme/ROADMAP.rst +0 -7
  99. odoo/addons/account_financial_report/static/src/js/action_manager_report.js +0 -37
  100. odoo/addons/account_financial_report/static/src/js/client_action.js +0 -58
  101. odoo/addons/account_financial_report/static/src/js/report.js +0 -58
  102. odoo_addon_account_financial_report-15.0.1.1.0.1.dist-info/METADATA +0 -179
  103. odoo_addon_account_financial_report-15.0.1.1.0.1.dist-info/RECORD +0 -95
  104. odoo_addon_account_financial_report-15.0.1.1.0.1.dist-info/top_level.txt +0 -1
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="utf-8" ?>
2
2
  <odoo>
3
3
  <template id="general_ledger">
4
- <t t-call="web.html_container">
4
+ <t t-call="account_financial_report.html_container">
5
5
  <t t-foreach="docs" t-as="o">
6
6
  <t t-call="account_financial_report.internal_layout">
7
7
  <t t-call="account_financial_report.report_general_ledger_base" />
@@ -16,15 +16,15 @@
16
16
  <!-- Defines global variables used by internal layout -->
17
17
  <t t-set="title">
18
18
  General Ledger -
19
- <t t-raw="company_name" />
19
+ <t t-out="company_name" />
20
20
  -
21
- <t t-raw="currency_name" />
21
+ <t t-out="currency_name" />
22
22
  </t>
23
23
  <div class="page">
24
24
  <div class="row">
25
25
  <h4
26
26
  class="mt0"
27
- t-esc="title or 'Odoo Report'"
27
+ t-out="title or 'Odoo Report'"
28
28
  style="text-align: center;"
29
29
  />
30
30
  </div>
@@ -35,48 +35,42 @@
35
35
  <!-- Display account header -->
36
36
  <div class="act_as_table list_table" style="margin-top: 10px;" />
37
37
  <div class="act_as_caption account_title" style="width: 100%">
38
- <span
39
- t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'code')"
40
- />
38
+ <span t-out="account['code']" />
41
39
  -
42
- <span
43
- t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'name')"
44
- />
40
+ <span t-out="account['name']" />
45
41
  </div>
46
- <t t-if="not account['partners']">
42
+ <t t-if="'list_grouped' not in account">
47
43
  <!-- Display account move lines without partner regroup -->
48
44
  <t t-set="type" t-value='"account_type"' />
49
45
  <t
50
46
  t-call="account_financial_report.report_general_ledger_lines"
51
47
  >
52
- <t t-set="account_or_partner_object" t-value="account" />
48
+ <t t-set="account_or_group_item_object" t-value="account" />
53
49
  </t>
54
50
  <!-- Display account footer -->
55
51
  <t
56
52
  t-call="account_financial_report.report_general_ledger_ending_cumul"
57
53
  >
58
- <t t-set="account_or_partner_object" t-value="account" />
54
+ <t t-set="account_or_group_item_object" t-value="account" />
59
55
  <t t-set="type" t-value='"account_type"' />
60
56
  </t>
61
57
  </t>
62
- <t t-if="account['partners']">
58
+ <t t-if="'list_grouped' in account">
63
59
  <!-- Display account partners -->
64
- <t t-foreach="account['list_partner']" t-as="partner">
65
- <t t-set="type" t-value='"partner_type"' />
60
+ <t t-foreach="account['list_grouped']" t-as="group_item">
61
+ <t t-set="type" t-value='"grouped_type"' />
66
62
  <div class="page_break">
67
63
  <!-- Display partner header -->
68
64
  <div class="act_as_caption account_title">
69
- <span
70
- t-esc="o._get_atr_from_dict(partner['id'], partners_data, 'name')"
71
- />
65
+ <span t-out="group_item['name']" />
72
66
  </div>
73
67
  <!-- Display partner move lines -->
74
68
  <t
75
69
  t-call="account_financial_report.report_general_ledger_lines"
76
70
  >
77
71
  <t
78
- t-set="account_or_partner_object"
79
- t-value="partner"
72
+ t-set="account_or_group_item_object"
73
+ t-value="group_item"
80
74
  />
81
75
  </t>
82
76
  <!-- Display partner footer -->
@@ -84,10 +78,10 @@
84
78
  t-call="account_financial_report.report_general_ledger_ending_cumul"
85
79
  >
86
80
  <t
87
- t-set="account_or_partner_object"
88
- t-value="partner"
81
+ t-set="account_or_group_item_object"
82
+ t-value="group_item"
89
83
  />
90
- <t t-set="type" t-value='"partner_type"' />
84
+ <t t-set="type" t-value='"grouped_type"' />
91
85
  </t>
92
86
  </div>
93
87
  </t>
@@ -97,7 +91,7 @@
97
91
  t-call="account_financial_report.report_general_ledger_ending_cumul"
98
92
  >
99
93
  <t
100
- t-set="account_or_partner_object"
94
+ t-set="account_or_group_item_object"
101
95
  t-value="account"
102
96
  />
103
97
  <t t-set="type" t-value='"account_type"' />
@@ -115,14 +109,13 @@
115
109
  <div class="act_as_cell">Target moves filter</div>
116
110
  <div class="act_as_cell">Account balance at 0 filter</div>
117
111
  <div class="act_as_cell">Centralize filter</div>
118
- <div class="act_as_cell">Show analytic tags</div>
119
112
  </div>
120
113
  <div class="act_as_row">
121
114
  <div class="act_as_cell">
122
115
  From:
123
- <span t-esc="date_from" />
116
+ <span t-out="date_from" />
124
117
  To:
125
- <span t-esc="date_to" />
118
+ <span t-out="date_to" />
126
119
  </div>
127
120
  <div class="act_as_cell">
128
121
  <t t-if="only_posted_moves">All posted entries</t>
@@ -136,10 +129,6 @@
136
129
  <t t-if="centralize">Yes</t>
137
130
  <t t-if="not centralize">No</t>
138
131
  </div>
139
- <div class="act_as_cell">
140
- <t t-if="show_analytic_tags">Yes</t>
141
- <t t-if="not show_analytic_tags">No</t>
142
- </div>
143
132
  </div>
144
133
  </div>
145
134
  </template>
@@ -170,7 +159,7 @@
170
159
  <t t-if="show_cost_center">
171
160
  <!--## cost_center-->
172
161
  <div class="act_as_cell" style="width: 8.03%;">
173
- Analytic Account
162
+ Analytic Distribution
174
163
  </div>
175
164
  </t>
176
165
  <t t-if="show_analytic_tags">
@@ -188,11 +177,14 @@
188
177
  Cumul. Bal.
189
178
  </div>
190
179
  <t t-if="foreign_currency">
191
- <!--## currency_name-->
192
- <div class="act_as_cell" style="width: 2.08%;">Cur.</div>
193
180
  <!--## amount_currency-->
194
- <div class="act_as_cell amount" style="width: 5.19%;">
195
- Amount cur.
181
+ <div
182
+ class="act_as_cell amount"
183
+ style="width: 3.63%;"
184
+ >Amount cur.
185
+ </div>
186
+ <!--## amount_currency cumulated-->
187
+ <div class="act_as_cell amount" style="width: 3.63%;">Cumul cur.
196
188
  </div>
197
189
  </t>
198
190
  </div>
@@ -212,7 +204,13 @@
212
204
  <!--## partner-->
213
205
  <div class="act_as_cell" />
214
206
  <!--## ref - label-->
215
- <div class="act_as_cell amount">Initial balance</div>
207
+ <div class="act_as_cell amount">
208
+ <t t-if='type == "account_type"'>Initial balance</t>
209
+ <t t-if='type == "grouped_type"'>
210
+ <t t-if="'partners' in account">Partner initial balance</t>
211
+ <t t-if="'taxes' in account">Tax initial balance</t>
212
+ </t>
213
+ </div>
216
214
  <t t-if="show_cost_center">
217
215
  <!--## cost_center-->
218
216
  <div class="act_as_cell" />
@@ -223,66 +221,64 @@
223
221
  </t>
224
222
  <!--## matching_number-->
225
223
  <div class="act_as_cell" />
224
+ <t
225
+ t-set="misc_domain"
226
+ t-value="[('account_id', '=', account['id']),('date', '&lt;', date_from)]"
227
+ />
228
+ <t
229
+ t-set="misc_grouped_domain"
230
+ t-value="[('partner_id', '=', account_or_group_item_object['id'])]"
231
+ t-if="'partners' in account"
232
+ />
233
+ <t t-set="misc_grouped_domain" t-value="[]" t-else="" />
226
234
  <!--## debit-->
227
235
  <div class="act_as_cell amount">
236
+ <t t-set="debit_domain" t-value="[('debit', '&lt;&gt;', 0)]" />
228
237
  <t t-if="type == 'account_type'">
229
- <t
230
- t-set="domain"
231
- t-value="[('account_id', '=', account['id']),
232
- ('date', '&lt;', date_from),
233
- ('debit', '&lt;&gt;', 0)]"
234
- />
235
- <span t-att-domain="domain" res-model="account.move.line">
238
+ <span
239
+ t-att-domain="misc_domain+debit_domain"
240
+ res-model="account.move.line"
241
+ >
236
242
  <t
237
- t-raw="account_or_partner_object['init_bal']['debit']"
238
- t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
243
+ t-out="account_or_group_item_object['init_bal']['debit']"
244
+ t-options="{'widget': 'monetary', 'display_currency': company_currency}"
239
245
  />
240
246
  </span>
241
247
  </t>
242
- <t t-if="type == 'partner_type'">
243
- <t
244
- t-set="domain"
245
- t-value="[('account_id', '=', account['id']),
246
- ('partner_id', '=', partner['id']),
247
- ('date', '&lt;', date_from),
248
- ('debit', '&lt;&gt;', 0)]"
249
- />
250
- <span t-att-domain="domain" res-model="account.move.line">
248
+ <t t-if="type == 'grouped_type'">
249
+ <span
250
+ t-att-domain="misc_domain+debit_domain+misc_grouped_domain"
251
+ res-model="account.move.line"
252
+ >
251
253
  <t
252
- t-raw="account_or_partner_object['init_bal']['debit']"
253
- t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
254
+ t-out="account_or_group_item_object['init_bal']['debit']"
255
+ t-options="{'widget': 'monetary', 'display_currency': company_currency}"
254
256
  />
255
257
  </span>
256
258
  </t>
257
259
  </div>
258
260
  <!--## credit-->
259
261
  <div class="act_as_cell amount">
262
+ <t t-set="credit_domain" t-value="[('credit', '&lt;&gt;', 0)]" />
260
263
  <t t-if="type == 'account_type'">
261
- <t
262
- t-set="domain"
263
- t-value="[('account_id', '=', account['id']),
264
- ('date', '&lt;', date_from),
265
- ('credit', '&lt;&gt;', 0)]"
266
- />
267
- <span t-att-domain="domain" res-model="account.move.line">
264
+ <span
265
+ t-att-domain="misc_domain+credit_domain"
266
+ res-model="account.move.line"
267
+ >
268
268
  <t
269
- t-raw="account_or_partner_object['init_bal']['credit']"
270
- t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
269
+ t-out="account_or_group_item_object['init_bal']['credit']"
270
+ t-options="{'widget': 'monetary', 'display_currency': company_currency}"
271
271
  />
272
272
  </span>
273
273
  </t>
274
- <t t-if="type == 'partner_type'">
275
- <t
276
- t-set="domain"
277
- t-value="[('account_id', '=', account['id']),
278
- ('partner_id', '=', partner['id']),
279
- ('date', '&lt;', date_from),
280
- ('credit', '&lt;&gt;', 0)]"
281
- />
282
- <span t-att-domain="domain" res-model="account.move.line">
274
+ <t t-if="type == 'grouped_type'">
275
+ <span
276
+ t-att-domain="misc_domain+credit_domain+misc_grouped_domain"
277
+ res-model="account.move.line"
278
+ >
283
279
  <t
284
- t-raw="account_or_partner_object['init_bal']['credit']"
285
- t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
280
+ t-out="account_or_group_item_object['init_bal']['credit']"
281
+ t-options="{'widget': 'monetary', 'display_currency': company_currency}"
286
282
  />
287
283
  </span>
288
284
  </t>
@@ -290,88 +286,89 @@
290
286
  <!--## balance cumulated-->
291
287
  <div class="act_as_cell amount">
292
288
  <t t-if="type == 'account_type'">
293
- <t
294
- t-set="domain"
295
- t-value="[('account_id', '=', account['id']),
296
- ('date', '&lt;', date_from)]"
297
- />
298
- <span t-att-domain="domain" res-model="account.move.line">
289
+ <span t-att-domain="misc_domain" res-model="account.move.line">
299
290
  <t
300
- t-raw="account_or_partner_object['init_bal']['balance']"
301
- t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
291
+ t-out="account_or_group_item_object['init_bal']['balance']"
292
+ t-options="{'widget': 'monetary', 'display_currency': company_currency}"
302
293
  />
303
294
  </span>
304
295
  </t>
305
- <t t-if="type == 'partner_type'">
306
- <t
307
- t-set="domain"
308
- t-value="[('account_id', '=', account['id']),
309
- ('partner_id', '=', partner['id']),
310
- ('date', '&lt;', date_from)]"
311
- />
312
- <span t-att-domain="domain" res-model="account.move.line">
296
+ <t t-if="type == 'grouped_type'">
297
+ <span
298
+ t-att-domain="misc_domain+misc_grouped_domain"
299
+ res-model="account.move.line"
300
+ >
313
301
  <t
314
- t-raw="account_or_partner_object['init_bal']['balance']"
315
- t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
302
+ t-out="account_or_group_item_object['init_bal']['balance']"
303
+ t-options="{'widget': 'monetary', 'display_currency': company_currency}"
316
304
  />
317
305
  </span>
318
306
  </t>
319
307
  </div>
320
308
  <t t-if="foreign_currency">
321
- <t
322
- t-if="o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
323
- >
324
- <div class="act_as_cell amount" style="width: 2.08%;">
325
- <span
326
- t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'currency_name')"
327
- />
309
+ <t t-if="account['currency_id']">
310
+ <t
311
+ t-set="account_currency"
312
+ t-value="currency_model.browse(account['currency_id'])"
313
+ />
314
+ <div class="act_as_cell amount" style="width: 3.63%;">
315
+ <t t-if="type == 'account_type'">
316
+ <span
317
+ t-att-domain="misc_domain"
318
+ res-model="account.move.line"
319
+ >
320
+ <t
321
+ t-out="account_or_group_item_object['init_bal']['bal_curr']"
322
+ t-options="{'widget': 'monetary', 'display_currency': account_currency}"
323
+ />
324
+ </span>
325
+ </t>
326
+ <t t-if="type == 'grouped_type'">
327
+ <span
328
+ t-att-domain="misc_domain+misc_grouped_domain"
329
+ res-model="account.move.line"
330
+ >
331
+ <t
332
+ t-out="account_or_group_item_object['init_bal']['bal_curr']"
333
+ t-options="{'widget': 'monetary', 'display_currency': account_currency}"
334
+ />
335
+ </span>
336
+ </t>
328
337
  </div>
329
- <div class="act_as_cell amount" style="width: 5.19%;">
338
+ <div class="act_as_cell amount" style="width: 3.63%;">
330
339
  <t t-if="type == 'account_type'">
331
- <t
332
- t-set="domain"
333
- t-value="[('account_id', '=', account['id']),
334
- ('date', '&lt;', o.date_from)]"
335
- />
336
340
  <span
337
- t-att-domain="domain"
341
+ t-att-domain="misc_domain"
338
342
  res-model="account.move.line"
339
343
  >
340
344
  <t
341
- t-raw="account_or_partner_object['init_bal']['bal_curr']"
342
- t-options="{'widget': 'monetary', 'display_currency': o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')}"
345
+ t-out="account_or_group_item_object['init_bal']['bal_curr']"
346
+ t-options="{'widget': 'monetary', 'display_currency': account_currency}"
343
347
  />
344
348
  </span>
345
349
  </t>
346
- <t t-if="type == 'partner_type'">
347
- <t
348
- t-set="domain"
349
- t-value="[('account_id', '=', account['id']),
350
- ('partner_id', '=', partner['id']),
351
- ('date', '&lt;', o.date_from)]"
352
- />
350
+ <t t-if="type == 'grouped_type'">
353
351
  <span
354
- t-att-domain="domain"
352
+ t-att-domain="misc_domain+misc_grouped_domain"
355
353
  res-model="account.move.line"
356
354
  >
357
355
  <t
358
- t-raw="account_or_partner_object['init_bal']['bal_curr']"
359
- t-options="{'widget': 'monetary', 'display_currency': o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')}"
356
+ t-out="account_or_group_item_object['init_bal']['bal_curr']"
357
+ t-options="{'widget': 'monetary', 'display_currency': account_currency}"
360
358
  />
361
359
  </span>
362
360
  </t>
363
361
  </div>
364
362
  </t>
365
- <t
366
- t-if="not o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
367
- >
368
- <div class="act_as_cell" style="width: 2.08%;" />
369
- <div class="act_as_cell" style="width: 5.19%;" />
363
+ <t t-if="not account['currency_id']">
364
+ <div class="act_as_cell" style="width: 3.63%;" />
365
+ <div class="act_as_cell" style="width: 3.63%;" />
370
366
  </t>
371
367
  </t>
372
368
  </div>
373
369
  <!-- Display each lines -->
374
- <t t-foreach="account_or_partner_object['move_lines']" t-as="line">
370
+ <t t-set="total_bal_curr" t-value="0" />
371
+ <t t-foreach="account_or_group_item_object['move_lines']" t-as="line">
375
372
  <!-- # lines or centralized lines -->
376
373
  <div class="act_as_row lines">
377
374
  <!--## date-->
@@ -384,7 +381,7 @@
384
381
  view-type="form"
385
382
  >
386
383
  <t
387
- t-esc="line['date']"
384
+ t-out="line['date']"
388
385
  t-options="{'widget': 'date'}"
389
386
  />
390
387
  </span>
@@ -393,7 +390,7 @@
393
390
  <span>
394
391
  <!--## We don't use t-field because it throws an error on click -->
395
392
  <t
396
- t-esc="line['date']"
393
+ t-out="line['date']"
397
394
  t-options="{'widget': 'date'}"
398
395
  />
399
396
  </span>
@@ -407,7 +404,7 @@
407
404
  res-model="account.move"
408
405
  view-type="form"
409
406
  >
410
- <t t-raw="line['entry']" />
407
+ <t t-out="line['entry']" />
411
408
  </span>
412
409
  </t>
413
410
  </div>
@@ -419,7 +416,7 @@
419
416
  view-type="form"
420
417
  >
421
418
  <t
422
- t-raw="o._get_atr_from_dict(line['journal_id'], journals_data, 'code')"
419
+ t-out="o._get_atr_from_dict(line['journal_id'], journals_data, 'code')"
423
420
  />
424
421
  </span>
425
422
  </div>
@@ -430,9 +427,7 @@
430
427
  res-model="account.account"
431
428
  view-type="form"
432
429
  >
433
- <t
434
- t-raw="o._get_atr_from_dict(account['id'], accounts_data, 'code')"
435
- />
430
+ <t t-out="account['code']" />
436
431
  </span>
437
432
  </div>
438
433
  <!--## taxes-->
@@ -440,10 +435,13 @@
440
435
  <t t-if="taxes_data and line['tax_ids']">
441
436
  <t t-foreach="line['tax_ids']" t-as="tax_id">
442
437
  <span
443
- t-esc="o._get_atr_from_dict(tax_id, taxes_data, 'tax_name')"
438
+ t-out="o._get_atr_from_dict(tax_id, taxes_data, 'tax_name')"
444
439
  />
445
440
  </t>
446
441
  </t>
442
+ <t t-if="line['tax_line_id']">
443
+ <span t-out="line['tax_line_id'][1]" />
444
+ </t>
447
445
  </div>
448
446
  <!--## partner-->
449
447
  <div class="act_as_cell left">
@@ -453,7 +451,7 @@
453
451
  res-model="res.partner"
454
452
  view-type="form"
455
453
  >
456
- <t t-raw="line['partner_name']" />
454
+ <t t-out="line['partner_name']" />
457
455
  </span>
458
456
  </t>
459
457
  </div>
@@ -465,26 +463,49 @@
465
463
  res-model="account.move.line"
466
464
  view-type="form"
467
465
  >
468
- <t t-raw="line['ref_label']" />
466
+ <t
467
+ t-out="limit_text(line['ref_label'], 'label_text_limit')"
468
+ />
469
469
  </span>
470
470
  </t>
471
471
  <t t-else="">
472
472
  <span>
473
- <t t-raw="line['ref_label']" />
473
+ <t
474
+ t-out="limit_text(line['ref_label'], 'label_text_limit')"
475
+ />
474
476
  </span>
475
477
  </t>
476
478
  </div>
477
479
  <!--## cost_center-->
478
480
  <t t-if="show_cost_center">
479
481
  <div class="act_as_cell left">
480
- <t t-if="line['analytic_account_id']">
481
- <span
482
- t-att-res-id="line['analytic_account_id']"
483
- res-model="account.analytic.account"
484
- view-type="form"
485
- >
486
- <t t-raw="line['analytic_account']" />
487
- </span>
482
+ <t
483
+ t-foreach="line['analytic_distribution']"
484
+ t-as="analytic_id"
485
+ >
486
+ <div>
487
+ <t
488
+ t-foreach="analytic_id.split(',')"
489
+ t-as="analytic_account_id"
490
+ >
491
+ <span
492
+ t-att-res-id="analytic_account_id"
493
+ res-model="account.analytic.account"
494
+ view-type="form"
495
+ >
496
+ <t
497
+ t-out="o._get_atr_from_dict(int(analytic_account_id), analytic_data, 'name')"
498
+ />
499
+ <t
500
+ t-if="int(line['analytic_distribution'][analytic_id]) &lt; 100"
501
+ >
502
+ <t
503
+ t-out="int(line['analytic_distribution'][analytic_id])"
504
+ />%
505
+ </t>
506
+ </span>
507
+ </t>
508
+ </div>
488
509
  </t>
489
510
  </div>
490
511
  </t>
@@ -494,7 +515,7 @@
494
515
  <t t-if="line['tag_ids']">
495
516
  <t t-foreach="line['tag_ids']" t-as="tag_id">
496
517
  <span
497
- t-esc="o._get_atr_from_dict(tag_id, tags_data, 'name')"
518
+ t-out="o._get_atr_from_dict(tag_id, tags_data, 'name')"
498
519
  />
499
520
  </t>
500
521
  </t>
@@ -508,7 +529,7 @@
508
529
  res-model="account.full.reconcile"
509
530
  view-type="form"
510
531
  >
511
- <t t-raw="line['rec_name']" />
532
+ <t t-out="line['rec_name']" />
512
533
  </span>
513
534
  </t>
514
535
  </div>
@@ -521,7 +542,7 @@
521
542
  view-type="form"
522
543
  >
523
544
  <t
524
- t-raw="line['debit']"
545
+ t-out="line['debit']"
525
546
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
526
547
  />
527
548
  </span>
@@ -529,7 +550,7 @@
529
550
  <t t-else="">
530
551
  <span>
531
552
  <t
532
- t-raw="line['debit']"
553
+ t-out="line['debit']"
533
554
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
534
555
  />
535
556
  </span>
@@ -544,7 +565,7 @@
544
565
  view-type="form"
545
566
  >
546
567
  <t
547
- t-raw="line['credit']"
568
+ t-out="line['credit']"
548
569
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
549
570
  />
550
571
  </span>
@@ -552,7 +573,7 @@
552
573
  <t t-else="">
553
574
  <span>
554
575
  <t
555
- t-raw="line['credit']"
576
+ t-out="line['credit']"
556
577
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
557
578
  />
558
579
  </span>
@@ -567,7 +588,7 @@
567
588
  view-type="form"
568
589
  >
569
590
  <t
570
- t-raw="line['balance']"
591
+ t-out="line['balance']"
571
592
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
572
593
  />
573
594
  </span>
@@ -575,7 +596,7 @@
575
596
  <t t-else="">
576
597
  <span>
577
598
  <t
578
- t-raw="line['balance']"
599
+ t-out="line['balance']"
579
600
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
580
601
  />
581
602
  </span>
@@ -583,26 +604,43 @@
583
604
  </div>
584
605
  <t t-if="foreign_currency">
585
606
  <t t-if="line['currency_id']">
586
- <!--## currency_name-->
587
- <div class="act_as_cell amount" style="width: 2.08%;">
588
- <span t-esc="line['currency_id'][1]" />
589
- </div>
607
+ <t
608
+ t-set="line_currency"
609
+ t-value="currency_model.browse(line['currency_id'][0])"
610
+ />
611
+ <t
612
+ t-set="total_bal_curr"
613
+ t-value="total_bal_curr + line['bal_curr']"
614
+ t-if="line_currency!=company_currency"
615
+ />
590
616
  <!--## amount_currency-->
591
- <div class="act_as_cell amount" style="width: 5.19%;">
617
+ <div class="act_as_cell amount" style="width: 3.63%;">
592
618
  <span
593
619
  t-att-res-id="line['id']"
594
620
  res-model="account.move.line"
595
621
  view-type="form"
596
- >
597
- <t t-raw="line['bal_curr']" />
598
- </span>
622
+ t-out="line['bal_curr']"
623
+ t-options="{'widget': 'monetary', 'display_currency': line_currency}"
624
+ t-if="line_currency!=company_currency"
625
+ />
626
+ </div>
627
+ <!--## amount_currency cumulated-->
628
+ <div class="act_as_cell amount" style="width: 3.63%;">
629
+ <span
630
+ t-att-res-id="line['id']"
631
+ res-model="account.move.line"
632
+ view-type="form"
633
+ t-out="total_bal_curr"
634
+ t-options="{'widget': 'monetary', 'display_currency': line_currency}"
635
+ t-if="line_currency!=company_currency"
636
+ />
599
637
  </div>
600
638
  </t>
601
639
  <t t-if="not line['currency_id']">
602
- <!--## currency_name-->
603
- <div class="act_as_cell amount" style="width: 2.08%;" />
604
640
  <!--## amount_currency-->
605
- <div class="act_as_cell amount" style="width: 5.19%;" />
641
+ <div class="act_as_cell amount" style="width: 3.63%;" />
642
+ <!--## amount_currency cumulated-->
643
+ <div class="act_as_cell amount" style="width: 3.63%;" />
606
644
  </t>
607
645
  </t>
608
646
  </div>
@@ -616,22 +654,18 @@
616
654
  <!--## date-->
617
655
  <t t-if='type == "account_type"'>
618
656
  <div class="act_as_cell first_column" style="width: 41.32%;">
619
- <span
620
- t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'code')"
621
- />
657
+ <span t-out="account['code']" />
622
658
  -
623
- <span
624
- t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'name')"
625
- />
659
+ <span t-out="account['name']" />
626
660
  </div>
627
- <div class="act_as_cell right" style="width: 16.9%;">
628
- Ending balance
661
+ <div class="act_as_cell right" style="width: 16.9%;">Ending balance
629
662
  </div>
630
663
  </t>
631
- <t t-if='type == "partner_type"'>
664
+ <t t-if='type == "grouped_type"'>
632
665
  <div class="act_as_cell first_column" style="width: 41.32%;" />
633
666
  <div class="act_as_cell right" style="width: 16.9%;">
634
- Partner ending balance
667
+ <t t-if="'partners' in account">Partner ending balance</t>
668
+ <t t-if="'taxes' in account">Tax ending balance</t>
635
669
  </div>
636
670
  </t>
637
671
  <t t-if="show_cost_center">
@@ -647,83 +681,109 @@
647
681
  <!--## debit-->
648
682
  <div class="act_as_cell amount" style="width: 8.02%;">
649
683
  <span
650
- t-esc="account_or_partner_object['fin_bal']['debit']"
651
- t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
684
+ t-out="account_or_group_item_object['fin_bal']['debit']"
685
+ t-options="{'widget': 'monetary', 'display_currency': company_currency}"
652
686
  />
653
687
  </div>
654
688
  <!--## credit-->
655
689
  <div class="act_as_cell amount" style="width: 8.02%;">
656
690
  <span
657
- t-esc="account_or_partner_object['fin_bal']['credit']"
658
- t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
691
+ t-out="account_or_group_item_object['fin_bal']['credit']"
692
+ t-options="{'widget': 'monetary', 'display_currency': company_currency}"
659
693
  />
660
694
  </div>
661
695
  <!--## balance cumulated-->
662
696
  <div class="act_as_cell amount" style="width: 8.02%;">
663
697
  <span
664
- t-esc="account_or_partner_object['fin_bal']['balance']"
665
- t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
698
+ t-out="account_or_group_item_object['fin_bal']['balance']"
699
+ t-options="{'widget': 'monetary', 'display_currency': company_currency}"
666
700
  />
667
701
  </div>
668
702
  <!--## currency_name + amount_currency-->
703
+ <t
704
+ t-set="misc_domain"
705
+ t-value="[('account_id', '=', account['id']),('date', '&lt;', date_from)]"
706
+ />
707
+ <t
708
+ t-set="misc_grouped_domain"
709
+ t-value="[('partner_id', '=', account_or_group_item_object['id'])]"
710
+ t-if="'partners' in account"
711
+ />
712
+ <t t-set="misc_grouped_domain" t-value="[]" t-else="" />
669
713
  <t t-if="foreign_currency">
670
- <t
671
- t-if="o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
672
- >
673
- <div class="act_as_cell amount" style="width: 2.08%;">
674
- <span
675
- t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'currency_name')"
676
- />
714
+ <t t-if="account['fin_bal_currency_id']">
715
+ <t
716
+ t-set="account_currency"
717
+ t-value="currency_model.browse(account['fin_bal_currency_id'])"
718
+ />
719
+ <div class="act_as_cell amount" style="width: 3.63%;">
720
+ <t t-if="type == 'account_type'">
721
+ <span>
722
+ <a
723
+ t-att-data-t-att-domain="misc_domain"
724
+ t-att-data-res-model="'account.move.line'"
725
+ class="o_account_financial_reports_web_action_monetary_multi"
726
+ style="color: black;"
727
+ >
728
+ <t
729
+ t-out="account_or_group_item_object['fin_bal']['bal_curr']"
730
+ t-options="{'widget': 'monetary', 'display_currency': account_currency}"
731
+ />
732
+ </a>
733
+ </span>
734
+ </t>
735
+ <t t-if="type == 'grouped_type'">
736
+ <span>
737
+ <a
738
+ t-att-data-t-att-domain="misc_domain+misc_grouped_domain"
739
+ t-att-data-res-model="'account.move.line'"
740
+ class="o_account_financial_reports_web_action_monetary_multi"
741
+ style="color: black;"
742
+ >
743
+ <t
744
+ t-out="account_or_group_item_object['fin_bal']['bal_curr']"
745
+ t-options="{'widget': 'monetary', 'display_currency': account_currency}"
746
+ />
747
+ </a>
748
+ </span>
749
+ </t>
677
750
  </div>
678
- <div class="act_as_cell amount" style="width: 5.19%;">
751
+ <div class="act_as_cell amount" style="width: 3.63%;">
679
752
  <t t-if="type == 'account_type'">
680
- <t
681
- t-set="domain"
682
- t-value="[('account_id', '=', account['id']),
683
- ('date', '&lt;', date_from)]"
684
- />
685
753
  <span>
686
754
  <a
687
- t-att-data-t-att-domain="domain"
755
+ t-att-data-t-att-domain="misc_domain"
688
756
  t-att-data-res-model="'account.move.line'"
689
757
  class="o_account_financial_reports_web_action_monetary_multi"
690
758
  style="color: black;"
691
759
  >
692
760
  <t
693
- t-raw="account_or_partner_object['fin_bal']['bal_curr']"
694
- t-options="{'widget': 'monetary', 'display_currency': o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')}"
761
+ t-out="account_or_group_item_object['fin_bal']['bal_curr']"
762
+ t-options="{'widget': 'monetary', 'display_currency': account_currency}"
695
763
  />
696
764
  </a>
697
765
  </span>
698
766
  </t>
699
- <t t-if="type == 'partner_type'">
700
- <t
701
- t-set="domain"
702
- t-value="[('account_id', '=', account['id']),
703
- ('partner_id', '=', partner['id']),
704
- ('date', '&lt;', date_from)]"
705
- />
767
+ <t t-if="type == 'grouped_type'">
706
768
  <span>
707
769
  <a
708
- t-att-data-t-att-domain="domain"
770
+ t-att-data-t-att-domain="misc_domain+misc_grouped_domain"
709
771
  t-att-data-res-model="'account.move.line'"
710
772
  class="o_account_financial_reports_web_action_monetary_multi"
711
773
  style="color: black;"
712
774
  >
713
775
  <t
714
- t-raw="account_or_partner_object['fin_bal']['bal_curr']"
715
- t-options="{'widget': 'monetary', 'display_currency': o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')}"
776
+ t-out="account_or_group_item_object['fin_bal']['bal_curr']"
777
+ t-options="{'widget': 'monetary', 'display_currency': account_currency}"
716
778
  />
717
779
  </a>
718
780
  </span>
719
781
  </t>
720
782
  </div>
721
783
  </t>
722
- <t
723
- t-if="not o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
724
- >
725
- <div class="act_as_cell amount" style="width: 2.08%;" />
726
- <div class="act_as_cell amount" style="width: 5.19%;" />
784
+ <t t-if="not account['currency_id']">
785
+ <div class="act_as_cell amount" style="width: 3.63%;" />
786
+ <div class="act_as_cell amount" style="width: 3.63%;" />
727
787
  </t>
728
788
  </t>
729
789
  </div>