Upgrade patches last core changes

This commit is contained in:
Raimon Esteve 2019-10-23 11:18:04 +02:00
parent f2551bc8e3
commit 0f89795c63
4 changed files with 27 additions and 42 deletions

View File

@ -1,7 +1,7 @@
diff -r 3d822d8cff23 move.py
--- a/trytond/trytond/modules/stock/move.py Fri Jun 07 11:46:35 2019 +0200
+++ b/trytond/trytond/modules/stock/move.py Fri Jun 07 11:50:52 2019 +0200
@@ -1389,11 +1389,27 @@
diff -r 988c3bc94672 trytond/trytond/modules/stock/move.py
--- a/trytond/trytond/modules/stock/move.py Wed Oct 23 10:38:49 2019 +0200
+++ b/trytond/trytond/modules/stock/move.py Wed Oct 23 10:53:33 2019 +0200
@@ -1400,11 +1400,27 @@
del quantities[key]
# Round quantities
@ -29,6 +29,6 @@ diff -r 3d822d8cff23 move.py
location = key[0]
- uom = default_uom[id_getter(key)]
+ uom = uoms[default_uom[id_getter(key)]]
quantities[key] = uom.round(float(quantity)) if quantity else 0.0
quantities[key] = uom.round(quantity) if quantity else 0.0
return quantities

View File

@ -1,7 +1,7 @@
diff -r f95dbecc064f trytond/trytond/modules/stock/move.py
--- a/trytond/trytond/modules/stock/move.py Thu May 02 09:50:09 2019 +0200
+++ b/trytond/trytond/modules/stock/move.py Thu May 02 09:52:21 2019 +0200
@@ -904,7 +904,8 @@
diff -r b56a5b6d059d trytond/trytond/modules/stock/move.py
--- a/trytond/trytond/modules/stock/move.py Wed Oct 23 10:24:05 2019 +0200
+++ b/trytond/trytond/modules/stock/move.py Wed Oct 23 10:35:18 2019 +0200
@@ -912,7 +912,8 @@
@classmethod
def compute_quantities_query(cls, location_ids, with_childs=False,
@ -11,7 +11,7 @@ diff -r f95dbecc064f trytond/trytond/modules/stock/move.py
"""
Prepare a query object to compute for each location and product the
stock quantity in the default uom of the product.
@@ -922,6 +923,8 @@
@@ -930,6 +931,8 @@
stock_skip_warehouse: if set, quantities on a warehouse are no more
quantities of all child locations but quantities of the storage
zone.
@ -20,17 +20,17 @@ diff -r f95dbecc064f trytond/trytond/modules/stock/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.
@@ -974,7 +977,7 @@
@@ -982,7 +985,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']
- 'internal_quantity', 'from_location', 'to_location', 'company']
+ quantity_field, 'from_location', 'to_location', 'company']
columns += [c for c in grouping if c not in columns]
columns = [get_column(c, move, product) for c in columns]
move = (move
@@ -987,7 +990,7 @@
period_cache = PeriodCache.__table__()
@@ -996,7 +999,7 @@
period_table = Period.__table__()
if use_product:
product_cache = Product.__table__()
- columns = ['internal_quantity', 'period', 'location']
@ -38,16 +38,16 @@ diff -r f95dbecc064f trytond/trytond/modules/stock/move.py
columns += [c for c in grouping if c not in columns]
columns = [get_column(c, period_cache, product_cache)
for c in columns]
@@ -1004,7 +1007,7 @@
@@ -1017,7 +1020,7 @@
to_location = Location.__table__()
to_parent_location = Location.__table__()
columns = ['id', 'state', 'effective_date', 'planned_date',
- 'internal_quantity']
+ quantity_field]
- 'internal_quantity', 'company']
+ quantity_field, 'company']
columns += [c for c in grouping if c not in columns]
columns = [Column(move, c).as_(c) for c in columns]
@@ -1059,7 +1062,7 @@
@@ -1072,7 +1075,7 @@
if PeriodCache:
location = Location.__table__()
parent_location = Location.__table__()
@ -56,7 +56,7 @@ diff -r f95dbecc064f trytond/trytond/modules/stock/move.py
columns = [Column(period_cache, c).as_(c) for c in columns]
period_cache = Union(
period_cache.select(
@@ -1257,7 +1260,7 @@
@@ -1270,7 +1273,7 @@
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'),
@ -65,7 +65,7 @@ diff -r f95dbecc064f trytond/trytond/modules/stock/move.py
*move_keys_alias,
where=state_date_clause_in
& where
@@ -1267,7 +1270,7 @@
@@ -1279,7 +1282,7 @@
& dest_clause_from,
group_by=[move.to_location] + move_keys)
query = Union(query, move.select(move.from_location.as_('location'),
@ -74,7 +74,7 @@ diff -r f95dbecc064f trytond/trytond/modules/stock/move.py
*move_keys_alias,
where=state_date_clause_out
& where
@@ -1282,7 +1285,7 @@
@@ -1293,7 +1296,7 @@
for key in grouping]
query = Union(query, from_period.select(
period_cache.location.as_('location'),
@ -83,11 +83,11 @@ diff -r f95dbecc064f trytond/trytond/modules/stock/move.py
*period_keys,
where=(period_cache.period
== (period.id if period else None))
@@ -1391,7 +1394,7 @@
@@ -1402,7 +1405,7 @@
for key, quantity in quantities.items():
location = key[0]
uom = default_uom[id_getter(key)]
- quantities[key] = uom.round(quantity)
+ quantities[key] = uom.round(float(quantity)) if quantity else 0.0
+ quantities[key] = uom.round(quantity) if quantity else 0.0
return quantities

View File

@ -1,13 +0,0 @@
diff -r af895bf647f2 product.py
--- a/trytond/trytond/modules/product_cost_fifo/product.py Fri Aug 09 16:36:11 2019 +0200
+++ b/trytond/trytond/modules/product_cost_fifo/product.py Thu Sep 19 00:59:26 2019 +0200
@@ -50,7 +50,8 @@
moves = Move.search([
('product', '=', product.id),
('state', '=', 'done'),
- ('from_location.type', '=', 'supplier'),
+ ('from_location.type', 'in', ['supplier', 'production']),
+ ('to_location.type', '=', 'storage'),
], offset=offset, limit=limit,
order=[('effective_date', 'DESC'), ('id', 'DESC')])
if not moves:

8
series
View File

@ -34,7 +34,7 @@ lock_stock_move.diff # [stock] Function to overwrite if lock table or not
issue4482.diff # [stock] stock inventory misses company access rule
search_warehouse.diff # [stock] search function for warehouse
issue239_630.diff # [stock] get location quantity by product, product template or lot
issue53451002_1_10001.diff # [stock] Allow configuring which quantity is grouped in compute_quantities_query() needed by stock_number_of_packages
issue7805.diff # [stock] Allow configuring which quantity is grouped in compute_quantities_query() needed by stock_number_of_packages
stock_quantity_to_zero.diff # [stock] Ensure to sum with value.
improve_performance_on_try_assign.diff # [stock] change browse of product to get default_uom to pysql
@ -42,7 +42,6 @@ stock_lot_sled.diff # [stock_lot_sled] Allow configuring which quantity is group
issue10467.diff # [stock_lot] add lot to grouping when assign try if lot it's required on product
issue8659.diff # [product_cost_fifo] Cost FIFO does not consider moves from productions
issue8699.diff # [product_cost_fifo] Cost price increases when no quantity FIFO
issue8413.diff # [carrier] Add recname to search
@ -53,7 +52,6 @@ issue8369.diff # [trytond] Sort keys of PYSON XML value
issue8375.diff # [trytond] n_sign_posn and p_sign_posn are considered as string by trytond.convert
issue8636.diff # [account_payment_sepa] da434be20358 Include only validated mandates on lines to pay domain
issue8697.diff # [stock_supply] Missing supply period in purchase configuration
@ -61,5 +59,5 @@ issue8697.diff # [stock_supply] Missing supply period in purchase configuration
issue8703.diff # [stock_forecast] stock_forecast creates moves in the past
issue8702.diff # [stock_supply_forecast] Support production forecast
#issue8705.diff # [trytond] Always use search method on translations
issue8752.diff # [analytic_invoice]
#issue8705.diff # [trytond] Always use search method on translations
issue8752.diff # [analytic_invoice] set_analytic_lines must return move