Openbravo Issue Tracking System - POS2
View Issue Details
0050471POS2POSpublic2022-10-10 14:512022-10-24 11:55
cberner 
cberner 
normalmajorhave not tried
closedfixed 
5
 
23Q1 
No
0050471: Service products marked as grouped are incorrectly separated into new lines when added to the ticket
Service products should keep their grouping rules when added to the ticket, except if they have modifiers or beeper configuration, that's the only case when we need to force them to be non-grouped, when not in this case it should follow normal ruling and be grouped if configured as so.

To allow this, ProductConfiguration should be extended to accept some info regarding if the checked rule is or not a valid one to force non-grouped lines on applicable products.
1. Open WebPOS and login
2. Search product Basecamp Lamp, try to add several of them to the ticket

Check that each one is on one line. They should be together, as they are marked as a grouped product.
No tags attached.
Issue History
2022-10-10 14:51cbernerNew Issue
2022-10-10 14:51cbernerAssigned To => cberner
2022-10-10 14:51cbernerTriggers an Emergency Pack => No
2022-10-10 15:00hgbotNote Added: 0141917
2022-10-24 11:55hgbotResolutionopen => fixed
2022-10-24 11:55hgbotStatusnew => closed
2022-10-24 11:55hgbotNote Added: 0142451
2022-10-24 11:55hgbotFixed in Version => 23Q1
2022-10-24 11:55hgbotNote Added: 0142452

Notes
(0141917)
hgbot   
2022-10-10 15:00   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1266 [^]
(0142451)
hgbot   
2022-10-24 11:55   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1266 [^]
(0142452)
hgbot   
2022-10-24 11:55   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: f292ded45dae4fb0be78093784f7d99ea3e52065
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 24-10-2022 09:54:59
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/f292ded45dae4fb0be78093784f7d99ea3e52065 [^]

Fixes ISSUE-50471: Service products marked as grouped are incorrectly separated into new lines

ProductConfiguration rules have been extended by adding a new options key. Under this key, it is possible to add an object with different properties. forceNewLine is one of this properties, when set to false(by default true) it will not separate each new order-line into its own line if not configured as so.

As part of this fix, all hooks from AddProduct have been extracted from the AddProduct.js file and moved to AddProductHooks.js file, with the goal to test them in AddProductHooks.test.js.

---
A web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/AddProductHooks.js
A web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/__test__/AddProductHooks.test.js
M web-jspack/org.openbravo.pos2/src/configurations/product-configuration/ProductConfiguration.js
M web-jspack/org.openbravo.pos2/src/configurations/product-configuration/ServiceConfiguration.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/AddProduct.js
---