Use explicit list of product types for stock move
issue10225 review361481002
This commit is contained in:
1 parent
f4f279cf09
commit
1f8d94d700
1 file changed
+3
-1
@@ -209,10 +209,12 @@ class Sale(metaclass=PoolMeta):
|
||||
pool = Pool()
|
||||
Date = pool.get('ir.date')
|
||||
Currency = pool.get('currency.currency')
|
||||
Move = pool.get('stock.move')
|
||||
stockable = any(
|
||||
line.quantity >= 0 for line in self.lines
|
||||
if line.type == 'line'
|
||||
and line.product and line.product.type != 'service')
|
||||
and line.product
|
||||
and line.product.type in Move.get_product_types())
|
||||
if self.carrier and stockable:
|
||||
with Transaction().set_context(self._get_carrier_context()):
|
||||
cost, currency_id = self.carrier.get_sale_price()
|
||||
|
||||
Reference in new issue
Block a user