Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030235Openbravo ERP09. Financial managementpublic2015-06-23 15:452016-03-17 10:55
malsasua 
vmromanos 
normalminoralways
closedfixed 
20Community Appliance
 
 
vmromanos
Core
No
0030235: Add an Extension point at the end of aprm_gen_paymentschedule_inv procedure
Add an Extension point at the end of aprm_gen_paymentschedule_inv procedure
n/a
No tags attached.
patch aprm_gen_paymentschedule_inv_NEW_EP.patch (3,924) 2015-10-27 11:53
https://issues.openbravo.com/file_download.php?file_id=8646&type=bug
Issue History
2015-06-23 15:45malsasuaNew Issue
2015-06-23 15:45malsasuaAssigned To => Triage Finance
2015-06-23 15:45malsasuaModules => Core
2015-06-23 15:45malsasuaTriggers an Emergency Pack => No
2015-10-27 11:53VictorVillarFile Added: aprm_gen_paymentschedule_inv_NEW_EP.patch
2016-01-30 10:15vmromanosStatusnew => scheduled
2016-01-30 10:15vmromanosAssigned ToTriage Finance => vmromanos
2016-01-30 10:17vmromanosNote Added: 0083750
2016-01-30 10:29hgbotCheckin
2016-01-30 10:29hgbotNote Added: 0083751
2016-01-30 10:29hgbotStatusscheduled => resolved
2016-01-30 10:29hgbotResolutionopen => fixed
2016-01-30 10:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/dafbb746f82205023a0aab2c15728165c5720c8c [^]
2016-01-30 10:30vmromanosReview Assigned To => vmromanos
2016-01-30 10:30vmromanosNote Added: 0083752
2016-01-30 10:30vmromanosStatusresolved => closed
2016-01-30 13:06vmromanosNote Edited: 0083750bug_revision_view_page.php?bugnote_id=0083750#r10833
2016-03-17 10:55hudsonbotCheckin
2016-03-17 10:55hudsonbotNote Added: 0085093

Notes
(0083750)
vmromanos   
2016-01-30 10:17   
(edited on: 2016-01-30 13:06)
Test plan:

1. Create a new db procedure with the following code:

CREATE OR REPLACE FUNCTION aprm_borrar(p_ep_instance character varying)
  RETURNS void AS
$BODY$ DECLARE
 
p_record_id VARCHAR(60);
p_message VARCHAR(2000);
p_docAction VARCHAR(60);
p_user VARCHAR(60);
p_result NUMERIC;
 
--TYPE RECORD IS REFCURSOR;
Cur_Params RECORD;
 
BEGIN
 
  FOR Cur_Params IN (
    SELECT *
    FROM ad_ep_instance_para
    WHERE ad_ep_instance_id = p_ep_instance
    ) LOOP
    IF (cur_params.parametername LIKE 'DocAction') THEN
      p_docaction := Cur_Params.p_string;
    ELSIF (cur_params.parametername LIKE 'Record_ID') THEN
      p_record_id := cur_params.p_string;
    ELSIF (cur_params.parametername LIKE 'User') THEN
      p_user := cur_params.p_string;
    ELSIF (cur_params.parametername LIKE 'Message') THEN
      p_message := cur_params.p_text;
    ELSIF (cur_params.parametername LIKE 'Result') THEN
      p_result := cur_params.p_number;
    END IF;
  END LOOP;
 
-- The code goes here
update ad_org set name = 'Test' where ad_org_id = '19404EAD144C49A0AF37D54377CF452D';
 
END ; $BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;


2. As System Admin, go to Extension Point window and add the new process to the aprm_gen_paymentschedule_inv end extension point.

3. As Openbravo Admin, create a sales invoice with any line.
Complete it

4. Go to Organization window.
Verify "F&B International Group" organization is now called "Test"

(0083751)
hgbot   
2016-01-30 10:29   
Repository: erp/devel/pi
Changeset: dafbb746f82205023a0aab2c15728165c5720c8c
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Sat Jan 30 10:26:12 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/dafbb746f82205023a0aab2c15728165c5720c8c [^]

Fixed bug 30235: Extension point at the end of aprm_gen_paymentschedule_inv

Added Extension point at the end of aprm_gen_paymentschedule_inv procedure, so it now has an extension point at the beginning and at the end of the process.

Solution contributed by partner

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_EXTENSION_POINTS.xml
---
(0083752)
vmromanos   
2016-01-30 10:30   
Code review + testing OK
(0085093)
hudsonbot   
2016-03-17 10:55   
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/b22fb0500156 [^]
Maturity status: Test