Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Manufacturing

Entity: mrp.unbuild

Compute Method: _compute_location_id

View 19.0 View 20.0
Inputs Method Outputs
  • company_id
  • company_id.id
  • location_id
  • location_id.company_id
  • location_dest_id
  • location_dest_id.company_id
for order in self:
-             if order.company_id:
+             if order.company_id and order.location_id.company_id != order.company_id:
                warehouse = self.env['stock.warehouse'].search([('company_id', '=', order.company_id.id)], limit=1)
-                 if order.location_id.company_id != order.company_id:
-                     order.location_id = warehouse.lot_stock_id
-                 if order.location_dest_id.company_id != order.company_id:
-                     order.location_dest_id = warehouse.lot_stock_id
+                 order.location_id = warehouse.lot_stock_id
  • location_id
  • location_dest_id

Back to entity