diff --git a/addons/account/project/report/analytic_balance.py b/addons/account/project/report/analytic_balance.py
index 780c519c1d4..3df4fd9584b 100644
--- a/addons/account/project/report/analytic_balance.py
+++ b/addons/account/project/report/analytic_balance.py
@@ -64,7 +64,6 @@ class account_analytic_balance(report_sxw.rml_parse):
self.empty_acc = empty_acc
self.read_data = []
self.get_children(self.ids)
-
return self.read_data
def _lines_g(self, account_id, date1, date2):
@@ -104,14 +103,14 @@ class account_analytic_balance(report_sxw.rml_parse):
query_params = (tuple(ids), date1, date2)
if option == "credit" :
- self.cr.execute("SELECT -sum(amount) FROM account_analytic_line \
+ self.cr.execute("SELECT COALESCE(-sum(amount),0.0) FROM account_analytic_line \
WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0",query_params)
elif option == "debit" :
- self.cr.execute("SELECT sum(amount) FROM account_analytic_line \
+ self.cr.execute("SELECT COALESCE(sum(amount),0.0) FROM account_analytic_line \
WHERE account_id IN %s\
AND date>=%s AND date<=%s AND amount>0",query_params)
elif option == "quantity" :
- self.cr.execute("SELECT sum(unit_amount) FROM account_analytic_line \
+ self.cr.execute("SELECT COALESCE(sum(unit_amount),0.0) FROM account_analytic_line \
WHERE account_id IN %s\
AND date>=%s AND date<=%s",query_params)
return self.cr.fetchone()[0] or 0.0
@@ -132,15 +131,16 @@ class account_analytic_balance(report_sxw.rml_parse):
self.acc_sum_list = ids2
else:
ids2 = self.acc_sum_list
- query_params = (tuple(ids2), date1, date2)
+
+ query_params = (tuple(ids2), date1, date2)
if option == "debit" :
- self.cr.execute("SELECT sum(amount) FROM account_analytic_line \
+ self.cr.execute("SELECT COALESCE(sum(amount),0.0) FROM account_analytic_line \
WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0",query_params)
elif option == "credit" :
- self.cr.execute("SELECT -sum(amount) FROM account_analytic_line \
+ self.cr.execute("SELECT COALESCE(-sum(amount),0.0) FROM account_analytic_line \
WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0",query_params)
elif option == "quantity" :
- self.cr.execute("SELECT sum(unit_amount) FROM account_analytic_line \
+ self.cr.execute("SELECT COALESCE(sum(unit_amount),0.0) FROM account_analytic_line \
WHERE account_id IN %s AND date>=%s AND date<=%s",query_params)
return self.cr.fetchone()[0] or 0.0
diff --git a/addons/account/project/report/analytic_balance.rml b/addons/account/project/report/analytic_balance.rml
index 52878d08612..bbd7e409dc0 100644
--- a/addons/account/project/report/analytic_balance.rml
+++ b/addons/account/project/report/analytic_balance.rml
@@ -107,13 +107,13 @@
Account Name
[[ repeatIn(get_objects(data['form']['empty_acc']),'o') ]]
@@ -161,10 +158,10 @@
[[ o['complete_name'] ]]
- [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'debit')) ]] [[ company.currency_id.symbol]]
+ [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'debit')) ]]
|
- [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'credit')) ]] [[ company.currency_id.symbol]]
+ [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'credit')) ]]
|
[[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]]
@@ -188,10 +185,10 @@
[[ move_g['name'] ]]
|
- [[ formatLang(move_g['debit'])]] [[ company.currency_id.symbol ]]
+ [[ formatLang(move_g['debit'])]]
|
- [[ formatLang(move_g['credit']) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(move_g['credit']) ]]
|
[[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol ]]
diff --git a/addons/account/project/report/cost_ledger.rml b/addons/account/project/report/cost_ledger.rml
index ad1fef8e96e..bc3f2f2d7ca 100644
--- a/addons/account/project/report/cost_ledger.rml
+++ b/addons/account/project/report/cost_ledger.rml
@@ -175,13 +175,13 @@
J.C. /Move name
|
- Debit([[ company.currency_id.code]])
+ Debit
|
- Credit([[ company.currency_id.code]])
+ Credit
|
- Balance([[ company.currency_id.code]])
+ Balance
|
@@ -199,10 +199,10 @@
- [[ formatLang (sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang (sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]]
|
- [[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]]
|
[[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]
@@ -223,10 +223,10 @@
[[ o.complete_name ]]
|
- [[ formatLang (account_sum_debit(o.id,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang (account_sum_debit(o.id,data['form']['date1'],data['form']['date2'])) ]]
|
- [[ formatLang (account_sum_credit(o.id,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang (account_sum_credit(o.id,data['form']['date1'],data['form']['date2'])) ]]
|
[[ formatLang (account_sum_balance(o.id,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol ]]
@@ -247,10 +247,10 @@
[[ move_g['name'] ]]
|
- [[ formatLang( move_g['debit']) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang( move_g['debit']) ]]
|
- [[ formatLang( move_g['credit']) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang( move_g['credit']) ]]
|
[[ formatLang( move_g['balance']) ]] [[ company.currency_id.symbol ]]
@@ -274,13 +274,13 @@
[[ move_a['name'] ]]
|
- [[ formatLang( move_a['debit'] )]] [[ company.currency_id.symbol]]
+ [[ formatLang( move_a['debit'] )]]
|
- [[ formatLang( move_a['credit']) ]] [[ company.currency_id.symbol]]
+ [[ formatLang( move_a['credit']) ]]
|
- [[ formatLang( move_a['balance']) ]] [[ company.currency_id.symbol]]
+ [[ formatLang( move_a['balance']) ]]
|
diff --git a/addons/account/project/report/inverted_analytic_balance.rml b/addons/account/project/report/inverted_analytic_balance.rml
index 1404183e913..6de2e28d46e 100644
--- a/addons/account/project/report/inverted_analytic_balance.rml
+++ b/addons/account/project/report/inverted_analytic_balance.rml
@@ -106,13 +106,13 @@
Name
- Debit([[ company.currency_id.code]])
+ Debit
|
- Credit([[ company.currency_id.code]])
+ Credit
|
- Balance([[ company.currency_id.code]])
+ Balance
|
Quantity
@@ -133,10 +133,10 @@
|
- [[ formatLang(sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]]
+ [[ formatLang(sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]]
|
- [[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol]]
+ [[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]]
|
[[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol]]
@@ -157,10 +157,10 @@
[[ move_g['name'] ]]
|
- [[ formatLang(move_g['debit'])]] [[ company.currency_id.symbol]]
+ [[ formatLang(move_g['debit'])]]
|
- [[formatLang(move_g['credit'])]] [[ company.currency_id.symbol]]
+ [[formatLang(move_g['credit'])]]
|
[[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol]]
@@ -181,10 +181,10 @@
[[ move_a['complete_name'] ]]
|
- [[ formatLang(move_a['debit']) ]] [[ company.currency_id.symbol]]
+ [[ formatLang(move_a['debit']) ]]
|
- [[ formatLang(move_a['credit']) ]] [[ company.currency_id.symbol]]
+ [[ formatLang(move_a['credit']) ]]
|
[[ formatLang(move_a['balance']) ]] [[ company.currency_id.symbol]]
diff --git a/addons/account/report/account_aged_partner_balance.rml b/addons/account/report/account_aged_partner_balance.rml
index 122e90261e9..7f90ae0983b 100644
--- a/addons/account/report/account_aged_partner_balance.rml
+++ b/addons/account/report/account_aged_partner_balance.rml
@@ -186,7 +186,7 @@
[[ data['form']['0']['name'] ]]([[ company.currency_id.code ]])
|
- Total([[ company.currency_id.code ]])
+ Total
|
diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml
index 5d71ef95c39..fac1983ef25 100644
--- a/addons/account/report/account_balance.rml
+++ b/addons/account/report/account_balance.rml
@@ -287,15 +287,15 @@
| Code |
Account |
- Debit([[ company.currency_id.code]]) |
- Credit([[ company.currency_id.code]]) |
- Balance([[ company.currency_id.code]]) |
+ Debit |
+ Credit |
+ Balance |
| [[ repeatIn(lines(data['form']), 'a') ]][[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['code'] or removeParentNode('tr') ]] |
[[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ '..'*(a['level']-1) ]][[ a['name'] ]] |
- [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]] [[ company.currency_id.symbol ]] |
- [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]] |
+ [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]][[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]] |
+ [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]] |
[[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]] |
diff --git a/addons/account/report/account_balance_sheet.rml b/addons/account/report/account_balance_sheet.rml
index 052ecce16cb..8887fa49808 100644
--- a/addons/account/report/account_balance_sheet.rml
+++ b/addons/account/report/account_balance_sheet.rml
@@ -25,19 +25,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -63,19 +52,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- Printed at : [[time.strftime("%Hh%M")]]
-
-
+
-
-
-
-
-
- |
- Name
- |
-
- Order
- |
-
- Description
- |
-
- Unit Price
- |
-
-
-
+ [[repeatIn(objects,'o')]]
+
+
+ |
+
+
+
+ |
+
+
+
+
+ |
+
+ [[ o.user_id.address_id.title or '' ]] [[ o.user_id.address_id.name ]]
+ [[ o.user_id.address_id.street ]]
+ [[ o.user_id.address_id.street2 or removeParentNode('para') ]]
+ [[ o.user_id.address_id.zip or '' ]] [[ o.user_id.address_id.city or '' ]]
+ [[ (o.user_id.address_id.state_id and o.user_id.address_id.state_id.name) or removeParentNode('para')]] [[ (o.user_id.address_id.country_id and o.user_id.address_id.country_id.name) or '' ]]
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+ Lunch Order
+ |
+
+
+
+
+
+
+
+
+
+
+ |
+ Name
+ |
+
+ Order
+ |
+
+ Description
+ |
+
+ Unit Price([[company.currency_id.code]])
+ |
+
+
-
+
|
- [[repeatIn(objects, 'o') ]]
- [[ o.user_id.name ]]
+ [[repeatIn(objects, 'o') ]]
+ [[ o.user_id.name ]]
|
- [[o.product.name ]]
+ [[o.product.name ]]
|
- [[ o.descript ]]
-
-
-
+ [[ o.descript ]]
|
- [['%.2f' % o.price ]]
- |
-
-
- |
-
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
- [[ '%.2f' % sum_price(objects) ]]
+ [[formatLang(o.price) ]] [[company.currency_id.symbol]]
|
-
+
+
+ |
+
+
+
+ |
+
+
+
+
+ |
+
+ Total:
+ |
+
+ [[ formatLang(sum_price(objects)) ]] [[company.currency_id.symbol]]
+ |
+
+
+
-
diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py
index 9c4a11cb9e0..4fadcdce471 100644
--- a/addons/mrp_repair/mrp_repair.py
+++ b/addons/mrp_repair/mrp_repair.py
@@ -272,7 +272,6 @@ class mrp_repair(osv.osv):
@param product_id: Product id from current record.
@return: Dictionary of values.
"""
- prodlot_obj = self.pool.get('stock.production.lot')
move_obj = self.pool.get('stock.move')
data = {}
data['value'] = {
@@ -503,7 +502,7 @@ class mrp_repair(osv.osv):
return True
def wkf_repair_done(self, cr, uid, ids, *args):
- res = self.action_repair_done(cr, uid, ids)
+ self.action_repair_done(cr, uid, ids)
return True
def action_repair_done(self, cr, uid, ids, context=None):
diff --git a/addons/mrp_repair/report/order.py b/addons/mrp_repair/report/order.py
index 3257ba3df7a..3d6f9200dd8 100644
--- a/addons/mrp_repair/report/order.py
+++ b/addons/mrp_repair/report/order.py
@@ -21,8 +21,6 @@
import time
from report import report_sxw
-from osv import osv
-import pooler
class order(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
diff --git a/addons/point_of_sale/report/account_statement.rml b/addons/point_of_sale/report/account_statement.rml
index 180e9d6a97b..e4c3b99b6ee 100644
--- a/addons/point_of_sale/report/account_statement.rml
+++ b/addons/point_of_sale/report/account_statement.rml
@@ -1,6 +1,6 @@
-
+
@@ -10,111 +10,105 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
+
-
-
+
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -124,8 +118,8 @@
-
-
+
+
@@ -139,34 +133,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
[[ repeatIn(objects,'statement') ]]
-
+
+
+
+
+
+
+ Statement
+
+
+
+
+
+
+
|
Statement Name
@@ -182,7 +169,7 @@
|
-
+
[[ statement.name ]]
@@ -201,7 +188,10 @@
-
+
+
+
+
|
Opening Date
@@ -217,19 +207,19 @@
|
-
+
|
- [[ formatLang(statement.date,date_time=True) ]]
+ [[ formatLang(statement.date,date=True) ]]
|
- [[ formatLang(statement.closing_date,date_time=True) ]]
+ [[ formatLang(statement.closing_date,date=True) ]]
|
- [[ formatLang(statement.balance_start) ]]
+ [[ formatLang(statement.balance_start) ]][[ company.currency_id.symbol ]]
|
- [[ formatLang(statement.balance_end_real) ]]
+ [[ formatLang(statement.balance_end_real) ]][[ company.currency_id.symbol ]]
|
@@ -239,7 +229,7 @@
-
+
|
Name
@@ -248,28 +238,26 @@
Partner
|
- Amount
+ Amount ([[ company.currency_id.code ]])
|
-
- [[ repeatIn(statement.line_ids,'line_ids') ]]
-
+
|
-
+ [[ repeatIn(statement.line_ids,'line_ids') and ' ' or removeParentNode('blockTable') ]]
+ [[ repeatIn(get_data(statement), 'line_ids')]]
[[ line_ids.name ]]
|
[[ line_ids.partner_id.name ]]
|
- [[ formatLang(line_ids.amount) ]]
+ [[ formatLang(line_ids.amount) ]][[ company.currency_id.symbol ]]
|
-
-
+
|
@@ -277,20 +265,21 @@
|
-
-
-
+ Total :
|
- Total :
- |
-
- [[ formatLang(get_total(statement.line_ids)) ]]
+ [[ formatLang(get_total(statement.line_ids)) ]][[ company.currency_id.symbol ]]
|
+
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.py b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.py
index fce080dfd0b..8ec13ede5f5 100644
--- a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.py
+++ b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.py
@@ -125,10 +125,7 @@ class all_closed_cashbox_of_the_day(report_sxw.rml_parse):
return lst
def _get_net_total(self,user):
- lst = []
res={}
- total_ending_bal = 0.0
- total_starting_bal = 0.0
sql = """select sum(absl.amount) as net_total from account_bank_statement as abs
LEFT JOIN account_bank_statement_line as absl ON abs.id = absl.statement_id
where abs.state IN ('confirm','open') and abs.user_id = %d
diff --git a/addons/point_of_sale/report/pos_details.rml b/addons/point_of_sale/report/pos_details.rml
index 1aaac4dbe3a..f3bebade402 100644
--- a/addons/point_of_sale/report/pos_details.rml
+++ b/addons/point_of_sale/report/pos_details.rml
@@ -119,6 +119,7 @@
+
@@ -154,7 +155,13 @@
+
+
+
Details of Sales
+
+
+
|
@@ -196,16 +203,16 @@
Product
|
- Price
+ Price ([[ company.currency_id.code ]])
|
Qty
|
- Disc
+ Disc ([[ company.currency_id.code ]])
|
- Invoiced
+ Invoiced ([[ company.currency_id.code ]])
|
@@ -213,7 +220,7 @@
|
[[ pos_sales_details(data['form'],user) and '' or removeParentNode('blockTable') ]]
- [[ repeatIn(pos_sales_details(data['form'],user), 'line_ids') ]] [[ formatLang(line_ids['date_order'],date_time = True) ]]
+ [[ repeatIn(pos_sales_details(data['form'],user), 'line_ids') ]] [[ formatLang(line_ids['date_order'],date = True) ]]
|
[[ line_ids['pos_name'] ]]
@@ -222,13 +229,13 @@
[[ line_ids['name'] ]]
|
- [[ formatLang(line_ids['price_unit']) ]]
+ [[ formatLang(line_ids['price_unit']) ]][[ company.currency_id.symbol ]]
|
[[ formatLang(line_ids['qty']) ]]
|
- [[ formatLang(line_ids['discount']) ]]
+ [[ formatLang(line_ids['discount']) ]][[ company.currency_id.symbol ]]
|
[[ getinvoice(line_ids['invoice_id'],user) or removeParentNode('font') ]]
@@ -254,7 +261,7 @@
[[ repeatIn(gettaxamount(data['form'],user), 'p') ]][[ p['name'] or removeParentNode('tr') ]]
|
- [[ formatLang(p['amount']) or removeParentNode('font') ]]
+ [[ formatLang(p['amount']) or removeParentNode('font') ]][[ company.currency_id.symbol ]]
|
@@ -274,7 +281,7 @@
[[ repeatIn(getpayments(data['form'],user), 'p') ]] [[ p['name'] or removeParentNode('tr') ]]
|
- [[ formatLang(p['sum']) or removeParentNode('tr') ]]
+ [[ formatLang(p['sum']) or removeParentNode('tr') ]] [[ company.currency_id.symbol ]]
|
@@ -305,7 +312,7 @@
Sales total
- [[ formatLang(getsalestotal2(data['form'],user)) ]]
+ [[ formatLang(getsalestotal2(data['form'],user)) ]][[ company.currency_id.symbol ]]
|
@@ -321,7 +328,7 @@
Total invoiced
|
- [[ formatLang(getsuminvoice2(data['form'],user)) ]]
+ [[ formatLang(getsuminvoice2(data['form'],user)) ]][[ company.currency_id.symbol ]]
|
@@ -329,7 +336,7 @@
Total discount
|
- [[ formatLang(getsumdisc(objects)) ]]
+ [[ formatLang(getsumdisc(objects)) ]][[ company.currency_id.symbol ]]
|
@@ -337,7 +344,7 @@
Total paid
|
- [[ formatLang(getpaidtotal2(data['form'],user)) ]]
+ [[ formatLang(getpaidtotal2(data['form'],user)) ]][[ company.currency_id.symbol ]]
|
@@ -345,7 +352,7 @@
Total of the day
|
- [[ formatLang(gettotalofthaday(data['form'])) ]]
+ [[ formatLang(gettotalofthaday(data['form'])) ]][[ company.currency_id.symbol ]]
|
diff --git a/addons/point_of_sale/report/pos_details_summary.py b/addons/point_of_sale/report/pos_details_summary.py
index 2d1fd0b98c7..7a57e17bf87 100644
--- a/addons/point_of_sale/report/pos_details_summary.py
+++ b/addons/point_of_sale/report/pos_details_summary.py
@@ -25,6 +25,10 @@ from report import report_sxw
class pos_details_summary(report_sxw.rml_parse):
+ def get_company(self,objects):
+ comp=[obj.company_id.name for obj in objects]
+ return '%s' % (comp[0])
+
def _get_qty_total(self, objects):
#code for the sum of qty_total
return reduce(lambda acc, object:
@@ -122,6 +126,7 @@ class pos_details_summary(report_sxw.rml_parse):
'gettaxamount': self._get_tax_amount,
'getsalestotal': self._get_sales_total,
'getperiod': self._get_period,
+ 'getcompany':self.get_company
})
report_sxw.report_sxw('report.pos.details_summary',
diff --git a/addons/point_of_sale/report/pos_details_summary.rml b/addons/point_of_sale/report/pos_details_summary.rml
index 3981f389166..aa559eb9961 100644
--- a/addons/point_of_sale/report/pos_details_summary.rml
+++ b/addons/point_of_sale/report/pos_details_summary.rml
@@ -1,251 +1,298 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Detail of Sales
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Details of Sales
+
+
+
+
|
- Company
+ Company
|
- Print Date
+ Print Date
|
- Period
+ Period
|
-
+
|
- [[ company.name ]]
+ [[ '%s' % getcompany(objects)]]
|
- [[time.strftime('%Y-%m-%d')]]
+ [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]
|
[[ '%s' % getperiod(objects) ]]
|
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
- |
-
- Mode of Taxes
-
- |
- |
-
- [[ repeatIn(gettaxamount(objects).items(), 'p') ]]
- | [[ p[0] ]] |
- [[ '%.2f' % (p[1],) ]] |
-
-
-
-
-
- |
-
- Mode of payment
-
- |
- |
-
- [[ repeatIn(getpayments(objects).items(), 'p') ]]
- | [[ p[0] ]] |
- [[ '%.2f' % (p[1],) ]] |
-
-
-
-
-
-
-
+
+
+ |
+ Mode of Taxes
+ |
+
+
-
+ |
+
+
+ |
+
+ [[ repeatIn(gettaxamount(objects).items(),'p') ]]
+ [[ p[0] ]]
+
+ |
+
+ [[ p[1] ]]
+ |
+
+
+
+
+ |
+ Mode of Payment
+ |
+
+
-
-
- |
- Summary |
-
-
- | Sales total |
- terp_tblheader_Details
- [[ '%d' % getsalestotal(objects) ]] |
-
-
- | Qty of product |
- [[ '%d' % getqtytotal(objects) ]] |
-
-
- | Total invoiced |
- [[ '%.2f' % getsuminvoice(objects) ]] |
-
-
- | Total discount |
- [[ '%.2f' % getsumdisc(objects) ]] |
-
-
- | Total paid |
- [[ '%.2f' % getpaidtotal(objects) ]] |
-
-
- | Total of the day |
- [[ '%.2f' % gettotalofthaday(objects) ]] |
-
-
-
-
-
-
+ |
+
+
+ |
+
+ [[ repeatIn(getpayments(objects).items(),'t') ]]
+ [[ t[0] ]]
+
+ |
+
+ [[ '%.2f' % (t[1],) ]]
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ Summary
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+ Sales total
+ |
+
+ [[ '%d' % getsalestotal(objects) ]]
+ |
+
+
+ |
+ Qty of product
+ |
+
+ [[ '%d' % getqtytotal(objects) ]]
+ |
+
+
+ |
+ Total invoiced
+ |
+
+ [[ '%.2f' % getsuminvoice(objects) ]][[ company.currency_id.symbol ]]
+ |
+
+
+ |
+ Total discount
+ |
+
+ [[ '%.2f' % getsumdisc(objects) ]][[ company.currency_id.symbol ]]
+ |
+
+
+ |
+ Total paid
+ |
+
+ [[ '%.2f' % getpaidtotal(objects) ]][[ company.currency_id.symbol ]]
+ |
+
+
+ |
+ Total of the day
+ |
+
+ [[ '%.2f' % gettotalofthaday(objects) ]][[ company.currency_id.symbol ]]
+ |
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/point_of_sale/report/pos_payment_report.rml b/addons/point_of_sale/report/pos_payment_report.rml
index c1980e9e209..e62b4bd1290 100644
--- a/addons/point_of_sale/report/pos_payment_report.rml
+++ b/addons/point_of_sale/report/pos_payment_report.rml
@@ -82,6 +82,7 @@
+
@@ -109,7 +110,13 @@
-
+
+
+
+
+
+
+ Payment For Sale
@@ -154,10 +161,10 @@
Disc. (%)
- Unit Price
+ Unit Price ([[ company.currency_id.code ]])
|
- Total
+ Total ([[ company.currency_id.code ]])
|
@@ -177,10 +184,10 @@
[[ formatLang(line_ids['discount']) ]]
- [[ formatLang(line_ids['price_unit']) ]]
+ [[ formatLang(line_ids['price_unit']) ]] [[ company.currency_id.symbol ]]
|
- [[ formatLang(line_ids['total']) ]]
+ [[ formatLang(line_ids['total']) ]] [[ company.currency_id.symbol ]]
|
@@ -205,10 +212,10 @@
- Net Total
+ Net Total
|
- [[ formatLang(pos_payment_total(o)) or removeParentNode('blockTable')]]
+ [[ formatLang(pos_payment_total(o)) or removeParentNode('blockTable')]] [[ company.currency_id.symbol ]]
|
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 1f220e253ca..846eaf1f861 100644
--- a/addons/point_of_sale/report/pos_payment_report_date.rml
+++ b/addons/point_of_sale/report/pos_payment_report_date.rml
@@ -140,10 +140,10 @@
Disc(%)
- Unit Price
+ Unit Price ([[ company.currency_id.code ]])
|
- Total
+ Total ([[ company.currency_id.code ]])
|
@@ -161,10 +161,10 @@
[[ formatLang(line_ids['discount']) ]]
- [[ formatLang(line_ids['price_unit']) ]]
+ [[ formatLang(line_ids['price_unit']) ]] [[ company.currency_id.symbol ]]
|
- [[ formatLang(line_ids['total']) ]]
+ [[ formatLang(line_ids['total']) ]] [[ company.currency_id.symbol ]]
|
@@ -190,7 +190,7 @@
Total
- [[ formatLang(pos_payment_date_total(data['form'])) or removeParentNode('blockTable')]]
+ [[ formatLang(pos_payment_date_total(data['form'])) or removeParentNode('blockTable')]] [[ company.currency_id.symbol ]]
|
diff --git a/addons/point_of_sale/report/pos_receipt.rml b/addons/point_of_sale/report/pos_receipt.rml
index 46a19714234..b9da3f5e9a6 100644
--- a/addons/point_of_sale/report/pos_receipt.rml
+++ b/addons/point_of_sale/report/pos_receipt.rml
@@ -1,196 +1,170 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [[ repeatIn(objects,'o') ]]
- [[o.user_id.company_id.name]]
- [[ address and address.street ]], [[ address and address.zip ]] [[ address and address.city ]]
- [[ address and address.country_id.name ]]
- Tel : [[ address and address.phone ]]
- E-mail : [[ address and address.email ]]
- Shop : [[ o.shop_id.name ]]
- Vendeur : [[ o.user_salesman_id.name ]]
- Date : [[ formatLang(o.date_order,date_time = True) ]]
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ repeatIn(objects,'o') ]]
+ [[o.user_id.company_id.name]]
+ [[ address and address.street ]], [[ address and address.zip ]] [[ address and address.city ]]
+ [[ address and address.country_id.name ]]
+ Tel : [[ address and address.phone ]]
+ E-mail : [[ address and address.email ]]
+ Shop : [[ o.shop_id.name ]]
+ Vendeur : [[ o.user_salesman_id.name ]]
+ Date : [[ o.date_order ]]
+
+
+
+
+
+
+ [[o.type_rec]]
+
+
+
+ N° : [[ o.name ]]
+ Contract : [[ o.contract_number ]]
+
+
+ |
+ Description
+ |
+
+ Qty
+ |
+
+ Price
+ |
+
+
+ |
+ [[ repeatIn(o.lines,'line') ]]
+ [[ line.product_id.name ]]
+ |
+
+ [[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]]
+ |
+
+ [[o.state=='cancel' and o.statement_ids and '-' or '']][[ '%.2f' % net(line.id) ]] [[company.currency_id.symbol]] [[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ '%.2f' % line.discount ]]%) [[company.currency_id.symbol]]
+ |
+
+
+
+
+ |
+ Taxes :
+ |
+
+ [[o.state=='cancel' and o.statement_ids and '-' or '']][['%.2f' % o.amount_tax]] [[company.currency_id.symbol]]
+ |
+
+
+
+
+ |
+ Total :
+ |
+
+ [[o.state=='cancel' and o.statement_ids and '-' or '']][['%.2f' % o.amount_total]] [[company.currency_id.symbol]]
+ |
+
+
+
+
+ |
+ Payment Mode
+ |
+
+
-
-
+
+ |
+
+ Amount
+ |
+
+
+ |
+ [[ repeatIn(get_journal_amt(o),'d') ]]
+ [[ d['name'] ]]
+ |
+
+
-
- [[o.type_rec]]
-
-
-
- N° : [[ o.name ]]
- Contract : [[ o.contract_number ]]
-
-
-
- |
- Description
- |
-
- Qty
- |
-
- Price
- |
-
-
- | [[ repeatIn(o.lines,'line') ]]
- [[ line.product_id.name ]]
- |
-
- [[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]]
-
- |
-
- [[o.state=='cancel' and o.statement_ids and '-' or '']][[ '%.2f' % net(line.id) ]] [[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ '%.2f' % line.discount ]]%)
- |
-
-
-
-
- |
- Taxes :
- |
-
- [[o.state=='cancel' and o.statement_ids and '-' or '']][['%.2f' % o.amount_tax ]]
- |
-
-
-
-
- |
- |
-
- Total :
- |
-
- [[o.state=='cancel' and o.statement_ids and '-' or '']][['%.2f' % o.amount_total ]]
- |
-
-
-
-
-
- |
- Payment Mode
- |
- |
-
- Amount
- |
-
-
- |
- [[ repeatIn(get_journal_amt(o),'d') ]]
- [[ d['name'] ]]
- |
- |
-
- [[ '%.2f' %(d['amt'] or 0) ]]
- |
-
-
-
- [[o.note_2]]
-
-
-
+
+ |
+
+ [[ '%.2f' %(d['amt'] or 0) ]] [[company.currency_id.symbol]]
+ |
+
+
+ [[o.note_2]]
+
-
diff --git a/addons/point_of_sale/report/pos_users_product.rml b/addons/point_of_sale/report/pos_users_product.rml
index ef911861d85..24059dcbb0b 100644
--- a/addons/point_of_sale/report/pos_users_product.rml
+++ b/addons/point_of_sale/report/pos_users_product.rml
@@ -2,7 +2,7 @@
-
+
@@ -10,98 +10,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
@@ -111,8 +90,8 @@
-
-
+
+
@@ -126,18 +105,30 @@
-
+
-
-[[ repeatIn(objects,'o') ]]
-
+ [[ repeatIn(objects,'statement') ]]
+
-
+
-
+
+
+
+ User's Product
+
+
+
+
+
+
+
+
+
+
|
User
@@ -156,10 +147,10 @@
|
-
+
- |
- [[ get_user(objects) ]]
+ |
+ [[ get_user(objects) ]]
|
[[ company.name ]]
@@ -168,66 +159,67 @@
[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]
|
- [[ formatLang(o.date,date_time = True) ]]
+ [[ formatLang(statement.date,date = True) ]]
|
- [[ formatLang(o.closing_date,date_time = True) ]]
+ [[ formatLang(statement.closing_date,date = True) ]]
|
-
+
-
+
-
+
+
+
+
-
|
- Product
+ Product
|
- Qty
+ Qty
|
- Amount
+ Amount ([[ company.currency_id.code ]])
|
-
+
-
- [[ repeatIn(get_data(o), 'line_ids')]]
-
-
-
- |
- [[ line_ids['name'] ]]
- |
-
- [[ formatLang(line_ids['qty']) ]]
- |
-
- [[ formatLang(line_ids['amt']) ]]
- |
-
-
-
-
-
-
-
-
-
-
+
+
+ |
+ [[ 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 ]]
+ |
+
+
+
+
+ |
+
+
- |
-
- Total
- |
-
- [[ formatLang(get_total()) ]]
- |
-
-
+ |
+
+ Total :
+ |
+
+ [[ formatLang(get_total()) ]][[ company.currency_id.symbol ]]
+ |
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/addons/point_of_sale/wizard/pos_return.py b/addons/point_of_sale/wizard/pos_return.py
index 46e7fd8ca27..dfc16e0ff96 100644
--- a/addons/point_of_sale/wizard/pos_return.py
+++ b/addons/point_of_sale/wizard/pos_return.py
@@ -240,7 +240,6 @@ class add_product(osv.osv_memory):
data = data and data[0] or False
if active_id:
order_obj = self.pool.get('pos.order')
- lines_obj = self.pool.get('pos.order.line')
picking_obj = self.pool.get('stock.picking')
stock_move_obj = self.pool.get('stock.move')
property_obj= self.pool.get("ir.property")
diff --git a/addons/product/report/product_pricelist.py b/addons/product/report/product_pricelist.py
index ce6cdb2d864..613de646fe0 100644
--- a/addons/product/report/product_pricelist.py
+++ b/addons/product/report/product_pricelist.py
@@ -87,9 +87,12 @@ class product_pricelist(report_sxw.rml_parse):
pro_ids.append(product.id)
if product.categ_id.id not in cat_ids:
cat_ids.append(product.categ_id.id)
- cats = pool.get('product.category').read(self.cr, self.uid, cat_ids, ['name'])
+
+ cats = pool.get('product.category').name_get(self.cr, self.uid, cat_ids)
+ if not cats:
+ return res
for cat in cats:
- product_ids=pool.get('product.product').search(self.cr, self.uid, [('id','in',pro_ids),('categ_id','=',cat['id'])])
+ product_ids=pool.get('product.product').search(self.cr, self.uid, [('id','in',pro_ids),('categ_id','=',cat[0])])
products = []
for product in pool.get('product.product').read(self.cr, self.uid, product_ids, ['name','code']):
val = {
@@ -105,7 +108,7 @@ class product_pricelist(report_sxw.rml_parse):
val['qty'+str(i)]=self._get_price(self.pricelist, product['id'], qty)
i += 1
products.append(val)
- res.append({'name':cat['name'],'products': products})
+ res.append({'name':cat[1],'products': products})
return res
def _get_price(self,pricelist_id, product_id,qty):
diff --git a/addons/product/report/product_pricelist.rml b/addons/product/report/product_pricelist.rml
index fe3fad5ed62..5d3a39e9144 100644
--- a/addons/product/report/product_pricelist.rml
+++ b/addons/product/report/product_pricelist.rml
@@ -191,7 +191,7 @@
[[repeatIn(get_categories(objects,data['form']), 'c')]]
-
+
|
[[ c['name'] ]]
diff --git a/addons/product/wizard/product_price.py b/addons/product/wizard/product_price.py
index 4681f28d71b..853935acf6e 100644
--- a/addons/product/wizard/product_price.py
+++ b/addons/product/wizard/product_price.py
@@ -51,7 +51,6 @@ class product_price_list(osv.osv_memory):
datas = {'ids': context.get('active_ids', [])}
res = self.read(cr, uid, ids, ['price_list','qty1', 'qty2','qty3','qty4','qty5'], context)
res = res and res[0] or {}
- price_dict = self.pool.get('product.pricelist').price_get(cr, uid, [res['price_list']], 1, 1.0)
datas['form'] = res
return {
'type': 'ir.actions.report.xml',
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index b2df12965d3..c6e40af6f3f 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -468,7 +468,8 @@ class sale_order(osv.osv):
lines = []
for line in o.order_line:
if line.invoiced:
- raise osv.except_osv(_('Error !'), _('The Sale Order already has some lines invoiced. You should continue the billing process by line.'))
+ #raise osv.except_osv(_('Error !'), _('The Sale Order already has some lines invoiced. You should continue the billing process by line.'))
+ continue
elif (line.state in states):
lines.append(line.id)
created_lines = self.pool.get('sale.order.line').invoice_line_create(cr, uid, lines)
diff --git a/addons/stock/report/report_stock_move_view.xml b/addons/stock/report/report_stock_move_view.xml
index 2c8c1ad80e9..efbaaa12625 100644
--- a/addons/stock/report/report_stock_move_view.xml
+++ b/addons/stock/report/report_stock_move_view.xml
@@ -86,6 +86,15 @@
+
+
+
+
+
+
+
+
+
@@ -102,16 +111,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -187,7 +186,13 @@
-
+
+
+
+
+
+
+
@@ -200,13 +205,6 @@
-
-
-
-
-
-
-
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
index 13cdd624cf2..edbd9e66b7d 100644
--- a/addons/stock/report/report_stock_picking_view.xml
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -72,6 +72,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -89,21 +103,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index f9fd2ed2bd2..e80e9856023 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -1598,6 +1598,14 @@
+
+
+
+
+
+
+
+
@@ -1612,14 +1620,6 @@
-
-
-
-
-
-
-
-
|