Projects:Product On The Fly in WebPOS/Functional Specifications
Contents |
Product On The Fly in WebPOS - Functional Specifications
Overview
This project is about to have the possibility of creating new products “on the fly” through the webpos. These new products will be used for an specific sales order and never will be re-used again. The products can be created into different ways:
- Copying an existing product
- Creating the product from scratch
General Business rules
- This kind of product will be active just for that sales order. Active means that it won’t be accessible through the browser nor through the Search panel anymore once the ticket has been synchronized with the backend
- These products can be returned later on, that is, using the Verify Returns functionality
- The way to create a “Product On The Fly” will be through a menu entry so there should be a preference that allows to hide or not this entry, that is, authorised/forbidden to some roles/users, etc.
- These products cannot be included in the assortment so this has to be taken into account (Processes in the backoffice and webpos)
- “Product On The Fly” will only be Items (product type. item)
- OTF created by copying another product must inherit its services and complementary products
Functional Requirements
Backend
- New column/field in the Product window: IsOTF (On The Fly)
- Show it in grid and form mode
- Name of the field: OTF (Y/N)
- Display logic: When product type is Item
- New column/field in the Product window: SourceProductId (Source Product Id), when OTF is created from another product, this field store id of original product.
- Assortment window. Change processes that add products. These kind of products cannot be inserted in the assortment
- Change all sales products selectors to not take into account these products
WebPOS
- New menu entry “Create OTF”. With the typical preference it would be possible not allow having this functionality by role, user, etc by hiding the menu entry. This option is to create a new OTF product.
- By clicking this option there will be a modal window asking to enter the values for the new OTF
- New column in the product table of WebPOS: IsOTF
- In the BROWSER and in the SEARCH panel there will be a menu icon. This will show a contextual menu with the option “Create OTF”. This option will launch a modal window to create a new OTF product based on the selected one.
Dialog Constraints: Copying an existing product
A dialog with following fields:
- Name: Editable and mandatory
- Product Category: Not editable. The same as the existing one.
- Description: Editable and not mandatory
- Price List: The price list by default for the store. Not editable, multiprice list not supported
- Price List including Taxes: Check field that shows whether the price list include taxes or not. Not editable
- Sell price: Editable and mandatory
- Taxes: Not editable. The same as the existing one.
- Unit of measure: Not editable. The same as the existing one.
- UPC/EAN: Editable, empty and not mandatory
- Comments: Editable, empty and not mandatory
Dialog Constraints: Creating the product from scratch
A dialog with following fields:
- Name: Editable and mandatory
- Product Category: Editable in a hierarchy way and mandatory
- Description: Editable and not mandatory
- Price List: The price list by default for the store. Not editable, multiprice list not supported
- Price List including Taxes: Check field that shows whether the price list include taxes or not. Not editable
- Sell price: Editable and mandatory
- Taxes: A tax selector, editable and mandatory
- Unit of measure: A UOM selector, editable and mandatory
- UPC/EAN: Editable, empty and not mandatory
- Comments: Editable, empty and not mandatory
Implementation
This project is implemented in a new collaborative module: org.openbravo.retail.productonthefly
To implement this module were necesary make a change en core module: org.openbravo.retail.posterminal to allow add context menu options to the contextual menu on search result.
When the terminal was loaded from backend (Hook: OBPOS_TerminalLoadedFromBackend), it's added the option Create OTF on product context menu
var productContextMenuOptions = OB.MobileApp.model.get('productContextMenuOptions') || []; productContextMenuOptions.push({ kind: 'OB.UI.ListContextMenuItem', content: OB.I18N.getLabel('OBROTF_lblMenuOption'), permission: 'OBROTF_otf.create.contextmenu', selectItem: function (product) { ..... } }); OB.MobileApp.model.set('productContextMenuOptions', productContextMenuOptions); OB.UTIL.HookManager.callbackExecutor(args, callbacks); });
Terminal model has a new property: productContextMenuOptions (if not exist only need create it in the model), this property is array of OB.UI.ListContextMenuItem.
Your menu option will have following parameters:
- kind: Enyo kind (OB.UI.ListContextMenuItem)
- content: Caption of menu item
- permission: Preference to show/hide the menu item
- selectItem: Callback function that is called when menu item is selected
Hook: OBROTF_SetProductExtraProperties
After that all changes are applied to new product and before add the new product to current receipt is called a hook to allow add/modify other properties of new product.
Hook name: OBROTF_SetProductExtraProperties
Arguments:
- product: The new product model