Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016832Openbravo ERP07. Sales managementpublic2011-04-15 15:142011-05-03 10:48
jonalegriaesarte 
dalsasua 
immediatemajoralways
closedfixed 
5
2.50MP28 
2.50MP292.50MP29 
Core
No
0016832: A trigger condition in c_orderline has been added and can cause problems in special conditions
This piece of code has been added to src-db/database/model/triggers/C_ORDLINE_CHK_RESTRICTIONS_TRG.xml:
IF(UPDATING OR INSERTING) THEN
    IF (:NEW.C_BPARTNER_ID IS NOT NULL AND :NEW.C_BPARTNER_LOCATION_ID IS NULL) THEN
      RAISE_APPLICATION_ERROR(-20000, '@LocationNotNullConstraint@');
    END IF;
END IF;

This piece of code is trying to simulate the old behavior when the line is not a discount. This piece of code is wrong because in some special conditions the user can not insert lines or modify existing lines where this field is null. The original bug is solved without this change in the trigger.

Remove the Business Partner Address field from the purchase order line windows.
Create a purchase order; fill in all the necessary fields.
Create a line for the order; fill in all the necessary fields.
Save the line.
Trigger restriction makes the save to fail.
This piece of code must be deleted.
No tags attached.
related to backport 00155942.50MP27 closed adrianromero Not possible to modify available fields of Discount line when order is processed 
blocks defect 00168312.50MP29 closed dalsasua A trigger condition in c_orderline has been added and can cause problems in special conditions 
Issue History
2011-04-15 15:18dalsasuaTypedefect => backport
2011-04-15 15:18dalsasuafix_in_branch => 2.50
2011-04-15 15:22hgbotCheckin
2011-04-15 15:22hgbotNote Added: 0035994
2011-04-15 15:22hgbotStatusscheduled => resolved
2011-04-15 15:22hgbotResolutionopen => fixed
2011-04-15 15:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/31fa3266b55b52960f051c727d44708c4a73634a [^]
2011-04-15 15:41dalsasuaStatusresolved => new
2011-04-15 15:41dalsasuaResolutionfixed => open
2011-04-15 15:41dalsasuaRelationship addedrelated to 0015594
2011-04-15 15:41dalsasuaStatusnew => scheduled
2011-04-15 15:41dalsasuafix_in_branch2.50 => pi
2011-04-15 15:41dalsasuaStatusscheduled => resolved
2011-04-15 15:41dalsasuaResolutionopen => fixed
2011-04-15 16:43dalsasuaStatusresolved => new
2011-04-15 16:43dalsasuaResolutionfixed => open
2011-04-15 16:43dalsasuafix_in_branchpi =>
2011-04-15 16:43dalsasuaDescription Updatedbug_revision_view_page.php?rev_id=1859#r1859
2011-04-15 16:43dalsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1861#r1861
2011-04-15 16:43dalsasuaStatusnew => scheduled
2011-04-15 16:43dalsasuafix_in_branch => pi
2011-04-15 16:44dalsasuaStatusscheduled => resolved
2011-04-15 16:44dalsasuaResolutionopen => fixed
2011-04-27 18:43jonalegriaesarteNote Added: 0036141
2011-04-27 18:43jonalegriaesarteStatusresolved => closed
2011-04-27 18:43jonalegriaesarteFixed in Version => 2.50MP29
2011-04-29 19:32hgbotCheckin
2011-04-29 19:32hgbotNote Added: 0036235
2011-04-29 19:32hgbotStatusclosed => resolved
2011-04-29 19:32hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/stable/2.50/rev/31fa3266b55b52960f051c727d44708c4a73634a [^] => http://code.openbravo.com/erp/stable/2.50/rev/e6bb116f2a6cf983628fcf18d8253fd5a940675a [^]
2011-05-03 10:48jonalegriaesarteNote Added: 0036297
2011-05-03 10:48jonalegriaesarteStatusresolved => closed

Notes
(0035994)
hgbot   
2011-04-15 15:22   
Repository: erp/stable/2.50
Changeset: 31fa3266b55b52960f051c727d44708c4a73634a
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Fri Apr 15 15:21:32 2011 +0200
URL: http://code.openbravo.com/erp/stable/2.50/rev/31fa3266b55b52960f051c727d44708c4a73634a [^]

Fixes 16832: A trigger condition in c_orderline has been added.
The condition in the trigger has been removed

---
M src-db/database/model/triggers/C_ORDLINE_CHK_RESTRICTIONS_TRG.xml
---
(0036141)
jonalegriaesarte   
2011-04-27 18:43   
Verified
(0036235)
hgbot   
2011-04-29 19:32   
Repository: erp/stable/2.50
Changeset: e6bb116f2a6cf983628fcf18d8253fd5a940675a
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Fri Apr 15 15:21:32 2011 +0200
URL: http://code.openbravo.com/erp/stable/2.50/rev/e6bb116f2a6cf983628fcf18d8253fd5a940675a [^]

Fixes 16832: A trigger condition in c_orderline has been added.
The condition in the trigger has been removed

---
M src-db/database/model/triggers/C_ORDLINE_CHK_RESTRICTIONS_TRG.xml
---
(0036297)
jonalegriaesarte   
2011-05-03 10:48   
Verified