Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyecto
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Location capacity by volume

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
inventoryOdoov18
1 Responder
2975 Vistas
Avatar
Cristofher Saquilme
Hello everyone, how could I configure the capacity of a storage location based on volume in odoo 18?
0
Avatar
Descartar
Avatar
Gracious Joseph
Mejor respuesta

In Odoo 18, you can configure the capacity of a storage location based on volume by utilizing custom fields, rules, and automation. Odoo doesn’t have a built-in feature for setting location capacity by volume, but this can be achieved with some customization. Here's how to implement it step-by-step:

1. Add a Volume Field to Storage Locations

You can add a custom field for volume capacity and use Odoo’s automated actions or custom modules to manage it.

Using Studio (If Available):

  1. Go to Inventory > Configuration > Locations.
  2. Open Odoo Studio (if enabled).
  3. Add the following fields:
    • Capacity Volume (m³):
      • Field Name: x_volume_capacity
      • Type: Float
      • Label: Volume Capacity
    • Current Volume Used (m³):
      • Field Name: x_volume_used
      • Type: Float
      • Label: Volume Used
  4. Save the changes.

Without Studio (Custom Module):

If Studio is unavailable, you can achieve this using a custom module. Here's an example:

pythonCopy codefrom odoo import models, fields, api

class StockLocation(models.Model):
    _inherit = 'stock.location'

    volume_capacity = fields.Float(string="Capacity Volume (m³)", help="Maximum volume the location can hold.")
    volume_used = fields.Float(string="Current Volume Used (m³)", compute='_compute_volume_used', store=True)

    @api.depends('quant_ids')
    def _compute_volume_used(self):
        for location in self:
            location.volume_used = sum(location.quant_ids.mapped(lambda q: q.quantity * q.product_id.volume))

2. Set Product Volume

Odoo already supports volume on the product level:

  1. Go to Inventory > Products.
  2. Open a product form view.
  3. Under the Inventory tab, ensure the "Volume" field is filled in.
    • This value represents the volume of a single unit of the product.

3. Automate Volume Calculation

Ensure the total volume of products in a location doesn’t exceed its capacity:

Using Automated Actions:

  1. Go to Settings > Technical > Automated Actions.
  2. Create a new automated action:
    • Model: stock.quant
    • Trigger: On Update or On Creation.
    • Condition: Add a condition to check if the location's volume_used exceeds volume_capacity.
    • Action: Prevent the transaction or notify the user.
    Example Python code for the action:
    pythonCopy codeif record.location_id.volume_capacity > 0 and record.location_id.volume_used > record.location_id.volume_capacity:
        raise Warning(f"Location {record.location_id.name} has exceeded its volume capacity!")
    

Using Custom Python Constraints:

You can enforce a constraint directly in the model:

pythonCopy codefrom odoo.exceptions import ValidationError

class StockLocation(models.Model):
    _inherit = 'stock.location'

    @api.constrains('quant_ids')
    def _check_volume_capacity(self):
        for location in self:
            if location.volume_capacity > 0 and location.volume_used > location.volume_capacity:
                raise ValidationError(f"Location {location.name} has exceeded its volume capacity!")

4. Enhance Stock Operations

You can further improve the process:

  1. Restrict Transfers: Add validation during stock picking to ensure the volume added to a location doesn’t exceed its capacity. Example:
    pythonCopy codeclass StockPicking(models.Model):
        _inherit = 'stock.picking'
    
        @api.constrains('move_line_ids')
        def _check_location_volume(self):
            for move_line in self.move_line_ids:
                location = move_line.location_dest_id
                if location.volume_capacity > 0 and (location.volume_used + move_line.product_id.volume * move_line.qty_done) > location.volume_capacity:
                    raise ValidationError(f"Cannot move products. Location {location.name} will exceed its volume capacity.")
    
  2. Add Alerts: Use server actions or scheduled actions to alert warehouse managers if a location is close to its capacity.

5. Reporting and Dashboard

  • Volume Utilization Report: Create a custom report using Odoo’s reporting tools to monitor locations’ volume utilization.
  • Dashboard Widget: Add a widget showing the top locations nearing their capacity.

Final Notes

  • User Training: Train warehouse staff on maintaining product volumes for accurate tracking.
  • Testing: Before deploying, test the configuration in a development or staging environment.

0
Avatar
Descartar
Cristofher Saquilme
Autor

Thanks Gracious, I was seeing that you can configure storage categories and have the option to add maximum weight, can't you add maximum volume there either? or in general for odoo 18 it does not have the maximum volume option?

Gracious Joseph

n Odoo 18, maximum weight is a built-in feature for storage locations, but maximum volume is not a native option provided out-of-the-box. However, it is possible to extend Odoo to include the maximum volume functionality for storage locations using customizations. Here's an explanation and possible solutions:

1. Maximum Weight in Odoo
Odoo allows you to configure a maximum weight for storage locations, which helps ensure that no more products are assigned to a location than it can physically handle. This is available under:

Inventory > Configuration > Locations (in the warehouse module).
2. Maximum Volume in Odoo
Out-of-the-Box Support
As of Odoo 18, there is no default feature to configure or track maximum volume for storage locations.
Customization Possibilities
You can implement the maximum volume feature by adding a custom field to the location configuration and logic to validate the total volume of products stored.

3. Customization to Add Maximum Volume
Here’s how you can add the maximum volume option:

Step 1: Add a Maximum Volume Field
Extend the stock.location Model: Create a custom module to add a maximum_volume field to storage locations.

from odoo import models, fields, api

class StockLocation(models.Model):
_inherit = 'stock.location'

maximum_volume = fields.Float(string="Maximum Volume (m³)", help="Maximum volume allowed for this location.")
current_volume = fields.Float(string="Current Volume (m³)", compute="_compute_current_volume", store=True)

@api.depends('quant_ids')
def _compute_current_volume(self):
for location in self:
total_volume = sum(quant.product_id.volume * quant.quantity for quant in location.quant_ids)
location.current_volume = total_volume
Add the Field to the Location Form View: Extend the form view to show the new field.

<record id="view_location_form_inherit" model="ir.ui.view">
<field name="name">stock.location.form.inherit</field>
<field name="model">stock.location</field>
<field name="inherit_id" ref="stock.view_location_form" />
<field name="arch" type="xml">
<xpath expr="//group[@name='location_usage']" position="after">
<group string="Capacity">
<field name="maximum_volume" />
<field name="current_volume" readonly="1" />
</group>
</xpath>
</field>
</record>
Step 2: Add Validation for Maximum Volume
Check Volume Before Adding Stock: Override the method responsible for updating inventory (e.g., stock.move).

from odoo import models, exceptions

class StockMove(models.Model):
_inherit = 'stock.move'

def _action_done(self):
for move in self:
location = move.location_dest_id
if location.maximum_volume > 0:
new_volume = location.current_volume + (move.product_id.volume * move.quantity_done)
if new_volume > location.maximum_volume:
raise exceptions.ValidationError(
f"Exceeding maximum volume for location {location.name}. Allowed: {location.maximum_volume} m³."
)
return super(StockMove, self)._action_done()
Test the Logic:

Ensure the logic prevents stock operations when the volume exceeds the limit.
Test various scenarios, including transfers and inventory adjustments.
4. Benefits of Adding Maximum Volume
Prevents overloading storage locations by volume.
Provides more precise control over inventory.
Helps align with physical warehouse constraints for volume-based planning.
5. Alternative: Explore Third-Party Modules
If developing a custom solution isn’t viable, check the Odoo App Store for third-party modules that may offer this functionality.

Cristofher Saquilme
Autor

Thanks for your response Gracious

¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Odoo Inventory Valuation Report
inventory
Avatar
Avatar
Avatar
Avatar
3
nov 25
7301
Inventory rotation or inventory turnover
inventory
Avatar
Avatar
1
oct 25
1701
Lot/Serial Number Resuelto
inventory
Avatar
Avatar
Avatar
2
sept 25
897
track inventory history
inventory
Avatar
Avatar
1
ago 25
1749
SH V18 Using Products for Demos not relieving inventory properly Resuelto
inventory
Avatar
Avatar
1
jun 25
1572
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now