Reviewers: ,
Please review this at http://codereview.tryton.org/677002/
Affected files:
M __init__.py
M location.py
Index: __init__.py
===================================================================
--- a/__init__.py
+++ b/__init__.py
@@ -11,4 +11,5 @@
Product,
ProductLocation,
ShipmentIn,
+ ShipmentOutReturn,
module='stock_product_location', type_='model')
Index: location.py
===================================================================
--- a/location.py
+++ b/location.py
@@ -6,7 +6,7 @@
from trytond.backend import TableHandler
from trytond.pool import PoolMeta
-__all__ = ['ProductLocation', 'ShipmentIn']
+__all__ = ['ProductLocation', 'ShipmentIn', 'ShipmentOutReturn']
__metaclass__ = PoolMeta
@@ -58,3 +58,16 @@
continue
res['to_location'] = product_location.location.id
return res
+
+
+class ShipmentOutReturn:
+ __name__ = 'stock.shipment.out.return'
+
+ @classmethod
+ def _get_inventory_moves(cls, incoming_move):
+ res = super(ShipmentOutReturn,
cls)._get_inventory_moves(incoming_move)
+ for product_location in incoming_move.product.locations:
+ if (product_location.warehouse
+ == incoming_move.shipment_out_return.warehouse):
+ res['to_location'] = product_location.location.id
+ return res
--
--
[email protected] mailing list
---
You received this message because you are subscribed to the Google Groups "tryton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.