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] purchase_manual_delivery #2432

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

Conversation

StefanRijnhart
Copy link
Member

@StefanRijnhart StefanRijnhart commented Oct 10, 2024

From unmerged #2417

AdriaGForgeFlow and others added 29 commits October 10, 2024 12:33
[ADD] ability to change destination location in wizard
Currently translated at 100.0% (56 of 56 strings)

Translation: purchase-workflow-14.0/purchase-workflow-14.0-purchase_manual_delivery
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_manual_delivery/sl/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_manual_delivery
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_manual_delivery/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_manual_delivery
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_manual_delivery/
Currently translated at 100.0% (65 of 65 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_manual_delivery
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_manual_delivery/it/
Currently translated at 100.0% (65 of 65 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_manual_delivery
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_manual_delivery/es/
@StefanRijnhart StefanRijnhart added this to the 18.0 milestone Oct 10, 2024
JordiMForgeFlow and others added 11 commits October 10, 2024 13:18
Currently translated at 100.0% (65 of 65 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_manual_delivery
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_manual_delivery/it/
Fixed issues when uom_id and uom_po_id of a product are different.
- Comparison for Purchase Order Line pending to receive now uses the product quantity that uses the uom of the Purchase Order Line.
- When creating the Stock Move the quantity is now computed into the uom of the Stock Move
Fixes the following 2 errors:
- When the product_uom_qty changes the recompute is not triggered
- In case that existing_qty > product_uom_qty the line should not be pending_to_receive
Purchase Order Lines that are pending to receive are not considered for stock forecast. Thus, the manual and automatic reordering of products can be done despite having already create a Purchase Order and surpassing the max quantity. Confirmed Purchase Orders with pending to receive Purchase Order Lines are now considered at the forecast and the forecast report.
…' stock moves

Rename existing_qty to qty_in_receipt. It now reflects the quantity for which there
are pending stock moves and no longer includes the quantities of 'done' stock moves.

Co-authored-by: Cas Vissers <cvi@360erp.com>
@StefanRijnhart StefanRijnhart force-pushed the 18.0-mig-purchase_manual_delivery branch from 2c24f7e to fa9a5cc Compare October 10, 2024 11:18
self.env["purchase.order.line"]
.browse(po_line_ids)
.filtered(
lambda p: p.product_id.type in ["product", "consu"]
Copy link
Member

Choose a reason for hiding this comment

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

I think here it could be just:

Suggested change
lambda p: p.product_id.type in ["product", "consu"]
lambda p: p.product_id.type == "consu"

as "product" is removed in 18.0

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, all suggestions taken!

.browse(po_ids)
.mapped("order_line")
.filtered(
lambda p: p.product_id.type in ["product", "consu"]
Copy link
Member

Choose a reason for hiding this comment

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

Same here

product_in_progress = self.env["product.product"].create(
{
"name": "Test product pending",
"type": "consu",
Copy link
Member

Choose a reason for hiding this comment

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

I think there should be a "is_storable" here:

Suggested change
"type": "consu",
"type": "consu",
"is_storable": True,

* Move models and views into their own model file
* Integrate with purchase_order_line_menu
@StefanRijnhart StefanRijnhart force-pushed the 18.0-mig-purchase_manual_delivery branch from 3ec0395 to a65d3fd Compare October 17, 2024 07:39
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.