Allow locking tables by calling ModelSQL.lock without records

issue10785
review359051002
This commit is contained in:
Cédric Krier
2021-10-03 13:50:33 +02:00
parent 7ccc94b826
commit e3c341f8cd
+1 -1
View File
@@ -80,7 +80,7 @@ class Party(metaclass=PoolMeta):
for model in self._credit_limit_to_lock():
Model = pool.get(model)
Transaction().database.lock(Transaction().connection, Model._table)
Model.lock()
if self.credit_limit_amount < self.credit_amount + amount:
company = Company(Transaction().context.get('company'))
lang = Lang.get()