Merge lp:~openerp-dev/openobject-addons/7.0-opw-586154-msh into lp:openobject-addons/7.0

Proposed by Mohammed Shekha(Open ERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: no longer in the source branch.
Merged at revision: 9210
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-586154-msh
Merge into: lp:openobject-addons/7.0
Diff against target: 68 lines (+9/-7)
2 files modified
point_of_sale/static/src/js/screens.js (+6/-5)
point_of_sale/static/src/js/widgets.js (+3/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-586154-msh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+148987@code.launchpad.net

Description of the change

Hello,

Fixed the issue of translation of POS action buttons.

Demo:- Go to POS front end interface, create one order and select journal, the buttons Back, Validate, Print, Next Order is not tranlsated, so used _t translation database.

Thanks.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'point_of_sale/static/src/js/screens.js'
--- point_of_sale/static/src/js/screens.js 2013-01-29 14:01:46 +0000
+++ point_of_sale/static/src/js/screens.js 2013-02-18 06:28:23 +0000
@@ -16,7 +16,8 @@
16// hide()s16// hide()s
1717
18function openerp_pos_screens(instance, module){ //module is instance.point_of_sale18function openerp_pos_screens(instance, module){ //module is instance.point_of_sale
19 var QWeb = instance.web.qweb;19 var QWeb = instance.web.qweb,
20 _t = instance.web._t;
2021
21 module.ScreenSelector = instance.web.Class.extend({22 module.ScreenSelector = instance.web.Class.extend({
22 init: function(options){23 init: function(options){
@@ -808,13 +809,13 @@
808 var self = this;809 var self = this;
809810
810 this.add_action_button({811 this.add_action_button({
811 label: 'Print',812 label: _t('Print'),
812 icon: '/point_of_sale/static/src/img/icons/png48/printer.png',813 icon: '/point_of_sale/static/src/img/icons/png48/printer.png',
813 click: function(){ self.print(); },814 click: function(){ self.print(); },
814 });815 });
815816
816 this.add_action_button({817 this.add_action_button({
817 label: 'Next Order',818 label: _t('Next Order'),
818 icon: '/point_of_sale/static/src/img/icons/png48/go-next.png',819 icon: '/point_of_sale/static/src/img/icons/png48/go-next.png',
819 click: function() { self.finishOrder(); },820 click: function() { self.finishOrder(); },
820 });821 });
@@ -870,7 +871,7 @@
870 this.set_numpad_state(this.pos_widget.numpad.state);871 this.set_numpad_state(this.pos_widget.numpad.state);
871 872
872 this.back_button = this.add_action_button({873 this.back_button = this.add_action_button({
873 label: 'Back',874 label: _t('Back'),
874 icon: '/point_of_sale/static/src/img/icons/png48/go-previous.png',875 icon: '/point_of_sale/static/src/img/icons/png48/go-previous.png',
875 click: function(){ 876 click: function(){
876 self.pos_widget.screen_selector.set_current_screen(self.back_screen);877 self.pos_widget.screen_selector.set_current_screen(self.back_screen);
@@ -878,7 +879,7 @@
878 });879 });
879 880
880 this.validate_button = this.add_action_button({881 this.validate_button = this.add_action_button({
881 label: 'Validate',882 label: _t('Validate'),
882 name: 'validation',883 name: 'validation',
883 icon: '/point_of_sale/static/src/img/icons/png48/validate.png',884 icon: '/point_of_sale/static/src/img/icons/png48/validate.png',
884 click: function(){885 click: function(){
885886
=== modified file 'point_of_sale/static/src/js/widgets.js'
--- point_of_sale/static/src/js/widgets.js 2013-01-29 14:01:46 +0000
+++ point_of_sale/static/src/js/widgets.js 2013-02-18 06:28:23 +0000
@@ -1,5 +1,6 @@
1function openerp_pos_widgets(instance, module){ //module is instance.point_of_sale1function openerp_pos_widgets(instance, module){ //module is instance.point_of_sale
2 var QWeb = instance.web.qweb;2 var QWeb = instance.web.qweb,
3 _t = instance.web._t;
34
4 // The ImageCache is used to hide the latency of the application cache on-disk access in chrome 5 // The ImageCache is used to hide the latency of the application cache on-disk access in chrome
5 // that causes annoying flickering on product pictures. Why the hell a simple access to6 // that causes annoying flickering on product pictures. Why the hell a simple access to
@@ -969,7 +970,7 @@
969 this.onscreen_keyboard.appendTo($(".point-of-sale #content")); 970 this.onscreen_keyboard.appendTo($(".point-of-sale #content"));
970971
971 this.close_button = new module.HeaderButtonWidget(this,{972 this.close_button = new module.HeaderButtonWidget(this,{
972 label:'Close',973 label: _t('Close'),
973 action: function(){ self.try_close(); },974 action: function(){ self.try_close(); },
974 });975 });
975 this.close_button.appendTo(this.$('#rightheader'));976 this.close_button.appendTo(this.$('#rightheader'));