Browse Source

Fix review comments

pull/33/head
Antonio Espinosa 10 years ago
parent
commit
960cb66403
  1. 16
      pos_with_tax/README.rst
  2. 21
      pos_with_tax/__init__.py
  3. 4
      pos_with_tax/__openerp__.py
  4. 14
      pos_with_tax/views/pos_template.xml
  5. 19
      pos_with_tax/views/report_receipt.xml
  6. 12
      pos_with_tax/views/report_receipt_view.xml

16
pos_with_tax/README.rst

@ -1,16 +1,18 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: AGPLv3 License
Point of sale with tax
======================
Product prices in POS with taxes
================================
Include tax in price on POS.
This addon shows the correct price indepently of the tax configuration
(with or without the "Tax included in price" check)
This addons takes care of tax configuration: price_include, showing prices
with tax included even price_include == True or price_include == False
It takes care of tax configuration: price_include, showing prices
with tax included even "Tax included in price" is checked (price_include == True)
or unchecked (price_include == False)
This helps to shop owner because he can set product prices with taxes
or without taxes, but prices are always shown in POS with taxes
This helps to shop owner because he can set product prices with or without taxes,
but prices are always shown in POS with taxes
Credits

21
pos_with_tax/__init__.py

@ -1,24 +1,3 @@
# -*- coding: utf-8 -*-
# Python source code encoding : https://www.python.org/dev/peps/pep-0263/
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright :
# (c) 2014 Antiun Ingenieria, SL (Madrid, Spain, http://www.antiun.com)
# Endika Iglesias <endikaig@antiun.com>
# Antonio Espinosa <antonioea@antiun.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

4
pos_with_tax/__openerp__.py

@ -23,7 +23,7 @@
#
##############################################################################
{
'name': 'Point of sale with tax',
'name': 'Product prices in POS with taxes',
'category': 'Point Of Sale',
'version': '1.0',
'depends': [
@ -31,7 +31,7 @@
],
'data': [
'views/pos_template.xml',
'views/report_receipt_view.xml',
'views/report_receipt.xml',
],
'qweb': [
'static/src/xml/pos.xml',

14
pos_with_tax/views/pos_template.xml

@ -1,13 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="pos_with_tax_backend"
name="pos_with_tax_backend"
inherit_id="point_of_sale.assets_backend">
<data>
<template id="assets_backend"
inherit_id="point_of_sale.assets_backend"
name="Add POS with tax asset">
<xpath expr="." position="inside">
<script src="/pos_with_tax/static/src/js/main.js"
type="text/javascript"></script>
</xpath>
</template>
</template>
</data>
</data>
</openerp>

19
pos_with_tax/views/report_receipt.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_receipt"
inherit_id="point_of_sale.report_receipt"
name="POS price with tax included">
<xpath expr="//span[@t-esc='formatLang(net(line.id), currency_obj=res_company.currency_id)']"
position="attributes">
<attribute name="style">display: none;</attribute>
</xpath>
<xpath expr="//span[@t-esc='formatLang(net(line.id), currency_obj=res_company.currency_id)']"
position="after">
<span t-esc="formatLang(line.price_subtotal_incl, currency_obj=res_company.currency_id)"/>
</xpath>
</template>
</data>
</openerp>

12
pos_with_tax/views/report_receipt_view.xml

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="pos_with_tax_report_receipt"
inherit_id="point_of_sale.report_receipt">
<xpath expr="//div/table[@class='table table-condensed']/tbody/tr/td[@class='text-right'][2]/t[1]/span"
position="attributes">
<attribute name="t-esc">formatLang(line.price_subtotal_incl, currency_obj=res_company.currency_id)</attribute>
</xpath>
</template>
</data>
</openerp>
Loading…
Cancel
Save