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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0050629
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] Coremajorhave not tried2022-10-25 12:132022-10-25 12:13
ReportercbernerView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0050629: You may not call store.getState() error when calling OB.error from discount comparator engine

DescriptionAn error appears related with TerminalLog state action being called from inside another state action. "You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store."

This is due to calling OB.error from inside comparator-evaluator.js file in discounts.propertycondition module: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/blob/master/web/org.openbravo.discounts.propertycondition/js/engine/comparator-evaluator.js#L23 [^]

This call to OB.error fails with the attached gif when it is called as part of the Ticket modelhooks, which recalculate totals and discounts.
Steps To Reproduce1. Login backoffice and go to discounts and promotions
2. Add a CRM Property Condition with a not supported reference. This can be achieved by creating a new comparator in Comparator window(as system admin), or by changing one of the CRM Properties in CRM Configuration window to have reference Autocomplete(currently not supported)
3. Login WebPOS and refresh masterdata
4. Try to add any product and see that you get extra errors
Proposed SolutionTry not to execute OB.error from inside other actions, maybe we can use a "throw new Error" instead of OB.error in this particular case.
TagsNo tags attached.
Attached Filesgif file icon error storeGetStore.gif [^] (1,094,575 bytes) 2022-10-25 12:13
png file icon callStack getState.png [^] (108,490 bytes) 2022-10-25 12:13

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0050626 closedyogaskarnik Autocomplete CRM reference properties are not supported for discounts & promotions property/condition 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2022-10-25 12:13 cberner New Issue
2022-10-25 12:13 cberner Assigned To => Triage Platform Base
2022-10-25 12:13 cberner File Added: error storeGetStore.gif
2022-10-25 12:13 cberner Triggers an Emergency Pack => No
2022-10-25 12:13 cberner File Added: callStack getState.png
2022-10-25 15:49 rafaroda Relationship added related to 0050626


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker