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_move_line_purchase_info #1274

Merged

Conversation

JoanMForgeFlow
Copy link
Contributor

Standard migration to version 15: module Account move line purchase info

JordiBForgeFlow and others added 30 commits November 24, 2021 09:49
Currently translated at 100,0% (5 of 5 strings)

Translation: account-financial-tools-11.0/account-financial-tools-11.0-account_move_line_purchase_info
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-11-0/account-financial-tools-11-0-account_move_line_purchase_info/de/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_move_line_purchase_info
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_move_line_purchase_info/
Currently translated at 100.0% (5 of 5 strings)

Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_move_line_purchase_info
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_move_line_purchase_info/pt_BR/
To force wheel regeneration, because the
currently published wheel wrongly
depends on odoo12-addon-purchase_stock
which is a standard Odoo module.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_move_line_purchase_info
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_move_line_purchase_info/
Currently translated at 100.0% (5 of 5 strings)

Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_move_line_purchase_info
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_move_line_purchase_info/pt/
Currently translated at 100.0% (6 of 6 strings)

Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_move_line_purchase_info
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_move_line_purchase_info/pt_BR/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-tools-13.0/account-financial-tools-13.0-account_move_line_purchase_info
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-13-0/account-financial-tools-13-0-account_move_line_purchase_info/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-tools-13.0/account-financial-tools-13.0-account_move_line_purchase_info
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-13-0/account-financial-tools-13-0-account_move_line_purchase_info/
Copy link
Contributor

@mariadforgeflow mariadforgeflow left a comment

Choose a reason for hiding this comment

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

LGTM! :)



class TestAccountMoveLinePurchaseInfo(common.TransactionCase):
def setUp(self):

Choose a reason for hiding this comment

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

Use setUpClass instead

from odoo import api, models


class PurchaseOrder(models.Model):

Choose a reason for hiding this comment

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

I'd move this to a separate purchase_order.py file

"""Overwritten compute to avoid show all Journal Entries with
purchase_order_line as invoice_lines One2many would take them into account."""
for order in self:
invoices = order.mapped("order_line.invoice_lines.move_id").filtered(

Choose a reason for hiding this comment

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

Suggested change
invoices = order.mapped("order_line.invoice_lines.move_id").filtered(
invoices = order.order_line.invoice_lines.move_id.filtered(

mapping is not necessary here, anyway not blocking

invoices = order.mapped("order_line.invoice_lines.move_id").filtered(
lambda m: m.is_invoice(include_receipts=True)
)
order.invoice_ids = [(6, 0, invoices.ids)]

Choose a reason for hiding this comment

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

Suggested change
order.invoice_ids = [(6, 0, invoices.ids)]
order.invoice_ids = invoices

same but looks better :P

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ivantodorovich Thanks for the review! Solved :)

@JoanMForgeFlow JoanMForgeFlow force-pushed the 15.0-mig-account_move_line_purchase_info branch from 2f2c032 to 18c50d3 Compare November 26, 2021 09:20
Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

Functional review 👍 Just a minor comment

@@ -5,7 +5,7 @@
{
"name": "Account Move Line Purchase Info",
"summary": "Introduces the purchase order line to the journal items",
"version": "14.0.1.0.1",
"version": "15.0.1.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

15.0.1.0.0

@JoanMForgeFlow JoanMForgeFlow force-pushed the 15.0-mig-account_move_line_purchase_info branch from 18c50d3 to d51c304 Compare November 29, 2021 08:36
@JoanMForgeFlow JoanMForgeFlow changed the title [15.0][MIG]-Account move line purchase info [15.0][MIG]-Account_move_line_purchase_info Nov 29, 2021
@AaronHForgeFlow
Copy link
Contributor

AaronHForgeFlow commented Nov 29, 2021

/ocabot migration account_move_line_purchase_info

/ocabot merge nobump

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Nov 29, 2021
@OCA-git-bot OCA-git-bot mentioned this pull request Nov 29, 2021
31 tasks
@AaronHForgeFlow
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit 5d14e1d into OCA:15.0 Nov 29, 2021
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 8787358. 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.