Skip to content

Instantly share code, notes, and snippets.

@hieuhani
Created June 28, 2018 08:47
Show Gist options
  • Save hieuhani/4c8135484b17a17bfe9fe205b921913c to your computer and use it in GitHub Desktop.
Save hieuhani/4c8135484b17a17bfe9fe205b921913c to your computer and use it in GitHub Desktop.
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