Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041270
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Copy Retail Storemajoralways2019-07-04 09:142019-08-08 12:36
Reportersamuel_nicuesaView Statuspublic 
Assigned Torqueralta 
PriorityhighResolutionfixedFixed in VersionRR19Q4
StatusclosedFix in branchFixed in SCM revisione8d56b27c953
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041270: Copy Store Process are copying the same POS Terminal Type Name as the Original Store copied.

DescriptionCopy Store Process are copying the same POS Terminal Type Name as the Original Store copied.
It is happening because more than 1 Terminal is associated to the same Terminal Type.
Steps To Reproduce[BO]

 - > Execute Copy Store process Using the following information.
See attached images

     Original Store -> Vall Blanca Store
     Original Pos Terminal Type -> VBS POS Terminal Type
 
     New store -> 31400
     New Pos Terminal Type -> VBS POS Terminal Type (The same as the original)

It is happening because more than one terminal is using the same pos terminal type.
When pos terminal types are copied these code is being executed :


public void copyTerminalTypes(TerminalType originalType, BaseOBObject newObject) {
    MutableBoolean isNew = new MutableBoolean(false);
    TerminalType selectedType = (TerminalType) getObjectInTree(originalType, isNew);
    String terminalTypeName = originalType.getName();
    if (isNew.booleanValue()) {
      if (terminalTypeName.contains(originalTerminal.getName())) {
        terminalTypeName = terminalTypeName.replace(originalTerminal.getName(),
            newObject.get("name").toString());
      } else {
        terminalTypeName += "-" + newObject.get("name");
      }
    }
    selectedType.setName(terminalTypeName);
    newObject.set("obposTerminaltype", selectedType);
    if (isNew.booleanValue()) {
      copyPaymentMethods(originalType, selectedType);
    }
  }

In the first execution if (isNew.booleanValue()) { is TRUE and the pos terminal type is copied fine using :

1) Replace
or
2)terminalTypeName += "-" + newObject.get("name");

In the second execution, this terminal type is not new because it is used by more than 1 terminal and
if (isNew.booleanValue()) is FALSE.
The new terminal types created are overwritten by the original Pos Terminal Type :

 -> String terminalTypeName = originalType.getName();

 -> selectedType.setName(terminalTypeName);
Proposed SolutionThis problem comes from these issues, think if it is the expected behavior or is necessary revert this part of the code.

https://issues.openbravo.com/view.php?id=39091 [^]
https://issues.openbravo.com/view.php?id=39377 [^]
TagsNo tags attached.
Attached Filespng file icon CopyRetailStore.png [^] (79,798 bytes) 2019-07-12 10:48


png file icon CopyStoreParametrization.png [^] (90,883 bytes) 2019-07-12 10:49


png file icon SamePosterminalType1.png [^] (82,545 bytes) 2019-07-12 10:49


png file icon SamePosterminalType2.png [^] (85,734 bytes) 2019-07-12 10:49

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0039377 closedrqueralta The Copy Terminal process does not work 
related to defect 0039091 closedrqueralta 'Copy Retail Store' copied names for some windows can be problematic 

-  Notes
(0113167)
marvintm (manager)
2019-07-04 09:59

Cannot be reproduced in current version of Copy Store
(0113764)
hgbot (developer)
2019-08-01 21:04

Repository: erp/pmods/org.openbravo.retail.copystore
Changeset: e8d56b27c953e64a8aa5634d36571cc6dfbb97aa
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Aug 01 15:03:51 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.copystore/rev/e8d56b27c953e64a8aa5634d36571cc6dfbb97aa [^]

Fixed issue 41270: Copy Store Process are copying the same POS Terminal Type
Name as the Original Store copied

- Now Copy Store Process is not copying the same POS Terminal Type Name
as the Original Store copied, if not the new name of the POS Terminal Type

---
M src/org/openbravo/retail/copystore/process/CopyStoreProcess.java
---

- Issue History
Date Modified Username Field Change
2019-07-04 09:14 samuel_nicuesa New Issue
2019-07-04 09:14 samuel_nicuesa Assigned To => Retail
2019-07-04 09:14 samuel_nicuesa File Added: PossibleSolution.diff
2019-07-04 09:14 samuel_nicuesa Resolution time => 1564005600
2019-07-04 09:14 samuel_nicuesa Triggers an Emergency Pack => No
2019-07-04 09:15 samuel_nicuesa Relationship added depends on 0039377
2019-07-04 09:15 samuel_nicuesa Relationship deleted depends on 0039377
2019-07-04 09:15 samuel_nicuesa Relationship added related to 0039377
2019-07-04 09:59 marvintm Note Added: 0113167
2019-07-04 09:59 marvintm Assigned To Retail => samuel_nicuesa
2019-07-04 09:59 marvintm Status new => feedback
2019-07-12 10:46 samuel_nicuesa Resolution time 1564005600 => 1564696800
2019-07-12 10:46 samuel_nicuesa Reproducibility unable to reproduce => always
2019-07-12 10:46 samuel_nicuesa version RR18Q3 => pi
2019-07-12 10:46 samuel_nicuesa Summary In some circumstances the Copy Store Process are copying the same POS Terminal Type as the Original Store copied. => Copy Store Process are copying the same POS Terminal Type as the Original Store copied.
2019-07-12 10:46 samuel_nicuesa Description Updated View Revisions
2019-07-12 10:46 samuel_nicuesa Steps to Reproduce Updated View Revisions
2019-07-12 10:46 samuel_nicuesa Proposed Solution updated
2019-07-12 10:46 samuel_nicuesa File Deleted: PossibleSolution.diff
2019-07-12 10:48 samuel_nicuesa Relationship added related to 0039091
2019-07-12 10:48 samuel_nicuesa File Added: CopyRetailStore.png
2019-07-12 10:49 samuel_nicuesa File Added: CopyStoreParametrization.png
2019-07-12 10:49 samuel_nicuesa File Added: SamePosterminalType1.png
2019-07-12 10:49 samuel_nicuesa File Added: SamePosterminalType2.png
2019-07-12 10:54 samuel_nicuesa Summary Copy Store Process are copying the same POS Terminal Type as the Original Store copied. => Copy Store Process are copying the same POS Terminal Type Name as the Original Store copied.
2019-07-12 10:54 samuel_nicuesa Description Updated View Revisions
2019-07-12 12:48 samuel_nicuesa Status feedback => new
2019-07-12 13:51 samuel_nicuesa Steps to Reproduce Updated View Revisions
2019-07-24 14:20 ngarcia Assigned To samuel_nicuesa => Retail
2019-07-30 20:35 rqueralta Assigned To Retail => rqueralta
2019-07-30 20:36 rqueralta Status new => scheduled
2019-08-01 21:04 hgbot Checkin
2019-08-01 21:04 hgbot Note Added: 0113764
2019-08-01 21:04 hgbot Status scheduled => resolved
2019-08-01 21:04 hgbot Resolution open => fixed
2019-08-01 21:04 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.copystore/rev/e8d56b27c953e64a8aa5634d36571cc6dfbb97aa [^]
2019-08-08 12:36 marvintm Review Assigned To => marvintm
2019-08-08 12:36 marvintm Status resolved => closed
2019-08-08 12:36 marvintm Fixed in Version => RR19Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker