diff options
| author | Frédéric Van der Essen <fva@openerp.com> | 2014-08-25 17:36:12 +0200 |
|---|---|---|
| committer | Frédéric Van der Essen <fva@openerp.com> | 2014-08-25 17:36:12 +0200 |
| commit | e96bb90d21b72d18e61438ddf5ea2c28cd9673fb (patch) | |
| tree | 2d7e1313f52573a05ae6a8aefe25b6a43bc6e0e3 /addons/restaurant/static/src/xml | |
| parent | 48e0afcf95dd3263bd226066b4f1fc4aa450ccd5 (diff) | |
| parent | d7f93defb899b2b48a14d679e5dffffdb4a00eff (diff) | |
Merge pull request #1983 from odoo-dev/master-pos-new-payment-screen-fva
Point of Sale : New Payment Screen & Receipt Screens
Diffstat (limited to 'addons/restaurant/static/src/xml')
| -rw-r--r-- | addons/restaurant/static/src/xml/multiprint.xml | 56 | ||||
| -rw-r--r-- | addons/restaurant/static/src/xml/printbill.xml | 143 | ||||
| -rw-r--r-- | addons/restaurant/static/src/xml/splitbill.xml | 88 |
3 files changed, 287 insertions, 0 deletions
diff --git a/addons/restaurant/static/src/xml/multiprint.xml b/addons/restaurant/static/src/xml/multiprint.xml new file mode 100644 index 00000000000..63176f8938f --- /dev/null +++ b/addons/restaurant/static/src/xml/multiprint.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="SubmitOrderButton"> + <span class="control-button order-submit"> + <i class="fa fa-cutlery"></i> + Order + </span> + </t> + + <t t-name="OrderChangeReceipt"> + <receipt + align='center' + width='40' + size='double-height' + line-ratio='0.6' + value-decimals='3' + value-thousands-separator='' + value-autoint='on' + > + <div>#<t t-esc="changes.sequence_number" /></div> + <div size='normal'><t t-esc="changes.name" /></div> + <br /> + <br /> + <t t-if="changes.cancelled.length > 0"> + <div color='red'> + <div bold='on' size='double'>CANCELLED</div> + <br /> + <br /> + <t t-foreach="changes.cancelled" t-as="change"> + <line> + <left><t t-esc="change.name" /></left> + <right><value><t t-esc="change.quantity" /></value></right> + </line> + </t> + <br /> + <br /> + </div> + </t> + <t t-if="changes.new.length > 0"> + <div bold='on' size='double'>NEW</div> + <br /> + <br /> + <t t-foreach="changes.new" t-as="change"> + <line> + <left><t t-esc="change.name" /></left> + <right><value><t t-esc="change.quantity" /></value></right> + </line> + </t> + <br /> + <br /> + </t> + </receipt> + </t> + +</templates> diff --git a/addons/restaurant/static/src/xml/printbill.xml b/addons/restaurant/static/src/xml/printbill.xml new file mode 100644 index 00000000000..8727743a2ad --- /dev/null +++ b/addons/restaurant/static/src/xml/printbill.xml @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="PrintBillButton"> + <span class="control-button order-printbill"> + <i class="fa fa-print"></i> + Bill + </span> + </t> + + <t t-name="BillReceipt"> + <receipt align='center' width='40' value-thousands-separator='' > + <t t-if='receipt.company.logo'> + <img t-att-src='receipt.company.logo' /> + <br/> + </t> + <t t-if='!receipt.company.logo'> + <h1><t t-esc='receipt.company.name' /></h1> + <br/> + </t> + <div font='b'> + <t t-if='receipt.shop.name'> + <div><t t-esc='receipt.shop.name' /></div> + </t> + <t t-if='receipt.company.contact_address'> + <div><t t-esc='receipt.company.contact_address' /></div> + </t> + <t t-if='receipt.company.phone'> + <div>Tel:<t t-esc='receipt.company.phone' /></div> + </t> + <t t-if='receipt.company.vat'> + <div>VAT:<t t-esc='receipt.company.vat' /></div> + </t> + <t t-if='receipt.company.email'> + <div><t t-esc='receipt.company.email' /></div> + </t> + <t t-if='receipt.company.website'> + <div><t t-esc='receipt.company.website' /></div> + </t> + <t t-if='receipt.header'> + <div><t t-esc='receipt.header' /></div> + </t> + <t t-if='receipt.cashier'> + <div>--------------------------------</div> + <div>Served by <t t-esc='receipt.cashier' /></div> + </t> + </div> + <br /><br /> + + <!-- Orderlines --> + + <div line-ratio='0.6'> + <t t-foreach='receipt.orderlines' t-as='line'> + <t t-set='simple' t-value='line.discount === 0 and line.unit_name === "Unit(s)" and line.quantity === 1' /> + <t t-if='simple'> + <line> + <left><t t-esc='line.product_name' /></left> + <right><value><t t-esc='line.price_display' /></value></right> + </line> + </t> + <t t-if='!simple'> + <line><left><t t-esc='line.product_name' /></left></line> + <t t-if='line.discount !== 0'> + <line indent='1'><left>Discount: <t t-esc='line.discount' />%</left></line> + </t> + <line indent='1'> + <left> + <value value-decimals='3' value-autoint='on'> + <t t-esc='line.quantity' /> + </value> + <t t-if='line.unit_name !== "Unit(s)"'> + <t t-esc='line.unit_name' /> + </t> + x + <value value-decimals='2'> + <t t-esc='line.price' /> + </value> + </left> + <right> + <value><t t-esc='line.price_display' /></value> + </right> + </line> + </t> + </t> + </div> + + <!-- Subtotal --> + <t t-set='taxincluded' t-value='Math.abs(receipt.subtotal - receipt.total_with_tax) <= 0.000001' /> + <t t-if='!taxincluded'> + <line><right>--------</right></line> + <line><left>Subtotal</left><right> <value><t t-esc="receipt.subtotal" /></value></right></line> + <t t-foreach='receipt.tax_details' t-as='tax'> + <line> + <left><t t-esc='tax.name' /></left> + <right><value><t t-esc='tax.amount' /></value></right> + </line> + </t> + </t> + + <!-- Total --> + + <line><right>--------</right></line> + <line size='double-height'> + <left><pre> TOTAL</pre></left> + <right><value><t t-esc='receipt.total_with_tax' /></value></right> + </line> + <br/><br/> + + <!-- Extra Payment Info --> + + <t t-if='receipt.total_discount'> + <line> + <left>Discounts</left> + <right><value><t t-esc='receipt.total_discount'/></value></right> + </line> + </t> + <t t-if='taxincluded'> + <t t-foreach='receipt.tax_details' t-as='tax'> + <line> + <left><t t-esc='tax.name' /></left> + <right><value><t t-esc='tax.amount' /></value></right> + </line> + </t> + </t> + + <!-- Footer --> + <t t-if='receipt.footer'> + <br/> + <pre><t t-esc='receipt.footer' /></pre> + <br/> + <br/> + </t> + + <br/> + <div font='b'> + <div><t t-esc='receipt.name' /></div> + <div><t t-esc='receipt.date.localestring' /></div> + </div> + + </receipt> + </t> + +</templates> diff --git a/addons/restaurant/static/src/xml/splitbill.xml b/addons/restaurant/static/src/xml/splitbill.xml new file mode 100644 index 00000000000..d56f01aaa9b --- /dev/null +++ b/addons/restaurant/static/src/xml/splitbill.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="SplitbillButton"> + <span class="control-button order-split"> + <i class="fa fa-copy"></i> + Split + </span> + </t> + + <t t-name="SplitOrderline"> + + <li t-attf-class="orderline #{ selected ? 'selected' : ''} #{ quantity !== line.get_quantity() ? 'partially' : '' }" + t-att-data-id="id"> + <span class="product-name"> + <t t-esc="line.get_product().name"/> + </span> + <span class="price"> + <t t-esc="widget.format_currency(line.get_display_price())"/> + </span> + <ul class="info-list"> + <t t-if="line.get_quantity_str() !== '1'"> + <li class="info"> + <t t-if='selected and line.get_unit().groupable'> + <em class='big'> + <t t-esc='quantity' /> + </em> + / + <t t-esc="line.get_quantity_str()" /> + </t> + <t t-if='!(selected and line.get_unit().groupable)'> + <em> + <t t-esc="line.get_quantity_str()" /> + </em> + </t> + <t t-esc="line.get_unit().name" /> + at + <t t-esc="widget.format_currency(line.get_unit_price())" /> + / + <t t-esc="line.get_unit().name" /> + </li> + </t> + <t t-if="line.get_discount_str() !== '0'"> + <li class="info"> + With a + <em> + <t t-esc="line.get_discount_str()" />% + </em> + discount + </li> + </t> + </ul> + </li> + </t> + + <t t-name="SplitbillScreenWidget"> + <div class='splitbill-screen screen'> + <div class='screen-content'> + <div class='top-content'> + <span class='button back'> + <i class='fa fa-angle-double-left'></i> + Back + </span> + <h1>Bill Splitting</h1> + </div> + <div class='left-content touch-scrollable scrollable-y'> + <div class='order'> + <ul class='orderlines'> + </ul> + </div> + </div> + <div class='right-content touch-scrollable scrollable-y'> + <div class='order-info'> + <span class='subtotal'><t t-esc='widget.format_currency(0.0)'/></span> + </div> + <div class='paymentmethods'> + <t t-foreach="widget.pos.cashregisters" t-as="cashregister"> + <div class='button paymentmethod' t-att-data-id="cashregister.id"> + <t t-esc='cashregister.journal.name' /> + </div> + </t> + </div> + </div> + </div> + </div> + </t> + +</templates> |
