Make order point's minimal quantity required

issue8405
review259611017
This commit is contained in:
Sergi Almacellas Abellana committed 2019-06-28 10:17:32 +02:00
1 parent 260d1f70b6
commit cfa09b7a58
1 file changed
+16 -2
+16 -2
View File
@@ -82,14 +82,14 @@ There is now a production request::
>>> production.quantity
1.0
With an order point without minimal quantity::
Create an order point negative minimal quantity::
>>> OrderPoint = Model.get('stock.order_point')
>>> order_point = OrderPoint()
>>> order_point.type = 'production'
>>> order_point.product = product
>>> order_point.warehouse_location = warehouse_loc
>>> order_point.min_quantity = None
>>> order_point.min_quantity = -1
>>> order_point.target_quantity = 10
>>> order_point.save()
@@ -123,3 +123,17 @@ There is now a production request::
True
>>> production.quantity
11.0
Using zero as minimal quantity also creates a production request::
>>> order_point.min_quantity = 0
>>> order_point.save()
>>> create_pr = Wizard('stock.supply')
>>> create_pr.execute('create_')
>>> production, = Production.find([])
>>> production.state
'request'
>>> production.product == product
True
>>> production.quantity
11.0