Created
June 28, 2018 08:47
-
-
Save hieuhani/4c8135484b17a17bfe9fe205b921913c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const UPDATE_INVENTORY_ADJUSTMENTS = 'UPDATE_INVENTORY_ADJUSTMENTS' | |
export function updateInventoryAdjustments(inventoryAdjustments) { | |
return { | |
type: UPDATE_INVENTORY_ADJUSTMENTS, | |
payload: { | |
inventoryAdjustments, | |
}, | |
} | |
} | |
export function loadInventoryAdjustments() { | |
return dispatch => query({ model: 'stock.inventory', fields: ['name', 'date', 'state'] }) | |
.then(inventoryAdjustments => dispatch(updateInventoryAdjustments(inventoryAdjustments))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment