erpnext
erpnext copied to clipboard
feat(delivery): add cutoff item date for so delivery items
#38053 still addresses a very common use case and a current flaw in the end-2-end buisness workflow.
no-docs
This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
@deepeshgarg007 @ruthra-kumar Could we look together at this use case and get work together towards a merge? This is, as described in the linked item, a pretty critical feature in any scaled dispatch operations of more than a handful deliveries. We're currently managing roughly 200 daily and without this feature, operations would collapse.
Codecov Report
Attention: Patch coverage is 11.76471%
with 15 lines
in your changes are missing coverage. Please review.
Project coverage is 60.20%. Comparing base (
bdca718
) to head (9a70516
). Report is 296 commits behind head on develop.
:exclamation: Current head 9a70516 differs from pull request most recent head b8dac84. Consider uploading reports for the commit b8dac84 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## develop #38561 +/- ##
===========================================
- Coverage 60.20% 60.20% -0.01%
===========================================
Files 757 757
Lines 70811 70822 +11
===========================================
+ Hits 42635 42636 +1
- Misses 28176 28186 +10
Files | Coverage Δ | |
---|---|---|
erpnext/selling/doctype/sales_order/sales_order.py | 68.29% <33.33%> (-0.28%) |
:arrow_down: |
erpnext/utilities/bulk_transaction.py | 0.00% <0.00%> (ø) |
@ruthra-kumar commit history is now clean. Though, I've not found any existing test infrastructure for bulk transactions, albeit I was full of enthusiasm to write one. :smile: I checked manually though in a testing database and delivery notes are created as expected and only with the items expected.
@Mergify update
update
✅ Branch has been successfully updated
@blaggacao If there are no items within the cut-off date, then a delivery note with empty items table is created. User can unintentionally create lot of junk delivery notes.
@ruthra-kumar Thanks a lot for the friendly QA! I worked around this issue in the case of a bulk transaction with the amendment in https://github.com/frappe/erpnext/pull/38561/commits/9a705169fd3916342c14be693ab7a0da2f188fff.
I've tested in on a local database and it appears to behave as intended, now. :handshake:
I thought it might be good for performance on large bulk transactions to not depend on the python GC, hence: del obj
(cc @ankush for my education: is manually freeing memory a valid thought, at all?)
@ruthra-kumar I've been busy myself this week, but maybe we shouldn't let this dry out? I think it's ready.
Will take a look at it this week.
@ruthra-kumar maybe we can get this merged this week, still? :pray:
@blaggacao Code looks ok. No junk Delivery notes now.
I think, making this a toggleable feature would be better. Add an option in Selling Settings
and give the cut-off date popup only if enabled(?)
@ruthra-kumar added in: b8dac84a9014a66a1acd662d8245c4c2e8bc1823
semgrep failure is unrelated.Ignoring.
When backporting include https://github.com/frappe/erpnext/pull/40509