feat: Add 'PATENT & MERK' category mapping and search logic to the fixed assets import script.
This commit is contained in:
parent
cca0e8d88e
commit
4944a1ff24
@ -66,6 +66,12 @@ def ensure_models(env):
|
|||||||
'name': 'Peralatan Dapur',
|
'name': 'Peralatan Dapur',
|
||||||
'method_number': 60,
|
'method_number': 60,
|
||||||
'method_period': '1'
|
'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
|
model_name_search = current_category_name
|
||||||
if current_category_name == 'PERALATAN DAPUR':
|
if current_category_name == 'PERALATAN DAPUR':
|
||||||
model_name_search = '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)
|
model = models_cache.get(model_name_search)
|
||||||
if not model:
|
if not model:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user