Lock stock move

This commit is contained in:
Raimon Esteve 2016-09-20 16:32:24 +02:00
parent f5ab04ea07
commit 745798a4ff
2 changed files with 25 additions and 0 deletions

24
lock_stock_move.diff Normal file
View File

@ -0,0 +1,24 @@
diff -r 1714b4be593f trytond/trytond/modules/stock/move.py
--- a/trytond/trytond/modules/stock/move.py Tue Sep 20 16:27:51 2016 +0200
+++ b/trytond/trytond/modules/stock/move.py Tue Sep 20 16:29:45 2016 +0200
@@ -778,6 +778,10 @@
return to_pick
return to_pick
+ @staticmethod
+ def lock_stock_move():
+ return True
+
@classmethod
def assign_try(cls, moves, with_childs=True, grouping=('product',)):
'''
@@ -791,7 +795,8 @@
Date = pool.get('ir.date')
Location = pool.get('stock.location')
- Transaction().database.lock(Transaction().connection, cls._table)
+ if cls.lock_stock_move():
+ Transaction().database.lock(Transaction().connection, cls._table)
if with_childs:
locations = Location.search([

1
series
View File

@ -35,3 +35,4 @@ apm.diff
issue5865.diff
issue5847.diff
issue5352.diff
lock_stock_move.diff