feat: Add 'PATENT & MERK' category mapping and search logic to the fixed assets import script.

This commit is contained in:
Suherdy Yacob 2026-01-22 08:49:25 +07:00
parent cca0e8d88e
commit 4944a1ff24

View File

@ -66,6 +66,12 @@ def ensure_models(env):
'name': 'Peralatan Dapur',
'method_number': 60,
'method_period': '1'
},
'PATENT & MERK': {
'fallback': 'Asset Tidak Berwujud',
'name': 'Asset Tidak Berwujud',
'method_number': 60,
'method_period': '1'
}
}
@ -165,6 +171,8 @@ def process_import(env, excel_file):
model_name_search = current_category_name
if current_category_name == 'PERALATAN DAPUR':
model_name_search = 'Peralatan Dapur'
elif current_category_name == 'PATENT & MERK':
model_name_search = 'Asset Tidak Berwujud'
model = models_cache.get(model_name_search)
if not model: