-
-
Notifications
You must be signed in to change notification settings - Fork 753
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
[15.0][MIG]-Account_move_line_purchase_info #1274
Conversation
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/
…ensure invoice count consistency
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/
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.
LGTM! :)
|
||
|
||
class TestAccountMoveLinePurchaseInfo(common.TransactionCase): | ||
def setUp(self): |
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 setUpClass
instead
from odoo import api, models | ||
|
||
|
||
class PurchaseOrder(models.Model): |
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'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( |
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.
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)] |
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.
order.invoice_ids = [(6, 0, invoices.ids)] | |
order.invoice_ids = invoices |
same but looks better :P
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.
@ivantodorovich Thanks for the review! Solved :)
2f2c032
to
18c50d3
Compare
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.
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", |
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.
15.0.1.0.0
18c50d3
to
d51c304
Compare
/ocabot migration account_move_line_purchase_info /ocabot merge nobump |
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 8787358. Thanks a lot for contributing to OCA. ❤️ |
Standard migration to version 15: module Account move line purchase info