Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010212Openbravo ERP04. Warehouse managementpublic2009-08-07 10:592010-01-11 18:47
networkb 
balamurugan 
highminoralways
closedfixed 
5
2.50MP1 
2.50MP5pi 
Core
No
0010212: It is not possible to delete a Header in Goods Movements
It is not possible to delete a Header in Goods Movements (without lines).
Trying to delete the application shows:
      
ERROR: record "new" is not assigned yet Detail: The tuple structure of a not-yet-assigned record is indeterminate.
Go to Warehouse Management > Transactions > Goods Movement.
Create a new record.
Try to delete it.
Modify m_movement_trg:

DECLARE





/*************************************************************************
* The contents of this file are subject to the Openbravo Public License
* Version 1.0 (the "License"), being the Mozilla Public License
* Version 1.1 with a permitted attribution clause; you may not use this
* file except in compliance with the License. You may obtain a copy of
* the License at http://www.openbravo.com/legal/license.html [^]
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SL
* All portions are Copyright (C) 2007 Openbravo SL
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************/
v_DateNull TIMESTAMP := TO_DATE('01-01-1900', 'DD-MM-YYYY');

BEGIN

IF AD_isTriggerEnabled()='N' THEN IF TG_OP = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF;
END IF;

IF TG_OP = 'DELETE' THEN
IF (old.PROCESSED = 'Y') THEN
RAISE EXCEPTION '%', 'Document processed/posted' ; --OBTG:-20501--
END IF;
END IF;

IF TG_OP = 'UPDATE' THEN
IF (old.PROCESSED = 'Y' AND(
(COALESCE(old.MOVEMENTDATE, v_DateNull) <> COALESCE(new.MOVEMENTDATE, v_DateNull))
OR (COALESCE(old.AD_ORGTRX_ID, '0') <> COALESCE(new.AD_ORGTRX_ID, '0'))
OR (COALESCE(old.DOCUMENTNO, '.') <> COALESCE(new.DOCUMENTNO, '.'))
OR(COALESCE(old.AD_ORG_ID, '0') <> COALESCE(new.AD_ORG_ID, '0'))
OR(COALESCE(old.AD_CLIENT_ID, '0') <> COALESCE(new.AD_CLIENT_ID, '0')))) THEN
RAISE EXCEPTION '%', 'Document processed/posted' ; --OBTG:-20501--
END IF;
END IF;
IF TG_OP = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF;

END
No tags attached.
depends on backport 00119332.40MP16 closed adrianromero It is not possible to delete a Header in Goods Movements 
Issue History
2009-08-07 10:59networkbNew Issue
2009-08-07 10:59networkbAssigned To => rafaroda
2009-08-12 10:19networkbTarget Version => 2.50MP5
2009-08-13 17:37psarobePriorityimmediate => high
2009-08-13 17:37psarobeStatusnew => scheduled
2009-08-19 15:00rafarodaAssigned Torafaroda => balamurugan
2009-08-19 15:49hgbotCheckin
2009-08-19 15:49hgbotNote Added: 0019064
2009-08-19 15:49hgbotStatusscheduled => resolved
2009-08-19 15:49hgbotResolutionopen => fixed
2009-08-19 15:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/24379ebdd2262f25dbb7fece2a3eac82d0d6b596 [^]
2009-08-20 13:30sureshbabuStatusresolved => closed
2009-08-20 13:30sureshbabuNote Added: 0019099
2009-08-20 13:30sureshbabuFixed in Version => pi
2009-08-21 00:00anonymoussf_bug_id0 => 2841461
2010-01-11 18:47rafarodaIssue cloned0011933
2010-01-11 18:47rafarodaRelationship addeddepends on 0011933

Notes
(0019064)
hgbot   
2009-08-19 15:49   
Repository: erp/devel/pi
Changeset: 24379ebdd2262f25dbb7fece2a3eac82d0d6b596
Author: Balamurugan Ramadoss <balamurugan.ramadoss <at> openbravo.com>
Date: Wed Aug 19 19:17:01 2009 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/24379ebdd2262f25dbb7fece2a3eac82d0d6b596 [^]

Fixed Issue 0010212: It is not possible to delete a Header in Goods Movements.

---
M src-db/database/model/triggers/M_MOVEMENT_TRG.xml
---
(0019099)
sureshbabu   
2009-08-20 13:30   
Tested, able to delete the Goods movement record