Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041052Retail ModulesGift cards and gift voucherspublic2019-06-07 11:052019-09-11 17:57
barbararoncato 
Retail 
highmajoralways
closedfixed 
5
 
RR19Q4 
marvintm
No
0041052: System Problem when incrementing a Credit Note in a different store
When a customer has a Credit Note created in store A and try to increment it in store B, a system problem appears.
Preferences set as Y:
Web POS Save Removed Tickets
WebPOS Synchronized Mode
Enable Remote for Product


1. Login to store A
2. Add a customer and create a Credit Note
3. Login to webPOS in store B
4. Add the same customer
5. Select a product and click on "Return Line"
6. Select "Credit Note" as reimbursement method
7. Click on Done
-- System Problem

Video: https://drive.google.com/file/d/1_ZqUZ9LpMcI9KXIqjY2HFtN8jVXccb8K/view [^]
No tags attached.
related to defect 0040960 closed ranjith_qualiantech_com Server error when trying to reimburse a credit note created in a different organization 
related to defect 0041659 closed ranjith_qualiantech_com OBSecurtyException when reimburse a credit note created in a different organization 
Issue History
2019-06-07 11:05barbararoncatoNew Issue
2019-06-07 11:05barbararoncatoAssigned To => Retail
2019-06-07 11:05barbararoncatoResolution time => 1561154400
2019-06-07 11:05barbararoncatoTriggers an Emergency Pack => No
2019-06-07 11:47barbararoncatoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18896#r18896
2019-06-07 11:47barbararoncatoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18897#r18897
2019-06-07 11:50barbararoncatoRelationship addedrelated to 0040960
2019-06-11 15:54rqueraltaAssigned ToRetail => rqueralta
2019-06-11 15:55rqueraltaStatusnew => scheduled
2019-06-19 20:46hgbotCheckin
2019-06-19 20:46hgbotNote Added: 0112905
2019-06-19 20:46hgbotStatusscheduled => resolved
2019-06-19 20:46hgbotResolutionopen => fixed
2019-06-19 20:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/d5bd0e965f3f016da3ffc0786dfa970430387949 [^]
2019-06-19 20:48hgbotCheckin
2019-06-19 20:48hgbotNote Added: 0112906
2019-06-19 20:48hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/d5bd0e965f3f016da3ffc0786dfa970430387949 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8df055892bbe7c99442c575385c044fb79cb8cc7 [^]
2019-07-01 10:03hgbotCheckin
2019-07-01 10:03hgbotNote Added: 0113113
2019-07-01 10:11hgbotCheckin
2019-07-01 10:11hgbotNote Added: 0113114
2019-07-01 10:21marvintmStatusresolved => new
2019-07-01 10:21marvintmResolutionfixed => open
2019-07-03 18:28marvintmAssigned Torqueralta => ranjith_qualiantech_com
2019-07-03 18:28marvintmStatusnew => scheduled
2019-07-04 13:18hgbotCheckin
2019-07-04 13:18hgbotNote Added: 0113180
2019-07-04 15:49hgbotCheckin
2019-07-04 15:49hgbotNote Added: 0113182
2019-07-04 17:44ranjith_qualiantech_comStatusscheduled => resolved
2019-07-04 17:44ranjith_qualiantech_comResolutionopen => fixed
2019-07-05 13:28marvintmReview Assigned To => marvintm
2019-07-05 13:28marvintmStatusresolved => closed
2019-07-05 13:28marvintmFixed in Version => RR19Q4
2019-07-22 15:36hgbotCheckin
2019-07-22 15:36hgbotNote Added: 0113566
2019-07-22 15:54hgbotCheckin
2019-07-22 15:54hgbotNote Added: 0113568
2019-07-23 19:46hgbotCheckin
2019-07-23 19:46hgbotNote Added: 0113602
2019-07-23 19:48hgbotCheckin
2019-07-23 19:48hgbotNote Added: 0113603
2019-08-16 10:06kchoperenaAssigned Toranjith_qualiantech_com => Retail
2019-08-16 10:06kchoperenaStatusclosed => new
2019-08-16 10:06kchoperenaResolutionfixed => open
2019-08-16 10:06kchoperenaFixed in VersionRR19Q4 =>
2019-08-16 10:11kchoperenaNote Added: 0114031
2019-08-16 12:01marvintmStatusnew => scheduled
2019-08-16 12:01marvintmStatusscheduled => resolved
2019-08-16 12:01marvintmResolutionopen => fixed
2019-08-16 12:02marvintmNote Added: 0114036
2019-08-16 12:02marvintmStatusresolved => closed
2019-08-16 12:02marvintmFixed in Version => RR19Q4
2019-09-11 17:57aaroncaleroRelationship addedrelated to 0041659

Notes
(0112905)
hgbot   
2019-06-19 20:46   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: d5bd0e965f3f016da3ffc0786dfa970430387949
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Jun 19 14:29:18 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/d5bd0e965f3f016da3ffc0786dfa970430387949 [^]

Fixed issue 41052: System Problem when incrementing a Credit Note in a different
store

- Allowed Cross Organization Reference for Credit Note flow

---
M src/org/openbravo/retail/giftcards/GiftCardModel.java
---
(0112906)
hgbot   
2019-06-19 20:48   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 8df055892bbe7c99442c575385c044fb79cb8cc7
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Jun 19 14:29:25 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8df055892bbe7c99442c575385c044fb79cb8cc7 [^]

Fixed issue 41052: System Problem when incrementing a Credit Note in a different
store

- Allowed Cross Organization Reference for Credit Note flow

---
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0113113)
hgbot   
2019-07-01 10:03   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: c02726ae23fb073b9944fe7672b52e907c5be975
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Jul 01 10:03:00 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/c02726ae23fb073b9944fe7672b52e907c5be975 [^]

Related to issue 41052. Backed out the change as it is not correct.

---
M src/org/openbravo/retail/giftcards/GiftCardModel.java
---
(0113114)
hgbot   
2019-07-01 10:11   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 9025f87bfea9ee812b4dd15bfdeae0c6262c8f02
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Jul 01 10:03:25 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9025f87bfea9ee812b4dd15bfdeae0c6262c8f02 [^]

Related to issue 41052. Backed out the change as it is not correct.

---
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0113180)
hgbot   
2019-07-04 13:18   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: cc7359561e942f4a07d3e51a0dd136c6df820e84
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jul 04 16:48:35 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/cc7359561e942f4a07d3e51a0dd136c6df820e84 [^]

Related to issue 41052 : Reimburse payment should be created under Legal Entity of Store Organization instead of Store Organization

---
M src/org/openbravo/retail/giftcards/CloseGiftCard.java
M src/org/openbravo/retail/giftcards/GiftCardModel.java
M src/org/openbravo/retail/giftcards/process/CancelGiftCardProcessHandler.java
M src/org/openbravo/retail/giftcards/process/GiftCardGLItemUtils.java
---
(0113182)
hgbot   
2019-07-04 15:49   
Repository: tools/automation/pi-mobile
Changeset: b866289b7b3b61e7bd9cefb3a9e6191878e064c0
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jul 04 19:19:34 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/b866289b7b3b61e7bd9cefb3a9e6191878e064c0 [^]

Verifies issue 41052 : Added Automated Test 'I41052_VerifyCreditNoteCreationInCrossStore'

---
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/creditnote/I41052_VerifyCreditNoteCreationInCrossStore.java
---
(0113566)
hgbot   
2019-07-22 15:36   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: 885c5984f56d736916c789409b4d95594c31d45b
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jul 22 15:08:39 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/885c5984f56d736916c789409b4d95594c31d45b [^]

Related to issue 41052: Reimburse payment will be created in the org of terminal which cancel it

When a credit note is cancelled, the payment which cancel it will be associated to the organization of the current cashup and the financial account to be used must is selected filtering payment methods of the terminal which is closing the credit note. Selected payment method must match with the payment method used by the financial account which created the credit note which is being cancelled

---
M src/org/openbravo/retail/giftcards/process/GiftCardGLItemUtils.java
---
(0113568)
hgbot   
2019-07-22 15:54   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: fbef8b987b1305e012f346ffbb5225c839ee92a9
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jul 22 15:54:17 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/fbef8b987b1305e012f346ffbb5225c839ee92a9 [^]

Related to issue 41052: Fix format

---
M src/org/openbravo/retail/giftcards/process/GiftCardGLItemUtils.java
---
(0113602)
hgbot   
2019-07-23 19:46   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: 755d156a0cf198e294b74d042ab8aec1854d1482
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Tue Jul 23 19:45:57 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/755d156a0cf198e294b74d042ab8aec1854d1482 [^]

Related to issue 41052: Changed the way to pick FA and PM for reimburse

We start picking the PosTerminal payment method using the credit note key. Frome there
payment method and financial account are picked.

To pick the payment method is needed to navigate to TerminalType PaymentMethod and then to the FinPaymentMethod

---
M src/org/openbravo/retail/giftcards/process/GiftCardGLItemUtils.java
---
(0113603)
hgbot   
2019-07-23 19:48   
Repository: tools/automation/pi-mobile
Changeset: 0ee4286416b3560763b093a00f3759e838c5a366
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jul 22 15:20:32 2019 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/0ee4286416b3560763b093a00f3759e838c5a366 [^]

Related to issue 41052: Make test more stable

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/creditnote/I41052_VerifyCreditNoteCreationInCrossStore.java
---
(0114031)
kchoperena   
2019-08-16 10:11   
Reproduced in livebuilds. The error only appears in the openbravo.log. Also, after execute the test, there is an Error While Importing POS Data.
VIDEO: https://drive.google.com/file/d/1ll5EJEXaUcI_sXeSd4vKqocvl0gvvLGF/view [^]
Error:
org.openbravo.base.exception.OBSecurityException: Entity SPRR1000036 - 16-08-2019 - TEST REIMBURSE99 - 5.0 (FIN_Payment) with organization Yosemite Store references an entity Demo User - 16-08-2019 10:03:03 - PS POS Terminal through its property FIN_Payment.obposAppCashup but this referenced entity belongs to an organization Posets Store which is not part of the natural tree of Yosemite Store
    at org.openbravo.dal.core.OBInterceptor.checkReferencedOrganizations(OBInterceptor.java:316)
    at org.openbravo.dal.core.OBInterceptor.onFlushDirty(OBInterceptor.java:189)
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:355)
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:332)
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:283)
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:154)
    at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:235)
    at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:94)
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)
    at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1484)
    at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1470)
    at org.openbravo.dal.service.OBDal.flush(OBDal.java:265)
    at org.openbravo.retail.giftcards.process.GiftCardGLItemUtils.makePayment(GiftCardGLItemUtils.java:300)
    at org.openbravo.retail.giftcards.hooks.ProcessCashMgmtHookGiftCard.exec(ProcessCashMgmtHookGiftCard.java:66)
    at org.openbravo.retail.giftcards.hooks.ProcessCashMgmtHookGiftCard$Proxy$_$$_WeldClientProxy.exec(Unknown Source)
    at org.openbravo.retail.posterminal.ProcessCashMgmt.executeHooks(ProcessCashMgmt.java:303)
    at org.openbravo.retail.posterminal.ProcessCashMgmt.saveRecord(ProcessCashMgmt.java:283)
(0114036)
marvintm   
2019-08-16 12:02   
After review, the problem happens in the reimburse flow, not in the main flow which updates the credit note as in this issue. This is a different problem, and a separate issue will be reported for it.