- Net Total:
+ Net Total:
|
- [[ formatLang(o.amount_untaxed) ]]
+ [[ formatLang(o.amount_untaxed) or '0.00' ]]
|
[[ o.currency_id.code ]]
@@ -424,13 +428,13 @@
-
+
- Taxes:
+ Taxes:
|
- [[ formatLang(o.amount_tax) ]]
+ [[ formatLang(o.amount_tax) or '0.00']]
|
[[ o.currency_id.code ]]
@@ -440,13 +444,13 @@
-
+
- Total:
+ Total:
|
- [[ formatLang(o.amount_total) ]]
+ [[ formatLang(o.amount_total) or '0.00' ]]
|
[[ o.currency_id.code ]]
@@ -459,20 +463,23 @@
- [[ format(o.amount_tax or removeParentNode('blockTable')) ]]
+ [[ format(o.amount_tax or removeParentNode('blockTable')) ]]
- Tax
+ Tax
|
- Base
+ Base
|
- Amount
+ Amount
|
+
+
+
|
@@ -487,7 +494,7 @@
[[ formatLang(t.base) ]]
- [[ formatLang(t.amount) or 0.00 ]]
+ [[ formatLang(t.amount) or 0.00 ]]
|
@@ -534,7 +541,7 @@
- [[ format(o.comment or removeParentNode('blockTable')) ]]
+ [[ format(o.comment or removeParentNode('blockTable')) ]]
|
@@ -544,7 +551,7 @@
- [[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]
+ [[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]
|
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index 88e8a26758b..fcc3dc8c6c2 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -114,9 +114,14 @@ class hr_analytic_timesheet(osv.osv):
if not account_id:
return res
res.setdefault('value',{})
- st = self.pool.get('account.analytic.account').browse(cr, uid,
- account_id).to_invoice.id
+ acc = self.pool.get('account.analytic.account').browse(cr, uid, account_id)
+ st = acc.to_invoice.id
res['value']['to_invoice'] = st or False
+ if acc.state=='pending':
+ res['warning'] = {
+ 'title': 'Warning',
+ 'message': 'The analytic account is in pending state.\nYou should not work on this account !'
+ }
return res
def copy(self, cursor, user, obj_id, default=None, context=None):
diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml
index 54a0dc6c527..30ce25b4952 100644
--- a/addons/sale/report/order.rml
+++ b/addons/sale/report/order.rml
@@ -140,18 +140,18 @@
|
Shipping address :
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
- [[ o.partner_shipping_id.title or '' ]] [[ o.partner_shipping_id.name ]]
+ [[ o.partner_id.title or '' ]][[ o.partner_id.name ]]
+ [[ o.partner_shipping_id.title or '' ]][[ o.partner_shipping_id.name ]]
[[ o.partner_shipping_id.street ]]
- [[ o.partner_shipping_id.street2 or '' ]]
- [[ o.partner_shipping_id.city or '' ]] [[ o.partner_shipping_id.zip or '' ]]
- [[ o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name or '' ]] [[ o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name or '' ]]
+ [[ o.partner_shipping_id.street2 or '' ]]
+ [[ o.partner_shipping_id.city or '' ]][[ o.partner_shipping_id.zip or '' ]]
+ [[ o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name or '' ]][[ o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name or '' ]]
- Invoice address :[[ o.partner_id.property_payment_term and o.partner_id.property_payment_term.name or '' ]]
- [[ o.partner_invoice_id.street ]] [[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]]
- [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]]
+ Invoice address :[[ o.partner_id.property_payment_term.name ]]
+ [[ o.partner_invoice_id.street ]][[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]]
+ [[ o.partner_invoice_id.zip or '' ]][[ o.partner_invoice_id.city or '' ]][[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]]
|
@@ -159,17 +159,17 @@
|
- [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]
- [[ o.partner_order_id.title or '' ]] [[ o.partner_order_id.name ]]
+ [[ o.partner_id.title or '' ]][[ o.partner_id.name ]]
+ [[ o.partner_order_id.title or '' ]][[ o.partner_order_id.name ]]
[[ o.partner_order_id.street ]]
[[ o.partner_order_id.street2 or '' ]]
- [[ o.partner_order_id.zip or '' ]] [[ o.partner_order_id.city or '' ]]
- [[ o.partner_order_id.state_id and o.partner_order_id.state_id.name or '' ]] [[ o.partner_order_id.country_id and o.partner_order_id.country_id.name or '' ]]
+ [[ o.partner_order_id.zip or '' ]][[ o.partner_order_id.city or '' ]]
+ [[ o.partner_order_id.state_id and o.partner_order_id.state_id.name or '' ]][[ o.partner_order_id.country_id and o.partner_order_id.country_id.name or '' ]]
Tel. : [[ o.partner_order_id.phone or removeParentNode('para') ]]
- Fax : [[ o.partner_order_id.fax or removeParentNode('para') ]]
+ Fax : [[ o.partner_order_id.fax or removeParentNode('para') ]]
TVA : [[ o.partner_id.vat or removeParentNode('para') ]]
@@ -191,7 +191,7 @@
Your Reference
|
- Date
+ Date Ordered
|
Our Salesman
@@ -204,7 +204,7 @@
- [[ o.client_order_ref or '' ]]
+ [[ o.name ]]
|
[[ o.date_order ]]
@@ -213,7 +213,7 @@
[[ o.user_id.name ]]
|
- [[ o.partner_id.property_payment_term['name'] or o.payment_term and o.payment_term.name or '' ]]
+ [[ o.partner_id and o.partner_id.property_payment_term and o.partner_id.property_payment_term['name'] or '' ]]
|
@@ -244,28 +244,28 @@
[[ repeatIn(o.order_line,'line') ]]
-
+
[[ line.name ]]
|
- [[ ', '.join(map(lambda x: x.name, line.tax_id)) ]]
+ [[ ', '.join(map(lambda x: x.name, line.tax_id)) or '0.00' ]]
|
- [[ line.product_uos and line.product_uos_qty or line.product_uom_qty ]]
+ [[ line.product_uos and line.product_uos_qty or line.product_uom_qty or '0.00']]
|
[[ line.product_uos and line.product_uos.name or line.product_uom.name ]]
|
- [[ line.price_unit ]]
+ [[ line.price_unit or '0.00' ]]
|
- [[ line.discount and str(line.discount) or '' ]]
+ [[ line.discount and str(line.discount) or '0.00' ]]
|
- [[ line.price_subtotal ]]
+ [[ line.price_subtotal or '0.00' ]]
|
@@ -316,7 +316,7 @@
Net Total :
- [[ o.amount_untaxed ]]
+ [[ o.amount_untaxed or '0.00' ]]
|
[[ o.pricelist_id.currency_id.name ]]
@@ -332,7 +332,7 @@
Taxes :
|
- [[ o.amount_tax ]]
+ [[ o.amount_tax or '0.00' ]]
|
[[ o.pricelist_id.currency_id.name ]]
@@ -348,7 +348,7 @@
Total :
|
- [[ o.amount_total ]]
+ [[ o.amount_total or '0.00' ]]
|
[[ o.pricelist_id.currency_id.name ]]
@@ -358,7 +358,7 @@
-
+
[[ format(o.note or '') ]]
@@ -374,4 +374,4 @@
-
+
\ No newline at end of file
| | | | |