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

Create SalesOrderShipment model #2199

Merged
merged 68 commits into from
Dec 4, 2021

Conversation

SchrodingersGat
Copy link
Member

@SchrodingersGat SchrodingersGat commented Oct 25, 2021

Closes #2187
Ref: #1425

This PR implements a "Shipment" model for sales orders, allowing outgoing orders to be partially shipped.

TODO

  • Create SalesOrderShipment model
  • Add "status" field to SalesOrderShipment model
  • Data migrations
  • Implement "Shipment Detail" page
  • Unit testing for data migrations
  • Increment API version number
  • Implement CRUD API endpoints for SalesOrderShipment model
  • Unit testing for CRUD endpoints
  • Implement "ship" endpoint for SalesOrderShipment
  • Implement "cancel" endpoint for SalesOrderShipment - will be fixed in [FR] Convert more server-side forms to the API #2253
  • Implement "complete" endpoint for SalesOrder
  • Unit testing for "ship" endpoint
  • Update UI tables
  • Update process for "completing" a SalesOrder
  • Handle "cancelled" SalesOrder
  • Update documentation for SalesOrders - Update sales order documentation inventree-docs#215
  • Add documentation entry to "release notes" page - inventree/inventree-docs@35141e4
  • Delete old server-side views
  • Only allow order to be "cancelled" if it is empty
  • Only allow order to be marked as "shipped" if at least one item has actually been shipped
  • Refactor "assign by serial number" view to use the API

@SchrodingersGat SchrodingersGat mentioned this pull request Oct 25, 2021
10 tasks
@SchrodingersGat SchrodingersGat added this to the 0.6.0 milestone Oct 25, 2021
@SchrodingersGat SchrodingersGat added api Relates to the API enhancement This is an suggested enhancement or new feature stock Related to Stock models order Related to purchase orders / sales orders and removed stock Related to Stock models labels Oct 25, 2021
- If a SalesOrder is "PENDING" or there are allocations available, a shipment is created
- Deleting a "Shipment" will delete any "Allocation" objects which reference it
- Improve existing data migration for new shipment model
- Filter by order
- Filter by "shipped" status
- SalesOrderShipment serializer includes information on items allocated to that shipment
- Must be unique
- Auto-incrementing default value
- Updated migrations
- SalesOrderAllocations are no longer created manually
- API endpoint performs data validation
- Multiple line items can be allocated at once
- Adds unit testing for new API endpoint
- Added model renderer for SalesOrderShipment
- Some refactorin'
- From the "New Shipment" button
- As a secondary modal from the stock allocation dialgo
- Is not yet implemented in the db model
# Conflicts:
#	InvenTree/build/templates/build/build_base.html
#	InvenTree/order/templates/order/order_base.html
#	InvenTree/order/templates/order/sales_order_base.html
#	InvenTree/order/templates/order/sales_order_detail.html
#	InvenTree/order/templates/order/so_navbar.html
- Pass tracking number through when completing a shipment
- Reload tables automatically when certain actions are performed
- Limit stock items to only those with available stock
@matmair
Copy link
Member

matmair commented Dec 3, 2021

@SchrodingersGat pumped for this

@SchrodingersGat
Copy link
Member Author

Getting pretty close.. lots of loose ends to tie up!

image

SchrodingersGat added a commit to inventree/inventree-docs that referenced this pull request Dec 4, 2021
@SchrodingersGat SchrodingersGat merged commit 3f2cdf9 into inventree:master Dec 4, 2021
@SchrodingersGat SchrodingersGat deleted the partial-shipment branch December 4, 2021 07:22
@SchrodingersGat
Copy link
Member Author

@matmair merged in now, please let me know if you spot any issues, there are a lot of changes here!

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

Successfully merging this pull request may close these issues.

Add partial delivery feature
2 participants