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

[15.0][MIG] account_payment_promissory_note: Migration to 15.0 #521

Merged

Conversation

cesar-tecnativa
Copy link

@Tecnativa TT36428

@LudLaf LudLaf force-pushed the 15.0-mig-account_payment_promissory_note branch from bf8babe to 1a3a0f0 Compare July 22, 2022 10:18
@LudLaf
Copy link
Contributor

LudLaf commented Jul 22, 2022

@cesar-tecnativa, pre-commit was failing due to a redundant attribute string. This has been fixed.

@sergio-teruel
Copy link
Contributor

@cesar-tecnativa Plase check tests

@CarlosRoca13 CarlosRoca13 force-pushed the 15.0-mig-account_payment_promissory_note branch from 1a3a0f0 to 521beaf Compare October 27, 2022 15:33
@CarlosRoca13
Copy link
Contributor

I have finished the migration of this module please @sergio-teruel @carlosdauden review this

if not self.date_due:
invoices = payment.reconciled_invoice_ids
max_date = max(invoices.mapped("invoice_date_due"))
payment.write(
Copy link
Contributor

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

Suggested change
payment.write(
payment.update(

{"promissory_note": self.promissory_note, "date_due": max_date}
)
else:
payment.write(
Copy link
Contributor

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

Suggested change
payment.write(
payment.update(

@CarlosRoca13 CarlosRoca13 force-pushed the 15.0-mig-account_payment_promissory_note branch from 9ffdb5e to dc1ac2e Compare November 3, 2022 07:12
@CarlosRoca13
Copy link
Contributor

@carlosdauden changed!

Copy link
Contributor

@carlosdauden carlosdauden left a 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

@pedrobaeza
Copy link
Member

Please update copier template in another PR for solving the pre-commit error.

@CarlosRoca13 CarlosRoca13 force-pushed the 15.0-mig-account_payment_promissory_note branch from dc1ac2e to 830674f Compare November 3, 2022 07:23
@CarlosRoca13
Copy link
Contributor

Done @pedrobaeza

@pedrobaeza
Copy link
Member

/ocabot migration account_payment_promissory_note
/ocabot merge nobump

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Nov 3, 2022
@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 15.0-ocabot-merge-pr-521-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot mentioned this pull request Nov 3, 2022
22 tasks
OCA-git-bot added a commit that referenced this pull request Nov 3, 2022
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

@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.

@pedrobaeza
Copy link
Member

pedrobaeza commented Nov 3, 2022

@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.
CarlosRoca13 and others added 7 commits November 3, 2022 08:56
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
@CarlosRoca13 CarlosRoca13 force-pushed the 15.0-mig-account_payment_promissory_note branch from 830674f to e333cb3 Compare November 3, 2022 07:56
@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 15.0-ocabot-merge-pr-521-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit cb7b37a into OCA:15.0 Nov 3, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 6827d2e. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants