Openbravo Issue Tracking System - Retail Modules
View Issue Details
0032583Retail ModulesWeb POSpublic2016-04-04 14:372016-04-25 19:19
marvintm 
mario_castello 
urgentmajoralways
closedfixed 
5
 
RR16Q3 
marvintm
No
0032583: Changing a customer in the Web POS can lead to unexpected changes in the business partner properties
Due to the way the customer data is being managed by the Web POS, it is possible that editing a customer in the Web POS causes changes in business partner properties which are not show in the customer form.

Specifically, all properties which are being loaded in the customer model will be reverted to their original value if a customer is edited in the Web POS after a change has been done in the backend, if the incremental refresh has not been triggered after the change in the backend, and before the change in the Web POS.
- Log in the Web POS.
- Log in the backend in a separate browser.
- Open the customer "VBS Customer" in the Business Partner window, in the backend.
- Change the "Payment method" property, from "Cash" to "Wire transfer". Save.
- Open the same customer in the Web POS. Click on the EDIT button to see the edit form.
- Change any field (for example the name) and click on "Save".
- Refresh the backend window. Verify that the name has changed (this is correct), but that the Payment Method column has returned to its original value, Cash (this is wrong).

The main issue here is that we are setting all properties of the business partner, regardless of whether they are being shown and are editable in the form, or not.

In the backend class (CustomerLoader) we should only set the properties that were seen by the user, and are editable by him, in the form. This obviously only applies to the operation of editing an existing customer, when creating a new customer it should work as before.

Therefore, the main idea would be set in the ChangedBusinessPartner model only the properties which correspond to fields in the Customer form. If this is done, then the CustomerLoader will only set those properties, and therefore the problem will no longer happen for non-visible properties.

No tags attached.
diff 32583Posterminal.diff (4,765) 2016-04-06 09:27
https://issues.openbravo.com/file_download.php?file_id=9240&type=bug
Issue History
2016-04-04 14:37marvintmNew Issue
2016-04-04 14:37marvintmAssigned To => Retail
2016-04-04 14:37marvintmTriggers an Emergency Pack => No
2016-04-05 08:42migueldejuanaNote Added: 0085427
2016-04-06 09:27migueldejuanaFile Added: 32583Posterminal.diff
2016-04-07 16:09mario_castelloAssigned ToRetail => mario_castello
2016-04-07 16:09mario_castelloStatusnew => scheduled
2016-04-07 16:12hgbotCheckin
2016-04-07 16:12hgbotNote Added: 0085494
2016-04-07 16:12hgbotStatusscheduled => resolved
2016-04-07 16:12hgbotResolutionopen => fixed
2016-04-07 16:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2ac21f058f307ff8e4f00b5c904ea4f1b38b94e6 [^]
2016-04-07 16:54migueldejuanaNote Added: 0085498
2016-04-07 22:44hgbotCheckin
2016-04-07 22:44hgbotNote Added: 0085505
2016-04-25 19:19marvintmReview Assigned To => marvintm
2016-04-25 19:19marvintmStatusresolved => closed
2016-04-25 19:19marvintmFixed in Version => RR16Q3

Notes
(0085427)
migueldejuana   
2016-04-05 08:42   
Customer Address is ok because we already send just form attributes.
(0085494)
hgbot   
2016-04-07 16:12   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2ac21f058f307ff8e4f00b5c904ea4f1b38b94e6
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Thu Apr 07 08:12:05 2016 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2ac21f058f307ff8e4f00b5c904ea4f1b38b94e6 [^]

Fixed issue 32583: Added changes to save data of business partner

---
M web/org.openbravo.retail.posterminal/js/data/datacustomersave.js
M web/org.openbravo.retail.posterminal/js/model/businesspartner.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/components/sharedcomponents.js
---
(0085498)
migueldejuana   
2016-04-07 16:54   
- Serialize to JSON just attributes appearing in the form when editing a Customer.

- Move adjustNames to the model to be able to use it from everywhere.
(0085505)
hgbot   
2016-04-07 22:44   
Repository: tools/automation/pi-mobile
Changeset: 7e7fbbf37d369d106af8db345036f0c4808ed064
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Thu Apr 07 14:43:05 2016 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/7e7fbbf37d369d106af8db345036f0c4808ed064 [^]

Related to issue 32583: Added automated test

---
A src-test/org/openbravo/test/mobile/quarantine/pack/MCA/receipts/I32583_ReceiptModifyCustomerData.java
---