[IMP]:point_of_sale:Improves pos_details report

bzr revid: azaz.201186@gmail.com-20101012120447-82n9q5fv4m6ju1fk
This commit is contained in:
saz-OpenERP 2010-10-12 17:34:47 +05:30
parent c996f70aa4
commit e359ba1aee
2 changed files with 9 additions and 9 deletions

View File

@ -36,12 +36,12 @@ class pos_details(report_sxw.rml_parse):
def _pos_sales_details(self,form,user):
data={}
self.cr.execute ("select po.name as pos_name,po.date_order,pt.name ,pol.qty,pol.price_unit,pol.discount,po.invoice_id,sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as Total " \
"from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt,res_users as ru,res_company as rc " \
"where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id and po.state IN ('done','paid','invoiced') " \
self.cr.execute ("select po.name as pos_name,po.date_order,pt.name ,pp.default_code as code,pol.qty,pu.name as uom,pol.price_unit,pol.discount,po.invoice_id,sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as Total " \
"from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt,product_uom as pu,res_users as ru,res_company as rc " \
"where pt.id=pp.product_tmpl_id and pu.id=pt.uom_id and pp.id=pol.product_id and po.id = pol.order_id and po.state IN ('done','paid','invoiced') " \
"and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date >= %s and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date <= %s " \
"and po.user_id = ru.id and rc.id = %s and ru.id = %s " \
"group by po.name,pol.qty,po.date_order,pt.name,pol.price_unit,pol.discount,po.invoice_id " \
"group by po.name,pol.qty,po.date_order,pt.name,pp.default_code,pu.name,pol.price_unit,pol.discount,po.invoice_id " \
,(form['date_start'],form['date_end'],str(user.company_id.id),str(self.uid)))
data=self.cr.dictfetchall()
if data:

View File

@ -199,7 +199,7 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="67.0,65.0,143.0,59.0,40.0,47.0,88.0" style="Table4">
<blockTable colWidths="53.0,44.0,158.0,54.0,76.0,37.0,88.0" style="Table4">
<tr>
<td>
<para style="terp_tblheader_Details">Date</para>
@ -214,7 +214,7 @@
<para style="terp_tblheader_Details_Right">Price </para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Qty</para>
<para style="terp_tblheader_Details_Centre">Qty</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Disc(%) </para>
@ -226,7 +226,7 @@
</blockTable>
<section>
<para style="terp_default_1">[[ repeatIn(pos_sales_details(data['form'],user), 'line_ids') ]]</para>
<blockTable colWidths="67.0,66.0,142.0,59.0,41.0,46.0,89.0" style="Table6">
<blockTable colWidths="54.0,44.0,159.0,54.0,75.0,36.0,89.0" style="Table6">
<tr>
<td>
<para style="terp_default_9">[[ formatLang(line_ids['date_order'],date_time = True) ]]</para>
@ -235,13 +235,13 @@
<para style="terp_default_9">[[ line_ids['pos_name'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line_ids['name'] ]]</para>
<para style="terp_default_9">[ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit']) ]] [[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line_ids['qty']) ]]</para>
<para style="terp_default_Centre_9">[[ formatLang(line_ids['qty']) ]] [[ line_ids['uom'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ formatLang(line_ids['discount']) ]]</para>