Openbravo Issue Tracking System - Modules
View Issue Details
0038806ModulesAdvance Warehouse Operationspublic2018-06-21 13:062018-09-17 08:32
gorkaion 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
 
dmiguelez
0038806: ADSequence not accessible error when creating Picking Tasks for DO Issue
When using a role with user level Organization it is not possible to generate the Picking Tasks of a DO Issue if the ADSequence to be used is created in the * organization.


This is the stacktrace from the logs:

2018-06-19 14:49:08,380 [ajp-bio-127.0.0.1-8009-exec-1] ERROR org.openbravo.warehouse.advancedwarehouseoperations.handler.OBAWO_BaseProcessActionHandler - Error in a OBAWO_BaseProcessActionHandler process
org.openbravo.base.exception.OBSecurityException: Organization 0 of object (ADSequence(FEECADC07DC647EE9DCD83925B838F07) (name: Issue List Sequence)) is not present in OrganizationList [4E17B96D63184BC3A4208DA4A9FD85CA, 2577FC4107D04AC18B5C8C29F464D179]
        at org.openbravo.dal.security.SecurityChecker.checkWriteAccess(SecurityChecker.java:166)
        at org.openbravo.dal.security.SecurityChecker.checkWriteAccess(SecurityChecker.java:105)
        at org.openbravo.dal.core.OBInterceptor.doEvent(OBInterceptor.java:350)
        at org.openbravo.dal.core.OBInterceptor.onFlushDirty(OBInterceptor.java:186)
        at org.hibernate.event.def.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:372)
        at org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:349)
        at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:287)
        at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:155)
        at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
        at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
        at org.openbravo.dal.service.OBDal.flush(OBDal.java:260)
        at org.openbravo.warehouse.advancedwarehouseoperations.centralbroker.InventoryTransactionTypeAlgorithm.updatesTasksProperty(InventoryTransactionTypeAlgorithm.java:322)
        at org.openbravo.warehouse.advancedwarehouseoperations.ittalgorithm.ReceiptOrIssue_ITT.createReceptionOrIssueList(ReceiptOrIssue_ITT.java:60)
        at org.openbravo.warehouse.advancedwarehouseoperations.ittalgorithm.ReceiptOrIssue_ITT.postCreateTasksHook(ReceiptOrIssue_ITT.java:47)
        at org.openbravo.warehouse.advancedwarehouseoperations.centralbroker.PostCreateTasksHookRunner.callPostCreatesTaskHook(PostCreateTasksHookRunner.java:43)
        at org.openbravo.warehouse.advancedwarehouseoperations.centralbroker.PostCreateTasksHookRunner.postProcessHookInternal(PostCreateTasksHookRunner.java:32)
        at org.openbravo.warehouse.advancedwarehouseoperations.centralbroker.PostCreateTasksHookRunner.run(PostCreateTasksHookRunner.java:27)
        at org.openbravo.warehouse.advancedwarehouseoperations.centralbroker.InventoryTransactionTypeAlgorithm.executeAlgorithm(InventoryTransactionTypeAlgorithm.java:227)
        at org.openbravo.warehouse.advancedwarehouseoperations.centralbroker.BatchOfTasksGenerator.createBatchOfTasksUsingItt(BatchOfTasksGenerator.java:193)
        at org.openbravo.warehouse.advancedwarehouseoperations.centralbroker.BatchOfTasksGenerator.createBatchOfTasksIfIttAlgorithmInstanceFound(BatchOfTasksGenerator.java:148)
        at org.openbravo.warehouse.advancedwarehouseoperations.centralbroker.BatchOfTasksGenerator.run(BatchOfTasksGenerator.java:114)
        at org.openbravo.warehouse.advancedwarehouseoperations.centralbroker.CentralBroker.doTheStuff(CentralBroker.java:156)
        at org.openbravo.warehouse.advancedwarehouseoperations.centralbroker.CentralBroker.doTheStuff(CentralBroker.java:106)
        at org.openbravo.warehouse.advancedwarehouseoperations.distributionorders.handler.GenerateReceptionOrIssueListFromDistributionOrderHandler.exec(GenerateReceptionOrIssueListFromDistributionOrderHandler.java:37)
        at org.openbravo.warehouse.advancedwarehouseoperations.handler.OBAWO_BaseProcessActionHandler.doExecute(OBAWO_BaseProcessActionHandler.java:43)
        at org.openbravo.client.application.process.BaseProcessActionHandler.execute(BaseProcessActionHandler.java:149)
        at org.openbravo.client.kernel.BaseActionHandler.execute(BaseActionHandler.java:73)
        at org.openbravo.client.kernel.KernelServlet.processActionRequest(KernelServlet.java:314)
        at org.openbravo.client.kernel.KernelServlet.doGet(KernelServlet.java:206)
Create a DO Issue and try to create the Picking Tasks using a role with user level Organization.
No tags attached.
related to defect 0038778 closed dmiguelez n.p.e when creating Picking Tasks for DO Issue with more than 100 lines 
Issue History
2018-06-21 13:06gorkaionNew Issue
2018-06-21 13:06gorkaionAssigned To => dmiguelez
2018-06-21 13:06gorkaionIssue generated from0038778
2018-06-21 13:06gorkaionRelationship addedrelated to 0038778
2018-07-04 08:39SandrahuguetAssigned Todmiguelez => AtulOpenbravo
2018-07-05 21:57AtulOpenbravoStatusnew => scheduled
2018-07-09 16:01SandrahuguetNote Added: 0105680
2018-07-09 16:01SandrahuguetAssigned ToAtulOpenbravo => gorkaion
2018-07-09 16:01SandrahuguetStatusscheduled => feedback
2018-07-12 08:39SandrahuguetAssigned Togorkaion => AtulOpenbravo
2018-07-16 11:22dmiguelezNote Added: 0105746
2018-07-16 11:24aferrazStatusfeedback => new
2018-07-19 10:21AtulOpenbravoStatusnew => scheduled
2018-07-24 12:06hgbotCheckin
2018-07-24 12:06hgbotNote Added: 0105904
2018-07-24 12:06hgbotStatusscheduled => resolved
2018-07-24 12:06hgbotResolutionopen => fixed
2018-07-24 12:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/a99e808fcec1f38d942cb0cf5cc12f5cbab81a46 [^]
2018-07-24 12:08dmiguelezNote Added: 0105905
2018-07-24 12:08dmiguelezReview Assigned To => dmiguelez
2018-07-24 12:08dmiguelezNote Added: 0105906
2018-07-24 12:08dmiguelezStatusresolved => closed
2018-07-24 12:24hgbotCheckin
2018-07-24 12:24hgbotNote Added: 0105907
2018-07-24 12:24hgbotCheckin
2018-07-24 12:24hgbotNote Added: 0105908
2018-08-30 10:19hgbotCheckin
2018-08-30 10:19hgbotNote Added: 0106531
2018-08-30 10:19hgbotStatusclosed => resolved
2018-08-30 10:19hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/a99e808fcec1f38d942cb0cf5cc12f5cbab81a46 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/cb617b609f113b8189b91a8e92cc6db90d33fe97 [^]
2018-08-31 14:59SandrahuguetStatusresolved => closed
2018-09-14 14:56hgbotCheckin
2018-09-14 14:56hgbotNote Added: 0106779
2018-09-14 14:56hgbotStatusclosed => resolved
2018-09-14 14:56hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/cb617b609f113b8189b91a8e92cc6db90d33fe97 [^] => http://code.openbravo.com/retail/backports/AWO/3.0RR18Q3/org.openbravo.warehouse.advancedwarehouseoperations/rev/cb617b609f113b8189b91a8e92cc6db90d33fe97 [^]
2018-09-17 08:32dmiguelezNote Added: 0106793
2018-09-17 08:32dmiguelezStatusresolved => closed

Notes
(0105680)
Sandrahuguet   
2018-07-09 16:01   
Detailed steps to reproduce required
(0105746)
dmiguelez   
2018-07-16 11:22   
Steps to reproduce:

With AWO and AWO SampleData installed

Log in as AWO QA Admin

Go to Role Window and select the record with name: FE_West_Users
Change the User Level from Client+Organization to Organization

Go to Distribution Order Issue Window and create a new record with:
  - Organization: US West Coast
  - Warehouse Issue: US West Coast
  - Warehouse Receipt: US East Coast
Move to lines and create a new record with:
  - Product: Ale Beer
  - Operative Quantity: 10
Book the Document

In the Front End log in as AWO_US_W/openbravo
Click on Pick and set the DocumentNo from the previously created DO Issue.
There is an error and the tasks are not created.

To reproduce the same problem in the BackEnd:
Go to Role Window and select the record with name: FE_West_Users
Move the Window Access and create a new record with:
  - Window: Distribution Order Issue
  - Editable Field: Yes

Log in as AWO_US_W/openbravo
Go to Distribution Order Issue Window and select the previously created record.
Click on Pick button.
(0105904)
hgbot   
2018-07-24 12:06   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: a99e808fcec1f38d942cb0cf5cc12f5cbab81a46
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Jul 24 12:06:23 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/a99e808fcec1f38d942cb0cf5cc12f5cbab81a46 [^]

Fixes Issue 38806. Added setAdminMode(false) when creating the different Lists
(Pick, Inventory, Issue and Reception)

Since the list can be created for an organization that the user has not
explicit access, it is needed to use the setAdminMode without enforcing
the Organization access check.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/Count_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/Picking_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/ReceiptOrIssue_ITT.java
---
(0105905)
dmiguelez   
2018-07-24 12:08   
Test Plan:

With AWO and AWO SampleData installed

Log in as AWO QA Admin

Go to Role Window and select the record with name: FE_West_Users
Change the User Level from Client+Organization to Organization

Go to Distribution Order Issue Window and create a new record with:
  - Organization: US West Coast
  - Warehouse Issue: US West Coast
  - Warehouse Receipt: US East Coast
Move to lines and create a new record with:
  - Product: Ale Beer
  - Operative Quantity: 10
Book the Document

In the Front End log in as AWO_US_W/openbravo
Click on Pick and set the DocumentNo from the previously created DO Issue.
The Tasks are created.

To reproduce the same problem in the BackEnd:
Go to Role Window and select the record with name: FE_West_Users
Move the Window Access and create a new record with:
  - Window: Distribution Order Issue
  - Editable Field: Yes

Log in as AWO_US_W/openbravo
Go to Distribution Order Issue Window and select the previously created record.
Click on Pick button.
Tasks are created if they were not previously
(0105906)
dmiguelez   
2018-07-24 12:08   
Code Review + Testing Ok
(0105907)
hgbot   
2018-07-24 12:24   
Repository: retail/backports/AWO/3.0RR18Q1/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: d959802ff1a33ee5efad28e373b7706463a3954c
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Jul 24 12:06:23 2018 +0200
URL: http://code.openbravo.com/retail/backports/AWO/3.0RR18Q1/org.openbravo.warehouse.advancedwarehouseoperations/rev/d959802ff1a33ee5efad28e373b7706463a3954c [^]

Related to Issue 38806. Added setAdminMode(false) when creating the different Lists
(Pick, Inventory, Issue and Reception)

Since the list can be created for an organization that the user has not
explicit access, it is needed to use the setAdminMode without enforcing
the Organization access check.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/Count_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/Picking_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/ReceiptOrIssue_ITT.java
---
(0105908)
hgbot   
2018-07-24 12:24   
Repository: retail/backports/AWO/3.0RR17Q4/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 991c8b69b89594f93c2606cc48fc02baa1972269
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Jul 24 12:06:23 2018 +0200
URL: http://code.openbravo.com/retail/backports/AWO/3.0RR17Q4/org.openbravo.warehouse.advancedwarehouseoperations/rev/991c8b69b89594f93c2606cc48fc02baa1972269 [^]

Related to Issue 38806. Added setAdminMode(false) when creating the different Lists
(Pick, Inventory, Issue and Reception)

Since the list can be created for an organization that the user has not
explicit access, it is needed to use the setAdminMode without enforcing
the Organization access check.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/Count_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/Picking_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/ReceiptOrIssue_ITT.java
---
(0106531)
hgbot   
2018-08-30 10:19   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: cb617b609f113b8189b91a8e92cc6db90d33fe97
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Jul 24 12:06:23 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/cb617b609f113b8189b91a8e92cc6db90d33fe97 [^]

Fixes Issue 38806. Added setAdminMode(false) when creating the different Lists
(Pick, Inventory, Issue and Reception)

Since the list can be created for an organization that the user has not
explicit access, it is needed to use the setAdminMode without enforcing
the Organization access check.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/Count_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/Picking_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/ReceiptOrIssue_ITT.java
---
(0106779)
hgbot   
2018-09-14 14:56   
Repository: retail/backports/AWO/3.0RR18Q3/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: cb617b609f113b8189b91a8e92cc6db90d33fe97
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Jul 24 12:06:23 2018 +0200
URL: http://code.openbravo.com/retail/backports/AWO/3.0RR18Q3/org.openbravo.warehouse.advancedwarehouseoperations/rev/cb617b609f113b8189b91a8e92cc6db90d33fe97 [^]

Fixes Issue 38806. Added setAdminMode(false) when creating the different Lists
(Pick, Inventory, Issue and Reception)

Since the list can be created for an organization that the user has not
explicit access, it is needed to use the setAdminMode without enforcing
the Organization access check.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/Count_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/Picking_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/ReceiptOrIssue_ITT.java
---
(0106793)
dmiguelez   
2018-09-17 08:32   
Code Review + Testing Ok