Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Location capacity by volume

Subscriure's

Get notified when there's activity on this post

This question has been flagged
inventoryOdoov18
1 Respondre
3010 Vistes
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
Best Answer

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

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Odoo Inventory Valuation Report
inventory
Avatar
Avatar
Avatar
Avatar
3
de nov. 25
7319
Inventory rotation or inventory turnover
inventory
Avatar
Avatar
1
d’oct. 25
1706
Lot/Serial Number Solved
inventory
Avatar
Avatar
Avatar
2
de set. 25
909
track inventory history
inventory
Avatar
Avatar
1
d’ag. 25
1763
SH V18 Using Products for Demos not relieving inventory properly Solved
inventory
Avatar
Avatar
1
de juny 25
1584
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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