Browse Source

[FIX] Fix the display of the price in the pos ticket generated in the backend. Use the configuration of the session, if tva included show price tva included else show price without tax

pull/56/head v1.2.1-2018-12-02
Thibault Francois 6 years ago
parent
commit
d91d0e92c3
  1. 21
      beesdoo_pos/models/beesdoo_pos.py

21
beesdoo_pos/models/beesdoo_pos.py

@ -75,3 +75,24 @@ class BeescoopPosPartner(models.Model):
def get_eater(self):
eater1, eater2, eater3 = self._get_eater()
return eater1, eater2, eater3
from openerp.addons.point_of_sale.report import pos_receipt
class order_tva_included(pos_receipt.order):
def __init__(self, cr, uid, name, context):
super(order_tva_included, self).__init__(cr, uid, name, context=context)
self.env = api.Environment(cr, uid, context)
def netamount(self, order_line_id):
order_line = self.env['pos.order.line'].browse(order_line_id)
if order_line.order_id.config_id.iface_tax_included:
return order_line.price_subtotal_incl
else:
return order_line.price_subtotal
class report_order_receipt(models.AbstractModel):
_inherit = 'report.point_of_sale.report_receipt'
_template = 'point_of_sale.report_receipt'
_wrapped_report_class = order_tva_included
Loading…
Cancel
Save