-
-
Notifications
You must be signed in to change notification settings - Fork 16
[18.0][ADD] l10n_jp_summary_invoice_carryover #102
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
base: 18.0
Are you sure you want to change the base?
[18.0][ADD] l10n_jp_summary_invoice_carryover #102
Conversation
736da93 to
5b4e35f
Compare
|
|
||
| class TestSummaryInvoiceCarryover(TransactionCase): | ||
| @classmethod | ||
| def setUpClass(cls): |
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.
@AungKoKoLin1997 We can reuse the setup of l10n_jp_summary_invoice if we refactor the code there. It's not a must-do now, but we want to work on it at some point.
5b4e35f to
ca0bba9
Compare
| rec.prev_billed_amount_manual | ||
| if rec.use_prev_billed_amount_manual | ||
| else rec.prev_billed_amount |
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.
A little helper method would be nice, so it can be used here and also in the report template.
| rec.payment_amount_manual | ||
| if rec.use_payment_amount_manual | ||
| else rec.payment_amount |
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.
Same as above, but I'm not sure there should be a shared method or two separate ones.
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.
I decided to use two separate methods to keep simple.
62b8d2d to
eb1adab
Compare
eb1adab to
98e5824
Compare
AungKoKoLin1997
left a comment
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.
Code and functional Test: LGTM
| compute="_compute_prev_billing_candidate_ids", | ||
| ) | ||
| use_prev_billed_amount_manual = fields.Boolean( | ||
| string="Use Manual Previous Billed Amount", |
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.
| string="Use Manual Previous Billed Amount", | |
| string="Use Manual Previous Billed Amount", | |
| default=False, |
I think manual entry should have default=False.
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.
The default value of boolean field is False, no?
I don't think we need to use default attribute.
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.
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.
@kanda999 That is intentional to "lock" the amounts. Otherwise the amounts (especially the payment amount) will show different figures when PDF is printed later. You may suggest an update to the readme. ;)
| help="Total billed amount from the previous billing.", | ||
| ) | ||
| use_payment_amount_manual = fields.Boolean( | ||
| string="Use Manual Payment Amount", |
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.
| string="Use Manual Payment Amount", | |
| string="Use Manual Payment Amount", | |
| default=False, |
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.
Same as above.


This module extends Japan Summary Invoice to support carryover amount tracking
for recurring billing cycles.
It adds the following fields to billings:
Manual override fields are available to adjust values when needed.
The visibility of carryover amounts in the report can be controlled at
company, partner, and billing levels.
Depends on #63
@qrtl QT6214