Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008945Openbravo ERP05. Production managementpublic2009-05-07 12:002010-05-18 21:43
sureshbabu 
sivaraman 
urgentminoralways
closedfixed 
30
2.50MP1 
2.50MP14 
Core
No
0008945: Line item attribute values are not copied in PO, when the user tries to copy the line items using copy from order option
Line item attribute values are not copied in PO, when the user tries to copy the line items using copy from order option

Note: when we try to copy the lines using copy lines option its working fine.



Step 1: create a PO, by moving to Procurement Management || Transactions || Purchase Order || Header and click New.

BP: select any BP and move to line item tab. Click new and select any product which as attribute value associated to it.

Attribute: enter some valid attribute value
Qty: enter any valid number.

Move to header and click Complete button.

Again click new and select the same Business partner
Click Copy from Order button and click the order icon.
select the above selected Purchase order and click ok.

Process completed successfully message appears

Move to lines tab & edit the line item.

Verify all the field values in the lines page.

Expected: Attribute field should get copied.

Actual result: Attribute field is blank.


 





250MP1, 250mp2
Issue History
2009-05-07 12:00sureshbabuNew Issue
2009-05-07 12:00sureshbabuAssigned To => rafaroda
2009-05-07 12:00sureshbabuRegression testing => No
2009-05-07 12:02sureshbabuTag Attached: 250MP1
2009-05-07 16:07psarobeStatusnew => scheduled
2009-05-07 16:07psarobeNote Added: 0016140
2009-05-07 16:07psarobefix_in_branch => pi
2009-05-07 16:10psarobeTag Attached: 250mp2
2009-05-08 10:44rafarodaAssigned Torafaroda => AinhoaPagola
2009-06-01 11:24rafarodaAssigned ToAinhoaPagola => rafaroda
2009-08-28 14:38rafarodaNote Added: 0019266
2009-08-28 14:38rafarodaAssigned Torafaroda => psarobe
2009-08-28 14:38rafarodaStatusscheduled => feedback
2009-08-28 14:38rafarodafix_in_branchpi =>
2009-09-29 23:51psarobeNote Edited: 0016140
2009-09-29 23:52psarobeNote Added: 0020565
2009-09-29 23:52psarobeStatusfeedback => scheduled
2009-09-29 23:52psarobefix_in_branch => pi
2010-01-04 09:39psarobeAssigned Topsarobe => rafaroda
2010-01-04 09:39psarobePrioritynormal => urgent
2010-01-04 09:39psarobeTarget Version => 2.50MP13
2010-01-04 09:39psarobefix_in_branchpi =>
2010-02-11 11:20rafarodaAssigned Torafaroda => adrianromero
2010-03-08 16:06jpabloaeTarget Version2.50MP13 => 2.50MP14
2010-05-03 12:16sivaramanAssigned Toadrianromero => sivaraman
2010-05-03 12:21hgbotCheckin
2010-05-03 12:21hgbotNote Added: 0026853
2010-05-03 12:21hgbotStatusscheduled => resolved
2010-05-03 12:21hgbotResolutionopen => fixed
2010-05-03 12:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/47ba45fd8ccd801a1c5eda46b8b37dd4397304f0 [^]
2010-05-03 13:32sivaramanNote Added: 0026858
2010-05-14 12:45sureshbabuNote Added: 0027243
2010-05-14 12:45sureshbabuStatusresolved => closed
2010-05-15 00:00anonymoussf_bug_id0 => 3001849
2010-05-18 21:43hudsonbotCheckin
2010-05-18 21:43hudsonbotNote Added: 0027473

Notes
(0016140)
psarobe   
2009-05-07 16:07   
(edited on: 2009-09-29 23:51)
Rafa for your team,

Here we only must copy the attributes that are non-instanciable

(0019266)
rafaroda   
2009-08-28 14:38   
Pablo,

Please explain what you mean by "instanciable" then re-assign me the issue.

Thanks
(0020565)
psarobe   
2009-09-29 23:52   
Non-instanciable= Color, size, etc. You define this in the attribute window
(0026853)
hgbot   
2010-05-03 12:21   
Repository: erp/devel/pi
Changeset: 47ba45fd8ccd801a1c5eda46b8b37dd4397304f0
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
Date: Mon May 03 15:48:43 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/47ba45fd8ccd801a1c5eda46b8b37dd4397304f0 [^]

Fixes issue 8945: Line item attribute values are not copied in PO, when the user tries to copy the line items using copy from order option

---
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder.java
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder_data.xsql
---
(0026858)
sivaraman   
2010-05-03 13:32   
Steps to test:
1. Log on to Openbravo
2. Change user role to Openbravo Admin
3. Go to Procurement Management || Transactions || Purchase Order || Header
4. Create new record with 'McGiver Supplies' as Business Partner
5. Go to Procurement Management || Transactions || Purchase Order || Header >> Lines
6. Create two lines with following details
    Product: Hat
    Attribute Set Value: Medium

    Product: Grand beer
    Attribute Set Value: L0_31-08-2010
7. Complete the purchase order by clicking 'Complete' button
8. Again create new purchase order
9. Create new record with 'McGiver Supplies' as Business Partner
10. Click 'Copy from order' button
11. Select the early created one and click 'Ok' button
12. Move to lines and verify if product and its attribute values are copied

Root cause & solution:
While copying the lines from order, Attribute instance ID was not included in the SQL statement that copy lines from one order to another. To fix this, we have included the attribute instance ID in the corresponding SQL statement. But, before assigning the attribute ID, we verify if the attribute set is instance enabled or not. If the attribute is instance enabled, we create a new instance of the attribute with the selected order's attribute values and the new instance attribute ID is used in copy lines process. If the attribute is instance disabled, we directly copy the attribute instance ID from one order to other.

Impact:
It has been verified that there is no other impact except resolving the issue, due to this change.
(0027243)
sureshbabu   
2010-05-14 12:45   
Tested
(0027473)
hudsonbot   
2010-05-18 21:43   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/47ba45fd8ccd [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/aa11838d5f80 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17380.obx [^]