Inventario Móvil: Visualización y Actualización de Stock

Start with this template
32
import logging
from gunicorn.app.base import BaseApplication
from app_init import create_initialized_flask_app

# Flask app creation should be done by create_initialized_flask_app to avoid circular dependency problems.
app = create_initialized_flask_app()

# Setup logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

class StandaloneApplication(BaseApplication):
    def __init__(self, app, options=None):
        self.application = app
        self.options = options or {}
        super().__init__()

    def load_config(self):
        # Apply configuration to Gunicorn
        for key, value in self.options.items():
            if key in self.cfg.settings and value is not None:
                self.cfg.set(key.lower(), value)

    def load(self):
Get full code

Inventario Móvil: Visualización y Actualización de Stock

Created: | Last Updated:

Here's a step-by-step guide for using the Inventario Móvil template:

Introduction

The Inventario Móvil template provides a web application for visualizing and updating inventory stock in a warehouse. It allows users to view theoretical stock levels and enter real stock counts from mobile devices.

Getting Started

  1. Click "Start with this Template" to begin using the Inventario Móvil template in Lazy Builder.

Test the Application

  1. Click the "Test" button to deploy and launch the application.

  2. Once deployed, Lazy will provide a server link to access the web application.

Using the Application

  1. Open the provided server link in your web browser to access the Inventario Móvil application.

  2. On the home page, you'll see a form to enter a warehouse code.

  3. Enter a valid warehouse code and click "Submit" to view the inventory for that warehouse.

  4. The inventory list will display with the following columns:

  5. Code
  6. Description
  7. Warehouse
  8. Theoretical Stock
  9. Real Stock

  10. You can update the real stock count for each item by entering a new value in the "Real Stock" input field.

Mobile Usage

The application is designed to be responsive and work well on mobile devices:

  • On smaller screens, the header will collapse into a mobile menu for easier navigation.
  • The inventory table will be scrollable horizontally if needed to accommodate all columns.

Integrating with External Systems

This template provides a simple API endpoint that can be used to fetch inventory data programmatically:

  • API Endpoint: /api/inventory
  • Method: GET
  • Query Parameter: warehouse_code

Example API request:

GET /api/inventory?warehouse_code=WH001

Example API response:

json [ { "code": "ITEM001", "description": "Widget A", "warehouse": "WH001", "theoreticalStock": 100, "realStock": 95 }, { "code": "ITEM002", "description": "Gadget B", "warehouse": "WH001", "theoreticalStock": 50, "realStock": 48 } ]

You can use this API to integrate the inventory data with other systems or create custom front-end applications.

By following these steps, you'll be able to use the Inventario Móvil template to manage and view warehouse inventory data through a web interface, with the option to update real stock counts from mobile devices.

Technologies