- [[ line_ids['name'] ]]
+ [ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]
- [[ formatLang(line_ids['qty']) ]]
+ [[ formatLang(line_ids['qty']) ]] [[line_ids['uom'] ]]
[[ formatLang(line_ids['discount']) ]]
@@ -212,7 +212,7 @@
- Net Total
+ Net Total:
[[ formatLang(pos_payment_total(o)) or removeParentNode('blockTable')]] [[ company.currency_id.symbol ]]
diff --git a/addons/point_of_sale/report/pos_payment_report_date.py b/addons/point_of_sale/report/pos_payment_report_date.py
index e492e929b7c..823fb3ce95e 100644
--- a/addons/point_of_sale/report/pos_payment_report_date.py
+++ b/addons/point_of_sale/report/pos_payment_report_date.py
@@ -25,7 +25,7 @@ from report import report_sxw
class pos_payment_report_date(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(pos_payment_report_date, self).__init__(cr, uid, name, context)
+ super(pos_payment_report_date, self).__init__(cr, uid, name, context=context)
self.total = 0.0
self.localcontext.update({
'time': time,
@@ -38,17 +38,17 @@ class pos_payment_report_date(report_sxw.rml_parse):
dt2 = form['date_end'] + ' 23:59:59'
data={}
if form['user_id']:
- self.cr.execute ("select pt.name,pol.qty,pol.discount,pol.price_unit, " \
+ self.cr.execute ("select pt.name,pp.default_code as code,pol.qty,pu.name as uom,pol.discount,pol.price_unit, " \
"(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 " \
- "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
+ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt,product_uom as pu " \
+ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id and pu.id=pt.uom_id " \
"and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s and po.user_id IN %s " \
,(dt1,dt2,tuple(form['user_id'])))
else:
- self.cr.execute ("select pt.name,pol.qty,pol.discount,pol.price_unit, " \
+ self.cr.execute ("select pt.name,pp.default_code as code,pol.qty,pu.name as uom,pol.discount,pol.price_unit, " \
"(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 " \
- "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
+ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt,product_uom as pu " \
+ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id and pu.id=pt.uom_id " \
"and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s" \
,(dt1,dt2))
data=self.cr.dictfetchall()
diff --git a/addons/point_of_sale/report/pos_payment_report_date.rml b/addons/point_of_sale/report/pos_payment_report_date.rml
index 846eaf1f861..23c3f950d81 100644
--- a/addons/point_of_sale/report/pos_payment_report_date.rml
+++ b/addons/point_of_sale/report/pos_payment_report_date.rml
@@ -2,7 +2,7 @@
-
+
@@ -98,11 +98,11 @@
- Payment
+ Sales Lines
-
+
Company
@@ -112,7 +112,7 @@
-
+
[[ company.name ]]
@@ -128,7 +128,7 @@
-
+
Product
@@ -140,22 +140,22 @@
Disc(%)
- Unit Price ([[ company.currency_id.code ]])
+ Unit Price
- Total ([[ company.currency_id.code ]])
+ Total
[[ repeatIn(pos_payment_date(data['form']), 'line_ids') ]]
-
+
- [[ line_ids['name'] ]]
+ [ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]
- [[ formatLang(line_ids['qty']) ]]
+ [[ formatLang(line_ids['qty']) ]] [[line_ids['uom'] ]]
[[ formatLang(line_ids['discount']) ]]
@@ -169,7 +169,7 @@
-
+
@@ -187,7 +187,7 @@
- Total
+ Total:
[[ formatLang(pos_payment_date_total(data['form'])) or removeParentNode('blockTable')]] [[ company.currency_id.symbol ]]
@@ -198,4 +198,4 @@
-
\ No newline at end of file
+
diff --git a/addons/point_of_sale/report/pos_payment_report_user.py b/addons/point_of_sale/report/pos_payment_report_user.py
index c7f31ffcd6f..37b129f68f2 100644
--- a/addons/point_of_sale/report/pos_payment_report_user.py
+++ b/addons/point_of_sale/report/pos_payment_report_user.py
@@ -24,7 +24,7 @@ from report import report_sxw
class pos_payment_report_user(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(pos_payment_report_user, self).__init__(cr, uid, name, context)
+ super(pos_payment_report_user, self).__init__(cr, uid, name, context=context)
self.total = 0.0
self.localcontext.update({
'time': time,
@@ -35,10 +35,10 @@ class pos_payment_report_user(report_sxw.rml_parse):
def __pos_payment_user__(self,form):
data={}
ids = form['user_id']
- sql = "select pt.name,pol.qty,pol.discount,pol.price_unit, " \
+ sql = "select pt.name,pp.default_code as code,pol.qty,pu.name as uom,pol.discount,pol.price_unit, " \
"(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 " \
- "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
+ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt,product_uom as pu " \
+ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id and pu.id=pt.uom_id " \
"and po.state in ('paid','invoiced') and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date = current_date " \
"and po.user_id IN %s"
self.cr.execute (sql, (tuple(ids), ))
diff --git a/addons/point_of_sale/report/pos_payment_report_user.rml b/addons/point_of_sale/report/pos_payment_report_user.rml
index fc874e52dac..18ed5b73d84 100644
--- a/addons/point_of_sale/report/pos_payment_report_user.rml
+++ b/addons/point_of_sale/report/pos_payment_report_user.rml
@@ -1,8 +1,8 @@
-
+
-
+
@@ -10,35 +10,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -46,9 +40,8 @@
-
-
+
@@ -56,31 +49,25 @@
-
-
+
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
@@ -90,8 +77,8 @@
-
-
+
+
@@ -105,17 +92,21 @@
-
+
-
-
+ [[ repeatIn(objects,'order') ]]
+
-
+
-
+ Payment By User
+
+
+
+
Company
@@ -125,7 +116,7 @@
-
+
[[ company.name ]]
@@ -138,38 +129,37 @@
-
+
-
+
Product
- Qty
+ Qty
- Disc. (%)
+ Disc(%)
- Unit Price
+ Unit Price
- Total
+ Total
-
+
-
- [[ repeatIn(pos_payment_user(data['form']), 'line_ids') ]]
-
+ [[ repeatIn(pos_payment_user(data['form']), 'line_ids') ]]
+
- [[ line_ids['name'] ]]
+ [ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]
- [[ formatLang(line_ids['qty']) ]]
+ [[ formatLang(line_ids['qty']) ]] [[line_ids['uom'] ]]
[[ formatLang(line_ids['discount']) ]]
@@ -178,38 +168,38 @@
[[ formatLang(line_ids['price_unit']) ]]
- [[ formatLang(line_ids['total']) ]]
+ [[ formatLang(line_ids['total']) ]] [[company.currency_id.symbol]]
-
-
-
+
+
-
+
-
+
-
+
- Total :
+ Total:
- [[ formatLang(pos_payment_user_total(data['form'])) or removeParentNode('blockTable')]]
+ [[ formatLang(pos_payment_user_total(data['form'])) or removeParentNode('blockTable')]] [[company.currency_id.symbol]]
-
-
-
+
+
+
+
diff --git a/addons/point_of_sale/report/pos_receipt.py b/addons/point_of_sale/report/pos_receipt.py
index 51e8e4d0f1b..9be543fb89b 100644
--- a/addons/point_of_sale/report/pos_receipt.py
+++ b/addons/point_of_sale/report/pos_receipt.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -33,7 +33,7 @@ def titlize(journal_name):
class order(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(order, self).__init__(cr, uid, name, context)
+ super(order, self).__init__(cr, uid, name, context=context)
user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid)
partner = user.company_id.partner_id
diff --git a/addons/point_of_sale/report/pos_receipt_bis.rml b/addons/point_of_sale/report/pos_receipt_bis.rml
deleted file mode 100644
index ab8af5ca999..00000000000
--- a/addons/point_of_sale/report/pos_receipt_bis.rml
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [[ repeatIn(objects,'o') ]]
- [[ setLang(o.user_id.context_lang) ]]
- [[o.user_id.company_id.name]]
- [[ address and address.street ]], [[ address and address.zip ]] [[ address and address.city ]]
- Tel : [[ address and address.phone ]]
- Fax : [[ address and address.fax ]]
- E-mail : [[ address and address.email ]]
-
-
-
-
-
-
- Operation N° : [[ o.name ]]
- Date : [[ o.date_order ]]
-
-
-
-
-
-
- Description
-
-
- Qty
-
-
- Price
-
-
-
-
- [[ repeatIn(o.lines,'line') ]]
-
-
-
- [[ len(line.product_id.name) > 39 and line.product_id.name[:39] + '...' or line.product_id.name ]]
-
-
- [[ '%.f' % line.qty ]]
-
-
- [[ '%.2f' % net(line.id) ]]
-
-
-
-
-
-
-
-
-
-
- Discount :
-
-
- [[ not(disc(o.id)) and removeParentNode('blockTable') or disc(o.id) ]] [[ o.pricelist_id.currency_id.name ]]
-
-
-
-
-
-
- Total :
-
-
- [[ '%.2f' % o.amount_total ]] [[ o.pricelist_id.currency_id.name ]]
-
-
-
-
-
-
- [[ repeatIn(o.payments,'d') ]]
- [[ d.name ]]:
-
-
- [[ d.amount ]]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/point_of_sale/report/pos_receipt_with_remboursment.py b/addons/point_of_sale/report/pos_receipt_with_remboursment.py
index d96cad52097..3286f40c5b7 100644
--- a/addons/point_of_sale/report/pos_receipt_with_remboursment.py
+++ b/addons/point_of_sale/report/pos_receipt_with_remboursment.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -27,7 +27,7 @@ import pooler
class order(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(order, self).__init__(cr, uid, name, context)
+ super(order, self).__init__(cr, uid, name, context=context)
user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid)
partner = user.company_id.partner_id
diff --git a/addons/point_of_sale/report/pos_receipt_with_remboursment.rml b/addons/point_of_sale/report/pos_receipt_with_remboursment.rml
index 32dea8dcd48..9c25d5f4a89 100644
--- a/addons/point_of_sale/report/pos_receipt_with_remboursment.rml
+++ b/addons/point_of_sale/report/pos_receipt_with_remboursment.rml
@@ -125,7 +125,7 @@
- [[ get_journal_amt(o)[0] ]] : [[ get_journal_amt(o)[1] ]]
+ [[ get_journal_amt(o)[1] ]]
diff --git a/addons/point_of_sale/report/pos_receipt_without_remboursment.py b/addons/point_of_sale/report/pos_receipt_without_remboursment.py
index a84b0588dae..58d7052b287 100644
--- a/addons/point_of_sale/report/pos_receipt_without_remboursment.py
+++ b/addons/point_of_sale/report/pos_receipt_without_remboursment.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -27,7 +27,7 @@ import pooler
class order(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(order, self).__init__(cr, uid, name, context)
+ super(order, self).__init__(cr, uid, name, context=context)
user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid)
partner = user.company_id.partner_id
diff --git a/addons/point_of_sale/report/pos_receipt_without_remboursment.rml b/addons/point_of_sale/report/pos_receipt_without_remboursment.rml
index 4e3b8ec64e1..ff6ebc3132c 100644
--- a/addons/point_of_sale/report/pos_receipt_without_remboursment.rml
+++ b/addons/point_of_sale/report/pos_receipt_without_remboursment.rml
@@ -127,12 +127,12 @@
[[ get_journal_amt(o)[0] ]] : [[ get_journal_amt(o)[1] ]]
-
- [[ repeatIn((o.state=='cancel' and o.statement_ids) and [1] or [], 'p') ]]
-
- Ce bon est valide jusqu'au [[ time.strftime('%d/%m/%Y', time.strptime(o.date_validity,'%Y-%m-%d')) ]].
-
-
+
+
+
+
+
+
diff --git a/addons/point_of_sale/report/pos_sales_user.py b/addons/point_of_sale/report/pos_sales_user.py
index 4032f035bdf..a764fa112b9 100644
--- a/addons/point_of_sale/report/pos_sales_user.py
+++ b/addons/point_of_sale/report/pos_sales_user.py
@@ -25,7 +25,7 @@ from report import report_sxw
class pos_sales_user(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(pos_sales_user, self).__init__(cr, uid, name, context)
+ super(pos_sales_user, self).__init__(cr, uid, name, context=context)
self.total = 0.0
self.localcontext.update({
'time': time,
diff --git a/addons/point_of_sale/report/pos_sales_user.rml b/addons/point_of_sale/report/pos_sales_user.rml
index cb817035a46..d2fefc379fd 100644
--- a/addons/point_of_sale/report/pos_sales_user.rml
+++ b/addons/point_of_sale/report/pos_sales_user.rml
@@ -1,8 +1,8 @@
-
+
-
+
@@ -10,35 +10,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -46,9 +40,8 @@
-
-
+
@@ -56,32 +49,20 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
@@ -91,8 +72,8 @@
-
-
+
+
@@ -106,17 +87,21 @@
-
+
-
-
+ [[ repeatIn(objects,'order') ]]
+
-
+
-
+ Sales Report
+
+
+
+
Company
@@ -126,7 +111,7 @@
-
+
[[ company.name ]]
@@ -139,10 +124,10 @@
-
+
-
+
Name
@@ -151,23 +136,22 @@
Date Order
- User
+ User
- State
+ State
Company
-
+
-
-
- [[ repeatIn(get_data(data['form']), 'line_ids')]]
-
+
+ [[ repeatIn(get_data(data['form']), 'line_ids')]]
+
- [[ line_ids['pos'] ]]
+ [[ line_ids['pos'] ]]
[[ formatLang(line_ids['date_order'],date_time = True) ]]
@@ -176,13 +160,16 @@
[[ line_ids['user'] ]]
- [[ line_ids['state'] ]]
+ [[ line_ids['state'] ]]
[[ line_ids['name'] ]]
-
+
+
+
+
diff --git a/addons/point_of_sale/report/pos_sales_user_today.py b/addons/point_of_sale/report/pos_sales_user_today.py
index 7c9b9b5a563..3a8b8bb1bba 100644
--- a/addons/point_of_sale/report/pos_sales_user_today.py
+++ b/addons/point_of_sale/report/pos_sales_user_today.py
@@ -25,7 +25,7 @@ from report import report_sxw
class pos_sales_user_today(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(pos_sales_user_today, self).__init__(cr, uid, name, context)
+ super(pos_sales_user_today, self).__init__(cr, uid, name, context=context)
self.total = 0.0
self.localcontext.update({
'time': time,
diff --git a/addons/point_of_sale/report/pos_sales_user_today.rml b/addons/point_of_sale/report/pos_sales_user_today.rml
index 39f6ddacb4c..6e633d375d8 100644
--- a/addons/point_of_sale/report/pos_sales_user_today.rml
+++ b/addons/point_of_sale/report/pos_sales_user_today.rml
@@ -1,8 +1,8 @@
-
+
-
+
@@ -10,35 +10,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -46,9 +40,8 @@
-
-
+
@@ -56,31 +49,20 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
@@ -90,8 +72,8 @@
-
-
+
+
@@ -105,17 +87,21 @@
-
+
-
-
+ [[ repeatIn(objects,'order') ]]
+
-
+
-
+ Today's Sales By User
+
+
+
+
Company
@@ -125,7 +111,7 @@
-
+
[[ company.name ]]
@@ -138,10 +124,10 @@
-
+
-
+
Name
@@ -150,23 +136,22 @@
Date Order
- User
+ User
- State
+ State
Company
-
+
-
-
- [[ repeatIn(get_data(data['form']), 'line_ids')]]
-
+
+ [[ repeatIn(get_data(data['form']), 'line_ids')]]
+
- [[ line_ids['pos'] ]]
+ [[ line_ids['pos'] ]]
[[ formatLang(line_ids['date_order'],date_time = True) ]]
@@ -175,13 +160,16 @@
[[ line_ids['user'] ]]
- [[ line_ids['state'] ]]
+ [[ line_ids['state'] ]]
[[ line_ids['name'] ]]
-
+
+
+
+
diff --git a/addons/point_of_sale/report/pos_sales_user_today_current_user.py b/addons/point_of_sale/report/pos_sales_user_today_current_user.py
index 7f4a8f827f5..ed793b4277e 100644
--- a/addons/point_of_sale/report/pos_sales_user_today_current_user.py
+++ b/addons/point_of_sale/report/pos_sales_user_today_current_user.py
@@ -25,7 +25,7 @@ from report import report_sxw
class pos_sales_user_today_current_user(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(pos_sales_user_today_current_user, self).__init__(cr, uid, name, context)
+ super(pos_sales_user_today_current_user, self).__init__(cr, uid, name, context=context)
self.total = 0.0
self.qty = 0.0
self.localcontext.update({
diff --git a/addons/point_of_sale/report/pos_sales_user_today_current_user.rml b/addons/point_of_sale/report/pos_sales_user_today_current_user.rml
index 475d045252b..7a94f5d6632 100644
--- a/addons/point_of_sale/report/pos_sales_user_today_current_user.rml
+++ b/addons/point_of_sale/report/pos_sales_user_today_current_user.rml
@@ -1,8 +1,8 @@
-
+
-
+
@@ -10,76 +10,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
-
-
-
+
+
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
@@ -89,8 +83,8 @@
-
-
+
+
@@ -104,17 +98,21 @@
-
+
-
-
+ [[ repeatIn(objects,'order') ]]
+
-
+
-
+ Today's Sales By Current User
+
+
+
+
Company
@@ -127,7 +125,7 @@
-
+
[[ company.name ]]
@@ -136,17 +134,17 @@
[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]
- [[ (get_user(user)) ]]
+ [[ (get_user(user)) ]]
-
+
-
+
-
+
Name
@@ -160,12 +158,11 @@
Total
-
+
-
-
- [[ repeatIn(get_data_current_user(user), 'line_ids')]]
-
+
+ [[ repeatIn(get_data_current_user(user), 'line_ids')]]
+
[[ line_ids['name'] ]]
@@ -177,26 +174,31 @@
[[ formatLang(line_ids['qty']) ]]
- [[ formatLang(line_ids['total']) ]]
-
-
-
-
-
-
-
-
-
-
- Total :
-
-
- [[ formatLang((get_data_current_user_qty(user))) ]]
-
-
- [[ formatLang((get_data_current_user_tot(user))) ]]
+ [[ formatLang(line_ids['total']) ]] [[company.currency_id.symbol]]
+
+
+
+
+
+
+
+
+
+ Total :
+
+
+ [[ formatLang((get_data_current_user_qty(user))) ]]
+
+
+ [[ formatLang((get_data_current_user_tot(user))) or removeParentNode('blockTable')]] [[company.currency_id.symbol]]
+
+
+
+
+
+
diff --git a/addons/point_of_sale/report/pos_users_product.py b/addons/point_of_sale/report/pos_users_product.py
index 141445bcafe..83a02d49832 100644
--- a/addons/point_of_sale/report/pos_users_product.py
+++ b/addons/point_of_sale/report/pos_users_product.py
@@ -25,7 +25,7 @@ from report import report_sxw
class pos_user_product(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
- super(pos_user_product, self).__init__(cr, uid, name, context)
+ super(pos_user_product, self).__init__(cr, uid, name, context=context)
self.total = 0.0
self.localcontext.update({
'time': time,
diff --git a/addons/point_of_sale/report/pos_users_product.rml b/addons/point_of_sale/report/pos_users_product.rml
index 24059dcbb0b..ae15e6478e7 100644
--- a/addons/point_of_sale/report/pos_users_product.rml
+++ b/addons/point_of_sale/report/pos_users_product.rml
@@ -1,6 +1,6 @@
-
+
@@ -57,9 +57,19 @@
-
+
+
+
+
+
+
+
+
+
+
+
@@ -71,8 +81,8 @@
-
-
+
+
@@ -118,7 +128,7 @@
- User's Product
+ User's Product
@@ -169,13 +179,7 @@
-
-
-
-
-
-
-
+
Product
@@ -184,26 +188,30 @@
Qty
- Amount ([[ company.currency_id.code ]])
+ Amount
-
-
-
- [[ repeatIn(get_data(statement), 'line_ids') and ' ' or removeParentNode('blockTable') ]]
- [[ repeatIn(get_data(statement), 'line_ids')]]
- [[ line_ids['name'] ]]
-
-
- [[ formatLang(line_ids['qty']) ]]
-
-
- [[ formatLang(line_ids['amt']) ]][[ company.currency_id.symbol ]]
-
-
-
-
+
+ [[ repeatIn(get_data(statement), 'line_ids') and ' ' or removeParentNode('blockTable') ]]
+
+ [[ repeatIn(get_data(statement), 'line_ids')]]
+
+
+
+ [[ line_ids['name'] ]]
+
+
+ [[ formatLang(line_ids['qty']) ]]
+
+
+ [[ formatLang(line_ids['amt']) ]] [[ company.currency_id.symbol ]]
+
+
+
+
+
+
@@ -214,7 +222,7 @@
Total :
- [[ formatLang(get_total()) ]][[ company.currency_id.symbol ]]
+ [[ formatLang(get_total()) ]] [[ company.currency_id.symbol ]]
@@ -222,4 +230,4 @@
-
\ No newline at end of file
+
diff --git a/addons/point_of_sale/report/report_cash_register_view.xml b/addons/point_of_sale/report/report_cash_register_view.xml
index fb498336fb5..df0dfc877de 100644
--- a/addons/point_of_sale/report/report_cash_register_view.xml
+++ b/addons/point_of_sale/report/report_cash_register_view.xml
@@ -36,7 +36,7 @@
Point of Sale / User
+
+
+ Registers
+
+
+ [('user_id','!=',['base.user_root'])]
+
diff --git a/addons/point_of_sale/statement_report.xml b/addons/point_of_sale/statement_report.xml
index fb1be16419e..a81d51a2679 100644
--- a/addons/point_of_sale/statement_report.xml
+++ b/addons/point_of_sale/statement_report.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/addons/point_of_sale/test/pos_report.yml b/addons/point_of_sale/test/pos_report.yml
index 08052356104..7eeea10bd1a 100644
--- a/addons/point_of_sale/test/pos_report.yml
+++ b/addons/point_of_sale/test/pos_report.yml
@@ -12,7 +12,7 @@
-
!python {model: pos.order}: |
import netsvc, tools, os
- (data, format) = netsvc.LocalService('report.pos.invoice').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
+ (data, format) = netsvc.LocalService('report.pos.invoice').create(cr, uid, [ref('point_of_sale.pos_order_pos11')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-invoice report'+format), 'wb+').write(data)
@@ -52,7 +52,7 @@
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt without reimbursement report'+format), 'wb+').write(data)
-
- In order to test the PDF reports defined on a Point Of Sale, we will print a POS Payment Report Report
+ In order to test the PDF reports defined on a Point Of Sale, we will print a POS Payment Report
-
!python {model: ir.ui.menu}: |
import netsvc, tools, os, time
@@ -84,6 +84,13 @@
balance_end_real: 0.0
date: '2010-05-19'
journal_id: account_journal_cash0
+ line_ids:
+ - name: statement
+ date: "2010-10-13"
+ type: customer
+ account_id: account_account_sales0
+ amount: 100
+ partner_id: base.res_partner_agrolait
period_id: account.period_5
state: 'draft'
-
@@ -133,7 +140,7 @@
-
!python {model: pos.order}: |
import netsvc, tools, os, time
- (data, format) = netsvc.LocalService('report.pos.payment.report').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
+ (data, format) = netsvc.LocalService('report.pos.payment.report').create(cr, uid, [ref('point_of_sale.pos_order_pos0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_report'+format), 'wb+').write(data)
-
@@ -152,4 +159,4 @@
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.pos.sales.user.today.current.user').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']:
- file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-sales_today_current_user_report'+format), 'wb+').write(data)
\ No newline at end of file
+ file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-sales_today_current_user_report'+format), 'wb+').write(data)
diff --git a/addons/point_of_sale/wizard/pos_return.py b/addons/point_of_sale/wizard/pos_return.py
index 6cfe0585203..99e697ea826 100644
--- a/addons/point_of_sale/wizard/pos_return.py
+++ b/addons/point_of_sale/wizard/pos_return.py
@@ -123,7 +123,7 @@ class pos_return(osv.osv_memory):
+ string="Return with Exchange" type="object"/>
"""
@@ -208,7 +208,8 @@ class pos_return(osv.osv_memory):
'name': '%s (return)' %order_id.name,
'date': date_cur
})
- line_obj.copy(cr, uid, line.id, {'qty': -qty, 'order_id': new_order})
+ if qty != 0.0:
+ line_obj.copy(cr, uid, line.id, {'qty': -qty, 'order_id': new_order})
statementl_obj.create(cr, uid, {
'name': 'Refund %s'%order_id.name,
'statement_id': order_id.statement_ids[0].statement_id.id,
diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py
index 318e572d597..c8cb8f460f0 100644
--- a/addons/procurement/procurement.py
+++ b/addons/procurement/procurement.py
@@ -163,7 +163,7 @@ class procurement_order(osv.osv):
""" Checks if move is cancelled or not.
@return: True or False.
"""
- return all(procurement.move_id.state != 'cancel' for procurement in self.browse(cr, uid, ids))
+ return all(procurement.move_id.state == 'cancel' for procurement in self.browse(cr, uid, ids))
def check_move_done(self, cr, uid, ids, context={}):
""" Checks if move is done or not.
@@ -331,6 +331,7 @@ class procurement_order(osv.osv):
'date_expected': procurement.date_planned,
'state': 'draft',
'company_id': procurement.company_id.id,
+ 'auto_validate': True,
})
move_obj.action_confirm(cr, uid, [id], context=context)
self.write(cr, uid, [procurement.id], {'move_id': id, 'close_move': 1})
@@ -424,7 +425,7 @@ class procurement_order(osv.osv):
wf_service.trg_trigger(uid, 'procurement.order', id, cr)
return True
- def action_check_finnished(self, cr, uid, ids):
+ def action_check_finished(self, cr, uid, ids):
return self.check_move_done(cr, uid, ids)
def action_check(self, cr, uid, ids):
@@ -477,9 +478,9 @@ procurement_order()
class StockPicking(osv.osv):
_inherit = 'stock.picking'
- def test_finnished(self, cursor, user, ids):
+ def test_finished(self, cursor, user, ids):
wf_service = netsvc.LocalService("workflow")
- res = super(StockPicking, self).test_finnished(cursor, user, ids)
+ res = super(StockPicking, self).test_finished(cursor, user, ids)
for picking in self.browse(cursor, user, ids):
for move in picking.move_lines:
if move.state == 'done' and move.procurements:
diff --git a/addons/procurement/procurement_workflow.xml b/addons/procurement/procurement_workflow.xml
index ff4325e248f..b4bcd1e1f04 100644
--- a/addons/procurement/procurement_workflow.xml
+++ b/addons/procurement/procurement_workflow.xml
@@ -187,7 +187,7 @@
- action_check_finnished()
+ action_check_finished()
stock.move
[move_id.id]
diff --git a/addons/procurement/schedulers.py b/addons/procurement/schedulers.py
index 777a8de45cc..06cbb86957a 100644
--- a/addons/procurement/schedulers.py
+++ b/addons/procurement/schedulers.py
@@ -241,7 +241,7 @@ class procurement_order(osv.osv):
'product_id': op.product_id.id,
'product_qty': qty,
'product_uom': op.product_uom.id,
- 'location_id': op.warehouse_id.lot_input_id.id,
+ 'location_id': op.location_id.id,
'procure_method': 'make_to_order',
'origin': op.name
})
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index 8f2e5efe649..5872e325715 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -632,5 +632,12 @@
form
+
+ Products
+ ir.ui.menu
+
+
+
+
diff --git a/addons/project/board_project_view.xml b/addons/project/board_project_view.xml
index c3b4b0c8000..275a969cbe9 100644
--- a/addons/project/board_project_view.xml
+++ b/addons/project/board_project_view.xml
@@ -86,16 +86,16 @@
- Value([[ company.currency_id.name ]])
+ Value