Lock stock move

This commit is contained in:
Raimon Esteve 2016-09-20 16:47:38 +02:00
parent 769f686636
commit 569e7f115e
3 changed files with 25 additions and 13 deletions

View File

@ -1,12 +0,0 @@
diff -r a87800ef903a move.py
--- a/trytond/trytond/modules/stock/move.py Fri Nov 27 12:13:17 2015 +0100
+++ b/trytond/trytond/modules/stock/move.py Fri Nov 27 12:13:55 2015 +0100
@@ -775,7 +775,7 @@
Date = pool.get('ir.date')
Location = pool.get('stock.location')
- Transaction().cursor.lock(cls._table)
+ # Transaction().cursor.lock(cls._table)
if with_childs:
locations = Location.search([

24
lock_stock_move.diff Normal file
View File

@ -0,0 +1,24 @@
diff -r 711fca08fbae trytond/trytond/modules/stock/move.py
--- a/trytond/trytond/modules/stock/move.py Tue Sep 20 16:44:08 2016 +0200
+++ b/trytond/trytond/modules/stock/move.py Tue Sep 20 16:44:54 2016 +0200
@@ -776,6 +776,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',)):
'''
@@ -789,7 +793,8 @@
Date = pool.get('ir.date')
Location = pool.get('stock.location')
- Transaction().cursor.lock(cls._table)
+ if cls.lock_stock_move():
+ Transaction().cursor.lock(cls._table)
if with_childs:
locations = Location.search([

2
series
View File

@ -95,7 +95,6 @@ fix_rounding_in_sync_inventory_to_outgoing.patch
#purchase_fix_get_move_done_rounding.diff
#multicompany_cron.diff
025476_5154_5155_5456_optimize_move_write_assign.diff
#do_not_lock_on_assign_try.diff
#limit_invoices_in_creit_note_action_by_domain.diff
move_do_batch_write.diff
issue10433002_60001.diff
@ -116,3 +115,4 @@ issue5587-stock.diff
account_payment_clearing-set_party.diff
issue4912.diff
issue5847.diff
lock_stock_move.diff