-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
base: 16.0
Are you sure you want to change the base?
[16.0][ADD] partner_statement, add report current statement #1163
Conversation
Hi @MiquelRForgeFlow, |
from odoo.addons.report_xlsx_helper.report.report_xlsx_format import FORMATS | ||
|
||
|
||
class OutstandingStatementXslx(models.AbstractModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class OutstandingStatementXslx(models.AbstractModel): | |
class OutstandingStatementXslx(models.AbstractModel): |
...
|
||
|
||
class CurrentStatementWizard(models.TransientModel): | ||
"""Outstanding Statement wizard.""" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this 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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
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. |
@ForgeFlow
cc @JordiBForgeFlow