Openbravo Issue Tracking System - Retail Modules
View Issue Details
0047850Retail ModulesWeb POSpublic2021-10-14 12:562021-11-08 07:32
30Ubuntu 18.04.1 LTS
0047850: There is an hiden error processing Cashups in Errors While Importing
When there is an error processing an order, the cashup, if there are fidderences, cannot be processed and the real error is hidden by another one "Couldn't enable triggers"

When creating the differences CashCloseProcessor.createDifferenceTransaction does not set the organization. Dal infrastructure will later set the Organization from the context.
If the user is logged in as * there is an error because transactions cannot be created for organization 0, then rolling back the triggers exception is raised and the real message is hiden.
Generate some error creating an order (use a product from other organization for example)
Do the cashup
Change the order json to import it
Logged in with organization *, process the cashup

The trigger error is shown
CashCloseProcessor.createDifferenceTransaction should set the organization, getting the legal organization from the cashup.
No tags attached.
depends on backport 0048003RR21Q4.1 closed justin_patterson There is an hiden error processing Cashups in Errors While Importing 
depends on backport 0048004RR21Q3.5 closed justin_patterson There is an hiden error processing Cashups in Errors While Importing 
Issue History
2021-10-14 12:56martinsdanNew Issue
2021-10-14 12:56martinsdanAssigned To => marvintm
2021-10-14 12:56martinsdanTriggers an Emergency Pack => No
2021-10-14 12:57martinsdanAssigned Tomarvintm => Retail
2021-10-14 12:57martinsdanNote Added: 0132347
2021-10-25 08:26marvintmStatusnew => scheduled
2021-10-25 08:26marvintmAssigned ToRetail => justin_patterson
2021-10-26 12:51hgbotNote Added: 0132641
2021-10-28 07:46hgbotResolutionopen => fixed
2021-10-28 07:46hgbotStatusscheduled => closed
2021-10-28 07:46hgbotNote Added: 0132693
2021-10-28 07:46hgbotFixed in Version => RR22Q1
2021-10-28 07:46hgbotNote Added: 0132694
2021-11-08 07:31marvintmStatusclosed => new
2021-11-08 07:31marvintmResolutionfixed => open
2021-11-08 07:31marvintmFixed in VersionRR22Q1 =>
2021-11-08 07:31marvintmStatusnew => scheduled
2021-11-08 07:31marvintmStatusscheduled => resolved
2021-11-08 07:31marvintmFixed in Version => RR22Q1
2021-11-08 07:31marvintmResolutionopen => fixed
2021-11-08 07:32marvintmReview Assigned To => marvintm
2021-11-08 07:32marvintmStatusresolved => closed

2021-10-14 12:57   
There is a workaround:
Set the organization to the cashup organization in the user menu.
2021-10-26 12:51   
Merge Request created: [^]
2021-10-28 07:46   
Merge request merged: [^]
2021-10-28 07:46   
Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: 599f02eafb4d16656e26033e8752d7ef5c340892
Author: Justin Patterson <>
Date: 2021-10-28T05:46:12+00:00
URL: [^]

Fixed ISSUE-47850: set organization within CashCloseProcessor.createDifferenceTransaction() method
- instantiate cashUpOrganization variable containing cashUp.getPOSTerminal().getOrganization() object
- set organization of transaction with cashUpOrganization value

M src/org/openbravo/retail/posterminal/