Openbravo Issue Tracking System - POS2
View Issue Details
0054485POS2POSpublic2024-01-29 10:502025-03-27 12:12
caristu 
migueldejuana 
highminorhave not tried
closedduplicate 
5
 
 
No
No
0054485: printProductLabel action is implemented with a non pure function
The printProductLabel action of org.openbravo.pos2.product.label.printing module is implemented with a non pure function, because the function causes side effects: it is registering a template if it is not registered yet. See here[1].

As stated in the documentation[2], actions must be implemented as pure functions.

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.product.label.printing/-/blame/master/web-jspack/org.openbravo.pos2.product.label.printing/src/model/messages/actions/PrintProductLabel.js#L28 [^]

[2] http://wiki.openbravo.com/wiki/StateController#Design_principles_of_the_StateController [^]
.
Move the template existence and registration part to an action preparation
No tags attached.
Issue History
2024-01-29 10:50caristuNew Issue
2024-01-29 10:50caristuAssigned To => Retail
2024-01-29 10:50caristuOBNetwork customer => No
2024-01-29 10:50caristuTriggers an Emergency Pack => No
2024-01-29 10:50caristuDescription Updatedbug_revision_view_page.php?rev_id=27409#r27409
2024-01-29 10:51caristuSummaryprintProductLabel action is using a non pure function => printProductLabel action is implemented with a non pure function
2024-01-29 10:51caristuDescription Updatedbug_revision_view_page.php?rev_id=27410#r27410
2024-01-31 11:23caristuProposed Solution updated
2024-01-31 11:35caristuIssue cloned0054519
2025-01-23 15:04guillermogilAssigned ToRetail => migueldejuana
2025-03-27 12:12hgbotNote Added: 0177507
2025-03-27 12:12hgbotStatusnew => closed
2025-03-27 12:12hgbotResolutionopen => duplicate

Notes
(0177507)
hgbot   
2025-03-27 12:12   
Issue exported to Jira: https://openbravo.atlassian.net/browse/RM-24240 [^]