Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0011933
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 04. Warehouse managementminoralways2010-01-11 18:472010-04-09 07:28
ReporternetworkbView Statuspublic 
Assigned Toadrianromero 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branch2.40Fixed in SCM revision1736b5f3d648
ProjectionnoneETAnoneTarget Version2.40MP16
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.40MP11SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0011933: It is not possible to delete a Header in Goods Movements

DescriptionIt 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.
Steps To ReproduceGo to Warehouse Management > Transactions > Goods Movement.
Create a new record.
Try to delete it.
Proposed SolutionModify 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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00126932.50MP17 closedadrianromero Review on delete triggers 
blocks defect 00102122.50MP5 closedbalamurugan It is not possible to delete a Header in Goods Movements 

-  Notes
(0023384)
rafaroda (developer)
2010-01-13 12:39

Re-opened
(0025615)
hgbot (developer)
2010-03-19 06:07

Repository: erp/stable/2.40
Changeset: 1736b5f3d6480a85dc06e30243e8ff31677a1a6c
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo>
Date: Fri Mar 19 10:44:13 2010 +0530
URL: http://code.openbravo.com/erp/stable/2.40/rev/1736b5f3d6480a85dc06e30243e8ff31677a1a6c [^]

Fixes issue 11933: It is not possible to delete a Header in Goods Movements

---
M src-db/database/model/triggers/M_MOVEMENT_TRG.xml
---
(0025616)
sivaraman (reporter)
2010-03-19 06:10

Steps to test:

1. Log on to Openbravo
2. Change role to Openbravo Admin
3. Go to Warehouse Management > Transactions > Goods Movement
4. Create new record & Save it
5. Delete the same
(0026013)
arunkumar (reporter)
2010-04-09 07:28

Tested & working fine

- Issue History
Date Modified Username Field Change
2010-01-11 18:47 rafaroda New Issue
2010-01-11 18:47 rafaroda Assigned To => rafaroda
2010-01-11 18:47 rafaroda Issue generated from 0010212
2010-01-11 18:47 rafaroda Relationship added blocks 0010212
2010-01-11 18:48 rafaroda Reporter rafaroda => networkb
2010-01-11 18:48 rafaroda Priority high => immediate
2010-01-11 18:48 rafaroda fix_in_branch => 2.40
2010-01-12 09:13 networkb version => 2.40MP11
2010-01-12 10:42 rafaroda Priority immediate => high
2010-01-12 10:42 rafaroda Status new => scheduled
2010-01-13 12:38 rafaroda Status scheduled => resolved
2010-01-13 12:38 rafaroda Fixed in SCM revision => bbb
2010-01-13 12:38 rafaroda Resolution open => fixed
2010-01-13 12:39 rafaroda Note Added: 0023384
2010-01-13 12:39 rafaroda Status resolved => new
2010-01-13 12:39 rafaroda Fixed in SCM revision bbb =>
2010-01-13 12:39 rafaroda Status new => scheduled
2010-01-13 12:39 rafaroda fix_in_branch 2.40 => pi
2010-01-13 12:39 rafaroda fix_in_branch pi => 2.40
2010-01-25 10:13 rafaroda Resolution fixed => open
2010-01-25 10:13 rafaroda Target Version => 2.40MP16
2010-02-11 11:07 rafaroda Assigned To rafaroda => adrianromero
2010-03-16 09:26 networkb Note Added: 0025524
2010-03-16 09:38 networkb Note Deleted: 0025524
2010-03-17 12:55 adrianromero Relationship added related to 0012693
2010-03-17 12:58 rafaroda Issue Monitored: rafaroda
2010-03-19 06:07 hgbot Checkin
2010-03-19 06:07 hgbot Note Added: 0025615
2010-03-19 06:07 hgbot Status scheduled => resolved
2010-03-19 06:07 hgbot Resolution open => fixed
2010-03-19 06:07 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/1736b5f3d6480a85dc06e30243e8ff31677a1a6c [^]
2010-03-19 06:10 sivaraman Note Added: 0025616
2010-04-09 07:28 arunkumar Note Added: 0026013
2010-04-09 07:28 arunkumar Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker