Skip to content

[16.0][FIX] stock_request: fix handling of expected_date#70

Open
matt454357 wants to merge 1 commit intoOCA:16.0from
asphaltzipper:16.0-fix_stock-request_expected-date
Open

[16.0][FIX] stock_request: fix handling of expected_date#70
matt454357 wants to merge 1 commit intoOCA:16.0from
asphaltzipper:16.0-fix_stock-request_expected-date

Conversation

@matt454357
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Author

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

@matt454357
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 8, 2026

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 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants