Browse Source

[ADD] Initial Commit

pull/54/head
SHEREEF PT 8 years ago
parent
commit
49ccfdf093
  1. 14
      11.0/pos_ticket/README.rst
  2. 11
      11.0/pos_ticket/README.rst~
  3. 22
      11.0/pos_ticket/__init__.py
  4. 41
      11.0/pos_ticket/__manifest__.py
  5. 41
      11.0/pos_ticket/__manifest__.py~
  6. BIN
      11.0/pos_ticket/static/description/banner.jpg
  7. BIN
      11.0/pos_ticket/static/description/cybro_logo.png
  8. BIN
      11.0/pos_ticket/static/description/icon.png
  9. 78
      11.0/pos_ticket/static/description/index.html
  10. BIN
      11.0/pos_ticket/static/description/new_pos_logo.png
  11. BIN
      11.0/pos_ticket/static/description/new_receipt_pos.png
  12. BIN
      11.0/pos_ticket/static/description/old_pos_logo.png
  13. BIN
      11.0/pos_ticket/static/description/old_receipt.png
  14. 158
      11.0/pos_ticket/static/src/xml/pos_ticket_view.xml

14
11.0/pos_ticket/README.rst

@ -0,0 +1,14 @@
POS Ticket v11
==============
This module will add company logo & company info in POS receipt. Also it will print the customer name
in the receipt if the customer is selected.
Default POS logo will be replaced by the company logo in POS status bar
Credits
=======
Cybrosys Techno Solutions
Author
------
* Niyas Raphy <niyas@cybrosys.in>

11
11.0/pos_ticket/README.rst~

@ -0,0 +1,11 @@
POS Ticket
==========
This module will add company logo & info in POS receipt
Credits
=======
Cybrosys Techno Solutions
Author
------
* Cybrosys Techno Solutions <http://www.cybrosys.com>

22
11.0/pos_ticket/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

41
11.0/pos_ticket/__manifest__.py

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Company Logo In POS Receipt',
'summary': """Add Company Logo ,Info & Customer name to POS Ticket""",
'version': '11.0.1.0',
'description': """Add Company Logo , Info & Customer name to POS Ticket""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'http://www.cybrosys.com',
'category': 'Point Of Sale',
'depends': ['base', 'point_of_sale'],
'license': 'AGPL-3',
'data': [],
'qweb': ['static/src/xml/pos_ticket_view.xml'],
'images': ['static/description/banner.jpg'],
'demo': [],
'installable': True,
'auto_install': False,
}

41
11.0/pos_ticket/__manifest__.py~

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Company Logo In POS Receipt',
'summary': """Add Company Logo & Info to POS Ticket""",
'version': '10.0.1.0.0',
'description': """Add company logo and info to pos ticket""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'http://www.cybrosys.com',
'category': 'Point Of Sale',
'depends': ['base', 'point_of_sale'],
'license': 'AGPL-3',
'data': [],
'qweb': ['static/src/xml/pos_ticket_view.xml'],
'images': ['static/description/banner.jpg'],
'demo': [],
'installable': True,
'auto_install': False,
}

BIN
11.0/pos_ticket/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
11.0/pos_ticket/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
11.0/pos_ticket/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

78
11.0/pos_ticket/static/description/index.html

@ -0,0 +1,78 @@
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="color:#875A7B;">Company Logo In POS Receipt</h2>
<h3 class="oe_slogan">Company logo and info will be displayed in POS receipt</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a></h4>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h3 class="oe_slogan">Receipt Details</h3>
</div>
<p class="oe_mt32" style="margin-left:48px;">
Currently in Odoo POS receipt there is no company logo.
This module adds the company logo to the POS receipt so that the users will get more information about
the company from the receipt. Also replace the default POS logo in the Status bar with Company logo
</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="color:#875A7B;">Receipt</h2>
<div class="col-md-5">
<img class="oe_picture oe_screenshot" src="old_receipt.png"/>
</div>
<div class="col-md-2" style="top:50px;color:green">
<i class="fa fa-hand-o-right fa-2x" aria-hidden="true"></i>
</div>
<div class="col-md-5">
<img class="oe_picture oe_screenshot" src="new_receipt_pos.png"/>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="color:#875A7B;">POS Logo</h2>
<div class="col-md-5">
<img class="oe_picture oe_screenshot" src="old_pos_logo.png"/>
</div>
<div class="col-md-2" style="top:50px;color:green">
<i class="fa fa-hand-o-right fa-2x" aria-hidden="true"></i>
</div>
<div class="col-md-5">
<img class="oe_picture oe_screenshot" src="new_pos_logo.png"/>
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

BIN
11.0/pos_ticket/static/description/new_pos_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
11.0/pos_ticket/static/description/new_receipt_pos.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
11.0/pos_ticket/static/description/old_pos_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
11.0/pos_ticket/static/description/old_receipt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

158
11.0/pos_ticket/static/src/xml/pos_ticket_view.xml

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="point_of_sale.template" xml:space="preserve">
<t t-extend="Chrome">
<t t-jquery='.pos-branding' t-operation='replace'>
<img src='/web/binary/company_logo' style="width: 3%;padding: 2px 8px 0px 13px;float: left;"/>
<span class="placeholder-UsernameWidget" style="float: left;padding-top: 19px;color: #fff;"></span>
</t>
</t>
<t t-extend="PosTicket">
<t t-jquery='.pos-sale-ticket' t-operation='replace'>
<div class="pos-sale-ticket">
<div>
<div style="width: 55%; float: left; padding: 20px 0px;">
<t t-if="order.get_client()">
Customer: <t t-esc="order.get_client().name"/><br />
</t>
Cashier: <t t-esc="widget.pos.cashier ? widget.pos.cashier.name : widget.pos.user.name"/><br />
<t t-if="widget.pos.company.phone">
Phone: <t t-esc="widget.pos.company.phone || ''"/><br />
</t>
<t t-esc="order.name"/>
<t t-esc="moment().format('L LT')"/>
</div>
<div style="width: 45%;float: left; ">
<img src='/web/binary/company_logo' style="width:100%"/>
</div>
</div>
<t t-if="widget.pos.company.name">
<div style="width:100%;text-align:right;"><t t-esc="widget.pos.company.name"/></div>
</t>
<t t-if="widget.pos.company.email">
<div style="width:100%;text-align:right;"><t t-esc="widget.pos.company.email"/></div>
</t>
<br />
<t t-if="receipt.header">
<div style='text-align:center'>
<t t-esc="receipt.header" />
</div>
<br/>
</t>
<table class='receipt-orderlines'>
<colgroup>
<col width='40%' />
<col width='15%' />
<col width='15%' />
<col width='30%' />
</colgroup>
<tr style="border: 1px solid rgb(0, 0, 0);">
<th>Name</th>
<th>Qty</th>
<th>Price</th>
<th>Value</th>
</tr>
<tr t-foreach="orderlines" t-as="orderline">
<td>
<t t-esc="orderline.get_product().display_name"/>
<t t-if="orderline.get_discount() > 0">
<div class="pos-disc-font">
With a <t t-esc="orderline.get_discount()"/>% discount
</div>
</t>
</td>
<td>
<t t-esc="orderline.get_quantity_str_with_unit()"/>
</td>
<td>
<t t-set="a" t-value="orderline.quantityStr"></t>
<t t-set="b" t-value="orderline.get_display_price()"></t>
<t t-set="c" t-value="b/a"></t>
<t t-esc="c"/>
</td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(orderline.get_display_price())"/>
</td>
</tr>
</table>
<br />
<table class='receipt-total'>
<colgroup>
<col width='40%' />
<col width='30%' />
<col width='30%' />
</colgroup>
<tr>
<td></td>
<td>Subtotal:</td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(order.get_total_without_tax())"/>
</td>
</tr>
<t t-foreach="order.get_tax_details()" t-as="taxdetail">
<tr>
<td></td>
<td><t t-esc="taxdetail.name" /></td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(taxdetail.amount)"/>
</td>
</tr>
</t>
<tr>
<td></td>
<td>Discount:</td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(order.get_total_discount())"/>
</td>
</tr>
<tr class="emph">
<td>Total:</td>
<td colspan="2" style='text-align:right'>
<t t-esc="widget.format_currency(order.get_total_with_tax())"/>
</td>
</tr>
</table>
<br/>
<table class='receipt-paymentlines'>
<colgroup>
<col width='38%' />
<col width='20%' />
<col width='13%' />
<col width='29%' />
</colgroup>
<t t-foreach="paymentlines" t-as="line">
<tr>
<td>
<t t-esc="line.name"/>
</td>
<td>
</td>
<td>
</td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(line.get_amount())"/>
</td>
</tr>
</t>
</table>
<br/>
<table class='receipt-change'>
<colgroup>
<col width='40%' />
<col width='15%' />
<col width='15%' />
<col width='30%' />
</colgroup>
<tr><td>Change:</td>
<td>
</td>
<td>
</td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(order.get_change())"/>
</td></tr>
</table>
</div>
</t>
</t>
</templates>
Loading…
Cancel
Save