Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035081Openbravo ERP04. Warehouse managementpublic2017-01-30 10:562017-03-21 15:26
ngarcia 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q2 
markmm82
Core
No
0035081: Wrong behaviour when the attribute included in an attribute set is named lot, serno or DateFrom
Wrong behaviour when the attribute included in an attribute set is named lot, serno or DateFrom. Its values are saved in the lot, serno and guaranteedate of the m_attributesetinstance table, which are reserved for attribute sets defined as Lot, Serial No. and Expiration date respectively
As group admin role:
   Create the following three attributes:
      1. Name: serno
         Instance Attribute: N
         List: N
         Mandatory: Y
      2. Name: lot
         Instance Attribute: N
         List: N
         Mandatory: Y
      3. Name: DateFrom
         Instance Attribute: N
         List: N
         Mandatory: Y
   Create a new attribute set:
      Lot: N
      Serial No.: N
      Expiration Date: N
   Add the previously created attributes to it
   Create a new product and assign the previously created attribute set to it
   Create a Goods Receipt, add the previously created product and check the Attribute Set Value field is shown
   Open it and add a value to its attributes

   Check in the m_attributesetinstance tables that the values are saved in lot, serno and guaranteedate of the m_attributesetinstance table when it should not
Check if it should not be allowed to create attributes with the following names:

- lot
- serno
- DateFrom
No tags attached.
related to defect 0035080 closed collazoandy4 Cannot set an attribute set value in a warehouse document line in case it does not contain an instance attribute 
Issue History
2017-01-30 10:56ngarciaNew Issue
2017-01-30 10:56ngarciaAssigned To => Triage Finance
2017-01-30 10:56ngarciaModules => Core
2017-01-30 10:56ngarciaResolution time => 1487545200
2017-01-30 10:56ngarciaTriggers an Emergency Pack => No
2017-01-30 10:57ngarciaRelationship addedrelated to 0035080
2017-01-30 15:54markmm82Assigned ToTriage Finance => collazoandy4
2017-02-09 16:31collazoandy4Statusnew => scheduled
2017-02-09 16:32collazoandy4Note Added: 0094185
2017-03-20 00:37markmm82Note Added: 0095407
2017-03-20 17:46hgbotCheckin
2017-03-20 17:46hgbotNote Added: 0095433
2017-03-20 17:46hgbotStatusscheduled => resolved
2017-03-20 17:46hgbotResolutionopen => fixed
2017-03-20 17:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5cf30e40a1ab9545d4c3aa36aec239b041b4cede [^]
2017-03-20 17:50markmm82Review Assigned To => markmm82
2017-03-20 17:50markmm82Note Added: 0095434
2017-03-20 17:50markmm82Statusresolved => closed
2017-03-20 17:50markmm82Fixed in Version => 3.0PR17Q2
2017-03-21 15:26hudsonbotCheckin
2017-03-21 15:26hudsonbotNote Added: 0095474

Notes
(0094185)
collazoandy4   
2017-02-09 16:32   
1 - As F&B International Group Admin role
  Create a new Attribute
    name: serno
  Check the error 'Invalid attribute name value, can not be serno, lot or dateFrom' is shown while saving the record

2 - As F&B International Group Admin role
  Create a new Attribute
    name: lot
  Check the error 'Invalid attribute name value, can not be serno, lot or dateFrom' is shown while saving the record

3 - As F&B International Group Admin role
  Create a new Attribute
    name: dateFrom
  Check the error 'Invalid attribute name value, can not be serno, lot or dateFrom' is shown while saving the record
(0095407)
markmm82   
2017-03-20 00:37   
Test Plan 1 Defining new attributes in an attribute set without use of the predefined attributes lot, serno and DateFrom
As group admin role:
   0- Create the following three attributes:
      a. Name: serno
         Instance Attribute: N
         List: N
         Mandatory: Y
      b. Name: lot
         Instance Attribute: N
         List: N
         Mandatory: Y
      c. Name: DateFrom
         Instance Attribute: N
         List: N
         Mandatory: Y

   1- Create a new attribute set:
      Lot: N
      Serial No.: N
      Expiration Date: N
   2- Add the previously created attributes to it
   3- Create a new product and assign the previously created attribute set to it
   4- Create a Goods Receipt, add the previously created product and check the Attribute Set Value field is shown
   5- Open it and add a value to its attributes, for instance:
      serno: 1
      lot: 2
      DateFrom: 3
   6- Save and notice when the popup is closed, the description field is updated with concatenation of the previously filled attribute values: 1_2_3.
   7- Open the selector again, and notice all the attributes are correctly filled with its values.
   Check in the m_attributesetinstance tables that the values are NOT saved in lot, serno and guaranteedate of the m_attributesetinstance table.


Test Plan 2 Defining new attributes in an attribute set AND using the predefined attributes lot, serno and DateFrom
As group admin role:
   0- You can use the same attributes created in step 0 from Test Plan 1.
   1- Create a new attribute set:
      Lot: Y
      Serial No.: Y
      Expiration Date: Y
   2- Add the previously created attributes to it
   3- Create a new product and assign the previously attribute set to it
   4- Create a Goods Receipt, add the previously created product and check the Attribute Set Value field is shown
   5- Open it and add a value to its attributes, for instance:
      serno: 1
      lot: 2
      DateFrom: 3
      Lot: 4
      Serial No.: 5
      Expiration Date: 2017-03-17
   6- Save and notice when the popup is closed, the description field is updated with concatenation of the previously filled attribute values: 1_2_3_L4_#5_17-03-2017.
   7- Open the selector again, and notice all the attributes are correctly filled with its values.
   Check in the m_attributesetinstance tables that the values related to the predefined attributes are saved in lot, serno and guaranteedate of the m_attributesetinstance table.


Test Plan 3 Using the predefined attributes lot, serno and DateFrom
As group admin role:
   1- Create a new attribute set:
      Lot: Y
      Serial No.: Y
      Expiration Date: Y
   2- Do not add attributes to it
   3- Create a new product and assign the previously attribute set to it
   4- Create a Goods Receipt, add the previously created product and check the Attribute Set Value field is shown
   5- Open it and add a value to its attributes, for instance:
      Lot: 1
      Serial No.: 2
      Expiration Date: 2017-03-17
   6- Save and notice when the popup is closed, the description field is updated with concatenation of the previously filled attribute values: L1_#2_17-03-2017.
   7- Open the selector again, and notice all the attributes are correctly filled with its values.
   Check in the m_attributesetinstance tables that the values related to the predefined attributes are saved in lot, serno and guaranteedate of the m_attributesetinstance table.
(0095433)
hgbot   
2017-03-20 17:46   
Repository: erp/devel/pi
Changeset: 5cf30e40a1ab9545d4c3aa36aec239b041b4cede
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Sun Mar 19 17:41:32 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/5cf30e40a1ab9545d4c3aa36aec239b041b4cede [^]

Fixed issue 35081: Wrong behaviour when the attribute included in an attribute
set is named lot, serno or DateFrom

When the attribute included in an attribute set is named lot, serno or DateFrom
its values are saved in the lot, serno and guaranteedate of the m_attributesetinstance
table, which are reserved for attribute sets defined as Lot, Serial No. and
Expiration date respectively.

To avoid this unliked behaviour, were renamed the Lot, Serial No. and Expiration
date params with more complex identifiers with the suffix "xxxinternalOB" that
identifies from rest of the attributes created from the Application dictionary.

---
M src/org/openbravo/erpCommon/info/AttributeSetInstance.html
M src/org/openbravo/erpCommon/info/AttributeSetInstance.java
---
(0095434)
markmm82   
2017-03-20 17:50   
Code review + Testing OK
(0095474)
hudsonbot   
2017-03-21 15:26   
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/d2c97fb54da7 [^]
Maturity status: Test