0% found this document useful (0 votes)
2 views

Pythonproject(final)

The document presents a project report on an Inventory Management System developed for small retail businesses using Django. It addresses common inventory management challenges faced by small marts, such as inefficient stock tracking and slow billing processes, by providing a web-based application with features like a user-friendly dashboard and bulk transaction capabilities. The project showcases skills in web development, database management, and user interface design, making it a significant addition to the developers' technical portfolios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Pythonproject(final)

The document presents a project report on an Inventory Management System developed for small retail businesses using Django. It addresses common inventory management challenges faced by small marts, such as inefficient stock tracking and slow billing processes, by providing a web-based application with features like a user-friendly dashboard and bulk transaction capabilities. The project showcases skills in web development, database management, and user interface design, making it a significant addition to the developers' technical portfolios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Department of Computer Engineering

Mini Project
Subject: Skill Base Lab Course: Python Programming CSL405

A PROJECT REPORT ON
“Inventory Management System”

by

Name Roll No.


Ritesh Mourya B403
Krish Natekar B406
Vedant Paranjape B410

under the guidance of


Prof. Dipak Gaikar
Abstract
The Stock Management System for Small Marts is a web-based application developed to streamline
inventory management for small retail businesses. Built using Django, this system enables mart staff to
efficiently track stock levels, manage product categories, and record transactions (stock in and out). It
features a user-friendly dashboard with low-stock alerts and a specialized billing counter interface for
rapid single-unit sales, inspired by retail chains like D-Mart. Designed with simplicity and practicality
in mind, the application addresses the needs of small marts by reducing manual effort and improving
operational efficiency. This project demonstrates proficiency in web development, database
management, and user interface design, making it a valuable addition to a technical portfolio.
Problem Definition:

Small marts often struggle with inefficient inventory management due to reliance on manual processes
or outdated tools. Key challenges include:
• Time-Consuming Stock Updates: Staff must manually track stock levels, leading to delays
and errors during busy hours.
• Slow Billing Process: Adding or removing items one-by-one for customers at the counter is
cumbersome with traditional systems.
• Stock Visibility: Lack of real-time insights into low-stock items hinders restocking decisions.
• Scalability: Paper-based or basic digital solutions fail to adapt as the mart grows.

This project aims to address these issues by providing an automated, intuitive, and scalable stock
management solution tailored for small retail environments.
Design/Methodology:

The system was designed using a modular approach with Django’s MVT (Model-View-Template)
architecture, ensuring maintainability and scalability.
• System Architecture:
• Models: Three core database models—Category, Product, and Transaction—store and
manage inventory data in SQLite.
• Views: Python functions handle logic for dashboard display, bulk transactions, and
billing counter operations.
• Templates: HTML with Bootstrap 5 renders the UI, including a dashboard, bulk
transaction form, and billing counter grid.
• Key Features:
• Dashboard: Displays all products with stock levels, highlighting low-stock items (≤5
units) in red.
• Bulk Transaction: Allows staff to add/remove multiple units of a product (e.g.,
restocking).
• Billing Counter: Enables one-click sales and returns of single units, optimized for
speed during checkout.

Methodology:
• Development: Iterative process starting with basic CRUD operations, followed by UI
enhancements inspired by D-Mart’s clean, functional design.
• Testing: Manual testing on Ubuntu via Django’s development server (python3 manage.py
runserver) to ensure stock updates and UI responsiveness.
• Deployment Prep: Code structured for easy GitHub upload and local setup by others.

UI Design:

• Dashboard uses a card-based layout with a grid for stock overview.


• Billing counter features a responsive item grid with bold “Sell” (red) and “Return” (green)
buttons.
Figure:
Software Requirements:

Operating System: Ubuntu (tested on 22.04 LTS, adaptable to other Linux distros).
Programming Language: Python 3.8+ (Django’s runtime), HTML/CSS for templates.
Frameworks/Libraries:
• Django 5.x.x (web framework).
• Bootstrap 5.3.3 (via CDN for styling).

Database: SQLite 3 (default with Django, stored as db.sqlite3).


Development Tools:
• Git (version control).
• Terminal (for commands).
• Optional: VS Code or PyCharm for editing.

Hardware: Minimum 2GB RAM, 1GHz processor (runs on typical laptops).


Source Code:

import tkinter as tk
from tkinter import
messagebox, ttk
import sqlite3

# Initialize database
def initialize_database():
conn =
sqlite3.connect('mart_stock.db')
cursor = conn.cursor()
cursor.execute('''
CREATE TABLE IF
NOT EXISTS stock (
id INTEGER
PRIMARY KEY
AUTOINCREMENT,
item_name TEXT
NOT NULL,
quantity INTEGER,
category TEXT
)
''')
conn.commit()
conn.close()

# CRUD Functions
def create_item(item_name,
quantity, category):
conn =
sqlite3.connect('mart_stock.db')
cursor = conn.cursor()
cursor.execute("INSERT
INTO stock (item_name,
quantity, category) VALUES
(?, ?, ?)",
(item_name,
quantity, category))
conn.commit()
conn.close()

def read_items():
conn =
sqlite3.connect('mart_stock.db')
cursor = conn.cursor()
cursor.execute("SELECT *
FROM stock")
items = cursor.fetchall()
conn.close()
return items

def update_item(item_id,
item_name=None,
quantity=None,
category=None):
conn =
sqlite3.connect('mart_stock.db')
cursor = conn.cursor()
updates = {}
if item_name:
updates['item_name'] =
item_name
if quantity is not None:
updates['quantity'] = quantity
if category:
updates['category'] = category
if updates:
query = "UPDATE stock
SET " + ", ".join(f"{k} = ?" for
k in updates.keys()) + "
WHERE id = ?"
values =
list(updates.values()) +
[item_id]
cursor.execute(query,
values)
conn.commit()
conn.close()

def delete_item(item_id):
conn =
sqlite3.connect('mart_stock.db')
cursor = conn.cursor()
cursor.execute("DELETE
FROM stock WHERE id = ?",
(item_id,))
conn.commit()
conn.close()

# GUI Application
class StockManagerApp:
def __init__(self, root):
self.root = root
self.root.title("Mart Stock
Management System")

self.root.geometry("600x500")

# Initialize database
initialize_database()

# Title
tk.Label(root, text="Mart
Stock Manager", font=("Arial",
16, "bold")).pack(pady=10)

# Input Frame
input_frame =
tk.Frame(root)

input_frame.pack(pady=10)

tk.Label(input_frame,
text="Item Name:",
font=("Arial", 12)).grid(row=0,
column=0, padx=5)

self.item_entry =
tk.Entry(input_frame,
width=20, font=("Arial", 12))

self.item_entry.grid(row=0,
column=1, padx=5)

tk.Label(input_frame,
text="Quantity:", font=("Arial",
12)).grid(row=1, column=0,
padx=5)
self.quantity_entry =
tk.Entry(input_frame,
width=20, font=("Arial", 12))

self.quantity_entry.grid(row=1,
column=1, padx=5)

tk.Label(input_frame,
text="Category:",
font=("Arial", 12)).grid(row=2,
column=0, padx=5)
self.category_var =
tk.StringVar(value="General")
categories = ["General",
"Food", "Electronics",
"Clothing"]
self.category_menu =
ttk.Combobox(input_frame,
textvariable=self.category_var,
values=categories,
state="readonly")

self.category_menu.grid(row=2
, column=1, padx=5)
# Buttons
tk.Button(input_frame,
text="Add Item",
command=self.add_item,
bg="green",
fg="white").grid(row=3,
column=0, pady=5)
tk.Button(input_frame,
text="Update Selected",
command=self.update_item,
bg="blue",
fg="white").grid(row=3,
column=1, pady=5)
tk.Button(input_frame,
text="Delete Selected",
command=self.delete_item,
bg="red",
fg="white").grid(row=3,
column=2, pady=5)

# Stock List
self.tree =
ttk.Treeview(root,
columns=("ID", "Name",
"Quantity", "Category"),
show="headings", height=10)
self.tree.heading("ID",
text="ID")
self.tree.heading("Name",
text="Item Name")

self.tree.heading("Quantity",
text="Quantity")

self.tree.heading("Category",
text="Category")
self.tree.column("ID",
width=50)
self.tree.column("Name",
width=200)
self.tree.column("Quantity",
width=100)

self.tree.column("Category",
width=150)
self.tree.pack(pady=10)
self.refresh_list()

def refresh_list(self):
for item in
self.tree.get_children():
self.tree.delete(item)
for item in read_items():
self.tree.insert("",
"end", values=item)

def add_item(self):
item_name =
self.item_entry.get().strip()
quantity =
self.quantity_entry.get().strip()
category =
self.category_var.get()
if not item_name or not
quantity.isdigit():
messagebox.showerror("Error
", "Please enter a valid item
name and quantity.")
return
create_item(item_name,
int(quantity), category)
self.refresh_list()
self.clear_entries()

messagebox.showinfo("Succes
s", f"Added '{item_name}' to
stock.")

def update_item(self):
selected =
self.tree.selection()
if not selected:

messagebox.showerror("Error",
"Please select an item to
update.")
return
item_id =
self.tree.item(selected[0])["valu
es"][0]
item_name =
self.item_entry.get().strip() or
None
quantity =
self.quantity_entry.get().strip()
quantity = int(quantity) if
quantity.isdigit() else None
category =
self.category_var.get() or None
update_item(item_id,
item_name, quantity, category)
self.refresh_list()
self.clear_entries()

messagebox.showinfo("Succes
s", f"Updated item ID
{item_id}.")

def delete_item(self):
selected =
self.tree.selection()
if not selected:

messagebox.showerror("Error",
"Please select an item to
delete.")
return
item_id =
self.tree.item(selected[0])["valu
es"][0]
item_name =
self.tree.item(selected[0])["valu
es"][1]
if
messagebox.askyesno("Confir
m Delete", f"Delete
'{item_name}' (ID:
{item_id})?"):
delete_item(item_id)
self.refresh_list()

messagebox.showinfo("Succes
s", f"Deleted '{item_name}'.")

def clear_entries(self):
self.item_entry.delete(0,
tk.END)

self.quantity_entry.delete(0,
tk.END)

self.category_var.set("General"
)

if __name__ == "__main__":
root = tk.Tk()
app =
StockManagerApp(root)
root.mainloop()
Snapshoot of Output (Result) :

Fig. Dashboard

Fig. Billing Counter


Fig. Bulk Transactions Interface

Fig. Admin Panel Login


Fig. Django Administration

Fig. Django Administration (Groups)


Fig. Django Administration (Users)

Fig. Django Administration (Categories)


Fig. Django Administration (Products)

Fig. Django Administration (Transactions)


Fig. Database (sqlite)
Conclusion :
The Stock Management System for Small Marts is a web-based application developed to streamline
inventory management for small retail businesses. Built using Django, this system enables mart staff to
efficiently track stock levels, manage product categories, and record transactions (stock in and out). It
features a user-friendly dashboard with low-stock alerts and a specialized billing counter interface for
rapid single-unit sales, inspired by retail chains like D-Mart. Designed with simplicity and practicality
in mind, the application addresses the needs of small marts by reducing manual effort and improving
operational efficiency. This project demonstrates proficiency in web development, database
management, and user interface design, making it a valuable addition to a technical portfolio.
References:

Django Project. (2025). Django Documentation. Retrieved from


https://docs.djangoproject.com/en/5.0/
• Official documentation for Django, used for framework setup, models, views, and templates.
• Bootstrap. (2025). Bootstrap 5 Documentation. Retrieved from https://getbootstrap.com/docs/5.3/
• Source for styling the web interface with responsive design components.
• SQLite. (2025). SQLite Documentation. Retrieved from https://www.sqlite.org/docs.html
• Reference for SQLite database syntax and functionality used in the project.
• Python Software Foundation. (2025). Python Documentation. Retrieved from
https://docs.python.org/3/
• General Python reference for scripting and integrating with Django.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy