Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034579Retail ModulesWeb POSpublic2016-11-18 12:582016-11-23 11:56
airaceburu 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
pi 
RR17Q1 
marvintm
No
0034579: Forcedtemplate parameter does not work when set before PrePrint hook
The forcedTemplate parameter does not work when set before PrePrint hook as it is retrieved from args inside the success callback of the hook and is not being send to it.
Do:

receipt.trigger('print', receipt, {
      forcedtemplate: '1'
    });

set a breakpoint in "if (args.forcedtemplate)"

Check that it does not stop
Send the paramter to the PrePrint hook, or send all printargs to the PrePrint hook:

OB.UTIL.HookManager.executeHooks('OBPRINT_PrePrint', {
      forcePrint: printargs.forcePrint,
      offline: printargs.offline,
      order: order ? order : me.receipt,
      template: template,
      callback: printargs.callback,
      forcedtemplate: printargs.forcedtemplate
    }

or

OB.UTIL.HookManager.executeHooks('OBPRINT_PrePrint', {
      forcePrint: printargs.forcePrint,
      offline: printargs.offline,
      order: order ? order : me.receipt,
      template: template,
      callback: printargs.callback,
      printargs: printargs
    }
No tags attached.
Issue History
2016-11-18 12:58airaceburuNew Issue
2016-11-18 12:58airaceburuAssigned To => Retail
2016-11-18 12:58airaceburuResolution time => 1480633200
2016-11-18 12:58airaceburuTriggers an Emergency Pack => No
2016-11-18 12:59airaceburuSummaryForcedtemplate parameter does not worked when set before PrePrint hook => Forcedtemplate parameter does not work when set before PrePrint hook
2016-11-21 16:06ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2016-11-21 16:06ranjith_qualiantech_comStatusnew => scheduled
2016-11-22 17:20hgbotCheckin
2016-11-22 17:20hgbotNote Added: 0091751
2016-11-22 17:20hgbotStatusscheduled => resolved
2016-11-22 17:20hgbotResolutionopen => fixed
2016-11-22 17:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1a7326589f3a4f9d03b6d6de28e303131996dda1 [^]
2016-11-23 11:56marvintmReview Assigned To => marvintm
2016-11-23 11:56marvintmStatusresolved => closed
2016-11-23 11:56marvintmFixed in Version => RR17Q1

Notes
(0091751)
hgbot   
2016-11-22 17:20   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1a7326589f3a4f9d03b6d6de28e303131996dda1
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Nov 22 21:47:50 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1a7326589f3a4f9d03b6d6de28e303131996dda1 [^]

Fixes issue 34579 : Add Missing attributes to OBPRINT_PrePrint hook

---
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-print.js
---