Commit Graph

138 Commits

Author SHA1 Message Date
Carlos Dauden
26c72726b6 [FIX] account_financial_report: Amount accumulated several times using hierarchy
TT56255
2025-05-12 10:47:01 +02:00
Hugo Santos
ee15901e27 [PERF] Improve journal ledger performance with lots of lines 2025-04-14 09:07:31 +02:00
OCA-git-bot
346a8daea4 Merge PR #1305 into 18.0
Signed-off-by pedrobaeza
2025-04-04 06:59:15 +00:00
bobrador
004ef506a5 [FIX] account_financial_report: Correct trial balance domain for analytic accounts
Clicking on the QWeb report for a balance grouped by analytic was causing an error because account.move.line does not have account_analytic_id.
This has been replaced with account_analytic_ids, which is the correct field.
2025-04-03 14:48:54 +02:00
bobrador
5d579dd8ed [IMP] account_financial_report: Added code for analytic accounts in general leadger 2025-04-03 14:39:12 +02:00
chaule97
01f22b8256 [MIG] account_financial_report: Migration to 18.0 2024-12-04 14:40:57 +07:00
chaule97
c46e83a4a4 [IMP] account_financial_report: pre-commit auto fixes 2024-12-04 14:40:56 +07:00
Jairo Llopis
4413611f93 [FIX] account_financial_report: KeyError rendering report
Some reports were failing to render without this fix.

It seems there was a regression introduced in 0a2b2736cdc1a73d6248b91fa79a0f4c6aedc99b.

@moduon MT-8285
2024-12-04 14:40:56 +07:00
Víctor Martínez
0e6c43603a [IMP] account_financial_report: Add grouping by analytical account in Trial balance
TT48969
2024-12-04 10:19:58 +07:00
Víctor Martínez
e4e301af0e [IMP] account_financial_report: Change t-esc and t-raw to t-out from Trial Balance report
TT48969
2024-12-04 10:12:22 +07:00
Víctor Martínez
9c59addd0f [IMP] account_financial_report: Add Amount cur. to General Ledger totals if the account has not set currency
Related to https://github.com/OCA/account-financial-reporting/pull/1235#issuecomment-2419269015

[FIX] account_financial_report: Avoid error in General ledger if the Show foreign currency checkbox is not checked.

Related to https://github.com/OCA/account-financial-reporting/pull/1236

TT51996
2024-11-29 15:38:41 +07:00
Víctor Martínez
01b2e35847 [IMP] account_financial_report: Change t-esc and t-raw to t-out from General Ledger report 2024-11-29 15:38:41 +07:00
Florian da Costa
580a6b785c [FIX] account_financial_report : fix wizard model names sent to qweb reports for vat and aged balance reports 2024-11-29 15:38:41 +07:00
Alexis de Lattre
3273d27e6c [IMP] account_financial_report: avoid crash if data structure changes in the future 2024-11-29 15:38:41 +07:00
Alexis de Lattre
2dad961ebb [FIX] account_financial_report: Open Items report now sorted by account code 2024-11-29 15:38:41 +07:00
Alexis de Lattre
50270b6e00 [FIX] account_financial_report: crash in XSLX report on partner balance 2024-11-29 15:38:41 +07:00
Alexis de Lattre
8a20028357 [FIX] account_financial_report: partner trial balance: sort by partner name 2024-11-29 15:38:41 +07:00
Alexis de Lattre
38dab025b1 [FIX] account_financial_report: in XLSX report, display null ending balance (just like we display null initial balance) 2024-11-29 15:38:41 +07:00
Víctor Martínez
3d36527370 [FIX] account_financial_report: Display the values of Amount cur. + Cumul cur. values in general ledger only if necessary
The currency_id field of the lines is always set, so follow the same logic as
in report/templates/general_ledger and show the data only if the currency is set
in the account.

TT51204
2024-11-29 15:38:41 +07:00
pilarvargas-tecnativa
ad5a4d3481 [IMP] account_financial_report: Change font size
Set a larger font style for the html report with a
relative font size to make it responsive. For this,
a new html_container is defined so that this does
not affect the other reports and the font style is
customised only for the report in html view.

TT48995
2024-11-29 15:38:41 +07:00
Saran440
7c5d5a80d1 [FIX] account_financial_report: aged partner compute due date 2024-11-29 15:38:41 +07:00
Saran440
849112bada [FIX] account_financial_report: fix error false due_date 2024-11-29 15:38:41 +07:00
Carolina Fernandez
6d6937346a [17.0][IMP] account_financial_report: Set custom intervales in aged report 2024-11-29 15:38:41 +07:00
Víctor Martínez
0a4dd5df6c [FIX] account_financial_report: Filter correctly by account_type in General ledger
In v15 it was filtered by the internal_type field (type of account.account.type) to use
"other" (most of the accounts had it set). Now in v16, there is the account_type field
exists and has to be compatible. The in or not in operator is set to "simplify" the
domain and avoid having to set almost all types.
2024-11-29 15:38:41 +07:00
eLBati
e00e8f8312 [FIX] account_financial_report: show currency name instead of dictionary
Steps:

 - Accounting > Reporting > OCA accounting reports > Journal Ledger
 - Select Date range and activate Foreign Currency

Get "{'name': 'EUR'} " in currency field

Desired: get EUR
2024-11-29 15:38:41 +07:00
Víctor Martínez
20244734b4 [IMP] account_financial_report: Change Missing Partner as translatable
TT47771
2024-11-29 15:38:41 +07:00
Víctor Martínez
2643fdd484 [IMP] account_financial_report: Add Missing partner support in trial balance
If there are records without partner_id set and we show the detail of partners
we need to take into account those records grouped as "Missing partner".

TT47771
2024-11-29 15:38:41 +07:00
Henrik Norlin
e6904a2449 [MIG] account_financial_report: Migration to 17.0 2024-11-29 15:38:41 +07:00
Henrik Norlin
0b128f03ee [IMP] account_financial_report: pre-commit auto fixes 2024-11-29 15:38:41 +07:00
Reyes4711
b7814418f7 [15.0][FIX] account_financial_report: generate ledger document
In general ledger report shows an error due to the fact that the ball_curr varible does not generated
2024-11-29 15:38:41 +07:00
Justinas Orechovas
d0c267eaa4 [FIX] account_financial_report: fixing bug when calculation of credit is dublicated 2024-11-29 15:38:41 +07:00
Simone Rubino
630df3cc7e [FIX] account_financial_report: Empty format 2024-11-29 15:38:41 +07:00
Aritz Olea
f16b46e4c5 [FIX] account_financial_report: Initial currency balance value on trial balance report 2024-11-29 15:38:41 +07:00
Víctor Martínez
9063f74cee [FIX] account_financial_report: Prevent error related to currency from Trial Balance
Use case: Generate report (showing foreign currency) with accounts with defined currency.

Traceback:

Error to render compiling AST
AttributeError: 'int' object has no attribute 'decimal_places'
Template: account_financial_report.report_trial_balance_line
Path: /t/div/t[3]/t[1]/t/t/div/span/t
Node: <t t-esc="balance['initial_currency_balance']" t-options="{'widget': 'monetary', 'display_currency': balance['currency_id']}"/>

The error occured while rendering the template account_financial_report.report_trial_balance_line and evaluating the following expression: <t t-esc="balance['initial_currency_balance']" t-options="{'widget': 'monetary', 'display_currency': balance['currency_id']}"/>
2024-11-29 15:38:41 +07:00
Víctor Martínez
fce83228b9 [FIX] account_financial_report: Prevent error related to currency from General ledger
Use case: Generate report (showing foreign currency) with accounts with defined currency.

Traceback:

File "/odoo/odoo-server/odoo/addons/base/models/ir_qweb_fields.py", line 448, in value_to_html
fmt = "%.{0}f".format(display_currency.decimal_places)
AttributeError: 'int' object has no attribute 'decimal_places'

The above exception was the direct cause of the following exception:

Error to render compiling AST
AttributeError: 'int' object has no attribute 'decimal_places'
Template: account_financial_report.report_general_ledger_lines
Path: /t/div/div[2]/t[6]/t[1]/div[1]/t[1]/span/t
Node: <t t-raw="account_or_group_item_object['init_bal']['bal_curr']" t-options="{'widget': 'monetary', 'display_currency': account['currency_id']}"/>

TT42804

[FIX] account_financial_report: Prevent error related to currency from General ledger

Use case: Generate xlsx report (showing foreign currency) with accounts with defined currency.

Traceback:

File "/opt/odoo/auto/addons/account_financial_report/report/abstract_report_xlsx.py", line 535, in _get_currency_amt_format
    field_name = "{}_{}".format(field_prefix, currency.name)
AttributeError: 'int' object has no attribute 'name'
2024-11-29 15:38:41 +07:00
Víctor Martínez
14e3724cb4 [IMP] account_financial_report: Show move_name in entry column from general ledger report
It is not necessary to repeat part of the text shown in Ref - Label column.

TT42731
2024-11-29 15:38:41 +07:00
David Ramia
2817ae074c [FIX] account_financial_report: Replace deprecated t-raw to t-out 2024-11-29 15:38:41 +07:00
@
d33d89ef62 [FIX] account_financial_report fix to take the id of the currency if is set, that fix the following error: opt/odoo/odoo/odoo/models.py", line 3681, in write
field.write(self, vals[fname])
  File "/opt/odoo/odoo/odoo/fields.py", line 3057, in write
    return self.write_batch([(records, value)])
  File "/opt/odoo/odoo/odoo/fields.py", line 3078, in write_batch
    return self.write_real(records_commands_list, create)
  File "/opt/odoo/odoo/odoo/fields.py", line 3254, in write_real
    flush()
  File "/opt/odoo/odoo/odoo/fields.py", line 3216, in flush
    comodel.create(to_create)
  File "<decorator-gen-69>", line 2, in create
  File "/opt/odoo/odoo/odoo/api.py", line 348, in _model_create_multi
    return create(self, arg)
  File "/opt/odoo/odoo/odoo/addons/base/models/ir_fields.py", line 534, in create
    recs = super().create(vals_list)
  File "<decorator-gen-13>", line 2, in create
  File "/opt/odoo/odoo/odoo/api.py", line 348, in _model_create_multi
    return create(self, arg)
  File "/opt/odoo/odoo/odoo/models.py", line 3886, in create
    records = self._create(data_list)
  File "/opt/odoo/odoo/odoo/models.py", line 3992, in _create
    cr.execute(query, params)
  File "<decorator-gen-3>", line 2, in execute
  File "/opt/odoo/odoo/odoo/sql_db.py", line 101, in check
    return f(self, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/sql_db.py", line 301, in execute
    res = self._obj.execute(query, params)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/odoo/odoo/http.py", line 641, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/odoo/http.py", line 317, in _handle_exception
    raise exception.with_traceback(None) from new_cause
psycopg2.ProgrammingError: can't adapt type 'res.currency'
2024-11-29 15:38:41 +07:00
Rachid Alassir
6edf341f72 [FIX] account_financial_report: Replace wrong field amount_currency with two fields debit_amount_currency and credit_amount_currency 2024-11-29 15:38:41 +07:00
Alberto Re
dcfe9e85d5 Fixed the amount_residual_currency on partial reconcile 2024-11-29 15:38:41 +07:00
Florian da Costa
4359fc8dcc [FIX] account_financial_report: Account group styling in qweb and xlsx 2024-11-29 15:38:41 +07:00
Pedro M. Baeza
e4ab5792d2 [FIX] account_financial_report: Assure the aml order
If we don't assure the order for the search, there are chances that
several items for the same account and date appear in a incorrect order:

24/02/2023 - BNK1/2023/02/0011 - ...
27/02/2023 - BNK1/2023/02/0013 - ...
27/02/2023 - BNK1/2023/02/0012 - ...
29/02/2023 - BNK1/2023/02/0014 - ...

TT42098
2024-11-29 15:38:41 +07:00
Víctor Martínez
defdc2f0fd [IMP] account_financial_report: Remove amount_different_company_currency type from xlsx 2024-11-29 15:38:41 +07:00
Víctor Martínez
babce27fd8 [IMP] account_financial_report: Trial balance changes:
- Show Initial balance and Ending balance only when it is necessary with currency + hide currency column
- Show currency in the correct column
- Create a dict with all keys when it does not exist
- Prevent wrong values

TT41158
2024-11-29 15:38:41 +07:00
Víctor Martínez
fcdf1ba8bf [FIX] account_financial_report: General ledger changes:
- Fix total_bal_curr value from General ledger to prevent wrong values
- Prevent wrong values

TT41041
2024-11-29 15:38:41 +07:00
AaronHForgeFlow
4104852ce0 [IMP] account_financial_report: extensibility xlsx: allow to use other column types 2024-11-29 15:38:41 +07:00
AaronHForgeFlow
74787ee588 [IMP] account_financial_report: extensibility: ml fields 2024-11-29 15:38:41 +07:00
Reyes4711
981680063e [16.0][FIX] account_financial_report: generate ledger document
In general ledger report shows an error due to the fact that the ball_curr varible does not generated
2024-11-29 15:38:41 +07:00
David Ramia
4de4c3d2b1 [MIG] account_financial_report: Migration to 16.0 2024-11-29 15:38:41 +07:00
Víctor Martínez
0e20eeb133 [FIX] account_financial_report: Change partner_domain to misc_grouped_domain in general_ledger.
TT39754
2024-11-29 15:38:41 +07:00