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

[18.0][MIG] account_invoice_select_for_payment: Migration to 18.0 #1374

Open
wants to merge 14 commits into
base: 18.0
Choose a base branch
from

Conversation

Kimkhoi3010
Copy link

@Kimkhoi3010 Kimkhoi3010 commented Nov 12, 2024

Change in 18.0:

  • I changed the widget of the selected_for_payment field from toggle_button to boolean_toggle because, starting from version 16, the toggle_button widget is no longer supported
  • Since Odoo 14.0 the 'action_register_payment' method has been moved from the 'account.payment' model to 'account.move'

gurneyalex and others added 12 commits November 5, 2024 15:23
This module allows to mark invoices as "selected for payment". This can be done
in the list view of invoices using a button in the first column of the view
which shows the selection status. This selection persists until a payment is
registered.
Currently translated at 100.0% (8 of 8 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_invoice_select_for_payment
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_invoice_select_for_payment/sv/
Currently translated at 100.0% (8 of 8 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_invoice_select_for_payment
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_invoice_select_for_payment/es/
Currently translated at 100.0% (8 of 8 strings)

Translation: bank-payment-14.0/bank-payment-14.0-account_invoice_select_for_payment
Translate-URL: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_invoice_select_for_payment/it/
@Kimkhoi3010 Kimkhoi3010 mentioned this pull request Nov 12, 2024
17 tasks
@Kimkhoi3010 Kimkhoi3010 force-pushed the 18.0-mig-account_invoice_select_for_payment branch from dd535b9 to 47ebee1 Compare November 12, 2024 07:38
Copy link
Contributor

@sebalix sebalix left a comment

Choose a reason for hiding this comment

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

I know there was none, but a test is welcome, especially to check if the payment removes the flag from the invoices.

Copy link
Contributor

@grindtildeath grindtildeath left a comment

Choose a reason for hiding this comment

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

Thanks for the mig.

Can you please add a small test as suggested by @sebalix ?

@Kimkhoi3010 Kimkhoi3010 force-pushed the 18.0-mig-account_invoice_select_for_payment branch 2 times, most recently from 2ba1fc0 to a322a59 Compare December 23, 2024 03:43
@Kimkhoi3010
Copy link
Author

Hello @grindtildeath, @sebalix, I updated by your comments

@Kimkhoi3010 Kimkhoi3010 force-pushed the 18.0-mig-account_invoice_select_for_payment branch 2 times, most recently from 802abbc to 4799428 Compare December 23, 2024 09:32
@@ -13,5 +13,4 @@ def action_register_payment(self):
invoices = self.env["account.move"].search(
[("id", "in", active_ids), ("selected_for_payment", "=", True)]
)
invoices.write({"selected_for_payment": False})
return super().action_register_payment()
return invoices.write({"selected_for_payment": False})
Copy link
Member

Choose a reason for hiding this comment

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

Why loose the call to super and could the invoices variable be unassigned ?

Copy link
Author

@Kimkhoi3010 Kimkhoi3010 Jan 24, 2025

Choose a reason for hiding this comment

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

Hi @TDu, I checked again and found out that this function has been moved to the account.move module since Odoo 14.0. I updated the PR. Thank for your comment.

@Kimkhoi3010 Kimkhoi3010 force-pushed the 18.0-mig-account_invoice_select_for_payment branch from 4799428 to 2c6df2a Compare January 24, 2025 11:53
@Kimkhoi3010 Kimkhoi3010 requested a review from TDu January 24, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.