~openerp-community/openobject-addons/taktik

« back to all changes in this revision

Viewing changes to point_of_sale/report/pos_lines.py

  • Committer: Fabien Lydoire
  • Date: 2010-01-08 12:48:56 UTC
  • Revision ID: fl@taktik.be-20100108124856-j2ccwjqbuybn0hht
betterĀ posĀ module

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- encoding: utf-8 -*-
2
2
##############################################################################
3
3
#
4
 
#    OpenERP, Open Source Management Solution
 
4
#    OpenERP, Open Source Management Solution   
5
5
#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
6
6
#    $Id$
7
7
#
32
32
        self.localcontext.update({
33
33
                'time': time,
34
34
                'total_quantity': self.__total_quantity__,
35
 
                'taxes':self.__taxes__,
36
 
 
37
35
        })
38
36
 
39
37
    def __total_quantity__(self, obj):
43
41
        self.total = tot
44
42
        return self.total
45
43
 
46
 
    def __taxes__(self,obj):
47
 
        self.cr.execute ( " Select acct.name from pos_order as po " \
48
 
                              " LEFT JOIN pos_order_line as pol ON po.id = pol.order_id " \
49
 
                              " LEFT JOIN product_taxes_rel as ptr ON pol.product_id = ptr.prod_id " \
50
 
                              " LEFT JOIN account_tax as acct ON acct.id = ptr.tax_id " \
51
 
                              " WHERE pol.id = %d" %(obj.id))
52
 
        res=self.cr.fetchone()[0]
53
 
        return res
54
 
 
55
 
 
56
44
report_sxw.report_sxw('report.pos.lines', 'pos.order', 'addons/point_of_sale/report/pos_lines.rml', parser=pos_lines)
57
45
 
58
46
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: