Skip to main content

Welcome to Inventario

Inventario is a comprehensive inventory management system that helps you track products, manage sales, monitor stock levels, and generate insightful reports. This guide will walk you through getting started with your first successful sale.
1

Create Your Account

Navigate to the registration page and create your admin account.
Inventario supports Google OAuth for quick signup. You can either register with email/password or use your Google account for instant access.
Registration Flow:
  1. Visit /registro/ and fill in your details
  2. Verify your email address (a confirmation link will be sent)
  3. Wait for account activation by an administrator
  4. Once activated, log in at /login/
Account Roles:
  • Admin: Full access to all features including product management, reports, and vendor management
  • Vendedor: Sales-focused access for processing transactions and viewing inventory
# User model from applications/cuentas/models.py
class Usuario(AbstractUser):
    ROLES = [
        ('admin', 'Administrador'),
        ('vendedor', 'Vendedor'),
    ]
    rol = models.CharField(max_length=20, choices=ROLES, default='admin')
    email = models.EmailField(unique=True)
2

Access Your Dashboard

After logging in, admins are redirected to the dashboard at /dashboard/.The dashboard provides real-time insights:
  • Total sales with VAT breakdown
  • Net profits (sales - costs - expenses)
  • Daily sales chart showing transactions by day of week
  • Top 5 products by quantity sold
  • Category analysis with visual charts
  • AI-powered insights and recommendations
The first time you log in, you’ll see an interactive tutorial overlay. Follow it to learn the key features quickly!
Dashboard Filters:
  • Today (7d)
  • This month
  • Specific month (via ?mes=YYYY-MM)
  • This year
# Example: Dashboard calculates net profit
# From applications/cuentas/views.py:471-472
ganancia_bruta = (total_ventas + total_ingresos_extras) - costo_productos
ganancia_neta = ganancia_bruta - total_gastos - total_activos
3

Create Your First Product

Navigate to ProductsAdd Product (/productos/crear/).

Product Fields

  • Name: Product identifier (min 2 characters, unique per user)
  • Category: Optional classification (e.g., “Beverages”, “Electronics”)
  • Barcode: Numeric code for scanner integration (optional but recommended)
  • Purchase Price: Cost paid to supplier
  • Sale Price: Price charged to customers (must be > purchase price)
  • Stock: Initial quantity (can be 0)
Example Product Creation:
# Model definition from applications/productos/models.py:5-51
class Producto(models.Model):
    usuario = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
    codigo_de_barras = models.CharField(max_length=50, blank=True, null=True)
    nombre = models.CharField(max_length=100)
    categoria = models.CharField(max_length=50, blank=True, null=True)
    precio_compra = models.DecimalField(max_digits=10, decimal_places=2, default=0)
    precio = models.DecimalField(max_digits=10, decimal_places=2, default=0)
    stock = models.PositiveIntegerField(default=0)
    
    class Meta:
        unique_together = ('codigo_de_barras', 'usuario')
Validation Rules:
  • Sale price must be greater than purchase price
  • Barcode must be numeric only
  • Product names are unique per user (case-insensitive)
Barcode Scanning: Products with barcodes can be quickly added to sales by scanning. The system searches by barcode:
# From applications/ventas/views.py:451-456
producto = Producto.objects.get(
    codigo_de_barras=codigo, 
    usuario=admin_owner
)
4

Process Your First Sale

Navigate to SalesNew Sale (/ventas/nueva/).

Quick Sale

For walk-in customers without registered profiles
  • Enter customer name (optional)
  • Select payment method (Cash/Transfer)
  • Add products to cart

Registered Client

For repeat customers with profiles
  • Search by name/phone/document
  • Auto-fill customer details
  • Track purchase history
Sale Process:
  1. Select Products
    • Search by name or scan barcode
    • System validates stock availability
    • Add multiple items to cart
  2. Review Pricing with VAT
    # VAT calculation from applications/ventas/models.py:9-10
    IVA_RATE = Decimal('0.19')  # 19% VAT
    
    # From applications/ventas/models.py:95-98
    base = Decimal(self.precio_unitario)
    self.monto_iva = (base * IVA_RATE).quantize(Decimal('0.01'))
    self.precio_unitario_final = (base + self.monto_iva).quantize(Decimal('0.01'))
    self.subtotal = self.cantidad * self.precio_unitario_final
    
    Pricing Breakdown:
    • Base price: Your product’s sale price
    • VAT (19%): Automatically calculated per unit
    • Final price: Base + VAT
    • Subtotal: Final price × quantity
  3. Choose Payment Method
    • Efectivo (Cash)
    • Transferencia (Bank Transfer) - requires bank name and reference number
  4. Complete Sale
    • Stock is automatically deducted
    • Total includes VAT
    • Transaction is recorded with timestamp
Stock Validation: The system uses database-level locking to prevent overselling:
# From applications/ventas/views.py:110
producto = Producto.objects.select_for_update().get(id=producto_id)
If insufficient stock exists, the sale is rejected before any changes are made.
Low Stock Alerts: After completing a sale, you’ll receive warnings if:
  • Product stock reaches 0
  • Product stock falls below threshold (default: 5 units)
// Alert structure returned after sale
{
  "success": true,
  "venta_id": 123,
  "stock_cero_warnings": ["Product A", "Product B"],
  "stock_bajo_warnings": [
    {"nombre": "Product C", "stock_restante": 3}
  ]
}
5

View Your Results

Sales History: Navigate to SalesView Sales (/ventas/lista/) to see all transactions.Features:
  • Paginated list (7 items per page)
  • Combined view of sales and extra income (services, delivery fees)
  • Click any sale to view detailed breakdown
  • Edit or delete sales (admin only)
Dashboard Analytics: Return to the dashboard to see updated metrics:
  • Real-time sales totals
  • Profit calculations (gross and net)
  • Best-selling products
  • Sales by category
  • Day-of-week patterns
Generate Reports:
  • Navigate to Reports to access detailed analytics
  • Export data for accounting
  • View inventory status
  • Analyze purchases by supplier

Next Steps

Manage Clients

Create customer profiles for faster checkout and purchase history tracking

Add Suppliers

Register suppliers to track purchases and manage reorder points

Generate Reports

Access detailed sales, inventory, and financial reports

Manage Users

Create user accounts for your team members (admin only)

Common Workflows

Barcode Scanning Workflow

  1. Ensure products have numeric barcodes assigned
  2. On the New Sale page, focus the barcode input field
  3. Scan the product barcode
  4. Product is automatically added to cart with correct pricing
  5. Adjust quantity if needed
  6. Continue scanning additional items

End-of-Day Reconciliation

  1. View Sales List and filter by today’s date
  2. Check the dashboard for “Today” period
  3. Review total sales by payment method
  4. Compare with physical cash/bank deposits
  5. Record any extra income (delivery fees, services)

Stock Replenishment

  1. Check dashboard alerts for low stock items
  2. Navigate to Products and filter by low stock
  3. Create purchase orders with suppliers
  4. Update stock levels when inventory arrives
  5. System tracks purchase price for profit calculations

Troubleshooting

The system prevents overselling by validating stock before completing transactions.Solution:
  1. Check current stock level in Products list
  2. Update stock if inventory count was incorrect
  3. Or reduce quantity in the sale
When scanning a barcode, you see “Product not found.”Solution:
  1. Verify the barcode is correctly entered in the product record
  2. Check that barcode contains only numbers
  3. Ensure the product belongs to your account (not another user)
The sale price field is hidden when creating new products.Solution: This is intentional. First create the product with purchase price and stock, then edit it to add the sale price. This prevents accidental sales before proper pricing is set.
You cancelled the Google sign-in flow.Solution: Click “Sign in with Google” again and select “Continue” when Google requests permissions. The app needs basic profile and email access to create your account.

Support

Need help? Contact the support team through the Help section in the navigation menu.

Build docs developers (and LLMs) love