Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012858Openbravo ERP03. Procurement managementpublic2010-04-01 09:012010-05-18 12:12
arunkumar 
eduardo_Argal 
immediatecriticalhave not tried
closedfixed 
5
pi 
2.50MP17 
Core
No
0012858: Unable to complete purchase/sales order and purcahse/sales invoice
Create a complete purchase order. Also Create & complete purchase invoice. You will see an error message "This record cannot be deleted because it is associated with other existing elements. Please see Linked Items"
Purchase order:

Login as Openbravo/openbravo with "Openbravo Admin" role.
Go to procurement management -> Transactions -> Purchase order -> Header.
Create a new record and select the business partner Mcgiver supplies.
In lines create a new record.Enter the product "Hat" and ordered quantity as 10.
Go back to header and complete.

You will see an error message "This record cannot be deleted because it is associated with other existing elements. Please see Linked Items"

Purchase Invoice:

Login as Openbravo/openbravo with "Openbravo Admin" role.
Go to procurement management -> Transactions -> Purchase Invoice-> Header.
Create a new record and select the business partner Mcgiver supplies.
In lines create a new record.Enter the product "Hat" and invoiced quantity as 10.
Go back to header and complete.

You will see an error message "This record cannot be deleted because it is associated with other existing elements. Please see Linked Items"
Regression QA
jpg purchaseorder.JPG (153,797) 2010-04-01 09:01
https://issues.openbravo.com/file_download.php?file_id=2397&type=bug
jpg
Issue History
2010-04-01 09:01arunkumarNew Issue
2010-04-01 09:01arunkumarAssigned To => adrianromero
2010-04-01 09:01arunkumarFile Added: purchaseorder.JPG
2010-04-01 09:01arunkumarStatusnew => scheduled
2010-04-01 09:01arunkumarfix_in_branch => pi
2010-04-02 11:40psarobeNote Added: 0025867
2010-04-02 11:40psarobeTarget Version => 2.50MP15
2010-04-02 11:40psarobefix_in_branchpi =>
2010-04-02 11:40psarobeSummaryUnable to complete purchase order and purcahse invoice => Unable to complete purchase/sales order and purcahse/sales invoice
2010-04-02 11:40psarobeSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=202#r202
2010-04-03 01:40eintelauIssue Monitored: eintelau
2010-04-06 09:31dalsasuaNote Added: 0025885
2010-04-06 11:36plujanAssigned Toadrianromero => eduardo_Argal
2010-04-06 12:36adrianromeroNote Added: 0025891
2010-04-06 12:56psarobeTag Attached: Regression QA
2010-04-07 01:22hgbotCheckin
2010-04-07 01:22hgbotNote Added: 0025916
2010-04-07 01:22hgbotStatusscheduled => resolved
2010-04-07 01:22hgbotResolutionopen => fixed
2010-04-07 01:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3e7d26d481a36e9e2b29e01c39ae3ce74f066e9f [^]
2010-04-13 17:30psarobeNote Added: 0026148
2010-04-13 17:30psarobeStatusresolved => closed
2010-04-14 00:01anonymoussf_bug_id0 => 2986802
2010-04-19 21:12hudsonbotCheckin
2010-04-19 21:12hudsonbotNote Added: 0026421
2010-05-18 12:12gorka_gilTarget Version2.50MP15 => 2.50MP17

Notes
(0025867)
psarobe   
2010-04-02 11:40   
The same happens in Sales order and sales invoice
(0025885)
dalsasua   
2010-04-06 09:31   
This is the error returned from database when executing the 'C_Order Post' process in a fresh installation, in revision e9504e6a07ae:

@ERROR=ORA-02291: restricción de integridad (TAD_PI.FIN_PAYMENTMETHOD_PAYMENT_SCH) violada - clave principal no encontrada
(0025891)
adrianromero   
2010-04-06 12:36   
From Hari investigations:

The issue rises in the FIN_GEN_PAYMENTSCHEDULE_INV.xml prodcedure.This occurs in Insert statement of this procedure.

Lines Numbers:

1)https://code.openbravo.com/erp/devel/pi/file/e9504e6a07ae/src-db/database/model/functions/FIN_GEN_PAYMENTSCHEDULE_INV.xml#l170 [^]

In this line

In this column "fin_paymentmethod_id" foreign key inserting value is "to-do"
2)https://code.openbravo.com/erp/devel/pi/file/e9504e6a07ae/src-db/database/model/functions/FIN_GEN_PAYMENTSCHEDULE_INV.xml#l241 [^]

In this the foreign key constraints are inserting null
(0025916)
hgbot   
2010-04-07 01:22   
Repository: erp/devel/pi
Changeset: 3e7d26d481a36e9e2b29e01c39ae3ce74f066e9f
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Wed Apr 07 01:33:48 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3e7d26d481a36e9e2b29e01c39ae3ce74f066e9f [^]

Fixes bug 0012858: Unable to complete purchase/sales order and purcahse/sales invoice

---
M src-db/database/sourcedata/AD_EP_PROCEDURES.xml
---
(0026148)
psarobe   
2010-04-13 17:30   
Tested, working fine
(0026421)
hudsonbot   
2010-04-19 21:12   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/3e7d26d481a3 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]