[14.0][ADD] stock_picking_purchase_order_alert#1913
[14.0][ADD] stock_picking_purchase_order_alert#1913antoniodavid wants to merge 3 commits intoOCA:14.0from
Conversation
|
@antoniodavid Thanks for this. Seems promising. |
christian-ramos-tecnativa
left a comment
There was a problem hiding this comment.
It looks pretty good, can you check my comments? Thanks
|
Looks good, also, don't forget to run the pre-commit stuff |
6aa2e96 to
a176084
Compare
a176084 to
e2a45a7
Compare
|
@antoniodavid Now the code LGTM just some last changes: |
e2a45a7 to
d8f2b45
Compare
Ready!!! |
rrebollo
left a comment
There was a problem hiding this comment.
Code Review: Great work! The code looks good to me (LGTM). Thank you for your contribution! I've provided a few suggestions for your consideration—feel free to address them as you see fit.
|
ping @rousseldenis |
|
This PR has the |
| class ResConfigSettings(models.TransientModel): | ||
| _inherit = "res.config.settings" | ||
|
|
||
| display_quantity_alert_percentage = fields.Boolean( |
There was a problem hiding this comment.
Maybe something on picking type level is more flexible.
| default=False, | ||
| config_parameter="stock_picking_order_alert.display_quantity_alert_percentage", | ||
| ) | ||
| quantity_alert_percentage = fields.Float( |
| # Only apply quantity check if feature is enabled | ||
| if is_enabled: | ||
| # Force compute has_quantity_alert before validation | ||
| picking._compute_has_quantity_alert() |
| """Override button_validate to prevent validation | ||
| when quantity alerts exist""" | ||
| for picking in self: | ||
| is_enabled, alert_percentage = picking._is_quantity_alert_enabled() |
There was a problem hiding this comment.
This should be done in compute instead
There was a problem hiding this comment.
@rousseldenis thanks, for all advice. Could you review again?
229935b to
c3395ba
Compare
c3395ba to
f850afc
Compare
christian-ramos-tecnativa
left a comment
There was a problem hiding this comment.
Also check pre-commit and tests. Thanks
6b2ac2c to
5b22144
Compare
40cb259 to
113cb70
Compare
Ready @Christian-RB |
113cb70 to
bcb7324
Compare
bcb7324 to
2659bd8
Compare
christian-ramos-tecnativa
left a comment
There was a problem hiding this comment.
After some time working with this module I have the feeling that
we don't really need to compare de done value with the purchase. IMO using the demand field product_uom_qty should be good enough and also way more generic as that field is updated directly from the purchase/sale. WDYT @antoniodavid
Co-authored-by: ChristianRB <69461150+Christian-RB@users.noreply.github.com>
edescalona
left a comment
There was a problem hiding this comment.
LGTM.
Hi @antoniodavid just a question: is the warning message displayed on the receipt fixed forever, even if the user had already validated the receipt with that difference in quantities?
Hi @Christian-RB, all changes have been made; please confirm. |
|
@Christian-RB, please check & approve this PR. |
|
ping @rousseldenis. |
|
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. |
@BinhexTeam T14028
This module adds alert notifications when the quantity being received in purchase receipts
exceeds the ordered quantity by more than a configurable threshold percentage (default 30%).
Often warehouse staff receive products in different units of measure than ordered,
which can lead to input errors. For example, if 6,000 units were ordered but the
staff tries to receive 60,000 units, this module will display a warning.
The module provides: