2
0
mirror of https://github.com/frappe/books.git synced 2025-01-09 01:44:15 +00:00

fix: print button not visible on first start

This commit is contained in:
18alantom 2023-05-26 10:44:56 +05:30 committed by Alan
parent 2bf5d3c38a
commit f6cc795184
2 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import {
initializeInstance, initializeInstance,
setCurrencySymbols, setCurrencySymbols,
} from 'src/utils/initialization'; } from 'src/utils/initialization';
import { updatePrintTemplates } from 'src/utils/printTemplates';
import { getRandomString } from 'utils'; import { getRandomString } from 'utils';
import { getDefaultLocations, getDefaultUOMs } from 'utils/defaults'; import { getDefaultLocations, getDefaultUOMs } from 'utils/defaults';
import { getCountryCodeFromCountry, getCountryInfo } from 'utils/misc'; import { getCountryCodeFromCountry, getCountryInfo } from 'utils/misc';
@ -48,6 +49,7 @@ export default async function setupInstance(
await createDefaultEntries(fyo); await createDefaultEntries(fyo);
await createDefaultNumberSeries(fyo); await createDefaultNumberSeries(fyo);
await updateInventorySettings(fyo); await updateInventorySettings(fyo);
await updatePrintTemplates(fyo);
await completeSetup(companyName, fyo); await completeSetup(companyName, fyo);
if (!Object.keys(fyo.currencySymbols).length) { if (!Object.keys(fyo.currencySymbols).length) {

View File

@ -349,6 +349,7 @@ export function getFormRoute(
return route; return route;
} }
// Use `encodeURIComponent` if more name issues
return `/edit/${schemaName}/${name.replaceAll('/', '%2F')}`; return `/edit/${schemaName}/${name.replaceAll('/', '%2F')}`;
} }