details:   https://code.tryton.org/tryton/commit/bad51b82be2d
branch:    8.0
user:      Cédric Krier <[email protected]>
date:      Tue Jul 21 19:12:14 2026 +0200
description:
        Use external parameter to activate the check for lot modification 
without move

        #14963
        (grafted from 2b4cfc5dd62800298f218bf8c850de8d3f1e1295)
diffstat:

 modules/stock_lot/stock.py |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 2c595c22e5dd -r bad51b82be2d modules/stock_lot/stock.py
--- a/modules/stock_lot/stock.py        Thu Jul 23 11:37:36 2026 +0200
+++ b/modules/stock_lot/stock.py        Tue Jul 21 19:12:14 2026 +0200
@@ -125,7 +125,6 @@
     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 @@
         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):

Reply via email to