diff --git a/addons/account/report/wizard_account_journal.rml b/addons/account/report/wizard_account_journal.rml
index def6acbecb8..0cc66191f53 100644
--- a/addons/account/report/wizard_account_journal.rml
+++ b/addons/account/report/wizard_account_journal.rml
@@ -24,7 +24,7 @@
- [[ time.strftime("%Y-%m-%d %H:%M", time.localtime()) ]]
+ [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]
Page
@@ -145,7 +145,7 @@
|
- [[line[0].period_id.name ]]
+ [[ line[0].period_id.name ]]
|
[[line[0].journal_id.code ]] |
@@ -153,16 +153,16 @@
|
|
- [[ '%.2f' % sum_debit(line[0].period_id.id, line[0].journal_id.id) or '0.00' ]]
+ [[ formatLang(sum_debit(line[0].period_id.id, line[0].journal_id.id)) ]]
|
- [[ '%.2f' % sum_credit(line[0].period_id.id, line[0].journal_id.id) or '0.00' ]]
+ [[ formatLang(sum_credit(line[0].period_id.id, line[0].journal_id.id)) ]]
|
[[repeatIn(line,'l')]]
|
- [[ l.date ]]
+ [[ formatLang(l.date,date=True) ]]
|
[[ l.ref ]]
@@ -177,10 +177,10 @@
[[ l.name ]]
|
- [[ l.debit and '%.2f' % l.debit or '0.00' ]]
+ [[ formatLang(l.debit) ]]
|
- [[ l.credit and '%.2f' % l.credit or '0.00' ]]
+ [[ formatLang(l.credit) ]]
|
diff --git a/addons/account/report/wizard_central_journal.rml b/addons/account/report/wizard_central_journal.rml
index 4c0b037971a..7cefd80fbe2 100644
--- a/addons/account/report/wizard_central_journal.rml
+++ b/addons/account/report/wizard_central_journal.rml
@@ -16,7 +16,7 @@
- [[ time.strftime("%Y-%m-%d %H:%M", time.localtime()) ]]
+ [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]
Page
@@ -169,7 +169,7 @@
[[ line[0]['journal'].name ]]
- [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]
+ [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]]
|
@@ -208,10 +208,10 @@
- [[ '%.2f' % sum_debit(line[0]['period'].id, line[0]['journal'].id) ]]
+ [[ formatLang(sum_debit(line[0]['period'].id, line[0]['journal'].id)) ]]
|
- [[ '%.2f' % sum_credit(line[0]['period'].id, line[0]['journal'].id) ]]
+ [[ formatLang(sum_credit(line[0]['period'].id, line[0]['journal'].id)) ]]
|
@@ -230,10 +230,10 @@
[[ l['name'] ]]
- [[ formatLang(l['debit']) and '%.2f' % l['debit'] or '0.00' ]]
+ [[ formatLang(l['debit']) ]]
|
- [[ formatLang(l['credit']) and '%.2f' % l['credit'] or '0.00' ]]
+ [[ formatLang(l['credit']) ]]
|
diff --git a/addons/account/report/wizard_general_journal.rml b/addons/account/report/wizard_general_journal.rml
index e61aa9b2267..aba1ad9c98c 100644
--- a/addons/account/report/wizard_general_journal.rml
+++ b/addons/account/report/wizard_general_journal.rml
@@ -16,7 +16,7 @@
- [[ time.strftime("%Y-%m-%d %H:%M", time.localtime()) ]]
+ [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]
Page
@@ -130,7 +130,7 @@
Printing Date :
- [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]
+ [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]]
|
@@ -178,10 +178,10 @@
- [[ '%.2f' % sum_debit(data['form']['period_id'][0][2],data['form']['journal_id'][0][2]) ]]
+ [[ formatLang(sum_debit(data['form']['period_id'][0][2],data['form']['journal_id'][0][2])) ]]
|
- [[ '%.2f' % sum_credit(data['form']['period_id'][0][2],data['form']['journal_id'][0][2]) ]]
+ [[ formatLang(sum_credit(data['form']['period_id'][0][2],data['form']['journal_id'][0][2])) ]]
|
@@ -208,10 +208,10 @@
- [[ '%.2f' % sum_debit_period( line[0]['pid'],data['form']['journal_id'][0][2]) ]]
+ [[ formatLang(sum_debit_period( line[0]['pid'],data['form']['journal_id'][0][2])) ]]
|
- [[ '%.2f' % sum_credit_period(line[0]['pid'],data['form']['journal_id'][0][2]) ]]
+ [[ formatLang(sum_credit_period(line[0]['pid'],data['form']['journal_id'][0][2])) ]]
|
@@ -229,10 +229,10 @@
[[ line[0]['period_name'] ]]
|
- [[ l['debit'] and ('%.2f' % l['debit']) or '' ]]
+ [[ formatLang(l['debit'])]]
|
- [[ l['credit'] and ('%.2f' % l['credit']) or '' ]]
+ [[ formatLang(l['credit']) ]]
|
diff --git a/addons/mrp/report/order.rml b/addons/mrp/report/order.rml
index f920a71337b..0209da707ac 100644
--- a/addons/mrp/report/order.rml
+++ b/addons/mrp/report/order.rml
@@ -206,7 +206,7 @@
[[ '['+ o.product_id.code +']' ]] [[ o.product_id.name ]]
- [['%.2f' % o.product_qty or '0.00' ]]
+ [[ formatLang(o.product_qty) ]]
|
[[o.priority or '']]
@@ -239,10 +239,10 @@
|
- [[ time.strftime('%d/%m/%Y') ]]
+ [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]
|
- [[ time.strftime('%d/%m/%Y', time.strptime(o.date_planned, '%Y-%m-%d %H:%M:%S')) ]]
+ [[ formatLang(o.date_planned, date=True) ]]
|
[[ o.sale_ref or ' ' ]]
@@ -292,10 +292,10 @@
[[ line2.workcenter_id.name ]]
|
- [[ line2.cycle or '0.00' ]]
+ [[ formatLang(line2.cycle) ]]
|
- [[ line2.hour or '0.00' ]]
+ [[ formatLang(line2.hour) ]]
|
@@ -327,7 +327,7 @@
[[ '['+line.product_id.code +']' ]][[ line.product_id.name ]]
|
- [[ '%.2f' % line.product_qty ]] [[line.product_uom.name]]
+ [[ formatLang(line.product_qty) ]] [[line.product_uom.name]]
|
[[ line.location_id.name ]]
@@ -348,4 +348,4 @@
-
\ No newline at end of file
+
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 355267229f6..e57e2833c8d 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -452,6 +452,8 @@ class purchase_order_line(osv.osv):
partner_id, date_order=False, fiscal_position=False):
if not pricelist:
raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist in the purchase form !\nPlease set one before choosing a product.'))
+ if not partner_id:
+ raise osv.except_osv(_('No Partner!'), _('You have to select a partner in the purchase form !\nPlease set one partner before choosing a product.'))
if not product:
return {'value': {'price_unit': 0.0, 'name':'','notes':'', 'product_uom' : False}, 'domain':{'product_uom':[]}}
prod= self.pool.get('product.product').browse(cr, uid,product)
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 4e3d384a057..c58c81efa57 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -851,6 +851,8 @@ class sale_order_line(osv.osv):
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
uom=False, qty_uos=0, uos=False, name='', partner_id=False,
lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False):
+ if not partner_id:
+ raise osv.except_osv(_('No Partner !'), _('You have to select a partner in the sale form !\nPlease set one partner before choosing a product.'))
warning={}
product_uom_obj = self.pool.get('product.uom')
partner_obj = self.pool.get('res.partner')
diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml
index 5f23bd8078d..e63d3aedcf9 100644
--- a/addons/stock/report/picking.rml
+++ b/addons/stock/report/picking.rml
@@ -119,7 +119,6 @@
[[ repeatIn(objects,'picking') ]]
- [[ setLang((picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.lang)) ]]
|