OCA / account-financial-reporting

Financial reports for Odoo
GNU Affero General Public License v3.0
235 stars 616 forks source link

[14] Partner statement does not work on Odoo 14 #1167

Closed zhumxcq closed 6 months ago

zhumxcq commented 6 months ago

Odoo 14 does not have account_type in table account_account, instead it has internal_group and internal_type.

For partner_statement module, everywhere that it references account_type, it needs to be split: internal_group = accounttype.split('')[0] internal_type = accounttype.split('')[1] and the WHERE clause need to be to changed: AND aa.internal_group = %(internal_group)s AND aa.internal_type = %(internal_type)s

In addition, for all views, t-out is not supported in Odoo14, it needs to be changed to t-esc

etobella commented 6 months ago

@zhumxcq I cannot find t-out in the repo. Are you using v14.0 repo?

About the other issue, can you enlighten us somehow? I don't know exactly which is your problem. Can you test on runboat?

vdewulf commented 6 months ago

Hello, The issue you report might have the same root cause as the one you reported here: https://github.com/OCA/reporting-engine/issues/877 and for which OCA members already answered. Please, for future issue creation, could you follow the guidelines proposed at the creation of the issue when choosing to report a bug. It'll help others to better understand and help you quickly.

Here is the template fyi

Module

The name of the module that has a bug.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Affected versions:

Steps to reproduce the behavior: 1. 2. 3.

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here. (e.g. OS, Python version, ...)

Thanks!

zhumxcq commented 6 months ago

Hi there, yes I checked out https://github.com/OCA/account-financial-reporting/tree/14.0

etobella commented 6 months ago

Giving file and line would be great. Otherwise I need to review all repo....

zhumxcq commented 6 months ago

For this issue: Odoo 14 does not have account_type in table account_account, instead it has internal_group and internal_type. internal_group = account_type.split('')[0] internal_type = account_type.split('')[1] and the WHERE clause need to be to changed: AND aa.internal_group = %(internal_group)s AND aa.internal_type = %(internal_type)s

The following file needs to be changed: https://github.com/OCA/account-financial-reporting/blob/14.0/partner_statement/report/outstanding_statement.py line 62 https://github.com/OCA/account-financial-reporting/blob/14.0/partner_statement/report/activity_statement.py line 48 https://github.com/OCA/account-financial-reporting/blob/14.0/partner_statement/report/report_statement_common.py line 85

etobella commented 6 months ago

And t-out?

etobella commented 6 months ago

I tested it on runboat and it worked well, also, the data you are complaining, comes from a selection field, and it is defined properly.

https://github.com/OCA/account-financial-reporting/blob/14.0/partner_statement/wizard/statement_common.py#L38-L42

Can you check that you are using v14 on your local installation?

It is recommended to check always on runboat to ensure that the issue does not come from your local installation.

zhumxcq commented 6 months ago

You are right, it have to do with a custom account_account that was installed on the odoo installation.