From f5679b7b8d49970633ade676524cf3ec916514f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Thu, 24 May 2012 16:14:08 +0200 Subject: [PATCH] [IMP] point_of_sale: put the receipt screen buttons in the action bar bzr revid: fva@openerp.com-20120524141408-10ru52eqcjbew2rw --- .../static/src/img/icons/png48/printer.png | Bin 0 -> 1681 bytes .../static/src/img/icons/printer.svg | 502 ++++++++++++++++++ .../static/src/js/pos_screens.js | 14 +- addons/point_of_sale/static/src/xml/pos.xml | 5 - 4 files changed, 514 insertions(+), 7 deletions(-) create mode 100644 addons/point_of_sale/static/src/img/icons/png48/printer.png create mode 100644 addons/point_of_sale/static/src/img/icons/printer.svg diff --git a/addons/point_of_sale/static/src/img/icons/png48/printer.png b/addons/point_of_sale/static/src/img/icons/png48/printer.png new file mode 100644 index 0000000000000000000000000000000000000000..9747f37ddcca05adcc3024ae4ff827f21e1aa9ac GIT binary patch literal 1681 zcmV;C25$L@P)o%Ze?=j`}Z#Z001F$MObuGZ*_8GWdLY&bZ|N^FKTIRZDC_BZFO^LV`yP) zY%XJZX=dYI0000b7gZcaCKsAX=7w>ZDDC{FImI>$^ZZbQ%OWYRA_Hw2^g&e#J1M<(3Xa_&_f|u%^WN9P{K@Xls55I^4ebw}&b;@{d%xfN z-uJyXvy6!FGDF#G0z1Y30`?k-sD@XrT=|-azL!!q?Dm&N;82T?CZN<>rZriOT?9tNAu>O$q=Qh7pHSxPZaI!M6>=_{p-Y_r0{) z+1UxxG_kg}2F6(IV|6X*%KJly4*A!fnDgh)6X3*zs;YkoAx_=6aU*a5W3`#!^y$;> z9UUEyMn^~64;(n)*I&JQ6-SRA^#|DLtZ!DIOeQfsJ&n=PQ2@^AcX9D=x_0gQqm`AF z*Y4c8Q?9fRcp#ZfUO#c-M6!~+hfF3DNPRmY8`kC}iF`f}+qS_NLwEP9?AWnmos*N3 z-vRh`Qvo9*BOmwn_I}ad->*t3s|HA=QYaJ(n-YkF?SeX$O8GlJ02GTw96x@Xr)Ous z8X6k<_2$i+Gob=>UH|6n*|VW}?97=n{xuQ##k;Spuf2{diiluYmM?;cAcVk|=gt|I zE?xQoz$c*sEX(?+rKJUmqC|f4Y9ur*0U^W(m337DY};}TU#4A*I?UrAg%%n-4n2~vI5gI@#M)<+`e_YYUgbvGTE%ZDnuL) zB$KW9YkC@|PM*a0`1mf<49A1HIjpX(Lf4&TALfC803jR!eSLk%WtVVqd>o3RhICKc zUG4}(1j8`!*1!Omn?xcB@Z6-HL(K%111QsCLMG9Jt= zmLERMPTae9Zx#S^i@y)p00aP$PN#p?b>91rng5Vz-~0q+m&>I;XJ%%8Lj_l$;-#K3 z)(oK4Erwe-oF%L60cpS?>-{eQ*Z{EZmI4uxzY`PDhWlD40h9q0;dn>^5Ox@91O%K3 z6fUQd%WIw7nGbwcVT`E&bU3rFVs8aVw+H|hfM-NxRT=~Y)PgalVDEm8B_i7LYwxxK b_B;LsbzY-L<5yxk00000NkvXXu0mjf{wM7; literal 0 HcmV?d00001 diff --git a/addons/point_of_sale/static/src/img/icons/printer.svg b/addons/point_of_sale/static/src/img/icons/printer.svg new file mode 100644 index 00000000000..4c702dc48e2 --- /dev/null +++ b/addons/point_of_sale/static/src/img/icons/printer.svg @@ -0,0 +1,502 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Printer + + + Jakub Steiner + + + + http://jimmac.musichall.cz + + + printer + local + laser + bubblejet + inkjet + print + output + cups + lpd + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/point_of_sale/static/src/js/pos_screens.js b/addons/point_of_sale/static/src/js/pos_screens.js index 875524dfaa1..4281125dd27 100644 --- a/addons/point_of_sale/static/src/js/pos_screens.js +++ b/addons/point_of_sale/static/src/js/pos_screens.js @@ -642,8 +642,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa start: function() { this.pos.bind('change:selectedOrder', this.change_selected_order, this); this.change_selected_order(); - $('button#pos-finish-order', this.$element).click(_.bind(this.finishOrder, this)); - $('button#print-the-ticket', this.$element).click(_.bind(this.print, this)); }, show: function(){ this._super(); @@ -657,6 +655,18 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.pos_widget.action_bar.set_logout_visible(true, function(){ self.pos_widget.screen_selector.set_user_mode('client'); }); + + this.pos_widget.action_bar.add_new_button({ + label: 'Print', + icon: '/point_of_sale/static/src/img/icons/png48/printer.png', + click: function(){ self.print(); }, + }); + + this.pos_widget.action_bar.add_new_button({ + label: 'Next Order', + icon: '/point_of_sale/static/src/img/icons/png48/go-next.png', + click: function() { self.finishOrder(); }, + }); }, print: function() { window.print(); diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index 930dbd3c18f..8ac4f0f49c8 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -218,11 +218,6 @@
-
- - -