Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0041659 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Gift cards and gift vouchers | major | always | 2019-08-16 12:10 | 2019-11-06 07:26 | |||
Reporter | kchoperena | View Status | public | |||||
Assigned To | ranjith_qualiantech_com | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR20Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | marvintm | |||||||
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 [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0114360) ranjith_qualiantech_com (developer) 2019-09-02 15:02 |
TestAnnotations waitFixOf should be removed for the Test I40960_VerifyCreditNoteReimburseInCrossStore, Once its resolved |
(0115257) hgbot (developer) 2019-10-24 08:03 |
Repository: erp/pmods/org.openbravo.retail.giftcards Changeset: 8e3cafdcf9de6854339b3c1188e36334413724da Author: Ranjith S R <ranjith <at> qualiantech.com> Date: Thu Oct 24 11:33:22 2019 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/8e3cafdcf9de6854339b3c1188e36334413724da [^] Related to issue 41659 : CreditNote payment should be created under User Organization * When Reimbursing/Cancelling Credit Note and Gift Certificate, Payment should be created with Processing organization --- M src/org/openbravo/retail/giftcards/GiftCardModel.java M src/org/openbravo/retail/giftcards/hooks/ProcessCashMgmtHookGiftCard.java M src/org/openbravo/retail/giftcards/process/GiftCardGLItemUtils.java --- |
(0115264) hgbot (developer) 2019-10-24 12:23 |
Repository: tools/automation/pi-mobile Changeset: a0707d106c70dcb0055465e1b050cd78c3f5e18b Author: Ranjith S R <ranjith <at> qualiantech.com> Date: Thu Oct 24 15:53:17 2019 +0530 URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/a0707d106c70dcb0055465e1b050cd78c3f5e18b [^] Verifies issue 41659 : Enabled I40960_VerifyCreditNoteReimburseInCrossStore Test --- M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/creditnote/I40960_VerifyCreditNoteReimburseInCrossStore.java --- |
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 |
Copyright © 2000 - 2009 MantisBT Group |