mirror of
https://github.com/frappe/books.git
synced 2024-11-14 01:14:03 +00:00
6197e78514
- make some fields readonly, hidden - formatting
21 lines
625 B
JavaScript
21 lines
625 B
JavaScript
import frappe from 'frappejs';
|
|
|
|
async function setAugmentedModel(model, regionalInfo) {
|
|
const getAugmentedModel = (
|
|
await import('./doctype/' + model + '/RegionalChanges')
|
|
).default;
|
|
const augmentedModel = getAugmentedModel(regionalInfo);
|
|
frappe.models[model] = augmentedModel;
|
|
frappe.models[model].augmented = 1;
|
|
}
|
|
|
|
export default async function regionalModelUpdates(regionalInfo) {
|
|
for (let model in frappe.models) {
|
|
const { regional, basedOn, augmented } = frappe.models[model];
|
|
if (!regional || basedOn || augmented) {
|
|
continue;
|
|
}
|
|
await setAugmentedModel(model, regionalInfo);
|
|
}
|
|
}
|