Projects:Assignation of Document Types Refactor
Contents |
Introduction
The aim of this project is to simplify the way document types are configured in the WebPOS.
Scope
Document types are configured in “Channel - Touchpoint Type” window, this fact force to create one Touchpoint Type by organization, because document types should be different for each organization, this adds complexity when setting up a store.
With the implementation of this refactor, document types will be configured in the “Organization”, therefore it is not necessary to duplicate the information in “Channel - Touchpoint Type” window. Only one “Channel - Touchpoint Type” window for each type will be enough.
Retail configuration guide suggests to use a “Channel - Touchpoint Type” for each “Channel - Touchpoint” to avoid contention issues [1]. This recommendation is no longer going to be allowed when the refactor is done. But in reality it is a very restrictive recommendation and nobody configures the WebPOS using it.
New recommendation is to use a “Channel - Touchpoint Type” and the corresponding “Document Types” for each organization.
Configuration
- Old approach: document types are defined in “Channel - Touchpoint Type” window.
- New approach: document types are defined in the “Retail Configuration” section of “Organization” window.
Technical Design
- Deprecate columns in obpos_terminaltype:
- C_Doctype_ID (mandatory)
- C_Doctyperet_ID (mandatory)
- C_Doctypequot_ID
- C_Doctyperecon_ID (mandatory)
- Create new document types inside section Organization/Retail Config. (ad_org)
- C_Doctype_ID
- C_Doctyperet_ID
- C_Doctypequot_ID
- C_Doctyperecon_ID
- Remove C_DOCTYPE_ID in OBPOS_APP_PAYMENT_TYPE (column not used)
- Add check for mandatory columns in InitialValidations
- Buildvalidation -> in order to check if more than one document type per type and store.
- Modulescript -> initialize the new columns with the same value.
- Change the use of old columns by the new ones:
- Login -> Terminal.java
- Cashup -> OrderGroupingProcessor, CashCloseProcessor, CashCloseReport
- ExternalOrderloader
- InitialValidations
- Copy Retail Store module provides a utility that simplifies the copy of a Store based on an already existent one. This module must be modified to use the new location of document types.
- Verify changes in an instance with all external modules.
- Once this development is done, execute the modulescript that initializes the data and export retail sampledata to persist the changes.
Test Cases
It has been considered that it is not necessary to develop new test cases for this refactor. The change does not create new flows. It just modifies the origin of the use of document types, and the use of document types is covered by current tests.
Issue
https://issues.openbravo.com/view.php?id=40033
API Change
https://issues.openbravo.com/view.php?id=40083
http://wiki.openbravo.com/wiki/Retail:API_changes#PI