Skip to content

Conversation

ThiagoMForgeFlow
Copy link
Contributor

@ThiagoMForgeFlow ThiagoMForgeFlow commented Jan 14, 2025

@LoisRForgeFlow
Copy link
Contributor

@ThiagoMForgeFlow dependency merged

@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 17.0-mig-mrp_component_operation branch 2 times, most recently from 84c73fa to c7b0637 Compare January 16, 2025 08:16
@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 17.0-mig-mrp_component_operation branch 2 times, most recently from 6928524 to c26d31d Compare January 20, 2025 11:47
@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 17.0-mig-mrp_component_operation branch from c26d31d to 58a614d Compare January 22, 2025 10:01
DavidJForgeFlow and others added 21 commits January 31, 2025 11:22
Currently translated at 97.8% (45 of 46 strings)

Translation: manufacture-14.0/manufacture-14.0-mrp_component_operation
Translate-URL: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_component_operation/it/
Manufacturing users should be allowed to operate components and
therefore they need to be able to create and write the wizard
model.
Currently translated at 100.0% (46 of 46 strings)

Translation: manufacture-14.0/manufacture-14.0-mrp_component_operation
Translate-URL: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_component_operation/it/
Currently translated at 100.0% (46 of 46 strings)

Translation: manufacture-14.0/manufacture-14.0-mrp_component_operation
Translate-URL: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_component_operation/it/
Currently translated at 100.0% (46 of 46 strings)

Translation: manufacture-14.0/manufacture-14.0-mrp_component_operation
Translate-URL: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_component_operation/it/
Currently translated at 100.0% (46 of 46 strings)

Translation: manufacture-14.0/manufacture-14.0-mrp_component_operation
Translate-URL: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_component_operation/it/
Currently translated at 100.0% (46 of 46 strings)

Translation: manufacture-14.0/manufacture-14.0-mrp_component_operation
Translate-URL: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_component_operation/it/
aditionally some adjustments have been done:
- create_date is a magic field, no need to include it in the vals.
- production_id is the inverse name of mo_id.scrap_ids.
@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 17.0-mig-mrp_component_operation branch from 58a614d to 5e02764 Compare January 31, 2025 10:23
Copy link
Contributor

@DavidJForgeFlow DavidJForgeFlow left a comment

Choose a reason for hiding this comment

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

Sorry for the mistaking approval, I have encountered some errors.

def _run_outgoing_operations(self):
res = []
if self.outgoing_operation == "scrap":
res = self._create_scrap()
Copy link
Contributor

Choose a reason for hiding this comment

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

scrap operation does not unreserve units in v17 maybe you should add part of the code below that unreserves units.

            move = self.mo_id.move_raw_ids.move_line_ids.filtered(
                lambda x: x.product_id == self.product_id
                and (x.lot_id == self.lot_id or self.lot_id is False)
            )
            if move.quantity_product_uom == self.product_qty:
                move.unlink()
            else:
                move.write({
                        "quantity_product_uom": (
                            move.quantity_product_uom - self.product_qty
                        ),
                    }
                )
                move.move_id._recompute_state()

In v14 worked fine, so I supose there must be a change in how odoo creates scraps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A new functionality has been added to unreserve quantities in scraps. Thanks!

@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 17.0-mig-mrp_component_operation branch from 5e02764 to daedbd4 Compare January 31, 2025 11:52
@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 17.0-mig-mrp_component_operation branch from daedbd4 to 32ec823 Compare February 13, 2025 09:05
@LoisRForgeFlow
Copy link
Contributor

@DavidJForgeFlow could you update your review?

Copy link
Contributor

@DavidJForgeFlow DavidJForgeFlow left a comment

Choose a reason for hiding this comment

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

LGTM now!

LoisRForgeFlow

This comment was marked as off-topic.

Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow 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 LGTM 👍

@LoisRForgeFlow
Copy link
Contributor

/ocabot migration mrp_component_operation

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-1455-by-LoisRForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot OCA-git-bot merged commit 9387f06 into OCA:17.0 Feb 24, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@LoisRForgeFlow LoisRForgeFlow deleted the 17.0-mig-mrp_component_operation branch February 24, 2025 08:15
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.

8 participants