-
-
Notifications
You must be signed in to change notification settings - Fork 729
[16.0][ADD] stock_lot_remove: Remove quants with a past removal date #2021
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?
Conversation
bbf6dbe to
6901647
Compare
|
ping @rousseldenis @jbaudoux |
1a245e6 to
ae5fed1
Compare
rousseldenis
left a comment
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.
Seems great. Some remarks
| return [ | ||
| ("usage", "=", "internal"), | ||
| ("warehouse_id", "=", self.warehouse_id.id), | ||
| ("location_id", "child_of", self.warehouse_id.lar_orig_location_id.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.
Why not using the picking type to determine source and destination (default_location_src_id and default_location_dest_id fields) as this is the default Odoo behavior ?
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.
The source location will become a M2M to allows a fine grained selection of the locations to consider
|
Note: When moves are in packages not already done, we shouldn't do the process. |
jbaudoux
left a comment
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.
partial review
| default=lambda self: self.env.context.get("active_model") == "stock.warehouse" | ||
| and self.env.context.get("active_id", False), |
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.
I think you have an active warehouse on user when you are in multi-wh. Would be nice to respect that
| removal_date = fields.Date( | ||
| string="Expiration 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.
date_limit ?
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.
is it better?
ae5fed1 to
26f7184
Compare
26f7184 to
475986e
Compare
I now exclude quants into packages. |
a5a473e to
25859f2
Compare
9b796d3 to
b307dff
Compare
b307dff to
8f7bc92
Compare
Automatically move remaining quants with a past removal date out of stocks