diff --git a/packages/apps/purchase/src/api/product-api.js b/packages/apps/purchase/src/api/product-api.js index 2560c3693..8b237ea07 100644 --- a/packages/apps/purchase/src/api/product-api.js +++ b/packages/apps/purchase/src/api/product-api.js @@ -47,7 +47,7 @@ const createProductCriteria = ({searchValue}) => { export async function searchProduct({page = 0, searchValue}) { return createStandardSearch({ model: 'com.axelor.apps.base.db.Product', - criteria: createProductCriteria(searchValue), + criteria: createProductCriteria({searchValue}), fieldKey: 'purchase_product', sortKey: 'purchase_product', page, diff --git a/packages/apps/purchase/src/components/templates/RequestCreationButton/RequestCreationButton.tsx b/packages/apps/purchase/src/components/templates/RequestCreationButton/RequestCreationButton.tsx index 0daeff796..5edd8c87c 100644 --- a/packages/apps/purchase/src/components/templates/RequestCreationButton/RequestCreationButton.tsx +++ b/packages/apps/purchase/src/components/templates/RequestCreationButton/RequestCreationButton.tsx @@ -28,6 +28,7 @@ interface RequestCreationButtonProps { lines: any[]; movedQty: number; isEditionMode: boolean; + unit: any; addLine: () => void; } @@ -36,6 +37,7 @@ const RequestCreationButton = ({ setStep, lines, movedQty, + unit, isEditionMode, addLine, }: RequestCreationButtonProps) => { @@ -80,19 +82,19 @@ const RequestCreationButton = ({ ); } - if (step === RequestCreation.step.addLine) { + if (step === RequestCreation.step.finish) { return (