Views on going#21
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances the warehouse management system by adding new fields and features such as a product SKU, warehouse capacity, improved API endpoints, data population scripts, and a development environment configuration.
- Introduces a unique SKU field for products and updates related API logic.
- Adds a capacity field to the Warehouse model and adjusts inventory handling including detailed API responses.
- Updates the seeding script for products, warehouses, and inventory transactions and adds a new docker-compose configuration for development.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| warehouse_managment/warehouse_managment/settings.py | Adds CORS headers and middleware configuration. |
| warehouse_managment/warehouse/views.py | Updates inventory API to require warehouse_id and returns detailed info. |
| warehouse_managment/warehouse/supplier_names.py | Introduces a supplier names mapping utility. |
| warehouse_managment/warehouse/models.py | Adds a new capacity field to the Warehouse model. |
| warehouse_managment/product/views.py | Enhances the product stock summary API using the new SKU field. |
| warehouse_managment/product/models.py | Adds a new product_SKU field to enforce unique SKUs on products. |
| warehouse_managment/product/management/commands/populate_all_data.py | Revises data population ensuring SKUs and capacities are set. |
| database/docker-compose.yml | Provides development environment setup with pgadmin and a PostgreSQL client. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements and new features to the warehouse management system, including improvements to data population scripts, database schema updates, API functionality, and development environment configuration. Below is a summary of the most important changes grouped by theme.
Database and Schema Updates:
product_SKUfield to theProductmodel, ensuring each product has a unique SKU identifier. Corresponding migration0002_product_product_sku.pywas created. ([[1]](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-e3126b89490ff95fab29bef220d891c5e08d044da990375f9f106e42769ef374R1-R18),[[2]](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-0cc46d5940330f7605259aec8e81d57aa0d4ccde56d5dea8638e58ccbc9ffe03R10))capacityfield to theWarehousemodel to track the maximum storage capacity. Corresponding migration0002_warehouse_capacity.pywas created. ([[1]](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-83711e32fd1d050ba9ed1c889bf7463e38584657e8df37494706199341656840R1-R18),[[2]](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-2c2090344d8cad465e9a858e8383d7a506938c8f3a786afe568ddf7f4ce4c8b8R10))Data Population Enhancements:
populate_all_data.pyscript to:[[1]](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-03a41d585e4f174dcb50486546917cd35cf23d52cd03c52547fdc300f2967516R5-R23),[[2]](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-03a41d585e4f174dcb50486546917cd35cf23d52cd03c52547fdc300f2967516L31-R114))API Improvements:
product_stock_summaryAPI to useproduct_SKUfor product lookup and include SKU in the response. ([warehouse_managment/product/views.pyL78-R95](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-e666d50864fb13751dbf7b4f6e89c0c2b92d9cdc3702b6f34a6096e0d59c4a22L78-R95))warehouse_inventory_listAPI to:warehouse_idas a parameter.[warehouse_managment/warehouse/views.pyL26-R61](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-671864e5ab4b2391fe05a8dc9ccf465183a73d48ddde61151f6e247ce13727f9L26-R61))Development Environment Configuration:
docker-compose.ymlfile to set up a development environment withpgadmin, a PostgreSQL client, and a custom network. ([database/docker-compose.ymlR1-R34](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-e0bbebfdf7f802db10750776ed72a77e6ec3e6049c211d039dda66b2bac04470R1-R34))corsheaderspackage and middleware, allowing all origins. ([[1]](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-ec23290768da4a8b3ede4e6320a9d220db0548118f69f62e69d882f4dee0d81bR51),[[2]](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-ec23290768da4a8b3ede4e6320a9d220db0548118f69f62e69d882f4dee0d81bR62-R66))Utility Additions:
supplier_names.pyutility to map supplier IDs to human-readable names, improving code readability and API responses. ([[1]](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-a84939202dc45597ccf0f61f6ade6d7c21a0b4b94c65256659c8b060bdee6c2eR1-R9),[[2]](https://github.com/IASSCMS/Warehouse-Management-Services/pull/21/files#diff-671864e5ab4b2391fe05a8dc9ccf465183a73d48ddde61151f6e247ce13727f9R10))