Openbravo Issue Tracking System - Modules
View Issue Details
0039622ModulesAdvanced Warehouse Operationspublic2018-11-13 18:212018-11-26 15:07
vmromanos 
nonofrancisco 
normalmajorN/A
closedfixed 
5
 
 
vmromanos
0039622: Automatic Invoice from Goods Shipment
Allow to automatically generate a sales invoice when confirming an issue task based on the related sales order invoice terms.

This behavior will be controlled by a preference.
NA
No tags attached.
depends on feature request 0039617 closed nonofrancisco Openbravo ERP Automatic Invoice from Goods Shipment 
Issue History
2018-11-13 18:21vmromanosNew Issue
2018-11-13 18:21vmromanosAssigned To => nonofrancisco
2018-11-13 18:21vmromanosModules => Core
2018-11-13 18:21vmromanosTriggers an Emergency Pack => No
2018-11-13 18:21vmromanosIssue generated from0039617
2018-11-13 18:21vmromanosRelationship addeddepends on 0039617
2018-11-13 18:21vmromanosProjectOpenbravo ERP => Modules
2018-11-13 18:22vmromanosStatusnew => acknowledged
2018-11-13 18:22vmromanosCategory07. Sales management => Advance Warehouse Operations
2018-11-13 18:22vmromanosStatusacknowledged => scheduled
2018-11-14 19:37hgbotCheckin
2018-11-14 19:38hgbotNote Added: 0107913
2018-11-14 19:38hgbotStatusscheduled => resolved
2018-11-14 19:38hgbotResolutionopen => fixed
2018-11-14 19:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/5580dd69af5a4537a69a28ccfeff576f6f63e37c [^]
2018-11-14 19:38hgbotCheckin
2018-11-14 19:38hgbotNote Added: 0107914
2018-11-14 19:38hgbotCheckin
2018-11-14 19:39hgbotNote Added: 0107915
2018-11-14 19:39hgbotCheckin
2018-11-14 19:39hgbotCheckin
2018-11-14 19:39hgbotNote Added: 0107916
2018-11-14 19:39hgbotNote Added: 0107917
2018-11-14 19:39hgbotCheckin
2018-11-14 19:39hgbotNote Added: 0107918
2018-11-14 19:48vmromanosReview Assigned To => vmromanos
2018-11-14 19:48vmromanosNote Added: 0107919
2018-11-14 19:48vmromanosStatusresolved => closed
2018-11-15 10:19hgbotCheckin
2018-11-15 10:19hgbotNote Added: 0107927
2018-11-15 10:22hgbotCheckin
2018-11-15 10:22hgbotNote Added: 0107930
2018-11-26 15:07hgbotCheckin
2018-11-26 15:07hgbotNote Added: 0108106
2022-09-06 17:18caristuCategoryAdvance Warehouse Operations => Advanced Warehouse Operations

Notes
(0107913)
hgbot   
2018-11-14 19:37   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 5580dd69af5a4537a69a28ccfeff576f6f63e37c
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Mon Oct 08 15:49:47 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/5580dd69af5a4537a69a28ccfeff576f6f63e37c [^]

Fixed issue 39622: Allows Automatic Invoice from Goods Shipment

- A new preference "OBAWO_AutomaticInvoiceFromGoodsShipment" was created.
- When processing a Goods Shipment on task confirmation, if preference is
  set, the API in Core is invoked to automatically generate invoice.
- Automated test were added.

---
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/ShipmentInOutGenerator.java
A src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOv_AutomaticInvoiceFromShipmentTest.java
---
(0107914)
hgbot   
2018-11-14 19:38   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: e186816ba71fdb27c2ce6ba6b93fc1ae723e17d0
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Nov 13 18:24:58 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/e186816ba71fdb27c2ce6ba6b93fc1ae723e17d0 [^]

Related to issue 39622: Adapted to new Core API

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOTestSuite.java
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOv_AutomaticInvoiceFromShipmentTest.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/ShipmentInOutGenerator.java
---
(0107915)
hgbot   
2018-11-14 19:38   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: a14fe998a725b3d0f7ebac563c311e01834d6940
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Nov 14 16:44:21 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/a14fe998a725b3d0f7ebac563c311e01834d6940 [^]

Related to issue 39622: Create stock for the tests, otherwise they fail

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOv_AutomaticInvoiceFromShipmentTest.java
---
(0107916)
hgbot   
2018-11-14 19:39   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.sampledata
Changeset: 3a09408cc7081d1e5acd7a0a6251af998bac1334
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Mon Oct 08 16:17:39 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.sampledata/rev/3a09408cc7081d1e5acd7a0a6251af998bac1334 [^]

Related to issue 39622: Adds data for automated tests

---
M referencedata/sampledata/AWO_QA/AD_SEQUENCE.xml
A referencedata/sampledata/AWO_QA/C_INVOICE.xml
---
(0107917)
hgbot   
2018-11-14 19:39   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 11335f1c10cd2c2ac3c51c0fd6538958097f60aa
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Nov 14 16:53:50 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/11335f1c10cd2c2ac3c51c0fd6538958097f60aa [^]

Related to issue 39622: Removed try-catch from tests and added to the BatchOfTasksGenerator

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOv_AutomaticInvoiceFromShipmentTest.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/BatchOfTasksGenerator.java
---
(0107918)
hgbot   
2018-11-14 19:39   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 4ec2470232174b7de40295d4326433c77b80db39
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Nov 14 18:22:53 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/4ec2470232174b7de40295d4326433c77b80db39 [^]

Related to issue 39622: refactor to create InvoiceGeneratorAtTaskConfirmation framework.

Although right now we only support invoice generation from goods shipment, it makes sense to define a generic framework for other flows that could come in the future.

The InvoiceGeneratorAtTaskConfirmation is an abstract class to be extended by the concrete invoice generations implementations.
The InvoiceGeneratorFromGoodsShipment implements the logic for Goods Shipment, and it's based on a new preference "OBAWO_AutomaticInvoiceFromGoodsShipment".
A new instance of InvoiceGeneratorFromGoodsShipment is injected in ShipmentInOutGenerator. So the invoice generation logic is perfectly isolated.
The TransactionDocGenerator always refresh the transaction document after processing it, thus the IndividualTaskConfirmator doesn't need to do it anymore.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/IndividualTaskConfirmator.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/ShipmentInOutGenerator.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/TransactionDocGenerator.java
A src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/InvoiceGeneratorAtTaskConfirmation.java
A src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/InvoiceGeneratorFromGoodsShipment.java
---
(0107919)
vmromanos   
2018-11-14 19:48   
Code review + testing OK
(0107927)
hgbot   
2018-11-15 10:19   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: c04d179bce0ffe2e5d1c80b726330fdef7902536
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Nov 15 10:19:21 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/c04d179bce0ffe2e5d1c80b726330fdef7902536 [^]

Related to issue 39622: renamed preference with awo meaning

---
M src-db/database/sourcedata/AD_REF_LIST.xml
---
(0107930)
hgbot   
2018-11-15 10:22   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 1c8d2f8c71dd260c19f53de7b3d899bd3557f90e
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Nov 15 10:22:10 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/1c8d2f8c71dd260c19f53de7b3d899bd3557f90e [^]

Related to issue 39622: renamed preference with awo meaning

---
M src-db/database/sourcedata/AD_REF_LIST.xml
---
(0108106)
hgbot   
2018-11-26 15:07   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 507c95cd1446bc0ea908d5c7272c96b82567506c
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Nov 26 15:07:45 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/507c95cd1446bc0ea908d5c7272c96b82567506c [^]

Related to issue 39622: backout admin mode in BatchOfTasksGenerator

Righ now it's required to call the CentralBroker with the right admin mode.
The original change forced the batch of task generator to be executed in admin mode, however this created a failure in a selenium test.

In this changeset we are reverting this behavior, forcing the user to previously set the right admin mode. However I do think we should reconsider this in the future, specially with Ommnichannel implementations.

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOv_AutomaticInvoiceFromShipmentTest.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/BatchOfTasksGenerator.java
---