X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=addons%2Fpoint_of_sale%2Freport%2Fpos_order_report.py;fp=addons%2Fpoint_of_sale%2Freport%2Fpos_order_report.py;h=58e03da50f8cd0f7457fd9de5ad289049a349568;hb=b5164698f255633e68e6c3b75f30eae8492326dc;hp=aa25052974b8288ec97b5104909846bfab50be0d;hpb=fa93166a1f68fadaac40fd804a2ec8f14b502e7d;p=odoo%2Fodoo.git diff --git a/addons/point_of_sale/report/pos_order_report.py b/addons/point_of_sale/report/pos_order_report.py index aa25052..58e03da 100644 --- a/addons/point_of_sale/report/pos_order_report.py +++ b/addons/point_of_sale/report/pos_order_report.py @@ -31,6 +31,7 @@ class pos_order_report(osv.osv): 'date': fields.datetime('Date Order', readonly=True), 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True), 'product_id':fields.many2one('product.product', 'Product', readonly=True), + 'product_tmpl_id': fields.many2one('product.template', 'Product Template', readonly=True), 'state': fields.selection([('draft', 'New'), ('paid', 'Closed'), ('done', 'Synchronized'), ('invoiced', 'Invoiced'), ('cancel', 'Cancelled')], 'Status'), 'user_id':fields.many2one('res.users', 'Salesperson', readonly=True), @@ -44,6 +45,11 @@ class pos_order_report(osv.osv): 'journal_id': fields.many2one('account.journal', 'Journal'), 'delay_validation': fields.integer('Delay Validation'), 'product_categ_id': fields.many2one('product.category', 'Product Category', readonly=True), + 'invoiced': fields.boolean('Invoiced', readonly=True), + 'config_id' : fields.many2one('pos.config', 'Point of Sale', readonly=True), + 'pos_categ_id': fields.many2one('pos.category','Public Category', readonly=True), + 'stock_location_id': fields.many2one('stock.location', 'Warehouse', readonly=True), + 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', readonly=True), } _order = 'date desc' @@ -67,17 +73,22 @@ class pos_order_report(osv.osv): s.company_id as company_id, s.sale_journal as journal_id, l.product_id as product_id, - pt.categ_id as product_categ_id + pt.categ_id as product_categ_id, + p.product_tmpl_id, + ps.config_id, + pt.pos_categ_id, + pc.stock_location_id, + s.pricelist_id, + s.invoice_id IS NOT NULL AS invoiced from pos_order_line as l left join pos_order s on (s.id=l.order_id) left join product_product p on (l.product_id=p.id) left join product_template pt on (p.product_tmpl_id=pt.id) left join product_uom u on (u.id=pt.uom_id) + left join pos_session ps on (s.session_id=ps.id) + left join pos_config pc on (ps.config_id=pc.id) group by s.date_order, s.partner_id,s.state, pt.categ_id, - s.user_id,s.location_id,s.company_id,s.sale_journal,l.product_id,s.create_date + s.user_id,s.location_id,s.company_id,s.sale_journal,s.pricelist_id,s.invoice_id,l.product_id,s.create_date,pt.categ_id,pt.pos_categ_id,p.product_tmpl_id,ps.config_id,pc.stock_location_id having sum(l.qty * u.factor) != 0)""") - - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: