Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0041659 | Retail Modules | Gift cards and gift vouchers | public | 2019-08-16 12:10 | 2019-11-06 07:26 | |||||||
Reporter | kchoperena | |||||||||||
Assigned To | ranjith_qualiantech_com | |||||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | RR20Q1 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | marvintm | |||||||||||
OBNetwork customer | ||||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0041659: OBSecurtyException when reimburse a credit note created in a different organization | |||||||||||
Description | OBSecurtyException error when trying to reimburse a credit note in a different organization than the created one. 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) | |||||||||||
Steps To Reproduce | 1.- Log into the Web POS YS-11 2.- Create a customer 3.- In the menu, click on 'Return Receipt' 4.- Add a product 5.- Complete the order using the Credit Note payment method to generate a new credit note 6.- Log into the Web POS PS-1 7.- In the menu, click on 'Gift / Credit Notes' 8.- Reimburse previously created Credit Note EXPECTED RESULTS: In the Web POS the reimbursement process seems to be completed successfully but in the openbravo.log there is an exception. Also, in the 'Errors While Importing POS Data' window there is an error VIDEO: https://drive.google.com/file/d/1ll5EJEXaUcI_sXeSd4vKqocvl0gvvLGF/view?usp=sharing [^] | |||||||||||
Proposed Solution | The base problem is that the reimburse payment is generated in the organization where the credit note was created, which is wrong. This happens in the following line: https://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/file/tip/src/org/openbravo/retail/giftcards/hooks/ProcessCashMgmtHookGiftCard.java#l66 [^] All payments generated during the reimburse process should be linked to the organization where the reimburse is happening. Additional note: The documentNo of both generated payments should be generated from the sequence defined for the current organizaton. Right now the sequences are generated using the sequence of the original org [1][2] [1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/file/tip/src/org/openbravo/retail/giftcards/process/GiftCardGLItemUtils.java#l261 [^] [2] https://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/file/tip/src/org/openbravo/retail/giftcards/process/GiftCardGLItemUtils.java#l330 [^] | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2019-08-16 12:10 | kchoperena | New Issue | ||||||||||
2019-08-16 12:10 | kchoperena | Assigned To | => Retail | |||||||||
2019-08-16 12:10 | kchoperena | Resolution time | => 1567116000 | |||||||||
2019-08-16 12:10 | kchoperena | Triggers an Emergency Pack | => No | |||||||||
2019-08-16 12:34 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com | |||||||||
2019-08-16 12:34 | ranjith_qualiantech_com | Status | new => scheduled | |||||||||
2019-09-02 15:02 | ranjith_qualiantech_com | Note Added: 0114360 | ||||||||||
2019-09-11 17:57 | aaroncalero | Relationship added | related to 0041052 | |||||||||
2019-09-18 18:10 | marvintm | Resolution time | 1567116000 => 1569880800 | |||||||||
2019-10-09 12:38 | aaroncalero | Proposed Solution updated | ||||||||||
2019-10-09 13:13 | aaroncalero | Proposed Solution updated | ||||||||||
2019-10-24 08:03 | hgbot | Checkin | ||||||||||
2019-10-24 08:03 | hgbot | Note Added: 0115257 | ||||||||||
2019-10-24 12:23 | hgbot | Checkin | ||||||||||
2019-10-24 12:23 | hgbot | Note Added: 0115264 | ||||||||||
2019-10-24 12:23 | ranjith_qualiantech_com | Status | scheduled => resolved | |||||||||
2019-10-24 12:23 | ranjith_qualiantech_com | Resolution | open => fixed | |||||||||
2019-10-25 09:44 | marvintm | Review Assigned To | => marvintm | |||||||||
2019-10-25 09:44 | marvintm | Status | resolved => closed | |||||||||
2019-10-25 09:44 | marvintm | Fixed in Version | => RR20Q1 | |||||||||
2019-11-06 07:26 | hgbot | Checkin | ||||||||||
2019-11-06 07:26 | hgbot | Note Added: 0115419 | ||||||||||
2019-11-06 07:50 | ranjith_qualiantech_com | Note Deleted: 0115419 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|