[IMP] point_of_sale: put the payment screen controls in the action bar
bzr revid: fva@openerp.com-20120524133930-z3pwpinc6rdj86l3
This commit is contained in:
parent
8ef967a392
commit
68a5af5711
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1,201 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
version="1.1"
|
||||
width="48"
|
||||
height="48"
|
||||
id="svg11300">
|
||||
<defs
|
||||
id="defs3">
|
||||
<linearGradient
|
||||
id="linearGradient1442">
|
||||
<stop
|
||||
id="stop1444"
|
||||
style="stop-color:#73d216;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop1446"
|
||||
style="stop-color:#4e9a06;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient8662">
|
||||
<stop
|
||||
id="stop8664"
|
||||
style="stop-color:#000000;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop8666"
|
||||
style="stop-color:#000000;stop-opacity:0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient8650">
|
||||
<stop
|
||||
id="stop8652"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop8654"
|
||||
style="stop-color:#ffffff;stop-opacity:0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
cx="24.837126"
|
||||
cy="36.421127"
|
||||
r="15.644737"
|
||||
fx="24.837126"
|
||||
fy="36.421127"
|
||||
id="radialGradient1444"
|
||||
xlink:href="#linearGradient8662"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
|
||||
<radialGradient
|
||||
cx="15.987216"
|
||||
cy="1.5350308"
|
||||
r="17.171415"
|
||||
fx="15.987216"
|
||||
fy="1.5350308"
|
||||
id="radialGradient3006"
|
||||
xlink:href="#linearGradient8650"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,2.046729,1.55761,0,2.91297,-22.93354)" />
|
||||
<radialGradient
|
||||
cx="35.292667"
|
||||
cy="20.494493"
|
||||
r="16.9562"
|
||||
fx="35.292667"
|
||||
fy="20.494493"
|
||||
id="radialGradient3009"
|
||||
xlink:href="#linearGradient1442"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0,0.843022,-1.020168,0,46.422124,1.41307)" />
|
||||
<linearGradient
|
||||
x1="46.5"
|
||||
y1="27"
|
||||
x2="80.5"
|
||||
y2="27"
|
||||
id="linearGradient3785"
|
||||
xlink:href="#linearGradient1442"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
x1="47.703129"
|
||||
y1="26.804157"
|
||||
x2="58.338215"
|
||||
y2="26.804157"
|
||||
id="linearGradient3807"
|
||||
xlink:href="#linearGradient8650"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
x1="58.968754"
|
||||
y1="24.609373"
|
||||
x2="75.09375"
|
||||
y2="24.609373"
|
||||
id="linearGradient3817"
|
||||
xlink:href="#linearGradient8650"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
x1="46.5"
|
||||
y1="27"
|
||||
x2="80.5"
|
||||
y2="27"
|
||||
id="linearGradient3825"
|
||||
xlink:href="#linearGradient1442"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
x1="47.703129"
|
||||
y1="26.804157"
|
||||
x2="58.338215"
|
||||
y2="26.804157"
|
||||
id="linearGradient3827"
|
||||
xlink:href="#linearGradient8650"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
x1="58.968754"
|
||||
y1="24.609373"
|
||||
x2="75.09375"
|
||||
y2="24.609373"
|
||||
id="linearGradient3829"
|
||||
xlink:href="#linearGradient8650"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata4">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Steiner</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:source>http://jimmac.musichall.cz</dc:source>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
|
||||
<dc:title></dc:title>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>go</rdf:li>
|
||||
<rdf:li>lower</rdf:li>
|
||||
<rdf:li>down</rdf:li>
|
||||
<rdf:li>arrow</rdf:li>
|
||||
<rdf:li>pointer</rdf:li>
|
||||
<rdf:li>></rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>Andreas Nilsson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/publicdomain/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<path
|
||||
d="m 40.481863,36.421127 a 15.644737,8.3968935 0 1 1 -31.2894745,0 15.644737,8.3968935 0 1 1 31.2894745,0 z"
|
||||
transform="matrix(0.90685456,0,0,0.595458,-2.8361621,15.68775)"
|
||||
id="path8660"
|
||||
style="opacity:0.20454544;color:#000000;fill:url(#radialGradient1444);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
|
||||
<g
|
||||
transform="translate(-40.03125,-3.65625)"
|
||||
id="g3819">
|
||||
<path
|
||||
d="M 52,23 47,28 59,40 80,19 75,14 59,30 z"
|
||||
id="path3002"
|
||||
style="fill:url(#linearGradient3825);fill-opacity:1;stroke:#3a7304;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||
<path
|
||||
d="M 52,24.417969 48.411612,28 59,38.601563 78.585938,19 75,15.414063 59,31.40625 z"
|
||||
id="path3787"
|
||||
style="opacity:0.5;fill:none;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 51.968752,23.734374 -4.265625,4.25 0.995256,1.104854 8.485282,0.04052 z"
|
||||
id="path3799"
|
||||
style="opacity:0.34893619;fill:url(#linearGradient3827);fill-opacity:1;stroke:none" />
|
||||
<path
|
||||
d="m 60.913297,28.932676 8.536072,0.01148 9.931219,-9.897748 -4.349335,-4.296415 z"
|
||||
id="path3809"
|
||||
style="opacity:0.26382979;fill:url(#linearGradient3829);fill-opacity:1;stroke:none" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.3 KiB |
|
@ -706,6 +706,22 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
|||
});
|
||||
|
||||
this.set_numpad_state(this.pos_widget.numpad.state);
|
||||
|
||||
this.back_button = this.pos_widget.action_bar.add_new_button({
|
||||
label: 'Back',
|
||||
icon: '/point_of_sale/static/src/img/icons/png48/go-previous.png',
|
||||
click: function(){
|
||||
self.pos_widget.screen_selector.set_current_screen('products');
|
||||
},
|
||||
});
|
||||
|
||||
this.validate_button = this.pos_widget.action_bar.add_new_button({
|
||||
label: 'Validate',
|
||||
icon: '/point_of_sale/static/src/img/icons/png48/validate.png',
|
||||
click: function(){
|
||||
self.validateCurrentOrder();
|
||||
},
|
||||
});
|
||||
},
|
||||
hide: function(){
|
||||
this._super();
|
||||
|
@ -719,12 +735,13 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
|||
var self = this;
|
||||
var currentOrder = this.pos.get('selectedOrder');
|
||||
|
||||
$('button#validate-order', this.$element).attr('disabled', 'disabled');
|
||||
this.validate_button.$element.attr('disabled','disabled'); //FIXME is the css actually using this attr ?
|
||||
|
||||
this.pos.push_order(currentOrder.exportAsJSON()).then(function() {
|
||||
$('button#validate-order', self.$element).removeAttr('disabled');
|
||||
self.pos_widget.screen_selector.set_current_screen('receipt');
|
||||
});
|
||||
this.pos.push_order(currentOrder.exportAsJSON())
|
||||
.then(function() {
|
||||
self.validate_button.$element.removeAttr('disabled');
|
||||
self.pos_widget.screen_selector.set_current_screen('receipt');
|
||||
});
|
||||
},
|
||||
bindPaymentLineEvents: function() {
|
||||
this.currentPaymentLines = (this.pos.get('selectedOrder')).get('paymentLines');
|
||||
|
@ -757,8 +774,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
|||
this.addPaymentLine(paymentLine);
|
||||
}, this));
|
||||
this.updatePaymentSummary();
|
||||
$('button#validate-order', this.$element).click(_.bind(this.validateCurrentOrder, this));
|
||||
$('.oe-back-to-products', this.$element).click(_.bind(this.back, this));
|
||||
},
|
||||
deleteLine: function(lineWidget) {
|
||||
this.currentPaymentLines.remove([lineWidget.model]);
|
||||
|
|
|
@ -346,12 +346,13 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
var button = new module.ActionButtonWidget(this,button_options);
|
||||
this.button_list.push(button);
|
||||
button.appendTo($('.pos-actionbar-button-list'));
|
||||
return button;
|
||||
}else{
|
||||
for(var i = 0; i < arguments.length; i++){
|
||||
this.add_new_button(arguments[i]);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
return undefined;
|
||||
},
|
||||
set_total_visible: function(visible){
|
||||
if(visible !== this.total_visibility){
|
||||
|
|
|
@ -208,14 +208,6 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pos-payment-buttons">
|
||||
<button class="oe-back-to-products">
|
||||
<img src="/web/static/src/img/icons/gtk-go-back.png"></img>
|
||||
Back to Products</button>
|
||||
<button id="validate-order">
|
||||
<img src="/web/static/src/img/icons/gtk-apply.png"></img>
|
||||
Validate</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t> <!-- pos-payment-screen -->
|
||||
|
|
Loading…
Reference in New Issue