diff --git a/sale_exception_nostock/__openerp__.py b/sale_exception_nostock/__openerp__.py index 37dce7d3574..928e6212625 100644 --- a/sale_exception_nostock/__openerp__.py +++ b/sale_exception_nostock/__openerp__.py @@ -29,16 +29,19 @@ Sale stock exception -------------------- -This addon adds two new sales exceptions to be used by sale_exception addon. -The first one will ensure that an order line can be delivered on the delivery -$date if it is in MTS. Validation is done by using the order line location via -related shop and using the line delay. +This addon adds two new sales exceptions to be used by the `sale_exception` addon: -The second one will create a sales exception if the current SO will break a -sales order already placed in the future. -The second test will only look for stock moves that pass by the line location. -So if your stock have children or if you have configured automated stock actions -they must pass by the location related to the SO line, else they will be ignored. +* The first one ensures that an order line can be delivered on the delivery + date if it is in MTS. Validation is done by using the order line location via + related shop and using the line delay. + +* The second one will create a sales exception if the current SO will break a + sales order already placed in the future. + +The second test will only look for stock moves that pass by the line location, +so if your stock have children or if you have configured automated stock +actions they must pass by the location related to the SO line, else they will +be ignored. **Warning:** diff --git a/sale_exception_nostock/model/sale.py b/sale_exception_nostock/model/sale.py index c6887d0d72c..54f3631db0c 100644 --- a/sale_exception_nostock/model/sale.py +++ b/sale_exception_nostock/model/sale.py @@ -25,13 +25,13 @@ class sale_order_line(orm.Model): - """Adds two exception functions to be call by sale_exceptions module. + """Adds two exception functions to be called by the sale_exceptions module. The first one will ensure that an order line can be delivered on the delivery date, if the related product is in MTS. Validation is done by using the shop related to the sales order line location and using the line delay. - The second one will raise a sales exception if the current SO will break a + The second one will raise a sales exception if the current SO will break an order already placed in future """ @@ -49,12 +49,12 @@ def _get_line_location(self, line_br, context=None): return line_br.order_id.shop_id.warehouse_id.lot_stock_id.id def can_command_at_delivery_date(self, cr, uid, l_id, context=None): - """Predicate that Checks if SO line can be delivered at delivery date. + """Predicate that checks whether a SO line can be delivered at delivery date. Delivery date is computed using date of the order + line delay. Location is taken from the shop linked to the line - :returns: True if line can be delivered on time + :return: True if line can be delivered on time """ if context is None: @@ -90,7 +90,7 @@ def _get_affected_dates(self, cr, location_id, product_id, delivery_date, contex :param location_id: location id to be checked :param product_id: product id te be checked - :returns: list of dates to be checked + :return: list of dates to be checked """ sql = ("SELECT date FROM stock_move" @@ -110,8 +110,7 @@ def future_orders_are_affected(self, cr, uid, l_id, context=None): This can be a performance killer, you should not use it if you have constantly a lot of running Orders - :returns: True if future order are affected by current command line - + :return: True if future order are affected by current command line """ if context is None: context = {}