Upgrades patch issue53451002_1_10001.diff

This commit is contained in:
Carlos G?lvez 2019-01-02 16:59:18 +01:00
parent dfd05fa963
commit b787e517ca
1 changed files with 12 additions and 38 deletions

View File

@ -1,7 +1,8 @@
diff -r 29eb0f164bcb move.py
--- a/trytond/trytond/modules/stock/move.py Tue Oct 30 12:37:21 2018 +0100
+++ b/trytond/trytond/modules/stock/move.py Tue Oct 30 12:41:42 2018 +0100
@@ -850,7 +850,6 @@
Index: ticnova/trytond/trytond/modules/stock/move.py
===================================================================
--- ticnova.orig/trytond/trytond/modules/stock/move.py
+++ ticnova/trytond/trytond/modules/stock/move.py
@@ -850,7 +850,6 @@ class Move(Workflow, ModelSQL, ModelView
])
else:
locations = list(set((m.from_location for m in moves)))
@ -9,8 +10,8 @@ diff -r 29eb0f164bcb move.py
location_ids = [l.id for l in locations]
product_ids = list(set((m.product.id for m in moves)))
stock_date_end = Date.today()
@@ -967,7 +966,8 @@
@@ -967,7 +966,8 @@ class Move(Workflow, ModelSQL, ModelView
@classmethod
def compute_quantities_query(cls, location_ids, with_childs=False,
- grouping=('product',), grouping_filter=None):
@ -19,7 +20,7 @@ diff -r 29eb0f164bcb move.py
"""
Prepare a query object to compute for each location and product the
stock quantity in the default uom of the product.
@@ -985,6 +985,8 @@
@@ -985,6 +985,8 @@ class Move(Workflow, ModelSQL, ModelView
stock_skip_warehouse: if set, quantities on a warehouse are no more
quantities of all child locations but quantities of the storage
zone.
@ -28,34 +29,7 @@ diff -r 29eb0f164bcb move.py
If with_childs, it computes also for child locations.
grouping is a tuple of Move (or Product if prefixed by 'product.')
field names and defines how stock moves are grouped.
@@ -1037,7 +1039,7 @@
if use_product:
product = Product.__table__()
columns = ['id', 'state', 'effective_date', 'planned_date',
- 'internal_quantity', 'from_location', 'to_location']
+ quantity_field, 'from_location', 'to_location']
columns += list(grouping)
columns = [get_column(c, move, product) for c in columns]
move = (move
@@ -1050,7 +1052,7 @@
period_cache = PeriodCache.__table__()
if use_product:
product_cache = Product.__table__()
- columns = ['internal_quantity', 'period', 'location']
+ columns = [quantity_field, 'period', 'location']
columns += list(grouping)
columns = [get_column(c, period_cache, product_cache)
for c in columns]
@@ -1067,7 +1069,7 @@
to_location = Location.__table__()
to_parent_location = Location.__table__()
columns = ['id', 'state', 'effective_date', 'planned_date',
- 'internal_quantity'] + list(grouping)
+ quantity_field] + list(grouping)
columns = [Column(move, c).as_(c) for c in columns]
move_with_parent = (move
@@ -1121,7 +1123,7 @@
@@ -1122,7 +1124,7 @@ class Move(Workflow, ModelSQL, ModelView
if PeriodCache:
location = Location.__table__()
parent_location = Location.__table__()
@ -64,7 +38,7 @@ diff -r 29eb0f164bcb move.py
columns = [Column(period_cache, c).as_(c) for c in columns]
period_cache = Union(
period_cache.select(
@@ -1319,7 +1321,7 @@
@@ -1320,7 +1322,7 @@ class Move(Workflow, ModelSQL, ModelView
move_keys_alias = [Column(move, key).as_(key) for key in grouping]
move_keys = [Column(move, key) for key in grouping]
query = move.select(move.to_location.as_('location'),
@ -73,7 +47,7 @@ diff -r 29eb0f164bcb move.py
*move_keys_alias,
where=state_date_clause_in
& where
@@ -1329,7 +1331,7 @@
@@ -1330,7 +1332,7 @@ class Move(Workflow, ModelSQL, ModelView
& dest_clause_from,
group_by=[move.to_location] + move_keys)
query = Union(query, move.select(move.from_location.as_('location'),
@ -82,7 +56,7 @@ diff -r 29eb0f164bcb move.py
*move_keys_alias,
where=state_date_clause_out
& where
@@ -1344,7 +1346,7 @@
@@ -1345,7 +1347,7 @@ class Move(Workflow, ModelSQL, ModelView
for key in grouping]
query = Union(query, from_period.select(
period_cache.location.as_('location'),