-
-
Notifications
You must be signed in to change notification settings - Fork 61
[16.0][FIX] stock_request: fix handling of expected_date #70
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
base: 16.0
Are you sure you want to change the base?
[16.0][FIX] stock_request: fix handling of expected_date #70
Conversation
|
Hi @etobella, @LoisRForgeFlow, |
9d44892 to
b510a87
Compare
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.
b510a87 to
54bbb07
Compare
|
@etobella, @LoisRForgeFlow, I would appreciate a review on this PR, if you have the time. |
|
@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"): |
There was a problem hiding this comment.
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.
|
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"): |
There was a problem hiding this comment.
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.
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.