-
-
Notifications
You must be signed in to change notification settings - Fork 697
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
[MIG][16.0] stock_production_lot_expiry #1214
Conversation
/ocabot migration stock_production_lot_expiry |
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.
LGTM. @glitchov Could you fix string ?
@@ -23,11 +23,12 @@ class ProductTemplate(models.Model): | |||
category_lot_expiry_field_name = fields.Selection( | |||
related="categ_id.lot_expiry_field_name", | |||
readonly=True, | |||
string="category_lot_expiry_field_name", |
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.
Maybe something more explicit ???
@alexis-via Maybe this one could be your interest |
b20adf8
to
818fcbb
Compare
Instead of adding a new computed field "is_expiry", you could use the native computed field "product_expiry_alert" (https://github.com/odoo/odoo/blob/16.0/addons/product_expiry/models/production_lot.py#L21) and add a search method on it. This module adds "yet another" date field on production lot... so it's a total of 5 date fields (4 datetime and 1 date). With some imagination, I think we could reach 10 date fields anytime soon :) |
|
||
_inherit = "stock.lot" | ||
|
||
is_expired = fields.Boolean( |
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.
@jbaudoux @glitchov Maybe we could use the product_expiry_alert
core field as that one is used in some flows, for instance there : https://github.com/odoo/odoo/blob/16.0/addons/product_expiry/models/stock_move_line.py#L16
818fcbb
to
382d397
Compare
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.
LGTM (code review),
should we rename the module to stock_lot_expiry
?
d1d1d4b
to
5002d5d
Compare
This PR has the |
@OCA/product-maintainers Someone to merge this one? |
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.
A lot is expired on its expiration date. And it is supposed to be removed from stock on its removal date.
It is not clear the intent of this module reading the description. Looks weird.
@rousseldenis I propose to close this one... (It makes non sense) |
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. |
migration from 10.0