Openbravo Issue Tracking System - POS2
View Issue Details
0048529POS2POSpublic2022-02-03 15:202022-03-07 16:14
timothee_catteeuw 
migueldejuana 
normalmajoralways
closedfixed 
5
 
 
No
0048529: JIRA 2670 - buyproductnotificationtemplate.xml does not work when using Printing template option
Following tests on the ability to configure a template directly on BO trough “POS Print templates”, 3 templates already done for our client does not work when I switch them to this new feature.

This ticket was created for buyproductnotificationtemplate, after switching the buyproductnotificationtemplate to printing template option, buyproductnotificationtemplate does not print anymore.

And the message attached in this ticket appears after paying.

1) create a new POS Print template (Module = empty, name = buyproductnotificationtemplate, template type = Buy Product with Notification Template, active = yes, printing template = buyproductnotificationtemplate.xml )

2) go to organization and assign the buyproductnotificationtemplate to a store

3) Go to webpos, refresh, logout and login, start a sale and take a product which generates a buyproductnotificationtemplate

4) Pay

→ KO, Prepare Product with buyproductnotificationtemplate is not print anymore (and the sales ticket is also not printed)

Addition information :
When logging out / logging in WebPOS, the sales ticket from the previous test is printed when logging in, but not the notif ticket yet
No tags attached.
related to defect 0048522 closed migueldejuana JIRA 2672 - prepareproductnotificationtemplate.xml does not work when using printing template option 
related to defect 0048521 closed cberner JIRA 2671 - creditnote.xml does not work when using printing template option 
png image-20220203-141126.png (69,856) 2022-02-03 15:20
https://issues.openbravo.com/file_download.php?file_id=16578&type=bug
png
Issue History
2022-02-03 15:20timothee_catteeuwNew Issue
2022-02-03 15:20timothee_catteeuwAssigned To => Retail
2022-02-03 15:20timothee_catteeuwFile Added: image-20220203-141126.png
2022-02-03 15:20timothee_catteeuwTriggers an Emergency Pack => No
2022-02-10 18:08hgbotNote Added: 0134893
2022-02-10 18:08cbernerRelationship addedrelated to 0048522
2022-02-10 18:09cbernerAssigned ToRetail => cberner
2022-02-10 18:09cbernerStatusnew => scheduled
2022-02-10 18:09cbernerRelationship addedrelated to 0048521
2022-02-11 17:48hgbotResolutionopen => fixed
2022-02-11 17:48hgbotStatusscheduled => closed
2022-02-11 17:48hgbotNote Added: 0134937
2022-02-11 17:48hgbotNote Added: 0134938
2022-03-02 11:24timothee_catteeuwNote Added: 0135381
2022-03-02 11:25timothee_catteeuwStatusclosed => new
2022-03-02 11:29timothee_catteeuwNote Edited: 0135381bug_revision_view_page.php?bugnote_id=0135381#r23711
2022-03-03 16:38guilleaerNote Edited: 0135381bug_revision_view_page.php?bugnote_id=0135381#r23717
2022-03-03 16:39guilleaerStatusnew => scheduled
2022-03-03 16:39guilleaerAssigned Tocberner => migueldejuana
2022-03-04 14:40hgbotNote Added: 0135475
2022-03-04 14:41hgbotNote Added: 0135476
2022-03-07 16:13hgbotStatusscheduled => closed
2022-03-07 16:13hgbotFixed in Version => RR22Q2
2022-03-07 16:13hgbotNote Added: 0135509
2022-03-07 16:13hgbotNote Added: 0135510
2022-03-07 16:14hgbotNote Added: 0135511
2022-03-07 16:14hgbotNote Added: 0135512

Notes
(0134893)
hgbot   
2022-02-10 18:08   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/807 [^]
(0134937)
hgbot   
2022-02-11 17:48   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 6589e846901da052eeb9d354a2682f8fc7d2f315
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 11-02-2022 10:42:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/6589e846901da052eeb9d354a2682f8fc7d2f315 [^]

Fixes ISSUE-48529: buyProduct and prepareProduct notification template does not work when using MD template

When using a masterdata printing template, saved in masterdata and not a
file, buyProductNotificationTemplate and
prepareProductNotificationTemplate do not work. This is due to them
being wrongly called in the frontend for printing. These are called in
some places with _ or OBPOS2_ prefixes, which shouldn't be done, due to
them being registered in masterdata without this prefixes, this commit
fixes that and should always be printed correctly. This does not affect
the cases where print template is declared with a file, those cases
follow another flow which was not modified.

---
M web-jspack/org.openbravo.pos2/src/authentication/loginInitActions.js
M web-jspack/org.openbravo.pos2/src/model/synchronization-buffer/ProductNotificationEndpoint.js
M web-jspack/org.openbravo.pos2/src/model/ticket/__test__/ProductNotification.test.js
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/GetProductNotificationMessages.js
M web-jspack/org.openbravo.pos2/src/services/pager/PagerHandler.js
M web-jspack/org.openbravo.pos2/src/services/pager/__test__/PagerHandler.test.jsx
---
(0134938)
hgbot   
2022-02-11 17:48   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/807 [^]
(0135381)
timothee_catteeuw   
2022-03-02 11:24   
(edited on: 2022-03-03 16:38)
Reopened after the merge of pickuppoints project

I tested with the last version of pickup point and this xml configured as printing template buyproductnotificationtemplate.xml and again no coupon is printed.

Steps to reproduce :

- create a new POS Print template (Module = empty, name = buyproductnotificationtemplate, template type = Buy Product with Notification Template, active = yes, printing template = (cf. link in Jira)

- Assign this template to a delivery method (with delivery control type = coupon)

- Go to organization and assign the notification type to a product and a pickupoint

- Go to webpos, refresh, logout and login, start a sale and take the product you previously configured which generates a buyproductnotificationtemplate described above

- Pay and select print

→ KO the coupon is not printed, moreover the sales is also not printed (No error displayed in developer tool)

→ Be careful because sometimes it happens for the second transaction after refreshing the till.

No error in dev mode.

→ to go back to the normal printing process, it is mandatory to clean cache on my browser, and assign the default template to the related delivery control type

(0135475)
hgbot   
2022-03-04 14:40   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/735 [^]
(0135476)
hgbot   
2022-03-04 14:41   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/849 [^]
(0135509)
hgbot   
2022-03-07 16:13   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 4e7d7576d0cec0b4f9ff576defb615911458b46a
Author: miguel.dejuana <miguel.dejuana@openbravo.com>
Date: 07-03-2022 15:09:39
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/4e7d7576d0cec0b4f9ff576defb615911458b46a [^]

Fixes ISSUE-0048529: buyproductnotificationtemplate.xml does not work when using Printing template option

If resource is not provided, initializer must handle the retrieval of the resourcedata

---
M web/org.openbravo.retail.posterminal/app/external-device/printing/PrintTemplate.js
---
(0135510)
hgbot   
2022-03-07 16:13   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/735 [^]
(0135511)
hgbot   
2022-03-07 16:14   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: e428c0184f2860029d9868f7cfdab956ac09c871
Author: miguel.dejuana <miguel.dejuana@openbravo.com>
Date: 07-03-2022 16:13:21
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/e428c0184f2860029d9868f7cfdab956ac09c871 [^]

Fixes ISSUE-0048529: buyproductnotificationtemplate.xml does not work when using Printing template option

If the template is not a Terminal Template, get it from Print Template by its name directly

---
M web-jspack/org.openbravo.pos2/src/services/printing/printTemplateInitializer.js
---
(0135512)
hgbot   
2022-03-07 16:14   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/849 [^]