Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035588Openbravo ERP01. General setuppublic2017-03-21 17:562019-01-14 17:07
aaroncalero 
markmm82 
normalminoralways
scheduledopen 
5
 
 
Core
No
0035588: The hqlfilterclause of the User window doesn't match the sql filterclause
The User window by default filters users which are not "real users" of the application, that is, it filters the users which are related with a business partner which is neither a sales representative nor an employee.

Verify the AD_TAB definition for the User window: https://code.openbravo.com/erp/devel/pi/file/5df11a528146/src-db/database/sourcedata/AD_TAB.xml#l521, [^] especifically the filterclause and the hqlfilterclause:
>> <!--118--> <FILTERCLAUSE><![CDATA[(EXISTS (SELECT * FROM C_BPartner bp WHERE AD_User.C_BPartner_ID=bp.C_BPartner_ID AND (bp.IsEmployee='Y' OR bp.IsSalesRep='Y')) OR AD_User.C_BPartner_ID IS NULL)]]></FILTERCLAUSE>

>> <!--118--> <HQLFILTERCLAUSE><![CDATA[e.businessPartner.id in (select id from BusinessPartner bp where bp.employee='Y' or bp.salesRepresentative='Y') or e.businessPartner is null]]></HQLFILTERCLAUSE>

The hqlfilterclause is referencing the salesRepresentative column of the businesspartner, which maps to the sql SalesRep_ID column, instead of the isSalesRepresentative which is the correct IsSalesRep column.
Replace the bp.salesRepresentative='Y' clause of the hqlfilterclause with:
bp.isSalesRepresentative='Y'
No tags attached.
Issue History
2017-03-21 17:56aaroncaleroNew Issue
2017-03-21 17:56aaroncaleroAssigned To => Triage Finance
2017-03-21 17:56aaroncaleroModules => Core
2017-03-21 17:56aaroncaleroTriggers an Emergency Pack => No
2018-01-11 11:06ngarciaIssue Monitored: networkb
2018-01-11 11:06ngarciaIssue Monitored: ngarcia
2019-01-08 14:44SandrahuguetAssigned ToTriage Finance => markmm82
2019-01-14 17:07markmm82Statusnew => scheduled

There are no notes attached to this issue.