Use external parameter to activate the check for lot modification without move

#14963
(grafted from 2b4cfc5dd62800298f218bf8c850de8d3f1e1295)

--HG--
branch : 8.0
This commit is contained in:
Cédric Krier
2026-07-21 19:12:14 +02:00
parent 526519b6c9
commit b5a51b997d
+1 -2
View File
@@ -125,7 +125,6 @@ class Lot(DeactivableMixin, ModelSQL, ModelView, LotMixin, StockMixin):
def check_modification(cls, mode, lots, values=None, external=False):
pool = Pool()
Move = pool.get('stock.move')
transaction = Transaction()
def find_moves(cls, state=None):
domain = [
@@ -139,7 +138,7 @@ class Lot(DeactivableMixin, ModelSQL, ModelView, LotMixin, StockMixin):
super().check_modification(
mode, lots, values=values, external=external)
if mode == 'write':
if transaction.user and transaction.check_access:
if external:
for field, state, error in cls._modify_no_move:
if field in values:
if find_moves(state):