Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0049494
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementmajoralways2022-06-07 10:062022-08-10 01:13
Reporterkousalya_rView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityhighResolutionfixedFixed in VersionPR22Q4
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0049494: Warehouse dropdown showing all warehouse in PO window

DescriptionPlease see the attached video. In Purchase order's warehouse dropdown, all warehouses are available and user can select any warehouse even if it is not even linked to that user's assigned organization.

To reproduce this issue we have created a role at organization level and user with that role has access to only one generic organization. But in Purchase order window all warehouses are available for selection.
Steps To Reproducevideo has been attached to reproduce the issue
TagsNo tags attached.
Attached Files? file icon 2022-06-03-12-26-14_WtrRZC8l.mp4 [^] (1,548,342 bytes) 2022-06-07 10:06
png file icon Screenshot from 2022-07-05 22-56-00.png [^] (256,298 bytes) 2022-07-05 22:56

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0049954PR22Q3 closedAtulOpenbravo Warehouse dropdown showing all warehouse in PO window 
depends on backport 0049955PR22Q2.2 closedAtulOpenbravo Warehouse dropdown showing all warehouse in PO window 
depends on backport 0049956PR22Q1.4 closedAtulOpenbravo Warehouse dropdown showing all warehouse in PO window 
depends on backport 00529373.0PR20Q1.1 closedAtulOpenbravo Warehouse dropdown showing all warehouse in PO window 
caused by defect 00284173.0PR15Q1 closedumartirena The warehouse selector in the Return Material Receipt window should not filter by warehouses on hand 

-  Notes
(0139075)
mtaal (manager)
2022-07-05 11:41

Note, analysis the warehouses are filtered like this in the obui selector for the warehouse column:
It seems explicitly show all the warehouses if it is not a sales transaction.

"( (" + OB.isSalesTransaction() + " = true and w.id in (select ow.warehouse.id from OrganizationWarehouse ow where ow.warehouse.id = w.id and ow.organization.id = \'" + OB.getParameters().get('inpadOrgId') + "\' )) or ((" + OB.isSalesTransaction() + " = false or \'"+OB.getWindowId()+"\' in (\'123271B9AD60469BAE8A924841456B63\'))))"
(0139111)
mtaal (manager)
2022-07-05 22:58

See attached screenshot. The m_warehouse_id column of c_order has the field 'Allow Cross Organization Reference' checked. This causes the selector logic to not include an organization filter.

Unchecking this field adds the organization filter in the selector logic on the server.
(0139112)
mtaal (manager)
2022-07-05 23:06

See the location in the source where it is used:
https://gitlab.com/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java#L239 [^]
(0139113)
mtaal (manager)
2022-07-05 23:30

The cross org field was introduced 6 yrs ago. Initially the value was N, in a later changeset [1] for cross-org support it was set to Y.

[1]
2019-02-19 Álvaro Ferraz [CrossStore] Enable crossOrgReference in multiple columns:

https://code.openbravo.com/erp/devel/pi/diff/db0df3a406a9/src-db/database/sourcedata/AD_COLUMN.xml#l1.26 [^]
(0139895)
vmromanos (manager)
2022-08-04 12:31

Let's adapt the selector to filter by organizations as if the allow cross org were unset.

Please note the Goods Receipt window is also affected by this bug, so the fix and test plan should cover it too.
(0139898)
mtaal (manager)
2022-08-04 12:40

backport should be done to three releases: 22Q1, 22Q2 and 22Q3
(0140002)
hgbot (developer)
2022-08-09 12:04

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/673 [^]
(0140012)
AtulOpenbravo (developer)
2022-08-09 19:25

Test Plan

- Login with Role F&B US Inc Procurement Role. This role has access to F&B US Inc, East Coast and West Coast Organzination.
- Create Purchase Order with F&B US Inc Organization.
- Check in Warehouse you have two options available i.e East Coast Warehouse and West Coast Warehouse.
- Set Organization as F&B US East Coast Org, check that only organization available is East Coast Warehouse
- Set Organziation as F&B US West Coast Org, check that only organization available is West Coast Warehouse
- Create a new Warehouse in F&B Internation Group Organization i.e for eg Group Warehouse.
- Create Purchase Order with F&B US Inc Organization.
- Check in Warehouse you have three options available i.e Group Warehouse, East Coast Warehouse and West Coast Warehoue.
- Set Organization as F&B US East Coast Org, check that only organization available are Group Warehouse and East Coast Warehouse
- Set Organziation as F&B US West Coast Org, check that only organization available are Group Warehouse and West Coast Warehouse

- Same also applies for Goods Receipt, Return To Vendor, Return To Vendor Shipment, Return Material Receipt window
- For Return From Customer and Sales Order, warehouse defined in natural tree org of transaction are available only if they
are defined in On Hand Warehouse tab.
(0140022)
hgbot (developer)
2022-08-10 01:13

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/673 [^]
(0140023)
hgbot (developer)
2022-08-10 01:13

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 30dc426b0db43f0171f0f2961b8c39b2b242d62b
Author: Atul Gaware <atul.gaware@openbravo.com>
Date: 09-08-2022 23:12:55
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/30dc426b0db43f0171f0f2961b8c39b2b242d62b [^]

Fixes BUG-0049494: Warehouse dropdown showing all warehouse
in PO window

**Added check whether warehouse organization is in the
transaction org natural tree or not only in the case of
non sales transaction

---
M src-db/database/sourcedata/OBUISEL_SELECTOR.xml
---

- Issue History
Date Modified Username Field Change
2022-06-07 10:06 kousalya_r New Issue
2022-06-07 10:06 kousalya_r Assigned To => Triage Omni OMS
2022-06-07 10:06 kousalya_r File Added: 2022-06-03-12-26-14_WtrRZC8l.mp4
2022-06-07 10:06 kousalya_r Modules => Core
2022-06-07 10:06 kousalya_r Triggers an Emergency Pack => No
2022-06-07 10:59 aferraz Assigned To Triage Omni OMS => Triage Omni WMS
2022-07-04 10:32 mtaal Assigned To Triage Omni WMS => mtaal
2022-07-05 11:40 mtaal Relationship added caused by 0028417
2022-07-05 11:41 mtaal Note Added: 0139075
2022-07-05 22:56 mtaal File Added: Screenshot from 2022-07-05 22-56-00.png
2022-07-05 22:58 mtaal Note Added: 0139111
2022-07-05 23:06 mtaal Note Added: 0139112
2022-07-05 23:30 mtaal Note Added: 0139113
2022-08-04 12:31 vmromanos Note Added: 0139895
2022-08-04 12:37 mtaal Note Added: 0139897
2022-08-04 12:37 mtaal Assigned To mtaal => AtulOpenbravo
2022-08-04 12:40 mtaal Note Added: 0139898
2022-08-04 12:43 mtaal Status new => scheduled
2022-08-08 10:39 mtaal Note Deleted: 0139897
2022-08-09 12:04 hgbot Note Added: 0140002
2022-08-09 19:25 AtulOpenbravo Note Added: 0140012
2022-08-10 01:13 hgbot Resolution open => fixed
2022-08-10 01:13 hgbot Status scheduled => closed
2022-08-10 01:13 hgbot Note Added: 0140022
2022-08-10 01:13 hgbot Fixed in Version => PR22Q4
2022-08-10 01:13 hgbot Note Added: 0140023
2023-07-08 00:31 axelmercado Relationship added depends on 0052937


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker