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

[17.0][MIG] mrp_component_operation #1455

Open
wants to merge 34 commits into
base: 17.0
Choose a base branch
from

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.
weblate and others added 12 commits January 31, 2025 11:22
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
Currently translated at 100.0% (49 of 49 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% (49 of 49 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% (49 of 49 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% (49 of 49 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/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
@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.

@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 17.0-mig-mrp_component_operation branch from 5e02764 to daedbd4 Compare January 31, 2025 11:52
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.

8 participants