Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039617Openbravo ERP07. Sales managementpublic2018-11-13 13:592018-12-11 20:22
vmromanos 
nonofrancisco 
normalmajorN/A
closedfixed 
5
 
3.0PR19Q1 
vmromanos
Core
No
0039617: Automatic Invoice from Goods Shipment
Allow the possibility to automatically create an invoice when processing a goods shipment based on the related sales order invoice terms.

Besides, a new button will be added to the Goods Shipment window to manually create an invoice from the goods shipment, similar to the existing one at Goods Receipt window.
NA
No tags attached.
blocks feature request 0039622 closed nonofrancisco Modules Automatic Invoice from Goods Shipment 
Issue History
2018-11-13 13:59vmromanosNew Issue
2018-11-13 13:59vmromanosAssigned To => Triage Finance
2018-11-13 13:59vmromanosModules => Core
2018-11-13 13:59vmromanosTriggers an Emergency Pack => No
2018-11-13 13:59vmromanosStatusnew => scheduled
2018-11-13 13:59vmromanosAssigned ToTriage Finance => nonofrancisco
2018-11-13 14:24hgbotCheckin
2018-11-13 14:24hgbotNote Added: 0107883
2018-11-13 14:24hgbotStatusscheduled => resolved
2018-11-13 14:24hgbotResolutionopen => fixed
2018-11-13 14:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a3bda4f3376a9cbaf2d13ad4536a08d5f6d7d5be [^]
2018-11-13 14:24hgbotCheckin
2018-11-13 14:24hgbotNote Added: 0107884
2018-11-13 14:24hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/a3bda4f3376a9cbaf2d13ad4536a08d5f6d7d5be [^] => http://code.openbravo.com/erp/devel/pi/rev/f2c342521137b1950badec07cca5e32451a71895 [^]
2018-11-13 14:24hgbotCheckin
2018-11-13 14:24hgbotNote Added: 0107885
2018-11-13 14:24hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/f2c342521137b1950badec07cca5e32451a71895 [^] => http://code.openbravo.com/erp/devel/pi/rev/37ad45032da1ffacc1a4994d7c718f7078d5fbf2 [^]
2018-11-13 14:24hgbotCheckin
2018-11-13 14:24hgbotNote Added: 0107886
2018-11-13 14:24hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/37ad45032da1ffacc1a4994d7c718f7078d5fbf2 [^] => http://code.openbravo.com/erp/devel/pi/rev/af52c7d01edc1f925dba486db5f48682fac263dd [^]
2018-11-13 14:25vmromanosReview Assigned To => vmromanos
2018-11-13 14:25vmromanosStatusresolved => closed
2018-11-13 14:25vmromanosFixed in Version => 3.0PR19Q1
2018-11-13 18:11hgbotCheckin
2018-11-13 18:11hgbotNote Added: 0107890
2018-11-13 18:21vmromanosIssue cloned0039622
2018-11-13 18:21vmromanosRelationship addedblocks 0039622
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108463
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108464
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108465
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108466
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108467

Notes
(0107883)
hgbot   
2018-11-13 14:24   
Repository: erp/devel/pi
Changeset: a3bda4f3376a9cbaf2d13ad4536a08d5f6d7d5be
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Thu Oct 04 15:59:12 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/a3bda4f3376a9cbaf2d13ad4536a08d5f6d7d5be [^]

Fixed issue 39617: Allows Automatic Invoice from Goods Shipment

- A new field was added to "Request Process" pop up window. The field is only
  visible in Goods Shipment window if the selected document is in draft status.
- A new class was created for automatically creating invoices from Goods
  Shipment, considering the invoice terms of the order linked to the shipment
  lines, when exists.
- The ProcessGoods process was modified to invoke the new API after complete the
  document, if the field in the pop up window is checked.
- A new button was added to Goods Shipment window to allow generate invoice
  from Goods Shipment. The button is only visible if the document is in status
  "CO" and is not completely invoiced.
- Automated tests were created.

---
M src-db/database/model/tables/M_INOUT.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_TEXTINTERFACES.xml
M src-db/database/sourcedata/OBUIAPP_PROCESS.xml
M src-test/src/org/openbravo/test/AllAntTaskTests.java
M src/org/openbravo/erpCommon/ad_actionButton/DocAction.html
M src/org/openbravo/erpCommon/ad_actionButton/ProcessGoods.java
A src-test/src/org/openbravo/test/materialMgmt/invoiceFromShipment/InvoiceFromShipmentTest.java
A src-test/src/org/openbravo/test/materialMgmt/invoiceFromShipment/TestUtils.java
A src/org/openbravo/common/actionhandler/InvoiceFromShipmentActionHandler.java
A src/org/openbravo/materialmgmt/ShipmentProcessor.java
---
(0107884)
hgbot   
2018-11-13 14:24   
Repository: erp/devel/pi
Changeset: f2c342521137b1950badec07cca5e32451a71895
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Thu Oct 25 15:40:15 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/f2c342521137b1950badec07cca5e32451a71895 [^]

Fixed issue 39617: Added new features

- Three new fields were added to "Request Process" pop up window. The fields
  are only visible in Goods Shipment window if the selected document is in
  draft status. The fields hold the Invoice Date, the Price List and whether
  the invoice generated will be processed or not.
- The ProcessGoods process was modified to consider the new fields added.
- The success message in Process Goods process shows the document number
  of the generated invoice and its status.
- Three new parameters were added to Generate Invoice from Goods Shipment
  process definition. The fields hold the Invoice Date, the Price List and
  whether the invoice generated will be processed or not.
- The Generate Invoice from Goods Shipment action handler was modified to
  consider the new fields added.
- Code was refactored. Some classes were renamed, java documentation was
  improved.
- Automated test were updated
- Two new automated test were added

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/AD_TEXTINTERFACES.xml
M src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
M src-db/database/sourcedata/OBUISEL_SELECTOR.xml
M src-test/src/org/openbravo/test/materialMgmt/invoiceFromShipment/InvoiceFromShipmentTest.java
M src/org/openbravo/common/actionhandler/InvoiceFromShipmentActionHandler.java
M src/org/openbravo/erpCommon/ad_actionButton/DocAction.html
M src/org/openbravo/erpCommon/ad_actionButton/DocAction.xml
M src/org/openbravo/erpCommon/ad_actionButton/ProcessGoods.java
A src/org/openbravo/materialmgmt/InvoiceFromGoodsShipmentDefaultValueFilterExpression.java
A src/org/openbravo/materialmgmt/InvoiceFromGoodsShipmentPriceListFilterExpression.java
A src/org/openbravo/materialmgmt/InvoiceFromGoodsShipmentUtil.java
A src/org/openbravo/materialmgmt/InvoiceGeneratorFromGoodsShipment.java
R src/org/openbravo/materialmgmt/ShipmentProcessor.java
---
(0107885)
hgbot   
2018-11-13 14:24   
Repository: erp/devel/pi
Changeset: 37ad45032da1ffacc1a4994d7c718f7078d5fbf2
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Thu Oct 25 17:59:27 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/37ad45032da1ffacc1a4994d7c718f7078d5fbf2 [^]

Fixed issue 39617: Java doc to Invoice from Goods Shipment action handler

---
M src/org/openbravo/common/actionhandler/InvoiceFromShipmentActionHandler.java
---
(0107886)
hgbot   
2018-11-13 14:24   
Repository: erp/devel/pi
Changeset: af52c7d01edc1f925dba486db5f48682fac263dd
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Nov 12 19:38:38 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/af52c7d01edc1f925dba486db5f48682fac263dd [^]

Fixed issue 39617: Code review improvements

Fixed db consistency.
Avoid useless usage of flush() and commitAndClose(). Refreshing needed objects instead.
TestUtils class declared at package level.
Refactor InvoiceGeneratorFromGoodsShipment class to improve code cleanliness.
 - Pass Process Invoice as parameter
 - Declare enum with the list of supported Invoice Terms
 - Avoid to store hibernate objects as class variables
 - Properly manage memory consumption by evicting useless objects
 - Simplify exception management
 - Validate order line is returned by C_Invoice_Candidate_V
 - Take into account only completed invoices
 - Properly calculate pending qty to invoice
 - Reduce complexity in several methods
 - Get the invoice document type using the standard AD_GET_DOCTYPE
HTML/XML/Java related to ProcessGoods:
 - It now follows Openbravo standards (parse dates and checkbox, remove useless catch)
 - Added default display logic hidden to invoice related fields

---
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
M src-test/src/org/openbravo/test/materialMgmt/invoiceFromShipment/InvoiceFromShipmentTest.java
M src-test/src/org/openbravo/test/materialMgmt/invoiceFromShipment/TestUtils.java
M src/org/openbravo/common/actionhandler/InvoiceFromShipmentActionHandler.java
M src/org/openbravo/erpCommon/ad_actionButton/DocAction.html
M src/org/openbravo/erpCommon/ad_actionButton/ProcessGoods.java
M src/org/openbravo/materialmgmt/InvoiceGeneratorFromGoodsShipment.java
---
(0107890)
hgbot   
2018-11-13 18:11   
Repository: erp/devel/pi
Changeset: c24eed29cc3d9ec40cb753285a4f3d4e9fa0c6a5
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Nov 13 18:11:23 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c24eed29cc3d9ec40cb753285a4f3d4e9fa0c6a5 [^]

Related to issue 39617: TestUtils declared as public to be used by AWO tests

---
M src-test/src/org/openbravo/test/materialMgmt/invoiceFromShipment/TestUtils.java
---
(0108463)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test
(0108464)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test
(0108465)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test
(0108466)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test
(0108467)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test