Skip to content
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

Shipment Reports #8194

Merged
merged 3 commits into from
Oct 1, 2024
Merged

Conversation

fuzeman
Copy link
Contributor

@fuzeman fuzeman commented Sep 26, 2024

This pull request implements sales order shipment reports which will enable greater flexibility for the generation of packing lists.

I found some previous discussions in #5232 and #62 around packing lists, but the solutions discussed appeared to be only suitable for generating a packing list of an entire sales order. I usually have long-running sales orders with weekly shipments requiring individual packing slips and it will be great to have this integrated inside InvenTree.


Sample Report (included in pull request):

SalesOrderShipment

Copy link

netlify bot commented Sep 26, 2024

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit f6930e1
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/66fae287e34f340008c893f8
😎 Deploy Preview https://deploy-preview-8194--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 86 (no change from production)
Best Practices: 92 (no change from production)
SEO: 70 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@matmair matmair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you for the PR. Let's see if all style checks pass - this is good to merge from my POV

@matmair matmair added enhancement This is an suggested enhancement or new feature report Report/Label generation labels Sep 26, 2024
@matmair matmair added this to the 0.17.0 milestone Sep 26, 2024
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.78%. Comparing base (5638895) to head (f6930e1).
Report is 310 commits behind head on master.

Files with missing lines Patch % Lines
src/backend/InvenTree/order/models.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8194      +/-   ##
==========================================
- Coverage   83.87%   83.78%   -0.10%     
==========================================
  Files        1161     1161              
  Lines       52188    52190       +2     
  Branches     1892     1892              
==========================================
- Hits        43772    43725      -47     
- Misses       7943     8006      +63     
+ Partials      473      459      -14     
Flag Coverage Δ
backend 85.79% <66.66%> (+<0.01%) ⬆️
pui 65.57% <ø> (-0.55%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SchrodingersGat SchrodingersGat added the order Related to purchase orders / sales orders label Oct 1, 2024
@SchrodingersGat
Copy link
Member

@fuzeman nice addition, thanks!!

@SchrodingersGat SchrodingersGat merged commit fe7bbc2 into inventree:master Oct 1, 2024
27 checks passed
@fuzeman
Copy link
Contributor Author

fuzeman commented Oct 1, 2024

Thanks.

I've been using InvenTree almost daily for build orders and stock management over the last 3 years and finally had the push to make my first contribution. Hopefully more PR's to come when time allows.

@SchrodingersGat
Copy link
Member

Contributions are always welcome 🤗 And it is wonderful to hear such feedback

@fuzeman
Copy link
Contributor Author

fuzeman commented Oct 1, 2024

Just noticed that the "Attach to Model on Print" functionality probably won't work as SalesOrderShipment doesn't support attachments. It would be simple enough to enable attachments on SalesOrderShipment, but I'm not sure how we would view them. Maybe they should be aggregated and displayed under the SalesOrder attachment list?

I'll take a look, but let me know if you have any thoughts.

@fuzeman
Copy link
Contributor Author

fuzeman commented Oct 2, 2024

After taking a closer look at how attachments are implemented, the simplest option would probably be a custom create_attachment implementation on SalesOrderShipment which stores the attachments on the parent SalesOrder instance. The only remaining concern would be if SalesOrderShipment should have InvenTreeAttachmentMixin which would create a redundant SalesOrderShipment model type on the Attachment model.

@SchrodingersGat
Copy link
Member

@fuzeman I think your suggested approach is reasonable, but could we have a situation where a user could manually create an attachment against a SalesOrderShipment? Probably not, or not easily, I'd imagine. In which case the redundant model type is likely fine. There is nowhere where the user has to manually select which model to upload an attachment against.

@fuzeman
Copy link
Contributor Author

fuzeman commented Oct 2, 2024

@SchrodingersGat Thanks. See PR #8231.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an suggested enhancement or new feature order Related to purchase orders / sales orders report Report/Label generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants