deisy 5 gadi atpakaļ
vecāks
revīzija
7cf2183eaa
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 1 1
      models/stock_move.py
  2. 1 1
      models/stock_transfer_order.py

+ 1 - 1
models/stock_move.py

@@ -10,7 +10,7 @@ class stock_move(models.Model):
     @api.multi
     def action_done_button(self):
         for move in self:
-            if move.product_id.type == 'product':
+            if move.product_id.type == 'product' and move.location_id.usage == 'internal':
                 uom_record = move.product_id.uom_id
                 qty_available = self.get_location_qty(move.product_id.id, move.location_id.id)
                 compare_qty = float_compare(qty_available, move.product_uom_qty, precision_rounding=uom_record.rounding)

+ 1 - 1
models/stock_transfer_order.py

@@ -197,7 +197,7 @@ class stock_picking(models.Model):
     def entregar_producto(self):
         for item in self:
             for move in item.move_lines:
-                if move.product_id.type == 'product':
+                if move.product_id.type == 'product' and move.location_id.usage == 'internal':
                     uom_record = move.product_id.uom_id
                     qty_available = self.get_location_qty(move.product_id.id, move.location_id.id)
                     compare_qty = float_compare(qty_available, move.product_uom_qty, precision_rounding=uom_record.rounding)