Openbravo Issue Tracking System - POS2
View Issue Details
0046936POS2POSpublic2021-06-01 17:252021-06-16 08:13
dmiguelez 
pablobessone 
urgentmajoralways
closedfixed 
5
 
 
No
0046936: JIRA-1763: Ticket Type color does not work with Translations
In the Window to Open previous Orders, the Type of the Order has different colors based on it's value.
However, when it is translated (from Receipt to Ticket, for example) it does not work.
It is necessary to install an extra translation module and/or to ensure that there is a translation for the language selected by the user for the records of the reference named 'POS Order Type' (In reference Window)

With that requirement met, in the POS.
Click on the Orders menu entry
Check the list of orders
Check that the values of the type column are not shown with different colors
In the file TicketRemoteTypeCellRender.js

const getOrderType = value => {
  return (Terminal.orderType.find(type => type.id === value) || {}).name;
};

This is used to retrieve the css based on the orderType name.
Both the scss file and this method should be modified to use the searchKey (or id field) instead, which is not translated.

In OrderType.java is possible to see the data retrieved for this model.

This change must also be done (or something similar) in TicketLocalTypeCellRender.js file
No tags attached.
depends on backport 0046990TAP closed pablobessone JIRA-1763: Ticket Type color does not work with Translations 
Issue History
2021-06-01 17:25dmiguelezNew Issue
2021-06-01 17:25dmiguelezAssigned To => Retail
2021-06-01 17:25dmiguelezTriggers an Emergency Pack => No
2021-06-01 17:26dmiguelezStatusnew => acknowledged
2021-06-01 17:26dmiguelezResolution time => 1623708000
2021-06-04 13:38dmiguelezSummaryTicket Type color does not work with Translations => JIRA-1763: Ticket Type color does not work with Translations
2021-06-04 13:38dmiguelezStatusacknowledged => scheduled
2021-06-04 13:38dmiguelezStatusscheduled => acknowledged
2021-06-09 11:35dmiguelezStatusacknowledged => scheduled
2021-06-09 11:35dmiguelezAssigned ToRetail => pablobessone
2021-06-10 19:17hgbotNote Added: 0129366
2021-06-16 08:13hgbotResolutionopen => fixed
2021-06-16 08:13hgbotStatusscheduled => closed
2021-06-16 08:13hgbotNote Added: 0129544
2021-06-16 08:13hgbotNote Added: 0129545

Notes
(0129366)
hgbot   
2021-06-10 19:17   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/545 [^]
(0129544)
hgbot   
2021-06-16 08:13   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: b0081412701f16750005c84dfb6909e7803ef841
Author: pablo.bessone <pablo.bessone@smfconsulting.es>
Date: 2021-06-16T06:13:14+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/b0081412701f16750005c84dfb6909e7803ef841 [^]

fixed ISSUE-0046936: now it checks for id instead of name when picking style for ticket type

---
M web-jspack/org.openbravo.pos2/src/components/TicketList/TicketListLocalGrid/render/TicketLocalTypeCellRender.jsx
M web-jspack/org.openbravo.pos2/src/components/TicketList/TicketListLocalGrid/render/TicketLocalTypeCellRender.scss
M web-jspack/org.openbravo.pos2/src/components/TicketList/TicketListRemoteGrid/render/TicketRemoteTypeCellRender.jsx
M web-jspack/org.openbravo.pos2/src/components/TicketList/TicketListRemoteGrid/render/TicketRemoteTypeCellRender.scss
---
(0129545)
hgbot   
2021-06-16 08:13   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/545 [^]