odoo-addon-account-financial-report 16.0.1.7.1.9__py3-none-any.whl → 16.0.1.8.0.1__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.

Potentially problematic release.


This version of odoo-addon-account-financial-report might be problematic. Click here for more details.

Files changed (34) hide show
  1. odoo/addons/account_financial_report/README.rst +1 -1
  2. odoo/addons/account_financial_report/__manifest__.py +1 -1
  3. odoo/addons/account_financial_report/i18n/account_financial_report.pot +16 -0
  4. odoo/addons/account_financial_report/i18n/ar.po +15 -0
  5. odoo/addons/account_financial_report/i18n/ca.po +15 -0
  6. odoo/addons/account_financial_report/i18n/de.po +15 -0
  7. odoo/addons/account_financial_report/i18n/es.po +16 -1
  8. odoo/addons/account_financial_report/i18n/es_AR.po +15 -0
  9. odoo/addons/account_financial_report/i18n/es_MX.po +15 -0
  10. odoo/addons/account_financial_report/i18n/fr.po +15 -0
  11. odoo/addons/account_financial_report/i18n/fr_CH.po +15 -0
  12. odoo/addons/account_financial_report/i18n/fr_FR.po +15 -0
  13. odoo/addons/account_financial_report/i18n/hr.po +15 -0
  14. odoo/addons/account_financial_report/i18n/hr_HR.po +17 -2
  15. odoo/addons/account_financial_report/i18n/it.po +17 -1
  16. odoo/addons/account_financial_report/i18n/ja.po +15 -0
  17. odoo/addons/account_financial_report/i18n/nl.po +15 -0
  18. odoo/addons/account_financial_report/i18n/nl_NL.po +15 -0
  19. odoo/addons/account_financial_report/i18n/pt.po +15 -0
  20. odoo/addons/account_financial_report/i18n/pt_BR.po +15 -0
  21. odoo/addons/account_financial_report/i18n/ro.po +15 -0
  22. odoo/addons/account_financial_report/i18n/sv.po +15 -0
  23. odoo/addons/account_financial_report/i18n/tr.po +15 -0
  24. odoo/addons/account_financial_report/report/open_items.py +29 -25
  25. odoo/addons/account_financial_report/report/open_items_xlsx.py +150 -17
  26. odoo/addons/account_financial_report/report/templates/open_items.xml +183 -56
  27. odoo/addons/account_financial_report/static/description/index.html +8 -5
  28. odoo/addons/account_financial_report/tests/test_open_items.py +22 -0
  29. odoo/addons/account_financial_report/wizard/open_items_wizard.py +18 -0
  30. odoo/addons/account_financial_report/wizard/open_items_wizard_view.xml +1 -0
  31. {odoo_addon_account_financial_report-16.0.1.7.1.9.dist-info → odoo_addon_account_financial_report-16.0.1.8.0.1.dist-info}/METADATA +2 -2
  32. {odoo_addon_account_financial_report-16.0.1.7.1.9.dist-info → odoo_addon_account_financial_report-16.0.1.8.0.1.dist-info}/RECORD +34 -34
  33. {odoo_addon_account_financial_report-16.0.1.7.1.9.dist-info → odoo_addon_account_financial_report-16.0.1.8.0.1.dist-info}/WHEEL +0 -0
  34. {odoo_addon_account_financial_report-16.0.1.7.1.9.dist-info → odoo_addon_account_financial_report-16.0.1.8.0.1.dist-info}/top_level.txt +0 -0
@@ -941,6 +941,7 @@ msgstr ""
941
941
 
942
942
  #. module: account_financial_report
943
943
  #: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
944
+ #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__grouped_by
944
945
  msgid "Grouped By"
945
946
  msgstr ""
946
947
 
@@ -1173,11 +1174,19 @@ msgstr ""
1173
1174
  #. odoo-python
1174
1175
  #: code:addons/account_financial_report/report/general_ledger.py:0
1175
1176
  #: code:addons/account_financial_report/report/open_items.py:0
1177
+ #: code:addons/account_financial_report/report/open_items_xlsx.py:0
1176
1178
  #: code:addons/account_financial_report/report/trial_balance.py:0
1177
1179
  #, python-format
1178
1180
  msgid "Missing Partner"
1179
1181
  msgstr ""
1180
1182
 
1183
+ #. module: account_financial_report
1184
+ #. odoo-python
1185
+ #: code:addons/account_financial_report/report/open_items.py:0
1186
+ #, python-format
1187
+ msgid "Missing Salesperson"
1188
+ msgstr ""
1189
+
1181
1190
  #. module: account_financial_report
1182
1191
  #: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line
1183
1192
  msgid "Model to set interval lines for Age partner balance report"
@@ -1385,6 +1394,11 @@ msgstr ""
1385
1394
  msgid "Partner Initial balance"
1386
1395
  msgstr ""
1387
1396
 
1397
+ #. module: account_financial_report
1398
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__salesperson
1399
+ msgid "Partner Salesperson"
1400
+ msgstr ""
1401
+
1388
1402
  #. module: account_financial_report
1389
1403
  #. odoo-python
1390
1404
  #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
@@ -1409,6 +1423,7 @@ msgstr ""
1409
1423
 
1410
1424
  #. module: account_financial_report
1411
1425
  #: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__partners
1426
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__partners
1412
1427
  msgid "Partners"
1413
1428
  msgstr ""
1414
1429
 
@@ -953,6 +953,7 @@ msgstr "Groepeer boekingen per"
953
953
 
954
954
  #. module: account_financial_report
955
955
  #: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
956
+ #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__grouped_by
956
957
  msgid "Grouped By"
957
958
  msgstr "Gegroepeerd op"
958
959
 
@@ -1191,11 +1192,19 @@ msgstr "Regel"
1191
1192
  #. odoo-python
1192
1193
  #: code:addons/account_financial_report/report/general_ledger.py:0
1193
1194
  #: code:addons/account_financial_report/report/open_items.py:0
1195
+ #: code:addons/account_financial_report/report/open_items_xlsx.py:0
1194
1196
  #: code:addons/account_financial_report/report/trial_balance.py:0
1195
1197
  #, python-format
1196
1198
  msgid "Missing Partner"
1197
1199
  msgstr ""
1198
1200
 
1201
+ #. module: account_financial_report
1202
+ #. odoo-python
1203
+ #: code:addons/account_financial_report/report/open_items.py:0
1204
+ #, python-format
1205
+ msgid "Missing Salesperson"
1206
+ msgstr ""
1207
+
1199
1208
  #. module: account_financial_report
1200
1209
  #: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line
1201
1210
  msgid "Model to set interval lines for Age partner balance report"
@@ -1405,6 +1414,11 @@ msgstr ""
1405
1414
  msgid "Partner Initial balance"
1406
1415
  msgstr "Relatiebeginsaldo"
1407
1416
 
1417
+ #. module: account_financial_report
1418
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__salesperson
1419
+ msgid "Partner Salesperson"
1420
+ msgstr ""
1421
+
1408
1422
  #. module: account_financial_report
1409
1423
  #. odoo-python
1410
1424
  #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
@@ -1429,6 +1443,7 @@ msgstr "Beginbalans partner"
1429
1443
 
1430
1444
  #. module: account_financial_report
1431
1445
  #: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__partners
1446
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__partners
1432
1447
  msgid "Partners"
1433
1448
  msgstr "Partners"
1434
1449
 
@@ -947,6 +947,7 @@ msgstr ""
947
947
 
948
948
  #. module: account_financial_report
949
949
  #: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
950
+ #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__grouped_by
950
951
  msgid "Grouped By"
951
952
  msgstr ""
952
953
 
@@ -1179,11 +1180,19 @@ msgstr ""
1179
1180
  #. odoo-python
1180
1181
  #: code:addons/account_financial_report/report/general_ledger.py:0
1181
1182
  #: code:addons/account_financial_report/report/open_items.py:0
1183
+ #: code:addons/account_financial_report/report/open_items_xlsx.py:0
1182
1184
  #: code:addons/account_financial_report/report/trial_balance.py:0
1183
1185
  #, python-format
1184
1186
  msgid "Missing Partner"
1185
1187
  msgstr ""
1186
1188
 
1189
+ #. module: account_financial_report
1190
+ #. odoo-python
1191
+ #: code:addons/account_financial_report/report/open_items.py:0
1192
+ #, python-format
1193
+ msgid "Missing Salesperson"
1194
+ msgstr ""
1195
+
1187
1196
  #. module: account_financial_report
1188
1197
  #: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line
1189
1198
  msgid "Model to set interval lines for Age partner balance report"
@@ -1391,6 +1400,11 @@ msgstr ""
1391
1400
  msgid "Partner Initial balance"
1392
1401
  msgstr ""
1393
1402
 
1403
+ #. module: account_financial_report
1404
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__salesperson
1405
+ msgid "Partner Salesperson"
1406
+ msgstr ""
1407
+
1394
1408
  #. module: account_financial_report
1395
1409
  #. odoo-python
1396
1410
  #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
@@ -1415,6 +1429,7 @@ msgstr ""
1415
1429
 
1416
1430
  #. module: account_financial_report
1417
1431
  #: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__partners
1432
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__partners
1418
1433
  msgid "Partners"
1419
1434
  msgstr ""
1420
1435
 
@@ -945,6 +945,7 @@ msgstr "Agrupar movimentos por"
945
945
 
946
946
  #. module: account_financial_report
947
947
  #: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
948
+ #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__grouped_by
948
949
  msgid "Grouped By"
949
950
  msgstr ""
950
951
 
@@ -1181,11 +1182,19 @@ msgstr ""
1181
1182
  #. odoo-python
1182
1183
  #: code:addons/account_financial_report/report/general_ledger.py:0
1183
1184
  #: code:addons/account_financial_report/report/open_items.py:0
1185
+ #: code:addons/account_financial_report/report/open_items_xlsx.py:0
1184
1186
  #: code:addons/account_financial_report/report/trial_balance.py:0
1185
1187
  #, python-format
1186
1188
  msgid "Missing Partner"
1187
1189
  msgstr ""
1188
1190
 
1191
+ #. module: account_financial_report
1192
+ #. odoo-python
1193
+ #: code:addons/account_financial_report/report/open_items.py:0
1194
+ #, python-format
1195
+ msgid "Missing Salesperson"
1196
+ msgstr ""
1197
+
1189
1198
  #. module: account_financial_report
1190
1199
  #: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line
1191
1200
  msgid "Model to set interval lines for Age partner balance report"
@@ -1395,6 +1404,11 @@ msgstr ""
1395
1404
  msgid "Partner Initial balance"
1396
1405
  msgstr "Saldo inicial de Parceiro"
1397
1406
 
1407
+ #. module: account_financial_report
1408
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__salesperson
1409
+ msgid "Partner Salesperson"
1410
+ msgstr ""
1411
+
1398
1412
  #. module: account_financial_report
1399
1413
  #. odoo-python
1400
1414
  #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
@@ -1419,6 +1433,7 @@ msgstr ""
1419
1433
 
1420
1434
  #. module: account_financial_report
1421
1435
  #: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__partners
1436
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__partners
1422
1437
  msgid "Partners"
1423
1438
  msgstr ""
1424
1439
 
@@ -959,6 +959,7 @@ msgstr "Agrupar lançamentos por"
959
959
 
960
960
  #. module: account_financial_report
961
961
  #: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
962
+ #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__grouped_by
962
963
  msgid "Grouped By"
963
964
  msgstr "Agrupado Por"
964
965
 
@@ -1199,11 +1200,19 @@ msgstr "Linha"
1199
1200
  #. odoo-python
1200
1201
  #: code:addons/account_financial_report/report/general_ledger.py:0
1201
1202
  #: code:addons/account_financial_report/report/open_items.py:0
1203
+ #: code:addons/account_financial_report/report/open_items_xlsx.py:0
1202
1204
  #: code:addons/account_financial_report/report/trial_balance.py:0
1203
1205
  #, python-format
1204
1206
  msgid "Missing Partner"
1205
1207
  msgstr "Parceiro ausente"
1206
1208
 
1209
+ #. module: account_financial_report
1210
+ #. odoo-python
1211
+ #: code:addons/account_financial_report/report/open_items.py:0
1212
+ #, python-format
1213
+ msgid "Missing Salesperson"
1214
+ msgstr ""
1215
+
1207
1216
  #. module: account_financial_report
1208
1217
  #: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line
1209
1218
  msgid "Model to set interval lines for Age partner balance report"
@@ -1417,6 +1426,11 @@ msgstr ""
1417
1426
  msgid "Partner Initial balance"
1418
1427
  msgstr "Saldo inicial do parceiro"
1419
1428
 
1429
+ #. module: account_financial_report
1430
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__salesperson
1431
+ msgid "Partner Salesperson"
1432
+ msgstr ""
1433
+
1420
1434
  #. module: account_financial_report
1421
1435
  #. odoo-python
1422
1436
  #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
@@ -1441,6 +1455,7 @@ msgstr "Saldo inicial do Parceiro"
1441
1455
 
1442
1456
  #. module: account_financial_report
1443
1457
  #: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__partners
1458
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__partners
1444
1459
  msgid "Partners"
1445
1460
  msgstr "Parceiros"
1446
1461
 
@@ -950,6 +950,7 @@ msgstr "Intrări de grup după"
950
950
 
951
951
  #. module: account_financial_report
952
952
  #: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
953
+ #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__grouped_by
953
954
  msgid "Grouped By"
954
955
  msgstr ""
955
956
 
@@ -1188,11 +1189,19 @@ msgstr "Linie"
1188
1189
  #. odoo-python
1189
1190
  #: code:addons/account_financial_report/report/general_ledger.py:0
1190
1191
  #: code:addons/account_financial_report/report/open_items.py:0
1192
+ #: code:addons/account_financial_report/report/open_items_xlsx.py:0
1191
1193
  #: code:addons/account_financial_report/report/trial_balance.py:0
1192
1194
  #, python-format
1193
1195
  msgid "Missing Partner"
1194
1196
  msgstr ""
1195
1197
 
1198
+ #. module: account_financial_report
1199
+ #. odoo-python
1200
+ #: code:addons/account_financial_report/report/open_items.py:0
1201
+ #, python-format
1202
+ msgid "Missing Salesperson"
1203
+ msgstr ""
1204
+
1196
1205
  #. module: account_financial_report
1197
1206
  #: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line
1198
1207
  msgid "Model to set interval lines for Age partner balance report"
@@ -1400,6 +1409,11 @@ msgstr ""
1400
1409
  msgid "Partner Initial balance"
1401
1410
  msgstr "Sold inițial partener"
1402
1411
 
1412
+ #. module: account_financial_report
1413
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__salesperson
1414
+ msgid "Partner Salesperson"
1415
+ msgstr ""
1416
+
1403
1417
  #. module: account_financial_report
1404
1418
  #. odoo-python
1405
1419
  #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
@@ -1424,6 +1438,7 @@ msgstr ""
1424
1438
 
1425
1439
  #. module: account_financial_report
1426
1440
  #: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__partners
1441
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__partners
1427
1442
  msgid "Partners"
1428
1443
  msgstr ""
1429
1444
 
@@ -958,6 +958,7 @@ msgstr "Gruppinlägg efter"
958
958
 
959
959
  #. module: account_financial_report
960
960
  #: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
961
+ #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__grouped_by
961
962
  msgid "Grouped By"
962
963
  msgstr "Grupperad efter"
963
964
 
@@ -1196,11 +1197,19 @@ msgstr "Rad"
1196
1197
  #. odoo-python
1197
1198
  #: code:addons/account_financial_report/report/general_ledger.py:0
1198
1199
  #: code:addons/account_financial_report/report/open_items.py:0
1200
+ #: code:addons/account_financial_report/report/open_items_xlsx.py:0
1199
1201
  #: code:addons/account_financial_report/report/trial_balance.py:0
1200
1202
  #, python-format
1201
1203
  msgid "Missing Partner"
1202
1204
  msgstr "Saknad kontakt"
1203
1205
 
1206
+ #. module: account_financial_report
1207
+ #. odoo-python
1208
+ #: code:addons/account_financial_report/report/open_items.py:0
1209
+ #, python-format
1210
+ msgid "Missing Salesperson"
1211
+ msgstr ""
1212
+
1204
1213
  #. module: account_financial_report
1205
1214
  #: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line
1206
1215
  msgid "Model to set interval lines for Age partner balance report"
@@ -1412,6 +1421,11 @@ msgstr ""
1412
1421
  msgid "Partner Initial balance"
1413
1422
  msgstr "Kund initial balans"
1414
1423
 
1424
+ #. module: account_financial_report
1425
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__salesperson
1426
+ msgid "Partner Salesperson"
1427
+ msgstr ""
1428
+
1415
1429
  #. module: account_financial_report
1416
1430
  #. odoo-python
1417
1431
  #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
@@ -1436,6 +1450,7 @@ msgstr "Kunds initiala saldo"
1436
1450
 
1437
1451
  #. module: account_financial_report
1438
1452
  #: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__partners
1453
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__partners
1439
1454
  msgid "Partners"
1440
1455
  msgstr "Kunder"
1441
1456
 
@@ -949,6 +949,7 @@ msgstr ""
949
949
 
950
950
  #. module: account_financial_report
951
951
  #: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__grouped_by
952
+ #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__grouped_by
952
953
  msgid "Grouped By"
953
954
  msgstr "Gruplanma"
954
955
 
@@ -1183,11 +1184,19 @@ msgstr ""
1183
1184
  #. odoo-python
1184
1185
  #: code:addons/account_financial_report/report/general_ledger.py:0
1185
1186
  #: code:addons/account_financial_report/report/open_items.py:0
1187
+ #: code:addons/account_financial_report/report/open_items_xlsx.py:0
1186
1188
  #: code:addons/account_financial_report/report/trial_balance.py:0
1187
1189
  #, python-format
1188
1190
  msgid "Missing Partner"
1189
1191
  msgstr ""
1190
1192
 
1193
+ #. module: account_financial_report
1194
+ #. odoo-python
1195
+ #: code:addons/account_financial_report/report/open_items.py:0
1196
+ #, python-format
1197
+ msgid "Missing Salesperson"
1198
+ msgstr ""
1199
+
1191
1200
  #. module: account_financial_report
1192
1201
  #: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line
1193
1202
  msgid "Model to set interval lines for Age partner balance report"
@@ -1395,6 +1404,11 @@ msgstr ""
1395
1404
  msgid "Partner Initial balance"
1396
1405
  msgstr "İş Ortağı Açılış Bakiyesi"
1397
1406
 
1407
+ #. module: account_financial_report
1408
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__salesperson
1409
+ msgid "Partner Salesperson"
1410
+ msgstr ""
1411
+
1398
1412
  #. module: account_financial_report
1399
1413
  #. odoo-python
1400
1414
  #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
@@ -1419,6 +1433,7 @@ msgstr "İş Ortağı Açılış Bakiyesi"
1419
1433
 
1420
1434
  #. module: account_financial_report
1421
1435
  #: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__partners
1436
+ #: model:ir.model.fields.selection,name:account_financial_report.selection__open_items_report_wizard__grouped_by__partners
1422
1437
  msgid "Partners"
1423
1438
  msgstr "İş Ortakları"
1424
1439
 
@@ -1,5 +1,6 @@
1
1
  # © 2016 Julien Coux (Camptocamp)
2
2
  # Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
3
+ # Copyright 2024 Tecnativa - Carolina Fernandez
3
4
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4
5
 
5
6
  import operator
@@ -66,6 +67,7 @@ class OpenItemsReport(models.AbstractModel):
66
67
  only_posted_moves,
67
68
  company_id,
68
69
  date_from,
70
+ grouped_by,
69
71
  ):
70
72
  domain = self._get_move_lines_domain_not_reconciled(
71
73
  company_id, account_ids, partner_ids, only_posted_moves, date_from
@@ -75,7 +77,7 @@ class OpenItemsReport(models.AbstractModel):
75
77
  domain=domain, fields=ml_fields
76
78
  )
77
79
  journals_ids = set()
78
- partners_ids = set()
80
+ group_ids = set()
79
81
  partners_data = {}
80
82
  if date_at_object < date.today():
81
83
  (
@@ -119,29 +121,27 @@ class OpenItemsReport(models.AbstractModel):
119
121
  journals_ids.add(move_line["journal_id"][0])
120
122
  acc_id = move_line["account_id"][0]
121
123
  # Partners data
122
- if move_line["partner_id"]:
123
- prt_id = move_line["partner_id"][0]
124
- prt_name = move_line["partner_id"][1]
124
+ partner = self.env["res.partner"]
125
+ if move_line.get("partner_id"):
126
+ partner = self.env["res.partner"].browse(move_line["partner_id"][0])
127
+ if grouped_by == "salesperson":
128
+ user = partner.user_id
129
+ group_id = user.id or 0
130
+ group_name = user.name or _("Missing Salesperson")
125
131
  else:
126
- prt_id = 0
127
- prt_name = _("Missing Partner")
128
- if prt_id not in partners_ids:
129
- partners_data.update({prt_id: {"id": prt_id, "name": prt_name}})
130
- partners_ids.add(prt_id)
131
-
132
+ group_id = partner.id or 0
133
+ group_name = partner.name or _("Missing Partner")
134
+ if group_id not in group_ids:
135
+ partners_data.update({group_id: {"id": group_id, "name": group_name}})
136
+ group_ids.add(group_id)
132
137
  # Move line update
133
- original = 0
134
-
135
138
  if not float_is_zero(move_line["credit"], precision_digits=2):
136
139
  original = move_line["credit"] * (-1)
137
- if not float_is_zero(move_line["debit"], precision_digits=2):
140
+ else:
138
141
  original = move_line["debit"]
139
142
 
140
143
  if move_line["ref"] == move_line["name"]:
141
- if move_line["ref"]:
142
- ref_label = move_line["ref"]
143
- else:
144
- ref_label = ""
144
+ ref_label = move_line["ref"] or ""
145
145
  elif not move_line["ref"]:
146
146
  ref_label = move_line["name"]
147
147
  elif not move_line["name"]:
@@ -155,8 +155,8 @@ class OpenItemsReport(models.AbstractModel):
155
155
  "date_maturity": move_line["date_maturity"]
156
156
  and move_line["date_maturity"].strftime("%d/%m/%Y"),
157
157
  "original": original,
158
- "partner_id": prt_id,
159
- "partner_name": prt_name,
158
+ "partner_id": partner.id or 0,
159
+ "partner_name": partner.name or "",
160
160
  "ref_label": ref_label,
161
161
  "journal_id": move_line["journal_id"][0],
162
162
  "move_name": move_line["move_id"][1],
@@ -172,12 +172,12 @@ class OpenItemsReport(models.AbstractModel):
172
172
 
173
173
  # Open Items Move Lines Data
174
174
  if acc_id not in open_items_move_lines_data.keys():
175
- open_items_move_lines_data[acc_id] = {prt_id: [move_line]}
175
+ open_items_move_lines_data[acc_id] = {group_id: [move_line]}
176
176
  else:
177
- if prt_id not in open_items_move_lines_data[acc_id].keys():
178
- open_items_move_lines_data[acc_id][prt_id] = [move_line]
177
+ if group_id not in open_items_move_lines_data[acc_id].keys():
178
+ open_items_move_lines_data[acc_id][group_id] = [move_line]
179
179
  else:
180
- open_items_move_lines_data[acc_id][prt_id].append(move_line)
180
+ open_items_move_lines_data[acc_id][group_id].append(move_line)
181
181
  journals_data = self._get_journals_data(list(journals_ids))
182
182
  accounts_data = self._get_accounts_data(open_items_move_lines_data.keys())
183
183
  return (
@@ -229,7 +229,9 @@ class OpenItemsReport(models.AbstractModel):
229
229
  move_lines = []
230
230
  for move_line in open_items_move_lines_data[acc_id][prt_id]:
231
231
  move_lines += [move_line]
232
- move_lines = sorted(move_lines, key=lambda k: (k["date"]))
232
+ move_lines = sorted(
233
+ move_lines, key=lambda k: (k["date"], k["partner_id"])
234
+ )
233
235
  new_open_items[acc_id][prt_id] = move_lines
234
236
  return new_open_items
235
237
 
@@ -244,7 +246,7 @@ class OpenItemsReport(models.AbstractModel):
244
246
  date_from = data["date_from"]
245
247
  only_posted_moves = data["only_posted_moves"]
246
248
  show_partner_details = data["show_partner_details"]
247
-
249
+ grouped_by = data["grouped_by"]
248
250
  (
249
251
  move_lines_data,
250
252
  partners_data,
@@ -258,6 +260,7 @@ class OpenItemsReport(models.AbstractModel):
258
260
  only_posted_moves,
259
261
  company_id,
260
262
  date_from,
263
+ grouped_by,
261
264
  )
262
265
 
263
266
  total_amount = self._calculate_amounts(open_items_move_lines_data)
@@ -280,6 +283,7 @@ class OpenItemsReport(models.AbstractModel):
280
283
  "accounts_data": accounts_data,
281
284
  "total_amount": total_amount,
282
285
  "Open_Items": open_items_move_lines_data,
286
+ "grouped_by": grouped_by,
283
287
  }
284
288
 
285
289
  def _get_ml_fields(self):