Skip to content

Conversation

@matt454357
Copy link

fixes #69

When creating a new stock request, use the expected date provided by the user.

When duplicating a stock request, copy the expected date.

@OCA-git-bot
Copy link
Contributor

Hi @etobella, @LoisRForgeFlow,
some modules you are maintaining are being modified, check this out!

@matt454357 matt454357 force-pushed the 16.0-fix_stock-request_expected-date branch 2 times, most recently from 9d44892 to b510a87 Compare July 11, 2025 15:24
fixes OCA#69

When creating a new stock request, use the expected date provided by the user.

When duplicating a stock request, copy the expected date.
@matt454357 matt454357 force-pushed the 16.0-fix_stock-request_expected-date branch from b510a87 to 54bbb07 Compare July 11, 2025 16:07
@matt454357
Copy link
Author

@etobella, @LoisRForgeFlow, I would appreciate a review on this PR, if you have the time.

@matt454357
Copy link
Author

@pedrobaeza would you mind reviewing this?

order = self.env["stock.request.order"].browse(upd_vals["order_id"])
upd_vals["expected_date"] = order.expected_date
else:
elif not upd_vals.get("expected_date"):
Copy link
Author

Choose a reason for hiding this comment

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

Only get a new expected date when the user has not specified one.

@pedrobaeza pedrobaeza added this to the 16.0 milestone Nov 6, 2025
@pedrobaeza
Copy link
Member

Sorry, not involved too much with this module.

if upd_vals.get("name", "/") == "/":
upd_vals["name"] = self.env["ir.sequence"].next_by_code("stock.request")
if "order_id" in upd_vals:
if upd_vals.get("order_id"):
Copy link
Author

Choose a reason for hiding this comment

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

Because sometimes order_id = False.

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.

3 participants