import odoo

db_name = 'lims_demo'
registry = odoo.registry(db_name)
with registry.cursor() as cr:
    env = odoo.api.Environment(cr, 1, {})
    fields = env['stock.lot']._fields.keys()
    print("Stock.lot fields containing 'name' or 'barcode':")
    for f in fields:
        if 'name' in f or 'barcode' in f:
            print(f"  - {f}")