Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0049500Openbravo ERPA. Platformpublic2022-06-07 17:422022-07-12 09:03
0049500: Preference visibility in other clients
In an instance with several clients, the preferences defined in one client can affected other clients.
Use any instance with several clients, like [^]
Login in backoffice and go to WhiteValley client
Create the following preference:
 Client: The White Valley Group
 Org: *
 Property List: Y
 Property: Allow Goods Transaction outside AWO for Inventories
 Value: Y
 Leave empty all the fields in Visibility field group

Information: with this preference we are allowing to manually process physical inventories outside AWO.

Now change the role to AWO-QA Admin (in AWO client, which is different from White Valley)
Go to Physical Inventory and create a new record:
 Org: US West Coast
 Warehouse: US West Coast
Enter a new line:
 Product: ISSalesAWOTest0001
 Bin: ISSalesAWOTest0001
 Quantity Count: 99
Process Inventory Count. Verify the record is processed successfully, however an exception should be thrown instead!

Go back to WhiteValley client and remove the previous preference.

Go back to AWO-QA client and create the same Physical Inventory, but setting Quantity Count: 100.
Process Inventory Count. Verify an exception is thrown. This is the expected behavior. So the preference in the WhiteValley client is impacting the AWO-QA client.
The problem is with the Visible At Client field. When you leave it empty in the preference definition, the AD_GET_PREFERENCE_VALUE is bypassing this field:

and (visibleat_client_id = v_ad_client_id
                or coalesce(visibleat_client_id, '0') = '0')

I honestly think this Visible At Client field has no sense and it should be removed. Instead we should do the following logic:
* You are able to see the preferences defined at your client AND the ones defined at System level.
No tags attached.
related to design defect 0049768 closed Triage Platform Base POS2 Get rid of "visibleat_client_id" field in ad_preference table, to make use of the client instead. Same with "visibleat_org_id" 
Issue History
2022-06-07 17:42vmromanosNew Issue
2022-06-07 17:42vmromanosAssigned To => Triage Platform Base
2022-06-07 17:42vmromanosModules => Core
2022-06-07 17:42vmromanosTriggers an Emergency Pack => No
2022-06-07 19:09hgbotNote Added: 0138126
2022-06-07 19:09hgbotNote Added: 0138127
2022-06-23 22:24AugustoMauchAssigned ToTriage Platform Base => ablasco
2022-06-23 22:24AugustoMauchStatusnew => scheduled
2022-06-27 12:19hgbotNote Added: 0138781
2022-07-08 15:11cbernerRelationship addedrelated to 0049768
2022-07-12 09:03hgbotResolutionopen => fixed
2022-07-12 09:03hgbotStatusscheduled => closed
2022-07-12 09:03hgbotFixed in Version => PR22Q4
2022-07-12 09:03hgbotNote Added: 0139260
2022-07-12 09:03hgbotNote Added: 0139261

2022-06-07 19:09   
Repository: [^]
Changeset: dea4408d031cf92ad4698eef69a63e8b5419d8ec
Author: Víctor Martínez Romanos <>
Date: 07-06-2022 18:58:59
URL: [^]

Related to ISSUE-49500: Force to set the visible at client to workaround issue

M src/org/openbravo/warehouse/advancedwarehouseoperations/api/hooks/
2022-06-07 19:09   
Repository: [^]
Changeset: 99dda422c1c5a94be5444e095456eb2ac84d4c90
Author: Víctor Martínez Romanos <>
Date: 07-06-2022 19:09:41
URL: [^]

Related to ISSUE-49500: enable tests again as there is a workaround in

org.openbravo.warehouse.advancedwarehouseoperations.api that sets the
visible at client property when creating the preference

M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/
2022-06-27 12:19   
Merge Request created: [^]
2022-07-12 09:03   
Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: 6ddeb15c5cc57bb33d3ff3f55df9a7468b22a97e
Author: Adrián Blasco <>
Date: 12-07-2022 07:03:11
URL: [^]

Fixes ISSUE-49500: Update preference visibility based on ad_user_id on several preference xml files

- This also updates to include use preference visibility at client level

M src-db/database/model/functions/AD_GET_PREFERENCE_VALUE.xml
M src-db/database/model/functions/C_BP_SOCREDITUSED_REFRESH.xml
M src-db/database/model/functions/C_GET_PRODUCT_TAXCATEGORY.xml
M src-db/database/model/functions/C_INVOICE_POST.xml
M src-db/database/model/functions/C_ORDER_POST1.xml
M src-db/database/model/functions/C_TAXPAYMENT_POST.xml
M src-db/database/model/functions/M_INOUT_CREATE.xml
M src-db/database/model/functions/M_PRICELIST_CREATE.xml
M src-db/database/model/triggers/M_RESERVATION_TRG.xml
M src/org/openbravo/erpCommon/businessUtility/
2022-07-12 09:03   
Merge request merged: [^]