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

[16.0][ADD] mrp_stock_owner_restriction #1013

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

AungKoKoLin1997
Copy link

@AungKoKoLin1997 AungKoKoLin1997 commented Apr 4, 2023

This module adopts the functionality of stock_owner_restriction in the manufacturing order. This module will assign the owner for the produced product.
Related - OCA/stock-logistics-workflow#1231

@qrtl

@AungKoKoLin1997 AungKoKoLin1997 changed the title [ADD] mrp_stock_owner_restriction [16.0][ADD] mrp_stock_owner_restriction Apr 4, 2023
@github-actions
Copy link

github-actions bot commented Sep 3, 2023

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 3, 2023
@yostashiro
Copy link
Member

@AungKoKoLin1997 Can you please rebase and push?

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-add-mrp_stock_owner_restriction branch from 3637991 to 71ef736 Compare September 6, 2023 01:59
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 10, 2023
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-add-mrp_stock_owner_restriction branch 3 times, most recently from e877e92 to 9303ccd Compare September 28, 2023 02:29
@@ -0,0 +1,2 @@
This module adopts the functionality of stock_owner_restriction in the manufacturing
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This module adopts the functionality of stock_owner_restriction in the manufacturing
This module adapts the functionality of stock_owner_restriction in the manufacturing

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 17, 2024
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-add-mrp_stock_owner_restriction branch 2 times, most recently from f525d3e to 6ddd377 Compare April 8, 2024 05:16
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 5, 2024
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-add-mrp_stock_owner_restriction branch from 6ddd377 to a9e376b Compare May 31, 2024 08:48
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-add-mrp_stock_owner_restriction branch from a9e376b to 7c8bf85 Compare July 30, 2024 09:20
@bosd
Copy link

bosd commented Sep 30, 2024

/ocabot rebase Would love a new runboat for func testing.

@OCA-git-bot
Copy link
Contributor

Hi @bosd. Your command failed:

Invalid options for command rebase: Would love a new runboat for func testing.

Ocabot commands

  • ocabot merge major|minor|patch|nobump
  • ocabot rebase
  • ocabot migration {MODULE_NAME}

More information

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-add-mrp_stock_owner_restriction branch from 7c8bf85 to 348f537 Compare October 1, 2024 02:20
@AungKoKoLin1997
Copy link
Author

@bosd I rerun the CI.

Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

I think we forgot to use the owner_restriction field defined in the production.

Comment on lines 23 to 24
owner_restriction = self.picking_type_id.owner_restriction
if owner_restriction in ("unassigned_owner", "picking_partner"):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
owner_restriction = self.picking_type_id.owner_restriction
if owner_restriction in ("unassigned_owner", "picking_partner"):
if production.owner_restriction in ("unassigned_owner", "picking_partner"):

Copy link
Author

Choose a reason for hiding this comment

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

Done!

# owner_restriction = fields.Selection(related="picking_type_id.owner_restriction")

def action_validate(self):
owner_restriction = self.mo_id.picking_type_id.owner_restriction
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
owner_restriction = self.mo_id.picking_type_id.owner_restriction
owner_restriction = self.mo_id.owner_restriction

Copy link
Author

Choose a reason for hiding this comment

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

Done!

self.ensure_one()
mo_to_unbuild = self._get_mo_to_unbuild()
if mo_to_unbuild:
return mo_to_unbuild.picking_type_id.owner_restriction
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return mo_to_unbuild.picking_type_id.owner_restriction
return mo_to_unbuild.owner_restriction

Copy link
Author

Choose a reason for hiding this comment

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

Done!

Copy link

@Dranyel-Bosd Dranyel-Bosd left a comment

Choose a reason for hiding this comment

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

LGTM 🎇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants