Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0044186Openbravo ERPA. Platformpublic2020-05-25 16:372020-06-17 10:05
Leyre 
AtulOpenbravo 
highmajoralways
closedfixed 
5
 
PR20Q3 
dmiguelez
Core
No
0044186: Incorrect data when change the organization in "Return from Customer" window.
Incorrect data when change the organization in "Return from Customer" window.
Field "Invoice Terms" doesn't get updated as expected. This can also be reproduced in window "Sales Order".
1. Login into Backend:
   User: Openbravo
   Role: F&B International Group Admin
2. Open the "Return from Customer" or the "Sales Order" window
3. Add a new record.
4. Verify there are 5 options in the "Invoice Terms" field.
5. Change Organization = F&B España - Región Sur
6. Verify there are 3 options in the "Invoice Terms" field.
7. Select Organization = F&B España - Región Norte again.
8. Verify that there are still 3 options in the "Invoice Terms" field, instead of 5
Two options:
1. Update validation setup rules("Invoice Rules for POS Sales orders") to include the rest of the elements for this field.
2. Add same logic as in SE_Order_BPartner.java or SE_Order_DocType.java to SE_Order_Organization.java. In former classes, this field is modified and the missing options are added.

A note explaining 2nd option more in detail has been added.
No tags attached.
Issue History
2020-05-25 16:37LeyreNew Issue
2020-05-25 16:37LeyreAssigned To => platform
2020-05-25 16:37LeyreModules => Core
2020-05-25 16:37LeyreResolution time => 1592172000
2020-05-25 16:37LeyreTriggers an Emergency Pack => No
2020-05-25 18:31PracticsIssue Monitored: Practics
2020-05-28 17:52cbernerNote Added: 0120430
2020-06-05 09:45cbernerDescription Updatedbug_revision_view_page.php?rev_id=21155#r21155
2020-06-05 09:45cbernerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21157#r21157
2020-06-05 09:45cbernerProposed Solution updated
2020-06-05 09:58cbernerAssigned Toplatform => Triage Finance
2020-06-08 10:51dmiguelezAssigned ToTriage Finance => inigo_lerga
2020-06-10 18:21dmiguelezAssigned Toinigo_lerga => AtulOpenbravo
2020-06-11 11:18AtulOpenbravoStatusnew => scheduled
2020-06-16 14:39AtulOpenbravoNote Added: 0120869
2020-06-16 15:49hgbotCheckin
2020-06-16 15:49hgbotNote Added: 0120871
2020-06-16 15:49hgbotStatusscheduled => resolved
2020-06-16 15:49hgbotResolutionopen => fixed
2020-06-16 15:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/91d85b2ea1b284650b19c7711ad6becca825b684 [^]
2020-06-16 15:50dmiguelezReview Assigned To => dmiguelez
2020-06-16 15:50dmiguelezNote Added: 0120872
2020-06-16 15:50dmiguelezStatusresolved => closed
2020-06-17 10:05dmiguelezFixed in Version => 3.0PR20Q3

Notes
(0120430)
cberner   
2020-05-28 17:52   
This can also be reproduced in Sales Order.
Updating of field Invoice Terms is missing from SE_Order_Organization callout. This callout is called when changing Organization in both Sales Order and "Return from Customer" window.

On BP field in same windows there's some checking and the field is updated accordingly.[1]
You can test this by changing the BP after changing organization. Transaction Document field also has a callout that updates this field, similar to BP field.

This should also be added to SE_Order_Organization.java[2], not directly, some modification may be necessary. Also possibly SE_Invoice_Organization.java.

[1] https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/erpCommon/ad_callouts/SE_Order_BPartner.java#L189 [^]

[2] https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/erpCommon/ad_callouts/SE_Order_Organization.java [^]
(0120869)
AtulOpenbravo   
2020-06-16 14:39   
Test Plan
- Login as F&B International Group Admin
- Open the "Return from Customer" or the "Sales Order" window
- Add a new record.
- Verify there are 5 options in the "Invoice Terms" field.
- Change Organization = F&B España - Región Sur
- Verify there are 5 options in the "Invoice Terms" field.
- Select Organization = F&B España - Región Norte again.
- Verify that there are 5 options in the "Invoice Terms" field
- When you change Transaction Document to POS Order then verify that there are 3 options in the invoice term field.
- Change transaction document to Standard Order, Verify that there are 5 options in the "Invoice Terms" field
(0120871)
hgbot   
2020-06-16 15:49   
Repository: erp/devel/pi
Changeset: 91d85b2ea1b284650b19c7711ad6becca825b684
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Jun 16 10:51:43 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/91d85b2ea1b284650b19c7711ad6becca825b684 [^]

Fixes BUG-44186::Incorrect data when change the
organization in "Return from Customer" window.

**Modify validation rule for Invoice Terms
field to check DocSubTypeSO is a non
POS Order Document Type to load all invoice
rules
**Set Translation Document column as Store in
Session, Modify Auxiliary Input query for
ORDERTYPE to get docsubtypeso for Transaction
Document in SalesOrder/Return From Customer
/Purchase Order window header.

---
M src-db/database/sourcedata/AD_AUXILIARINPUT.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_VAL_RULE.xml
---
(0120872)
dmiguelez   
2020-06-16 15:50   
Code Review + Testing Ok