Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032862Openbravo ERP07. Sales managementpublic2016-05-04 17:182018-06-12 14:08
lorenzofidalgo 
markmm82 
normalmajoralways
closedfixed 
5
pi 
3.0PR18Q3 
dmiguelez
Google Chrome
Core
No
0032862: "Enable Stock Reservations" preference throws an error when a Sales Order is booked
If there are more than one record created in "Preference" window for "Enable Stock Reservations" preference, it is not possible to book a "Sales Order" and it is thrown an error:
"Error:
StockReservations PropertyNotFound"
0-Login ERP as QAAdmin//QAAdmin.
1-Using "QA Testing Admin" role, go to "Preferences" window.
2-Create a new record with the following values:
--
Organization: *
Property: Enable Stock Reservations
Value: Y
Visible at User: QAAdmin
--
Save that record.
3-Create a new record with the following values:
--
Organization: *
Property: Enable Stock Reservations
Value: Y
Visible at User: Sales A
--
Save that record.
4-Go to "Sales Order", create a record with the following values:
--
Transaction Document: Standard Order
Business Partner: Customer B
--
5-Go to "Lines" tab and create a record with the following values:
--
Product: Final good B.
--
6-Click "Book" process and click OK button in the popup to confirm the booking. DEFECT: An error will appear and that process is not completed.
No tags attached.
has duplicate defect 0033911 closed Triage Finance Stock Reservation PropertyNot Found error shown if Enable Stock Reservation preference is created more than once. 
png StockReservation-PropertyNotFound.png (133,337) 2016-05-04 17:18
https://issues.openbravo.com/file_download.php?file_id=9364&type=bug
png
Issue History
2016-05-04 17:18lorenzofidalgoNew Issue
2016-05-04 17:18lorenzofidalgoAssigned To => Triage Finance
2016-05-04 17:18lorenzofidalgoFile Added: StockReservation-PropertyNotFound.png
2016-05-04 17:18lorenzofidalgoWeb browser => Google Chrome
2016-05-04 17:18lorenzofidalgoModules => Core
2016-05-04 17:18lorenzofidalgoTriggers an Emergency Pack => No
2016-09-06 14:54psanjuanRelationship addedhas duplicate 0033911
2016-09-06 14:56psanjuanNote Added: 0089783
2017-08-15 21:35markmm82Assigned ToTriage Finance => markmm82
2017-08-15 21:36markmm82Statusnew => scheduled
2017-10-03 17:27markmm82Note Added: 0099734
2018-06-12 10:06hgbotCheckin
2018-06-12 10:06hgbotNote Added: 0105081
2018-06-12 10:06hgbotStatusscheduled => resolved
2018-06-12 10:06hgbotResolutionopen => fixed
2018-06-12 10:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cd3262c908aabab42f98460f0cf13e85c7cb9b19 [^]
2018-06-12 10:06dmiguelezReview Assigned To => dmiguelez
2018-06-12 10:06dmiguelezNote Added: 0105083
2018-06-12 10:06dmiguelezStatusresolved => closed
2018-06-12 10:06dmiguelezFixed in Version => 3.0PR18Q3
2018-06-12 14:08hudsonbotCheckin
2018-06-12 14:08hudsonbotNote Added: 0105097

Notes
(0089783)
psanjuan   
2016-09-06 14:56   
Please be aware that it is possible to create and configure this propery same way, more than once. Review issue related (and closed as duplicate) 33911.

Same way, this issue prevents of booking purchase orders.
(0099734)
markmm82   
2017-10-03 17:27   
Test Plan:
0-Login ERP as QAAdmin//QAAdmin.
1-Using "QA Testing Admin" role, go to "Preferences" window.
2-Create a new record with the following values:
--
Organization: *
Property: Enable Stock Reservations
Value: Y
Visible at User: QAAdmin
--
Save that record.
3-Create a new record with the following values:
--
Organization: *
Property: Enable Stock Reservations
Value: Y
Visible at User: Sales A
--
Save that record.
4-Go to "Sales Order", create a record with the following values:
--
Transaction Document: Standard Order
Business Partner: Customer B
--
5-Go to "Lines" tab and create a record with the following values:
--
Product: Final good B.
--
6-Click "Book" process and click OK button in the popup to confirm the booking.

Notice the order is completed successfully.

Repeat the same test for Purchase Order.
(0105081)
hgbot   
2018-06-12 10:06   
Repository: erp/devel/pi
Changeset: cd3262c908aabab42f98460f0cf13e85c7cb9b19
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Jun 08 13:56:01 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cd3262c908aabab42f98460f0cf13e85c7cb9b19 [^]

Fixes issue 32862: "Enable Stock Reservations" preference throws an error
when a Sales Order is booked

If more than one "Enable Stock Reservations" preference is defined, and are specified
to specific users, C_ORDER_POST1 calls AD_GET_PREFERENCE_VALUE function without specify
the user, for this reason function throw an exception explaining that Preference can't be
found.

To fix that, user is specified when the AD_GET_PREFERENCE_VALUE is called.

---
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0105083)
dmiguelez   
2018-06-12 10:06   
Code Review + Testing Ok
(0105097)
hudsonbot   
2018-06-12 14:08   
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/e050974318af [^]
Maturity status: Test