Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020892Openbravo ERP07. Sales managementpublic2012-06-28 17:012012-10-18 11:06
xabiermerino 
jonalegriaesarte 
normalminoralways
newopen 
5
3.0MP12 
 
Core
No
0020892: It is possible save a good shipment with more quantity than the order
You have achieve this in two ways:

1.-
Create an order with a line: Product A; Quantity 2
Good shipment: Copy the line using 'create lines from'
Change the quantity to 4
The trigger does not allow you save the line

2.-
Create an order with a line: Product A; Quantity 2
Good shipment: Copy the line using 'create lines from'
Copy the same line again using 'create lines from'
you are able to save it

The problem is that the trigger verifies only if the line has the same or less qauntity than the order's one, but does not add qunatity of different lines that are related with the same order's line.
As admin create an order with a line: Quantity 2
Good shipment: Copy the line using 'create lines from'
Copy the same line again using 'create lines from'
you are able to save it
No tags attached.
related to defect 0021531 closed ioritzCia Changeset c265310457cd does not allow to reactivate orders in environments with shipments with more quantity than the order. 
Issue History
2012-06-28 17:01xabiermerinoNew Issue
2012-06-28 17:01xabiermerinoAssigned To => mirurita
2012-06-28 17:01xabiermerinoModules => Core
2012-06-28 17:01xabiermerinoResolution time => 1343858400
2012-06-28 17:01xabiermerinoIssue Monitored: networkb
2012-06-28 17:15miruritaAssigned Tomirurita => jonalegriaesarte
2012-07-16 13:50jonalegriaesarteAssigned Tojonalegriaesarte => ioritzCia
2012-07-25 13:01ioritzCiaStatusnew => scheduled
2012-07-25 13:01ioritzCiafix_in_branch => pi
2012-07-31 17:17jonalegriaesarteNote Added: 0051040
2012-07-31 17:17jonalegriaesarteTarget Version3.0MP14 => 3.0MP15
2012-07-31 17:17jonalegriaesartefix_in_branchpi =>
2012-08-09 13:10jonalegriaesarteSeveritymajor => minor
2012-08-30 09:57hgbotCheckin
2012-08-30 09:57hgbotNote Added: 0051662
2012-08-30 09:57hgbotStatusscheduled => resolved
2012-08-30 09:57hgbotResolutionopen => fixed
2012-08-30 09:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c265310457cd89f1e90ea640666ccdb14933c1b0 [^]
2012-08-30 13:09xabiermerinoNote Added: 0051682
2012-08-30 13:09xabiermerinoStatusresolved => closed
2012-09-01 01:03hudsonbotCheckin
2012-09-01 01:03hudsonbotNote Added: 0051743
2012-09-03 12:42ioritzCiaRelationship addedrelated to 0021531
2012-09-07 14:27ioritzCiaStatusclosed => new
2012-09-07 14:27ioritzCiaResolutionfixed => open
2012-09-07 14:37ioritzCiaNote Added: 0051940
2012-09-07 14:37ioritzCiaTypedefect => design defect
2012-09-13 10:42jonalegriaesarteAssigned ToioritzCia => dmiguelez
2012-09-19 13:30ioritzCiaTarget Version3.0MP15 =>
2012-09-19 18:20dmiguelezNote Added: 0052246
2012-10-18 11:06naiaramartinezAssigned Todmiguelez => jonalegriaesarte

Notes
(0051040)
jonalegriaesarte   
2012-07-31 17:17   
Moved to MP15 due to other priorities
(0051662)
hgbot   
2012-08-30 09:57   
Repository: erp/devel/pi
Changeset: c265310457cd89f1e90ea640666ccdb14933c1b0
Author: Ioritz Cia <ioritz.cia <at> openbravo.com>
Date: Wed Aug 29 10:14:08 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c265310457cd89f1e90ea640666ccdb14933c1b0 [^]

Fixes issue 20892: Goods Shipment line and Order line relation.
It is possible save a good shipment with more quantity than the order.

---
A src-db/database/model/triggers/M_INOUTLINE_TRG2.xml
---
(0051682)
xabiermerino   
2012-08-30 13:09   
verified
(0051743)
hudsonbot   
2012-09-01 01:03   
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/05b3ea484705 [^]

Maturity status: Test
(0051940)
ioritzCia   
2012-09-07 14:37   
Due to it's complexity this is changed to design defect. There are too many things to think about to be able to provide a simple solution:

- Changing create line process does not entirely fix the problem. As long as the quantity of the order does not get delivered, the create line process will suggest the order and it will copy the original quantity.

- It can be done by a trigger. But this has to take into account that you might want to distribute the quantity among the same goods shipment or different and that you might want to take the quantities from different warehouses.

- Another thing to take into account is isQuantityVariable column in product. If this is checked to yes, greater amounts should be allowed but not as to put double. With this last case the logic's complexity increases a lot.
(0052246)
dmiguelez   
2012-09-19 18:20   
Repository: erp/devel/pi
Changeset: 288baadd3b3c79495106300dd43091455064fd84
Author: Ioritz Cia <ioritz.cia <at> openbravo.com>
Date: Mon Sep 03 12:44:29 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/288baadd3b3c79495106300dd43091455064fd84 [^] [^]

Fixes issue 21531: Backout of the chageset c265310457cd.
Changeset c265310457cd does not allow to reactivate orders in environments with shipments with more quantity than the order.

---
R src-db/database/model/triggers/M_INOUTLINE_TRG2.xml