This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<templates id="template" xml:space="preserve"> | |
<!-- Inherit to add fixed discount in template--> | |
<t t-extend="Orderline"> | |
<t t-jquery="ul.info-list" t-operation="replace"> | |
<ul class="info-list"> | |
<t t-if="line.get_quantity_str() !== '1' || line.selected "> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.Order = Backbone.Model.extend({ | |
addProduct: function(product, options){ | |
options = options || {}; | |
var attr = JSON.parse(JSON.stringify(product)); | |
attr.pos = this.pos; | |
attr.order = this; | |
var line = new module.Orderline({}, {pos: this.pos, order: this, product: product}); | |
console.log("add products................",product) | |
if(options.quantity !== undefined){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.PosWidget = module.PosWidget.extend({ | |
build_widgets: function() { | |
var self = this; | |
this._super(); | |
this.discount_card_widget = new module.PaymentScreenDiscountWidget(this, {}); | |
this.discount_card_widget.replace($('.placeholder-PaymentScreenDiscountWidget')); | |
}, | |
}); |
NewerOlder