Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD] partner_statement, add report current statement #1163

Open
wants to merge 3 commits into
base: 16.0
Choose a base branch
from

Conversation

ChrisOForgeFlow
Copy link
Contributor

@OCA-git-bot
Copy link
Contributor

Hi @MiquelRForgeFlow,
some modules you are maintaining are being modified, check this out!

from odoo.addons.report_xlsx_helper.report.report_xlsx_format import FORMATS


class OutstandingStatementXslx(models.AbstractModel):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class OutstandingStatementXslx(models.AbstractModel):
class OutstandingStatementXslx(models.AbstractModel):

...



class CurrentStatementWizard(models.TransientModel):
"""Outstanding Statement wizard."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...

[("report_name", "=", report_name), ("report_type", "=", report_type)],
limit=1,
)
.report_action(self, data=data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apply 942a5f9 here too

_name = "report.partner_statement.current_statement"
_description = "Partner Current Statement"

def _display_lines_sql_q1(self, partners, date_end, account_type):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def _display_lines_sql_q1(self, partners, date_end, account_type):
def _display_current_lines_sql_q1(self, partners, date_end, account_type):

same for the other methods

Copy link
Contributor

@MiquelRForgeFlow MiquelRForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs update of partner_statement/security/ir.model.access.csv and also add views

ELSE avg(l.credit)
END as credit,
CASE WHEN l.balance > 0.0
THEN round(l.balance - sum(coalesce(pd.amount, 0.0)),2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why apply round? if you have a good reason, then apply it to other reports too, but my opinion is not to apply it in the queries, as maybe you have a different rounding instead of 2. I think it should be applied somewhere in the python part of the code.

@@ -5,3 +5,5 @@
from . import activity_statement_xlsx
from . import detailed_activity_statement_xlsx
from . import outstanting_statement_xlsx
from . import current_statement
from . import current_statement_xlsx
Copy link
Contributor

@MiquelRForgeFlow MiquelRForgeFlow May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there too much difference between current_statement and outstanding_statement? If not, perhaps it's better to make current_statement be an inherit of outstanding_statement, the same way detailed_activity_statement inherits activity_statement. Surely it would reduce code.

Or maybe it should just get merged into the outstanding_statement by adding an extra boolean parameter.

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants