details:   https://code.tryton.org/tryton/commit/552786db996d
branch:    7.8
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 7a2b12b14f7c -r 552786db996d modules/stock_lot/stock.py
--- a/modules/stock_lot/stock.py        Thu Jun 11 21:30:46 2026 +0200
+++ b/modules/stock_lot/stock.py        Tue Jul 21 19:12:14 2026 +0200
@@ -128,7 +128,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):
             for sub_records in grouped_slice(lots):
@@ -145,7 +144,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