-
-
Notifications
You must be signed in to change notification settings - Fork 414
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
[15.0][MIG] account_payment_promissory_note: Migration to 15.0 #521
[15.0][MIG] account_payment_promissory_note: Migration to 15.0 #521
Conversation
bf8babe
to
1a3a0f0
Compare
@cesar-tecnativa, pre-commit was failing due to a redundant attribute string. This has been fixed. |
@cesar-tecnativa Plase check tests |
1a3a0f0
to
521beaf
Compare
I have finished the migration of this module please @sergio-teruel @carlosdauden review this |
521beaf
to
9ffdb5e
Compare
if not self.date_due: | ||
invoices = payment.reconciled_invoice_ids | ||
max_date = max(invoices.mapped("invoice_date_due")) | ||
payment.write( |
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.
Use the update method or field assign directly to take advantage of improvements in the framework
payment.write( | |
payment.update( |
{"promissory_note": self.promissory_note, "date_due": max_date} | ||
) | ||
else: | ||
payment.write( |
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.
Use the update method or field assign directly to take advantage of improvements in the framework
payment.write( | |
payment.update( |
9ffdb5e
to
dc1ac2e
Compare
@carlosdauden changed! |
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.
Unrelated pre-commit error
Please update copier template in another PR for solving the pre-commit error. |
dc1ac2e
to
830674f
Compare
Done @pedrobaeza |
/ocabot migration account_payment_promissory_note |
Hey, thanks for contributing! Proceeding to merge this for you. |
@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 15.0-ocabot-merge-pr-521-by-pedrobaeza-bump-nobump. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
@CarlosRoca13 I think you haven't updated the copier template in the repository. |
…ry inheritance Fixed a bug that causes the expiration date not to be defined by default Eliminated the inheritance on 'account.payment' and 'account.register.payment' of 'account.abstract.payment' because the main models deppend on it yet.
Applied changes on due_date for take care about the partner groups on register payments. On one hand, if the field due_date is empty the camp will take the latest due_date of the invoices that form the payment. On the other hand, if we set a value on due_date field, all the payments generated will take this value.
…moves The method _get_liquidity_move_line_vals does not exist on v13, so we change it to new method to extend the due date to the related account moves. TT32207
830674f
to
e333cb3
Compare
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 6827d2e. Thanks a lot for contributing to OCA. ❤️ |
@Tecnativa TT36428