ModelSQL.lock(records) take a lock on the records.
Is it possible to lock the entire table?
You must use
Database.lock but indeed I guess
ModelSQL.lock could be extended to lock the all table if no records is given (Issue 10273: Allow lock all table with ModelSQL.lock - Tryton issue tracker).