From ef8b1bbde70bc32c3fb2367b271a6a2297b6c36f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Bidoul?=
Date: Wed, 20 Feb 2013 12:41:07 +0100
Subject: [PATCH 071/373] [FIX] improve l10n_lu financial report labels
bzr revid: stephane.bidoul@acsone.eu-20130220114107-uxxubknx3v6wg7qq
---
addons/l10n_lu/account_financial_report.xml | 30 ++++++++++-----------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/addons/l10n_lu/account_financial_report.xml b/addons/l10n_lu/account_financial_report.xml
index b39b0ceb15f..62a7a8c8d7e 100644
--- a/addons/l10n_lu/account_financial_report.xml
+++ b/addons/l10n_lu/account_financial_report.xml
@@ -84,7 +84,7 @@
- 2. Concessions, brevets, licences, marques, ainsi que droits et valeurs similaires s’ils ont été
+ 2. Concessions, brevets, licences, marques, ainsi que droits et valeurs similaires s’ils ont été115detail_flat
@@ -256,7 +256,7 @@
- I. Stocks
+ I. Stocks153detail_flat
@@ -292,7 +292,7 @@
- 4. Acomptes versés
+ 4. Acomptes versés161no_detail
@@ -301,7 +301,7 @@
- II. Créances
+ II. Créances163detail_flat
@@ -364,7 +364,7 @@
- 3. Créances sur des entreprises avec lesquelles la société a un
+ 3. Créances sur des entreprises avec lesquelles la société a un lien de participation177detail_flat
@@ -436,7 +436,7 @@
- 2. Actions propres ou parts propres
+ 2. Actions propres ou parts propres193no_detail
@@ -445,7 +445,7 @@
- 3. Autres valeurs mobilières
+ 3. Autres valeurs mobilières195no_detail
@@ -963,7 +963,7 @@
- CHARGES
+ A. CHARGES641detail_flat
@@ -972,7 +972,7 @@
- 1. Consommation de marchandises et de matières premières et consommables
+ 1. Consommation de marchandises et de matières premières et consommables601no_detail
@@ -1044,7 +1044,7 @@
- a) sur frais d'établissement et sur immobilisations corporelles
+ a) sur frais d'établissement et sur immobilisations corporelles et incorporelles617no_detail
@@ -1071,7 +1071,7 @@
- 6. Corrections de valeur sur immobilisations financières et aj
+ 6. Corrections de valeur sur immobilisations financières et ajustement de juste valeur sur immobilisations financières623no_detail
@@ -1080,7 +1080,7 @@
- 7. Corrections de valeur et ajustement de juste valeur sur élém
+ 7. Corrections de valeur et ajustement de juste valeur sur éléments financiers de l'actif circulant. Moins-values de cessions des valeurs mobilières625no_detail
@@ -1143,7 +1143,7 @@
- PRODUITS
+ B. PRODUITS737detail_flat
@@ -1161,7 +1161,7 @@
- 2. Variation des stocks de produits finis, et de produits et de commandes en cours
+ 2. Variation des stocks de produits finis, et de produits et de commandes en cours703no_detail
@@ -1188,7 +1188,7 @@
- a) sur frais d'établissement et sur immobilisations corporelles
+ a) sur frais d'établissement et sur immobilisations corporelles et incorporelles709no_detail
From a4de106b7932ec21bc5621c4b9251842962957cb Mon Sep 17 00:00:00 2001
From: "sergiocorato@gmail.com" <>
Date: Tue, 26 Feb 2013 00:28:26 +0100
Subject: [PATCH 072/373] [IMP] Implementation of all non-deductible tax codes
bzr revid: sergiocorato@gmail.com-20130225232826-uy3juozcpm0b98ew
---
.../data/account.tax.code.template.csv | 19 +++++--
addons/l10n_it/data/account.tax.template.csv | 56 +++++++++----------
2 files changed, 43 insertions(+), 32 deletions(-)
diff --git a/addons/l10n_it/data/account.tax.code.template.csv b/addons/l10n_it/data/account.tax.code.template.csv
index 18286632700..e5435945556 100644
--- a/addons/l10n_it/data/account.tax.code.template.csv
+++ b/addons/l10n_it/data/account.tax.code.template.csv
@@ -1,6 +1,7 @@
code,id,name,parent_id:id
,vat_code_chart_root,Tassazione,
IVC,template_ivacode_pagata,IVA a credito,vat_code_chart_root
+IVCN,template_ivacode_pagata_ind,IVA a credito indetraibile,vat_code_chart_root
IVC0,template_ivacode_pagata_0,Fuori Campo IVA (credito),template_ivacode_pagata
IVCI,template_impcode_pagata,IVA a credito (imponibile),vat_code_chart_root
IVC0I,template_impcode_pagata_0,Fuori Campo IVA (credito) (imponibile),template_impcode_pagata
@@ -8,23 +9,29 @@ IVCart15,template_ivacode_pagata_art15,Escluso Art.15 (credito),template_ivacode
IVCart15I,template_impcode_pagata_art15,Escluso Art.15. (credito) (imponibile),template_impcode_pagata
IVC10,template_ivacode_pagata_10,IVA a credito 10%,template_ivacode_pagata
IVC10I,template_impcode_pagata_10,IVA a credito 10% (imponibile),template_impcode_pagata
-IVC10ind,template_ivacode_pagata_10ind,IVA a credito 10% indetraibile,template_ivacode_pagata
+IVC10ind,template_ivacode_pagata_10ind,IVA a credito 10% indetraibile,template_ivacode_pagata_ind
IVC10Iind,template_impcode_pagata_10ind,IVA a credito 10% indetraibile (imponibile),template_impcode_pagata
-IVC20ind,template_ivacode_pagata_20ind,IVA a credito 20% indetraibile,template_ivacode_pagata
+IVC20ind,template_ivacode_pagata_20ind,IVA a credito 20% indetraibile,template_ivacode_pagata_ind
IVC20Iind,template_impcode_pagata_20ind,IVA a credito 20% indetraibile (imponibile),template_impcode_pagata
-IVC4ind,template_ivacode_pagata_4ind,IVA a credito 4% indetraibile,template_ivacode_pagata
+IVC4ind,template_ivacode_pagata_4ind,IVA a credito 4% indetraibile,template_ivacode_pagata_ind
IVC4Iind,template_impcode_pagata_4ind,IVA a credito 4% indetraibile (imponibile),template_impcode_pagata
IVC20det10,template_ivacode_pagata_20det10,IVA a credito 20% detraibile 10%,template_ivacode_pagata
+IVC20Ndet10,template_ivacode_pagata_20det10ind,IVA a credito 20% detraibile 10% (indetraibile),template_ivacode_pagata_ind
IVC20Idet10,template_impcode_pagata_20det10,IVA a credito 20% detraibile 10% (imponibile),template_impcode_pagata
IVC20det15,template_ivacode_pagata_20det15,IVA a credito 20% detraibile 15%,template_ivacode_pagata
+IVC20Ndet15,template_ivacode_pagata_20det15ind,IVA a credito 20% detraibile 15% (indetraibile),template_ivacode_pagata_ind
IVC20Idet15,template_impcode_pagata_20det15,IVA a credito 20% detraibile 15% (imponibile),template_impcode_pagata
IVC20det40,template_ivacode_pagata_20det40,IVA a credito 20% detraibile 40%,template_ivacode_pagata
+IVC20Ndet40,template_ivacode_pagata_20det40ind,IVA a credito 20% detraibile 40% (indetraibile),template_ivacode_pagata_ind
IVC20Idet40,template_impcode_pagata_20det40,IVA a credito 20% detraibile 40% (imponibile),template_impcode_pagata
IVC20det50,template_ivacode_pagata_20det50,IVA a credito 20% detraibile 50%,template_ivacode_pagata
+IVC20Ndet50,template_ivacode_pagata_20det50ind,IVA a credito 20% detraibile 50% (indetraibile),template_ivacode_pagata_ind
IVC20Idet50,template_impcode_pagata_20det50,IVA a credito 20% detraibile 50% (imponibile),template_impcode_pagata
IVC10det50,template_ivacode_pagata_10det50,IVA a credito 10% detraibile 50%,template_ivacode_pagata
+IVC10Ndet50,template_ivacode_pagata_10det50ind,IVA a credito 10% detraibile 50% (indetraibile),template_ivacode_pagata_ind
IVC10Idet50,template_impcode_pagata_10det50,IVA a credito 10% detraibile 50% (imponibile),template_impcode_pagata
IVC4det50,template_ivacode_pagata_4det50,IVA a credito 4% detraibile 50%,template_ivacode_pagata
+IVC4Ndet50,template_ivacode_pagata_4det50ind,IVA a credito 4% detraibile 50% (indetraibile),template_ivacode_pagata_ind
IVC4Idet50,template_impcode_pagata_4det50,IVA a credito 4% detraibile 50% (imponibile),template_impcode_pagata
IVC20,template_ivacode_pagata_20,IVA a credito 20%,template_ivacode_pagata
IVC20I,template_impcode_pagata_20,IVA a credito 20% (imponibile),template_impcode_pagata
@@ -54,13 +61,17 @@ IVD12,template_ivacode_riscossa_12,IVA a debito 12%,template_ivacode_riscossa
IVD12I,template_impcode_riscossa_12,IVA a debito 12% (imponibile),template_impcode_riscossa
IVD2,template_ivacode_riscossa_2,IVA a debito 2%,template_ivacode_riscossa
IVD2I,template_impcode_riscossa_2,IVA a debito 2% (imponibile),template_impcode_riscossa
-IVC21ind,template_ivacode_pagata_21ind,IVA a credito 21% indetraibile,template_ivacode_pagata
+IVC21ind,template_ivacode_pagata_21ind,IVA a credito 21% indetraibile,template_ivacode_pagata_ind
IVC21Iind,template_impcode_pagata_21ind,IVA a credito 21% indetraibile (imponibile),template_impcode_pagata
IVC21det10,template_ivacode_pagata_21det10,IVA a credito 21% detraibile 10%,template_ivacode_pagata
+IVC21Ndet10,template_ivacode_pagata_21det10ind,IVA a credito 21% detraibile 10% (indetraibile),template_ivacode_pagata_ind
IVC21Idet10,template_impcode_pagata_21det10,IVA a credito 21% detraibile 10% (imponibile),template_impcode_pagata
IVC21det15,template_ivacode_pagata_21det15,IVA a credito 21% detraibile 15%,template_ivacode_pagata
+IVC21Ndet15,template_ivacode_pagata_21det15ind,IVA a credito 21% detraibile 15% (indetraibile),template_ivacode_pagata_ind
IVC21Idet15,template_impcode_pagata_21det15,IVA a credito 21% detraibile 15% (imponibile),template_impcode_pagata
IVC21det40,template_ivacode_pagata_21det40,IVA a credito 21% detraibile 40%,template_ivacode_pagata
+IVC21Ndet40,template_ivacode_pagata_21det40ind,IVA a credito 21% detraibile 40% (indetraibile),template_ivacode_pagata_ind
IVC21Idet40,template_impcode_pagata_21det40,IVA a credito 21% detraibile 40% (imponibile),template_impcode_pagata
IVC21det50,template_ivacode_pagata_21det50,IVA a credito 21% detraibile 50%,template_ivacode_pagata
+IVC21Ndet50,template_ivacode_pagata_21det50ind,IVA a credito 21% detraibile 50% (indetraibile),template_ivacode_pagata_ind
IVC21Idet50,template_impcode_pagata_21det50,IVA a credito 21% detraibile 50% (imponibile),template_impcode_pagata
diff --git a/addons/l10n_it/data/account.tax.template.csv b/addons/l10n_it/data/account.tax.template.csv
index f64b4974fca..5654b32e5e9 100644
--- a/addons/l10n_it/data/account.tax.template.csv
+++ b/addons/l10n_it/data/account.tax.template.csv
@@ -6,38 +6,38 @@ id,description,chart_template_id:id,name,sequence,amount,parent_id:id,child_depe
10v,10v,l10n_it_chart_template_generic,Iva al 10% (debito),5,0.1,,False,percent,2601,2601,sale,template_impcode_riscossa_10,template_ivacode_riscossa_10,template_impcode_riscossa_10,template_ivacode_riscossa_10,-1,-1,False,1,1
10a,10a,l10n_it_chart_template_generic,Iva al 10% (credito),6,0.1,,False,percent,1601,1601,purchase,template_impcode_pagata_10,template_ivacode_pagata_10,template_impcode_pagata_10,template_ivacode_pagata_10,1,1,False,-1,-1
10AO,10AO,l10n_it_chart_template_generic,Iva al 10% indetraibile,7,0.1,,True,percent,,,purchase,template_impcode_pagata_10ind,,template_impcode_pagata_10ind,,1,1,False,-1,-1
-10AOb,10AOb,l10n_it_chart_template_generic,Iva al 10% indetraibile (D),200,0,10AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_10ind,,template_ivacode_pagata_10ind,1,1,False,1,1
-10AOa,10AOa,l10n_it_chart_template_generic,Iva al 10% indetraibile (I),100,1,10AO,False,percent,,,purchase,,,,,1,1,False,1,1
+10AOb,10AOb,l10n_it_chart_template_generic,Iva al 10% indetraibile (D),200,0,10AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_10,,template_ivacode_pagata_10,1,1,False,-1,-1
+10AOa,10AOa,l10n_it_chart_template_generic,Iva al 10% indetraibile (I),100,1,10AO,False,percent,,,purchase,,template_ivacode_pagata_10ind,,template_ivacode_pagata_10ind,1,1,False,-1,-1
12v,12v,l10n_it_chart_template_generic,Iva 12% (debito),8,0.12,,False,percent,2601,2601,sale,template_impcode_riscossa_12,template_ivacode_riscossa_12,template_impcode_riscossa_12,template_ivacode_riscossa_12,-1,-1,False,1,1
12a,12a,l10n_it_chart_template_generic,Iva 12% (credito),9,0.12,,False,percent,1601,1601,purchase,template_impcode_pagata_12,template_ivacode_pagata_12,template_impcode_pagata_12,template_ivacode_pagata_12,1,1,False,-1,-1
2010,2010,l10n_it_chart_template_generic,Iva al 20% detraibile 10%,10,0.2,,True,percent,,,purchase,template_impcode_pagata_20det10,,template_impcode_pagata_20det10,,1,1,False,-1,-1
-2010b,2010b,l10n_it_chart_template_generic,Iva al 20% detraibile 10% (D),200,0,2010,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det10,,template_ivacode_pagata_20det10,1,1,False,1,1
-2010a,2010a,l10n_it_chart_template_generic,Iva al 20% detraibile 10% (I),100,0.9,2010,False,percent,,,purchase,,,,,1,1,False,1,1
+2010b,2010b,l10n_it_chart_template_generic,Iva al 20% detraibile 10% (D),200,0,2010,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det10,,template_ivacode_pagata_20det10,1,1,False,-1,-1
+2010a,2010a,l10n_it_chart_template_generic,Iva al 20% detraibile 10% (I),100,0.9,2010,False,percent,,,purchase,,template_ivacode_pagata_20det10ind,,template_ivacode_pagata_20det10ind,1,1,False,-1,-1
2015,2015,l10n_it_chart_template_generic,Iva al 20% detraibile 15%,11,0.2,,True,percent,,,purchase,template_impcode_pagata_20det15,,template_impcode_pagata_20det15,,1,1,False,-1,-1
-2015b,2015b,l10n_it_chart_template_generic,Iva al 20% detraibile 15% (D),200,0,2015,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det15,,template_ivacode_pagata_20det15,1,1,False,1,1
-2015a,2015a,l10n_it_chart_template_generic,Iva al 20% detraibile 15% (I),100,0.85,2015,False,percent,,,purchase,,,,,1,1,False,1,1
+2015b,2015b,l10n_it_chart_template_generic,Iva al 20% detraibile 15% (D),200,0,2015,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det15,,template_ivacode_pagata_20det15,1,1,False,-1,-1
+2015a,2015a,l10n_it_chart_template_generic,Iva al 20% detraibile 15% (I),100,0.85,2015,False,percent,,,purchase,,template_ivacode_pagata_20det15ind,,template_ivacode_pagata_20det15ind,1,1,False,-1,-1
2040,2040,l10n_it_chart_template_generic,Iva al 20% detraibile 40%,12,0.2,,True,percent,,,purchase,template_impcode_pagata_20det40,,template_impcode_pagata_20det40,,1,1,False,-1,-1
-2040b,2040b,l10n_it_chart_template_generic,Iva al 20% detraibile 40% (D),200,0,2040,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det40,,template_ivacode_pagata_20det40,1,1,False,1,1
-2040a,2040a,l10n_it_chart_template_generic,Iva al 20% detraibile 40% (I),100,0.6,2040,False,percent,,,purchase,,,,,1,1,False,1,1
+2040b,2040b,l10n_it_chart_template_generic,Iva al 20% detraibile 40% (D),200,0,2040,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det40,,template_ivacode_pagata_20det40,1,1,False,-1,-1
+2040a,2040a,l10n_it_chart_template_generic,Iva al 20% detraibile 40% (I),100,0.6,2040,False,percent,,,purchase,,template_ivacode_pagata_20det40ind,,template_ivacode_pagata_20det40ind,1,1,False,-1,-1
20AO,20AO,l10n_it_chart_template_generic,Iva al 20% indetraibile,13,0.2,,True,percent,,,purchase,template_impcode_pagata_20ind,,template_impcode_pagata_20ind,,1,1,False,-1,-1
-20AOb,20AOb,l10n_it_chart_template_generic,Iva al 20% indetraibile (D),200,0,20AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_20ind,,template_ivacode_pagata_20ind,1,1,False,1,1
-20AOa,20AOa,l10n_it_chart_template_generic,Iva al 20% indetraibile (I),100,1,20AO,False,percent,,,purchase,,,,,1,1,False,1,1
+20AOb,20AOb,l10n_it_chart_template_generic,Iva al 20% indetraibile (D),200,0,20AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_20ind,,template_ivacode_pagata_20ind,1,1,False,-1,-1
+20AOa,20AOa,l10n_it_chart_template_generic,Iva al 20% indetraibile (I),100,1,20AO,False,percent,,,purchase,,template_ivacode_pagata_20ind,,template_ivacode_pagata_20ind,1,1,False,-1,-1
20I5,20I5,l10n_it_chart_template_generic,IVA al 20% detraibile al 50%,14,0.2,,True,percent,,,purchase,template_impcode_pagata_20det50,,template_impcode_pagata_20det50,,1,1,False,-1,-1
-20I5a,20I5a,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (I),100,0.5,20I5,False,percent,,,purchase,,,,,1,1,False,1,1
-20I5b,20I5b,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (D),200,0,20I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det50,,template_ivacode_pagata_20det50,1,1,False,1,1
+20I5b,20I5b,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (D),200,0,20I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det50,,template_ivacode_pagata_20det50,1,1,False,-1,-1
+20I5a,20I5a,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (I),100,0.5,20I5,False,percent,,,purchase,,template_ivacode_pagata_20det50ind,,template_ivacode_pagata_20det50ind,1,1,False,-1,-1
22v,22v,l10n_it_chart_template_generic,Iva 2% (debito),15,0.02,,False,percent,2601,2601,sale,template_impcode_riscossa_2,template_ivacode_riscossa_2,template_impcode_riscossa_2,template_ivacode_riscossa_2,-1,-1,False,1,1
22a,22a,l10n_it_chart_template_generic,Iva 2% (credito),16,0.02,,False,percent,1601,1601,purchase,template_impcode_pagata_2,template_ivacode_pagata_2,template_impcode_pagata_2,template_ivacode_pagata_2,1,1,False,-1,-1
4v,4v,l10n_it_chart_template_generic,Iva 4% (debito),17,0.04,,False,percent,2601,2601,sale,template_impcode_riscossa_4,template_ivacode_riscossa_4,template_impcode_riscossa_4,template_ivacode_riscossa_4,-1,-1,False,1,1
4a,4a,l10n_it_chart_template_generic,Iva 4% (credito),18,0.04,,False,percent,1601,1601,purchase,template_impcode_pagata_4,template_ivacode_pagata_4,template_impcode_pagata_4,template_ivacode_pagata_4,1,1,False,-1,-1
4AO,4AO,l10n_it_chart_template_generic,Iva al 4% indetraibile,19,0.04,,True,percent,,,purchase,template_impcode_pagata_4ind,,template_impcode_pagata_4ind,,1,1,False,-1,-1
-4AOb,4AOb,l10n_it_chart_template_generic,Iva al 4% indetraibile (D),200,0,4AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_4ind,,template_ivacode_pagata_4ind,1,1,False,1,1
-4AOa,4AOa,l10n_it_chart_template_generic,Iva al 4% indetraibile (I),100,1,4AO,False,percent,,,purchase,,,,,1,1,False,1,1
+4AOb,4AOb,l10n_it_chart_template_generic,Iva al 4% indetraibile (D),200,0,4AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_4ind,,template_ivacode_pagata_4ind,1,1,False,-1,-1
+4AOa,4AOa,l10n_it_chart_template_generic,Iva al 4% indetraibile (I),100,1,4AO,False,percent,,,purchase,,template_ivacode_pagata_4ind,,template_ivacode_pagata_4ind,1,1,False,-1,-1
10I5,10I5,l10n_it_chart_template_generic,IVA al 10% detraibile al 50%,20,0.1,,True,percent,,,purchase,template_impcode_pagata_10det50,,template_impcode_pagata_10det50,,1,1,False,-1,-1
-10I5b,10I5b,l10n_it_chart_template_generic,IVA al 10% detraibile al 50% (D),200,0,10I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_10det50,,template_ivacode_pagata_10det50,1,1,False,1,1
-10I5a,10I5a,l10n_it_chart_template_generic,IVA al 10% detraibile al 50% (I),100,0.5,10I5,False,percent,,,purchase,,,,,1,1,False,1,1
+10I5b,10I5b,l10n_it_chart_template_generic,IVA al 10% detraibile al 50% (D),200,0,10I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_10det50,,template_ivacode_pagata_10det50,1,1,False,-1,-1
+10I5a,10I5a,l10n_it_chart_template_generic,IVA al 10% detraibile al 50% (I),100,0.5,10I5,False,percent,,,purchase,,template_ivacode_pagata_10det50ind,,template_ivacode_pagata_10det50ind,1,1,False,-1,-1
4I5,4I5,l10n_it_chart_template_generic,IVA al 4% detraibile al 50%,21,0.04,,True,percent,,,purchase,template_impcode_pagata_4det50,,template_impcode_pagata_4det50,,1,1,False,-1,-1
-4I5b,4I5b,l10n_it_chart_template_generic,IVA al 4% detraibile al 50% (D),200,0,4I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_4det50,,template_ivacode_pagata_4det50,1,1,False,1,1
-4I5a,4I5a,l10n_it_chart_template_generic,IVA al 4% detraibile al 50% (I),100,0.5,4I5,False,percent,,,purchase,,,,,1,1,False,1,1
+4I5b,4I5b,l10n_it_chart_template_generic,IVA al 4% detraibile al 50% (D),200,0,4I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_4det50,,template_ivacode_pagata_4det50,1,1,False,-1,-1
+4I5a,4I5a,l10n_it_chart_template_generic,IVA al 4% detraibile al 50% (I),100,0.5,4I5,False,percent,,,purchase,,template_ivacode_pagata_4det50ind,,template_ivacode_pagata_4det50ind,1,1,False,-1,-1
00v,00v,l10n_it_chart_template_generic,Fuori Campo IVA (debito),22,0,,False,percent,2601,2601,sale,template_impcode_riscossa_0,template_ivacode_riscossa_0,template_impcode_riscossa_0,template_ivacode_riscossa_0,-1,-1,False,1,1
00a,00a,l10n_it_chart_template_generic,Fuori Campo IVA (credito),23,0,,False,percent,1601,1601,purchase,template_impcode_pagata_0,template_ivacode_pagata_0,template_impcode_pagata_0,template_ivacode_pagata_0,1,1,False,-1,-1
00art15v,00art15v,l10n_it_chart_template_generic,Imponibile Escluso Art.15 (debito),22,0,,False,percent,2601,2601,sale,template_impcode_riscossa_art15,template_ivacode_riscossa_art15,template_impcode_riscossa_art15,template_ivacode_riscossa_art15,-1,-1,False,1,1
@@ -50,17 +50,17 @@ id,description,chart_template_id:id,name,sequence,amount,parent_id:id,child_depe
4v INC,4v INC,l10n_it_chart_template_generic,Iva 4% (debito) INC,29,0.04,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_4,l10n_it.template_ivacode_riscossa_4,l10n_it.template_impcode_riscossa_4,l10n_it.template_ivacode_riscossa_4,-1,-1,True,1,1
00v INC,00v INC,l10n_it_chart_template_generic,Fuori Campo IVA (debito) INC,30,0,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_0,l10n_it.template_ivacode_riscossa_0,l10n_it.template_impcode_riscossa_0,l10n_it.template_ivacode_riscossa_0,-1,-1,True,1,1
2110,2110,l10n_it_chart_template_generic,Iva al 21% detraibile 10%,31,0.21,,True,percent,,,purchase,template_impcode_pagata_21det10,,template_impcode_pagata_21det10,,1,1,False,-1,-1
-2110b,2110b,l10n_it_chart_template_generic,Iva al 21% detraibile 10% (D),200,0,2110,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det10,,template_ivacode_pagata_21det10,1,1,False,1,1
-2110a,2110a,l10n_it_chart_template_generic,Iva al 21% detraibile 10% (I),100,0.9,2110,False,percent,,,purchase,,,,,1,1,False,1,1
+2110b,2110b,l10n_it_chart_template_generic,Iva al 21% detraibile 10% (D),200,0,2110,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det10,,template_ivacode_pagata_21det10,1,1,False,-1,-1
+2110a,2110a,l10n_it_chart_template_generic,Iva al 21% detraibile 10% (I),100,0.9,2110,False,percent,,,purchase,,template_ivacode_pagata_21det10ind,,template_ivacode_pagata_21det10ind,1,1,False,-1,-1
2115,2115,l10n_it_chart_template_generic,Iva al 21% detraibile 15%,32,0.21,,True,percent,,,purchase,template_impcode_pagata_21det15,,template_impcode_pagata_21det15,,1,1,False,-1,-1
-2115b,2115b,l10n_it_chart_template_generic,Iva al 21% detraibile 15% (D),200,0,2115,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det15,,template_ivacode_pagata_21det15,1,1,False,1,1
-2115a,2115a,l10n_it_chart_template_generic,Iva al 21% detraibile 15% (I),100,0.85,2115,False,percent,,,purchase,,,,,1,1,False,1,1
+2115b,2115b,l10n_it_chart_template_generic,Iva al 21% detraibile 15% (D),200,0,2115,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det15,,template_ivacode_pagata_21det15,1,1,False,-1,-1
+2115a,2115a,l10n_it_chart_template_generic,Iva al 21% detraibile 15% (I),100,0.85,2115,False,percent,,,purchase,,template_ivacode_pagata_21det15ind,,template_ivacode_pagata_21det15ind,1,1,False,-1,-1
2140,2140,l10n_it_chart_template_generic,Iva al 21% detraibile 40%,33,0.21,,True,percent,,,purchase,template_impcode_pagata_21det40,,template_impcode_pagata_21det40,,1,1,False,-1,-1
-2140b,2140b,l10n_it_chart_template_generic,Iva al 21% detraibile 40% (D),200,0,2140,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det40,,template_ivacode_pagata_21det40,1,1,False,1,1
-2140a,2140a,l10n_it_chart_template_generic,Iva al 21% detraibile 40% (I),100,0.6,2140,False,percent,,,purchase,,,,,1,1,False,1,1
+2140b,2140b,l10n_it_chart_template_generic,Iva al 21% detraibile 40% (D),200,0,2140,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det40,,template_ivacode_pagata_21det40,1,1,False,-1,-1
+2140a,2140a,l10n_it_chart_template_generic,Iva al 21% detraibile 40% (I),100,0.6,2140,False,percent,,,purchase,,template_ivacode_pagata_21det40ind,,template_ivacode_pagata_21det40ind,1,1,False,-1,-1
21AO,21AO,l10n_it_chart_template_generic,Iva al 21% indetraibile,34,0.21,,True,percent,,,purchase,template_impcode_pagata_21ind,,template_impcode_pagata_21ind,,1,1,False,-1,-1
-21AOb,21AOb,l10n_it_chart_template_generic,Iva al 21% indetraibile (D),200,0,21AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_21ind,,template_ivacode_pagata_21ind,1,1,False,1,1
-21AOa,21AOa,l10n_it_chart_template_generic,Iva al 21% indetraibile (I),100,1,21AO,False,percent,,,purchase,,,,,1,1,False,1,1
+21AOb,21AOb,l10n_it_chart_template_generic,Iva al 21% indetraibile (D),200,0,21AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_21ind,,template_ivacode_pagata_21ind,1,1,False,-1,-1
+21AOa,21AOa,l10n_it_chart_template_generic,Iva al 21% indetraibile (I),100,1,21AO,False,percent,,,purchase,,template_ivacode_pagata_21ind,,template_ivacode_pagata_21ind,1,1,False,-1,-1
21I5,21I5,l10n_it_chart_template_generic,IVA al 21% detraibile al 50%,35,0.21,,True,percent,,,purchase,template_impcode_pagata_21det50,,template_impcode_pagata_21det50,,1,1,False,-1,-1
-21I5a,21I5a,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (I),100,0.5,21I5,False,percent,,,purchase,,,,,1,1,False,1,1
-21I5b,21I5b,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (D),200,0,21I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det50,,template_ivacode_pagata_21det50,1,1,False,1,1
+21I5b,21I5b,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (D),200,0,21I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det50,,template_ivacode_pagata_21det50,1,1,False,-1,-1
+21I5a,21I5a,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (I),100,0.5,21I5,False,percent,,,purchase,,template_ivacode_pagata_21det50ind,,template_ivacode_pagata_21det50ind,1,1,False,-1,-1
From b507ac6a9e79f78ab7435eb39e208ee81dea9850 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Wed, 27 Feb 2013 16:27:11 +0530
Subject: [PATCH 073/373] [FIX]account_followup: no need create button in
report, added create false in tree view
bzr revid: mma@tinyerp.com-20130227105711-m1veqahapgyg3767
---
addons/account_followup/report/account_followup_report.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account_followup/report/account_followup_report.xml b/addons/account_followup/report/account_followup_report.xml
index 6fee6a77ac1..b7c38e89f5e 100644
--- a/addons/account_followup/report/account_followup_report.xml
+++ b/addons/account_followup/report/account_followup_report.xml
@@ -6,7 +6,7 @@
account_followup.stat.treeaccount_followup.stat
-
+
From e147f5779cdd2193f4d2bf43d43e79fce0d5ec73 Mon Sep 17 00:00:00 2001
From: Jonatan Cloutier
Date: Wed, 27 Feb 2013 11:36:41 -0500
Subject: [PATCH 074/373] fix quebec taxes calculations
bzr revid: jonatan.cloutier@savoirfairelinux.com-20130227163641-jp61202fihnuxt9u
---
addons/l10n_ca/account_tax_en.xml | 2 --
addons/l10n_ca/account_tax_fr.xml | 2 --
2 files changed, 4 deletions(-)
diff --git a/addons/l10n_ca/account_tax_en.xml b/addons/l10n_ca/account_tax_en.xml
index 4b15ebaa316..afe505f27f5 100644
--- a/addons/l10n_ca/account_tax_en.xml
+++ b/addons/l10n_ca/account_tax_en.xml
@@ -105,7 +105,6 @@
GSTTVQ_SALEsale1
- 1percent
@@ -372,7 +371,6 @@
GSTTVQ_PURCpurchase1
- 1percent
diff --git a/addons/l10n_ca/account_tax_fr.xml b/addons/l10n_ca/account_tax_fr.xml
index 8c4f87b25b3..c34f329be3a 100644
--- a/addons/l10n_ca/account_tax_fr.xml
+++ b/addons/l10n_ca/account_tax_fr.xml
@@ -105,7 +105,6 @@
TPSTVQ_SALEsale1
- 1percent
@@ -372,7 +371,6 @@
TPSTVQ_PURCpurchase1
- 1percent
From dff2dd01963e8a098987fcb2e088415472f29f78 Mon Sep 17 00:00:00 2001
From: Vishmita
Date: Thu, 28 Feb 2013 11:19:10 +0530
Subject: [PATCH 075/373] [IMP]Bounce ob image
bzr revid: vja@tinyerp.com-20130228054910-3s7mrp39y0kmkfpy
---
addons/web/static/src/js/view_form.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 0ef448b0d6e..3464f23549b 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -4985,6 +4985,13 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
url = this.placeholder;
}
var $img = $(QWeb.render("FieldBinaryImage-img", { widget: this, url: url }));
+ $($img).click(function(e) {
+ if(self.view.get("actual_mode") == "view") {
+ var $button = $(".oe_form_button_edit");
+ $button.openerpBounce();
+ e.stopPropagation();
+ }
+ });
this.$el.find('> img').remove();
this.$el.prepend($img);
$img.load(function() {
From 4d7cfc9ab32f24ef89312667cce8ae61f53d26e3 Mon Sep 17 00:00:00 2001
From: Vishmita
Date: Thu, 28 Feb 2013 19:17:40 +0530
Subject: [PATCH 076/373] [IMP]Improve code for bounce on boolean field
bzr revid: vja@tinyerp.com-20130228134740-jqv0zqletq6v1792
---
addons/web/static/src/css/base.css | 10 ++++++++++
addons/web/static/src/js/view_form.js | 13 +++++++++++++
2 files changed, 23 insertions(+)
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 6cfee50d6a4..5d5ca46b4ec 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -3145,6 +3145,16 @@ div.ui-widget-overlay {
.openerp_ie .oe_form_field_boolean input {
background: white;
}
+.openerp .oe_form_field_boolean .boolean{
+ position: relative;
+ top: -14px;
+ width: 14px;
+ height: 14px;
+ z-index:10000;
+ // IE needs a color in order for the layer to respond to mouse events
+ backgroundColor: "#fff";
+ opacity: 0;
+}
.openerp_ie .db_option_table .oe_form_field_selection {
width: auto;
}
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 3464f23549b..87bf7c1c49a 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2659,6 +2659,7 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({
}, this));
var check_readonly = function() {
self.$checkbox.prop('disabled', self.get("effective_readonly"));
+ self.click_disabled_boolean();
};
this.on("change:effective_readonly", this, check_readonly);
check_readonly.call(this);
@@ -2669,7 +2670,19 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({
},
focus: function() {
this.$checkbox[0].focus();
+ },
+ click_disabled_boolean: function(){
+ var $disabled = $(document).find('input[type=checkbox]:disabled');
+ $disabled.each(function (){
+ var $parent = $(this).closest("span");
+ if($(this).next('div')){
+ $(this).next('div').remove();
+ }
+ var $overlay = $("");
+ $parent.append($overlay);
+ });
}
+
});
/**
From 50a893a66e06b68c5f9100267e4f4fcd3b5f70ef Mon Sep 17 00:00:00 2001
From: Raphael Collet
Date: Fri, 1 Mar 2013 11:36:49 +0100
Subject: [PATCH 077/373] [IMP] base_action_rule: add selection field on action
rules to indicate when to execute them
bzr revid: rco@openerp.com-20130301103649-up2b2yrye2y80e1t
---
addons/base_action_rule/base_action_rule.py | 23 ++++++++++++---------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index a3237c1620b..6cca0e8b6b5 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -61,6 +61,9 @@ class base_action_rule(osv.osv):
help="When unchecked, the rule is hidden and will not be executed."),
'sequence': fields.integer('Sequence',
help="Gives the sequence order when displaying a list of rules."),
+ 'kind': fields.selection(
+ [('create', 'On Creation'), ('write', 'On Update'), ('cron', 'Based on Timed Condition')],
+ string='When to Run'),
'trg_date_id': fields.many2one('ir.model.fields', string='Trigger Date',
domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"),
'trg_date_range': fields.integer('Delay after trigger date',
@@ -133,7 +136,7 @@ class base_action_rule(osv.osv):
""" Return a wrapper around `old_create` calling both `old_create` and
`_process`, in that order.
"""
- def wrapper(cr, uid, vals, context=None):
+ def create(cr, uid, vals, context=None):
# avoid loops or cascading actions
if context and context.get('action'):
return old_create(cr, uid, vals, context=context)
@@ -141,8 +144,8 @@ class base_action_rule(osv.osv):
context = dict(context or {}, action=True)
new_id = old_create(cr, uid, vals, context=context)
- # as it is a new record, we do not consider the actions that have a prefilter
- action_dom = [('model', '=', model), ('trg_date_id', '=', False), ('filter_pre_id', '=', False)]
+ # retrieve the action rules to run on creation
+ action_dom = [('model', '=', model), ('kind', '=', 'create')]
action_ids = self.search(cr, uid, action_dom, context=context)
# check postconditions, and execute actions on the records that satisfy them
@@ -151,13 +154,13 @@ class base_action_rule(osv.osv):
self._process(cr, uid, action, [new_id], context=context)
return new_id
- return wrapper
+ return create
def _wrap_write(self, old_write, model):
""" Return a wrapper around `old_write` calling both `old_write` and
`_process`, in that order.
"""
- def wrapper(cr, uid, ids, vals, context=None):
+ def write(cr, uid, ids, vals, context=None):
# avoid loops or cascading actions
if context and context.get('action'):
return old_write(cr, uid, ids, vals, context=context)
@@ -165,8 +168,8 @@ class base_action_rule(osv.osv):
context = dict(context or {}, action=True)
ids = [ids] if isinstance(ids, (int, long, str)) else ids
- # retrieve the action rules to possibly execute
- action_dom = [('model', '=', model), ('trg_date_id', '=', False)]
+ # retrieve the action rules to run on update
+ action_dom = [('model', '=', model), ('kind', '=', 'write')]
action_ids = self.search(cr, uid, action_dom, context=context)
actions = self.browse(cr, uid, action_ids, context=context)
@@ -185,7 +188,7 @@ class base_action_rule(osv.osv):
self._process(cr, uid, action, post_ids, context=context)
return True
- return wrapper
+ return write
def _register_hook(self, cr, ids=None):
""" Wrap the methods `create` and `write` of the models specified by
@@ -217,8 +220,8 @@ class base_action_rule(osv.osv):
def _check(self, cr, uid, automatic=False, use_new_cursor=False, context=None):
""" This Function is called by scheduler. """
context = context or {}
- # retrieve all the action rules that have a trg_date_id and no precondition
- action_dom = [('trg_date_id', '!=', False), ('filter_pre_id', '=', False)]
+ # retrieve all the action rules to run based on a timed condition
+ action_dom = [('kind', '=', 'cron')]
action_ids = self.search(cr, uid, action_dom, context=context)
for action in self.browse(cr, uid, action_ids, context=context):
now = datetime.now()
From ae6d15de59251618a21d4520e50456fd9777de33 Mon Sep 17 00:00:00 2001
From: ggh-openerp
Date: Fri, 1 Mar 2013 16:24:39 +0530
Subject: [PATCH 078/373] [IMP] Add saas file
bzr revid: ggh@tinyerp.com-20130301105439-29y4yrr5yn2xcolt
---
addons/web/static/src/css/base.css | 20 ++++++++++----------
addons/web/static/src/css/base.sass | 10 ++++++++++
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 1c4f2509fa7..33bba914f3f 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -2374,6 +2374,16 @@
}
.openerp .oe_form .oe_form_field_boolean {
width: auto;
+ height: 14px;
+}
+.openerp .oe_form .oe_form_field_boolean .boolean {
+ position: relative;
+ top: -20px;
+ width: 14px;
+ height: 14px;
+ z-index: 10000;
+ backgroundColor: "#fff";
+ opacity: 0;
}
.openerp .oe_form .oe_datepicker_container {
display: none;
@@ -3168,16 +3178,6 @@ div.ui-widget-overlay {
.openerp_ie .oe_form_field_boolean input {
background: white;
}
-.openerp .oe_form_field_boolean .boolean{
- position: relative;
- top: -14px;
- width: 14px;
- height: 14px;
- z-index:10000;
- // IE needs a color in order for the layer to respond to mouse events
- backgroundColor: "#fff";
- opacity: 0;
-}
.openerp_ie .db_option_table .oe_form_field_selection {
width: auto;
}
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index 0a73728678d..db25cff9b3e 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -1878,6 +1878,16 @@ $sheet-padding: 16px
white-space: nowrap
.oe_form_field_boolean
width: auto
+ height: 14px
+ .boolean
+ position: relative
+ top: -20px
+ width: 14px
+ height: 14px
+ z-index: 10000
+ // IE needs a color in order for the layer to respond to mouse events
+ backgroundColor: "#fff"
+ opacity: 0
.oe_datepicker_container
display: none
.oe_datepicker_root
From 51fbcd39fbec0d18c2330b7752f82b58e3266f52 Mon Sep 17 00:00:00 2001
From: Raphael Collet
Date: Fri, 1 Mar 2013 12:01:48 +0100
Subject: [PATCH 079/373] [FIX] base_action_rule: adapt tests to rule kinds
bzr revid: rco@openerp.com-20130301110148-xq540esqbpofmp10
---
.../tests/base_action_rule_test.py | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/addons/base_action_rule/tests/base_action_rule_test.py b/addons/base_action_rule/tests/base_action_rule_test.py
index 36c928a84e3..25a6df8f884 100644
--- a/addons/base_action_rule/tests/base_action_rule_test.py
+++ b/addons/base_action_rule/tests/base_action_rule_test.py
@@ -19,8 +19,8 @@ class base_action_rule_test(common.TransactionCase):
'name': "Lead is in done state",
'is_default': False,
'model_id': 'base.action.rule.lead.test',
- 'domain' : "[('state','=','done')]",
- }, context=context)
+ 'domain': "[('state','=','done')]",
+ }, context=context)
def create_filter_draft(self, cr, uid, context=None):
filter_pool = self.registry('ir.filters')
@@ -40,16 +40,16 @@ class base_action_rule_test(common.TransactionCase):
'user_id': self.admin,
}, context=context)
- def create_rule(self, cr, uid, filter_id=False, filter_pre_id=False, context=None):
+ def create_rule(self, cr, uid, kind, filter_id=False, filter_pre_id=False, context=None):
"""
The "Rule 1" says that when a lead goes to the 'draft' state, the responsible for that lead changes to user "demo"
"""
return self.base_action_rule.create(cr,uid,{
- 'name' : "Rule 1",
+ 'name': "Rule 1",
'model_id': self.registry('ir.model').search(cr, uid, [('model','=','base.action.rule.lead.test')], context=context)[0],
- 'active' : 1,
- 'filter_pre_id' : filter_pre_id,
- 'filter_id' : filter_id,
+ 'kind': kind,
+ 'filter_pre_id': filter_pre_id,
+ 'filter_id': filter_id,
'act_user_id': self.demo,
}, context=context)
@@ -64,7 +64,7 @@ class base_action_rule_test(common.TransactionCase):
"""
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
- self.create_rule(cr, uid, filter_pre_id=filter_draft)
+ self.create_rule(cr, uid, 'write', filter_pre_id=filter_draft)
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
@@ -73,11 +73,11 @@ class base_action_rule_test(common.TransactionCase):
def test_01_check_to_state_draft_post(self):
"""
- Check that a new record (with state = draft) changes its responsible when there is a postcondition filter which check that the state is draft.
+ Check that a new record changes its responsible when there is a postcondition filter which check that the state is draft.
"""
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
- self.create_rule(cr, uid, filter_id=filter_draft)
+ self.create_rule(cr, uid, 'create')
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
@@ -95,7 +95,7 @@ class base_action_rule_test(common.TransactionCase):
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
filter_done = self.create_filter_done(cr, uid)
- self.create_rule(cr, uid, filter_pre_id=filter_draft, filter_id=filter_done)
+ self.create_rule(cr, uid, 'write', filter_pre_id=filter_draft, filter_id=filter_done)
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
@@ -133,7 +133,7 @@ class base_action_rule_test(common.TransactionCase):
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
filter_done = self.create_filter_done(cr, uid)
- self.create_rule(cr, uid, filter_pre_id=filter_draft, filter_id=filter_done)
+ self.create_rule(cr, uid, 'write', filter_pre_id=filter_draft, filter_id=filter_done)
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
From 9c21a6902ac27e1acf2fe10b7a2463605a958c17 Mon Sep 17 00:00:00 2001
From: Raphael Collet
Date: Fri, 1 Mar 2013 12:03:01 +0100
Subject: [PATCH 080/373] [IMP] base_action_rule: update records before
executing server actions
bzr revid: rco@openerp.com-20130301110301-xu4iaxi7hysmclm4
---
addons/base_action_rule/base_action_rule.py | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 6cca0e8b6b5..ba3ef572505 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -108,15 +108,6 @@ class base_action_rule(osv.osv):
def _process(self, cr, uid, action, record_ids, context=None):
""" process the given action on the records """
- # execute server actions
- model = self.pool.get(action.model_id.model)
- if action.server_action_ids:
- server_action_ids = map(int, action.server_action_ids)
- for record in model.browse(cr, uid, record_ids, context):
- action_server_obj = self.pool.get('ir.actions.server')
- ctx = dict(context, active_model=model._name, active_ids=[record.id], active_id=record.id)
- action_server_obj.run(cr, uid, server_action_ids, context=ctx)
-
# modify records
values = {}
if 'date_action_last' in model._all_columns:
@@ -130,6 +121,15 @@ class base_action_rule(osv.osv):
follower_ids = map(int, action.act_followers)
model.message_subscribe(cr, uid, record_ids, follower_ids, context=context)
+ # execute server actions
+ model = self.pool.get(action.model_id.model)
+ if action.server_action_ids:
+ server_action_ids = map(int, action.server_action_ids)
+ for record in model.browse(cr, uid, record_ids, context):
+ action_server_obj = self.pool.get('ir.actions.server')
+ ctx = dict(context, active_model=model._name, active_ids=[record.id], active_id=record.id)
+ action_server_obj.run(cr, uid, server_action_ids, context=ctx)
+
return True
def _wrap_create(self, old_create, model):
From 3bad12f1cfe64f271afa350918aaefb9c01306b7 Mon Sep 17 00:00:00 2001
From: Raphael Collet
Date: Fri, 1 Mar 2013 12:27:05 +0100
Subject: [PATCH 081/373] [IMP] base_action_rule: adapt views to new field
bzr revid: rco@openerp.com-20130301112705-hqn8wqz1l20ix2tu
---
addons/base_action_rule/base_action_rule.py | 15 +++++--
.../base_action_rule_view.xml | 43 +++++++++++--------
2 files changed, 38 insertions(+), 20 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index ba3ef572505..176c2bffe28 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -50,6 +50,7 @@ class base_action_rule(osv.osv):
_name = 'base.action.rule'
_description = 'Action Rules'
+ _order = 'sequence'
_columns = {
'name': fields.char('Rule Name', size=64, required=True),
@@ -81,10 +82,10 @@ class base_action_rule(osv.osv):
ondelete='restrict',
domain="[('model_id', '=', model_id.model)]",
help="If present, this condition must be satisfied before the update of the record."),
- 'filter_id': fields.many2one('ir.filters', string='After Update Filter',
+ 'filter_id': fields.many2one('ir.filters', string='Filter',
ondelete='restrict',
domain="[('model_id', '=', model_id.model)]",
- help="If present, this condition must be satisfied after the update of the record."),
+ help="If present, this condition must be satisfied before executing the action rule."),
'last_run': fields.datetime('Last Run', readonly=1),
}
@@ -93,7 +94,15 @@ class base_action_rule(osv.osv):
'trg_date_range_type': 'day',
}
- _order = 'sequence'
+ def onchange_kind(self, cr, uid, ids, kind, context=None):
+ clear_fields = []
+ if kind == 'create':
+ clear_fields = ['filter_pre_id', 'trg_date_id', 'trg_date_range', 'trg_date_range_type']
+ elif kind == 'write':
+ clear_fields = ['trg_date_id', 'trg_date_range', 'trg_date_range_type']
+ elif kind == 'cron':
+ clear_fields = ['filter_pre_id']
+ return {'value': dict.fromkeys(clear_fields, False)}
def _filter(self, cr, uid, action, action_filter, record_ids, context=None):
""" filter the list record_ids that satisfy the action filter """
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index 25ea4048bad..131b5cef08b 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -26,24 +26,32 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
- Select a filter or a timer as condition. An action rule is checked when you create or modify the "Related Document Model". The precondition filter is checked right before the modification while the postcondition filter is checked after the modification. A precondition filter will therefore not work during a creation.
- To create a new filter:
- - Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)
- - In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"
+
+ Select when the action must be run, and add filters and/or timing conditions.
+
+ In order to create a new filter:
+
+
Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)
+
In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"
+
The filter must therefore be available in this page.
@@ -76,6 +84,7 @@
+
From ed498dac73e5c65afb2627968c38460f9b786de0 Mon Sep 17 00:00:00 2001
From: Raphael Collet
Date: Fri, 1 Mar 2013 12:33:00 +0100
Subject: [PATCH 082/373] [IMP] crm: adapt action rules to the base.action.rule
model change
bzr revid: rco@openerp.com-20130301113300-6ezyicr11mg01x38
---
addons/crm/crm_action_rule_demo.xml | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/addons/crm/crm_action_rule_demo.xml b/addons/crm/crm_action_rule_demo.xml
index bf1f7d4082f..e52c40e1739 100644
--- a/addons/crm/crm_action_rule_demo.xml
+++ b/addons/crm/crm_action_rule_demo.xml
@@ -26,6 +26,7 @@ Description: [[object.description]]
Set Auto Reminder on leads which are not open since 5 days.1
+ cron5
@@ -54,12 +55,10 @@ object.write({'section_id': sales_team.id})
Set Auto Followers on leads which are urgent and come from USA.2
+ create
-
-
- 0
- minutes
+
From f1f15f52b3b37fea23f2dce09ee89fd29cb5d997 Mon Sep 17 00:00:00 2001
From: Raphael Collet
Date: Fri, 1 Mar 2013 14:19:29 +0100
Subject: [PATCH 083/373] [FIX] base_action_rule: undefined variable (due to
code move)
bzr revid: rco@openerp.com-20130301131929-3q4egd9jpasss88w
---
addons/base_action_rule/base_action_rule.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 176c2bffe28..f759dfd3bbb 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -117,6 +117,8 @@ class base_action_rule(osv.osv):
def _process(self, cr, uid, action, record_ids, context=None):
""" process the given action on the records """
+ model = self.pool.get(action.model_id.model)
+
# modify records
values = {}
if 'date_action_last' in model._all_columns:
@@ -131,7 +133,6 @@ class base_action_rule(osv.osv):
model.message_subscribe(cr, uid, record_ids, follower_ids, context=context)
# execute server actions
- model = self.pool.get(action.model_id.model)
if action.server_action_ids:
server_action_ids = map(int, action.server_action_ids)
for record in model.browse(cr, uid, record_ids, context):
From 2a0245b20c30e564a9d1e89afdc47583fd42d5b6 Mon Sep 17 00:00:00 2001
From: Raphael Collet
Date: Mon, 4 Mar 2013 10:49:51 +0100
Subject: [PATCH 084/373] [IMP] base_action_rule: use better value names for
new selection field
bzr revid: rco@openerp.com-20130304094951-7452svzw0cgzu6jp
---
addons/base_action_rule/base_action_rule.py | 14 +++++++-------
addons/base_action_rule/base_action_rule_view.xml | 4 ++--
.../tests/base_action_rule_test.py | 8 ++++----
addons/crm/crm_action_rule_demo.xml | 4 ++--
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index f759dfd3bbb..4f7215e215a 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -63,7 +63,7 @@ class base_action_rule(osv.osv):
'sequence': fields.integer('Sequence',
help="Gives the sequence order when displaying a list of rules."),
'kind': fields.selection(
- [('create', 'On Creation'), ('write', 'On Update'), ('cron', 'Based on Timed Condition')],
+ [('on_create', 'On Creation'), ('on_write', 'On Update'), ('on_time', 'Based on Timed Condition')],
string='When to Run'),
'trg_date_id': fields.many2one('ir.model.fields', string='Trigger Date',
domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"),
@@ -96,11 +96,11 @@ class base_action_rule(osv.osv):
def onchange_kind(self, cr, uid, ids, kind, context=None):
clear_fields = []
- if kind == 'create':
+ if kind == 'on_create':
clear_fields = ['filter_pre_id', 'trg_date_id', 'trg_date_range', 'trg_date_range_type']
- elif kind == 'write':
+ elif kind == 'on_write':
clear_fields = ['trg_date_id', 'trg_date_range', 'trg_date_range_type']
- elif kind == 'cron':
+ elif kind == 'on_time':
clear_fields = ['filter_pre_id']
return {'value': dict.fromkeys(clear_fields, False)}
@@ -155,7 +155,7 @@ class base_action_rule(osv.osv):
new_id = old_create(cr, uid, vals, context=context)
# retrieve the action rules to run on creation
- action_dom = [('model', '=', model), ('kind', '=', 'create')]
+ action_dom = [('model', '=', model), ('kind', '=', 'on_create')]
action_ids = self.search(cr, uid, action_dom, context=context)
# check postconditions, and execute actions on the records that satisfy them
@@ -179,7 +179,7 @@ class base_action_rule(osv.osv):
ids = [ids] if isinstance(ids, (int, long, str)) else ids
# retrieve the action rules to run on update
- action_dom = [('model', '=', model), ('kind', '=', 'write')]
+ action_dom = [('model', '=', model), ('kind', '=', 'on_write')]
action_ids = self.search(cr, uid, action_dom, context=context)
actions = self.browse(cr, uid, action_ids, context=context)
@@ -231,7 +231,7 @@ class base_action_rule(osv.osv):
""" This Function is called by scheduler. """
context = context or {}
# retrieve all the action rules to run based on a timed condition
- action_dom = [('kind', '=', 'cron')]
+ action_dom = [('kind', '=', 'on_time')]
action_ids = self.search(cr, uid, action_dom, context=context)
for action in self.browse(cr, uid, action_ids, context=context):
now = datetime.now()
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index 131b5cef08b..21bf6a0b0c9 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -31,12 +31,12 @@
+ attrs="{'invisible': [('kind', '!=', 'on_write')]}"/>
+ attrs="{'invisible': [('kind', '!=', 'on_time')]}"/>
diff --git a/addons/crm/static/lib/sparkline/jquery.sparkline.js b/addons/crm/static/lib/sparkline/jquery.sparkline.js
new file mode 100644
index 00000000000..c003923e03b
--- /dev/null
+++ b/addons/crm/static/lib/sparkline/jquery.sparkline.js
@@ -0,0 +1,3047 @@
+/**
+*
+* jquery.sparkline.js
+*
+* v2.1.1
+* (c) Splunk, Inc
+* Contact: Gareth Watts (gareth@splunk.com)
+* http://omnipotent.net/jquery.sparkline/
+*
+* Generates inline sparkline charts from data supplied either to the method
+* or inline in HTML
+*
+* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag
+* (Firefox 2.0+, Safari, Opera, etc)
+*
+* License: New BSD License
+*
+* Copyright (c) 2012, Splunk Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without modification,
+* are permitted provided that the following conditions are met:
+*
+* * Redistributions of source code must retain the above copyright notice,
+* this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following disclaimer in the documentation
+* and/or other materials provided with the distribution.
+* * Neither the name of Splunk Inc nor the names of its contributors may
+* be used to endorse or promote products derived from this software without
+* specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*
+* Usage:
+* $(selector).sparkline(values, options)
+*
+* If values is undefined or set to 'html' then the data values are read from the specified tag:
+*
Sparkline: 1,4,6,6,8,5,3,5
+* $('.sparkline').sparkline();
+* There must be no spaces in the enclosed data set
+*
+* Otherwise values must be an array of numbers or null values
+*
Sparkline: This text replaced if the browser is compatible
+* $('#sparkline1').sparkline([1,4,6,6,8,5,3,5])
+* $('#sparkline2').sparkline([1,4,6,null,null,5,3,5])
+*
+* Values can also be specified in an HTML comment, or as a values attribute:
+*
Sparkline:
+*
Sparkline:
+* $('.sparkline').sparkline();
+*
+* For line charts, x values can also be specified:
+*
Sparkline: 1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5
+* $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ])
+*
+* By default, options should be passed in as teh second argument to the sparkline function:
+* $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})
+*
+* Options can also be set by passing them on the tag itself. This feature is disabled by default though
+* as there's a slight performance overhead:
+* $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})
+*
Sparkline: loading
+* Prefix all options supplied as tag attribute with "spark" (configurable by setting tagOptionPrefix)
+*
+* Supported options:
+* lineColor - Color of the line used for the chart
+* fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart
+* width - Width of the chart - Defaults to 3 times the number of values in pixels
+* height - Height of the chart - Defaults to the height of the containing element
+* chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied
+* chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied
+* chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax
+* chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied
+* chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied
+* composite - If true then don't erase any existing chart attached to the tag, but draw
+* another chart over the top - Note that width and height are ignored if an
+* existing chart is detected.
+* tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values'
+* enableTagOptions - Whether to check tags for sparkline options
+* tagOptionPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark'
+* disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a
+* hidden dom element, avoding a browser reflow
+* disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled,
+* making the plugin perform much like it did in 1.x
+* disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled)
+* disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled
+* defaults to false (highlights enabled)
+* highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase
+* tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body
+* tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied
+* tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis
+* tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis
+* tooltipFormatter - Optional callback that allows you to override the HTML displayed in the tooltip
+* callback is given arguments of (sparkline, options, fields)
+* tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title
+* tooltipFormat - A format string or SPFormat object (or an array thereof for multiple entries)
+* to control the format of the tooltip
+* tooltipPrefix - A string to prepend to each field displayed in a tooltip
+* tooltipSuffix - A string to append to each field displayed in a tooltip
+* tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true)
+* tooltipValueLookups - An object or range map to map field values to tooltip strings
+* (eg. to map -1 to "Lost", 0 to "Draw", and 1 to "Win")
+* numberFormatter - Optional callback for formatting numbers in tooltips
+* numberDigitGroupSep - Character to use for group separator in numbers "1,234" - Defaults to ","
+* numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to "."
+* numberDigitGroupCount - Number of digits between group separator - Defaults to 3
+*
+* There are 7 types of sparkline, selected by supplying a "type" option of 'line' (default),
+* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box'
+* line - Line chart. Options:
+* spotColor - Set to '' to not end each line in a circular spot
+* minSpotColor - If set, color of spot at minimum value
+* maxSpotColor - If set, color of spot at maximum value
+* spotRadius - Radius in pixels
+* lineWidth - Width of line in pixels
+* normalRangeMin
+* normalRangeMax - If set draws a filled horizontal bar between these two values marking the "normal"
+* or expected range of values
+* normalRangeColor - Color to use for the above bar
+* drawNormalOnTop - Draw the normal range above the chart fill color if true
+* defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart
+* highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable
+* highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable
+* valueSpots - Specify which points to draw spots on, and in which color. Accepts a range map
+*
+* bar - Bar chart. Options:
+* barColor - Color of bars for postive values
+* negBarColor - Color of bars for negative values
+* zeroColor - Color of bars with zero values
+* nullColor - Color of bars with null values - Defaults to omitting the bar entirely
+* barWidth - Width of bars in pixels
+* colorMap - Optional mappnig of values to colors to override the *BarColor values above
+* can be an Array of values to control the color of individual bars or a range map
+* to specify colors for individual ranges of values
+* barSpacing - Gap between bars in pixels
+* zeroAxis - Centers the y-axis around zero if true
+*
+* tristate - Charts values of win (>0), lose (<0) or draw (=0)
+* posBarColor - Color of win values
+* negBarColor - Color of lose values
+* zeroBarColor - Color of draw values
+* barWidth - Width of bars in pixels
+* barSpacing - Gap between bars in pixels
+* colorMap - Optional mappnig of values to colors to override the *BarColor values above
+* can be an Array of values to control the color of individual bars or a range map
+* to specify colors for individual ranges of values
+*
+* discrete - Options:
+* lineHeight - Height of each line in pixels - Defaults to 30% of the graph height
+* thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor
+* thresholdColor
+*
+* bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ...
+* options:
+* targetColor - The color of the vertical target marker
+* targetWidth - The width of the target marker in pixels
+* performanceColor - The color of the performance measure horizontal bar
+* rangeColors - Colors to use for each qualitative range background color
+*
+* pie - Pie chart. Options:
+* sliceColors - An array of colors to use for pie slices
+* offset - Angle in degrees to offset the first slice - Try -90 or +90
+* borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border)
+* borderColor - Color to use for the pie chart border - Defaults to #000
+*
+* box - Box plot. Options:
+* raw - Set to true to supply pre-computed plot points as values
+* values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier
+* When set to false you can supply any number of values and the box plot will
+* be computed for you. Default is false.
+* showOutliers - Set to true (default) to display outliers as circles
+* outlierIQR - Interquartile range used to determine outliers. Default 1.5
+* boxLineColor - Outline color of the box
+* boxFillColor - Fill color for the box
+* whiskerColor - Line color used for whiskers
+* outlierLineColor - Outline color of outlier circles
+* outlierFillColor - Fill color of the outlier circles
+* spotRadius - Radius of outlier circles
+* medianColor - Line color of the median line
+* target - Draw a target cross hair at the supplied value (default undefined)
+*
+*
+*
+* Examples:
+* $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false });
+* $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 });
+* $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }):
+* $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' });
+* $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' });
+* $('#pie').sparkline([1,1,2], { type:'pie' });
+*/
+
+/*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */
+
+(function(factory) {
+ if(typeof define === 'function' && define.amd) {
+ define(['jquery'], factory);
+ }
+ else {
+ factory(jQuery);
+ }
+}
+(function($) {
+ 'use strict';
+
+ var UNSET_OPTION = {},
+ getDefaults, createClass, SPFormat, clipval, quartile, normalizeValue, normalizeValues,
+ remove, isNumber, all, sum, addCSS, ensureArray, formatNumber, RangeMap,
+ MouseHandler, Tooltip, barHighlightMixin,
+ line, bar, tristate, discrete, bullet, pie, box, defaultStyles, initStyles,
+ VShape, VCanvas_base, VCanvas_canvas, VCanvas_vml, pending, shapeCount = 0;
+
+ /**
+ * Default configuration settings
+ */
+ getDefaults = function () {
+ return {
+ // Settings common to most/all chart types
+ common: {
+ type: 'line',
+ lineColor: '#00f',
+ fillColor: '#cdf',
+ defaultPixelsPerValue: 3,
+ width: 'auto',
+ height: 'auto',
+ composite: false,
+ tagValuesAttribute: 'values',
+ tagOptionsPrefix: 'spark',
+ enableTagOptions: false,
+ enableHighlight: true,
+ highlightLighten: 1.4,
+ tooltipSkipNull: true,
+ tooltipPrefix: '',
+ tooltipSuffix: '',
+ disableHiddenCheck: false,
+ numberFormatter: false,
+ numberDigitGroupCount: 3,
+ numberDigitGroupSep: ',',
+ numberDecimalMark: '.',
+ disableTooltips: false,
+ disableInteraction: false
+ },
+ // Defaults for line charts
+ line: {
+ spotColor: '#f80',
+ highlightSpotColor: '#5f5',
+ highlightLineColor: '#f22',
+ spotRadius: 1.5,
+ minSpotColor: '#f80',
+ maxSpotColor: '#f80',
+ lineWidth: 1,
+ normalRangeMin: undefined,
+ normalRangeMax: undefined,
+ normalRangeColor: '#ccc',
+ drawNormalOnTop: false,
+ chartRangeMin: undefined,
+ chartRangeMax: undefined,
+ chartRangeMinX: undefined,
+ chartRangeMaxX: undefined,
+ tooltipFormat: new SPFormat('● {{prefix}}{{y}}{{suffix}}')
+ },
+ // Defaults for bar charts
+ bar: {
+ barColor: '#3366cc',
+ negBarColor: '#f44',
+ stackedBarColor: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
+ '#dd4477', '#0099c6', '#990099'],
+ zeroColor: undefined,
+ nullColor: undefined,
+ zeroAxis: true,
+ barWidth: 4,
+ barSpacing: 1,
+ chartRangeMax: undefined,
+ chartRangeMin: undefined,
+ chartRangeClip: false,
+ colorMap: undefined,
+ tooltipFormat: new SPFormat('● {{prefix}}{{value}}{{suffix}}')
+ },
+ // Defaults for tristate charts
+ tristate: {
+ barWidth: 4,
+ barSpacing: 1,
+ posBarColor: '#6f6',
+ negBarColor: '#f44',
+ zeroBarColor: '#999',
+ colorMap: {},
+ tooltipFormat: new SPFormat('● {{value:map}}'),
+ tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } }
+ },
+ // Defaults for discrete charts
+ discrete: {
+ lineHeight: 'auto',
+ thresholdColor: undefined,
+ thresholdValue: 0,
+ chartRangeMax: undefined,
+ chartRangeMin: undefined,
+ chartRangeClip: false,
+ tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}')
+ },
+ // Defaults for bullet charts
+ bullet: {
+ targetColor: '#f33',
+ targetWidth: 3, // width of the target bar in pixels
+ performanceColor: '#33f',
+ rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff'],
+ base: undefined, // set this to a number to change the base start number
+ tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'),
+ tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} }
+ },
+ // Defaults for pie charts
+ pie: {
+ offset: 0,
+ sliceColors: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
+ '#dd4477', '#0099c6', '#990099'],
+ borderWidth: 0,
+ borderColor: '#000',
+ tooltipFormat: new SPFormat('● {{value}} ({{percent.1}}%)')
+ },
+ // Defaults for box plots
+ box: {
+ raw: false,
+ boxLineColor: '#000',
+ boxFillColor: '#cdf',
+ whiskerColor: '#000',
+ outlierLineColor: '#333',
+ outlierFillColor: '#fff',
+ medianColor: '#f00',
+ showOutliers: true,
+ outlierIQR: 1.5,
+ spotRadius: 1.5,
+ target: undefined,
+ targetColor: '#4a2',
+ chartRangeMax: undefined,
+ chartRangeMin: undefined,
+ tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'),
+ tooltipFormatFieldlistKey: 'field',
+ tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median',
+ uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier',
+ lw: 'Left Whisker', rw: 'Right Whisker'} }
+ }
+ };
+ };
+
+ // You can have tooltips use a css class other than jqstooltip by specifying tooltipClassname
+ defaultStyles = '.jqstooltip { ' +
+ 'position: absolute;' +
+ 'left: 0px;' +
+ 'top: 0px;' +
+ 'visibility: hidden;' +
+ 'background: rgb(0, 0, 0) transparent;' +
+ 'background-color: rgba(0,0,0,0.6);' +
+ 'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);' +
+ '-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";' +
+ 'color: white;' +
+ 'font: 10px arial, san serif;' +
+ 'text-align: left;' +
+ 'white-space: nowrap;' +
+ 'padding: 5px;' +
+ 'border: 1px solid white;' +
+ 'z-index: 10000;' +
+ '}' +
+ '.jqsfield { ' +
+ 'color: white;' +
+ 'font: 10px arial, san serif;' +
+ 'text-align: left;' +
+ '}';
+
+ /**
+ * Utilities
+ */
+
+ createClass = function (/* [baseclass, [mixin, ...]], definition */) {
+ var Class, args;
+ Class = function () {
+ this.init.apply(this, arguments);
+ };
+ if (arguments.length > 1) {
+ if (arguments[0]) {
+ Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]);
+ Class._super = arguments[0].prototype;
+ } else {
+ Class.prototype = arguments[arguments.length - 1];
+ }
+ if (arguments.length > 2) {
+ args = Array.prototype.slice.call(arguments, 1, -1);
+ args.unshift(Class.prototype);
+ $.extend.apply($, args);
+ }
+ } else {
+ Class.prototype = arguments[0];
+ }
+ Class.prototype.cls = Class;
+ return Class;
+ };
+
+ /**
+ * Wraps a format string for tooltips
+ * {{x}}
+ * {{x.2}
+ * {{x:months}}
+ */
+ $.SPFormatClass = SPFormat = createClass({
+ fre: /\{\{([\w.]+?)(:(.+?))?\}\}/g,
+ precre: /(\w+)\.(\d+)/,
+
+ init: function (format, fclass) {
+ this.format = format;
+ this.fclass = fclass;
+ },
+
+ render: function (fieldset, lookups, options) {
+ var self = this,
+ fields = fieldset,
+ match, token, lookupkey, fieldvalue, prec;
+ return this.format.replace(this.fre, function () {
+ var lookup;
+ token = arguments[1];
+ lookupkey = arguments[3];
+ match = self.precre.exec(token);
+ if (match) {
+ prec = match[2];
+ token = match[1];
+ } else {
+ prec = false;
+ }
+ fieldvalue = fields[token];
+ if (fieldvalue === undefined) {
+ return '';
+ }
+ if (lookupkey && lookups && lookups[lookupkey]) {
+ lookup = lookups[lookupkey];
+ if (lookup.get) { // RangeMap
+ return lookups[lookupkey].get(fieldvalue) || fieldvalue;
+ } else {
+ return lookups[lookupkey][fieldvalue] || fieldvalue;
+ }
+ }
+ if (isNumber(fieldvalue)) {
+ if (options.get('numberFormatter')) {
+ fieldvalue = options.get('numberFormatter')(fieldvalue);
+ } else {
+ fieldvalue = formatNumber(fieldvalue, prec,
+ options.get('numberDigitGroupCount'),
+ options.get('numberDigitGroupSep'),
+ options.get('numberDecimalMark'));
+ }
+ }
+ return fieldvalue;
+ });
+ }
+ });
+
+ // convience method to avoid needing the new operator
+ $.spformat = function(format, fclass) {
+ return new SPFormat(format, fclass);
+ };
+
+ clipval = function (val, min, max) {
+ if (val < min) {
+ return min;
+ }
+ if (val > max) {
+ return max;
+ }
+ return val;
+ };
+
+ quartile = function (values, q) {
+ var vl;
+ if (q === 2) {
+ vl = Math.floor(values.length / 2);
+ return values.length % 2 ? values[vl] : (values[vl-1] + values[vl]) / 2;
+ } else {
+ if (values.length % 2 ) { // odd
+ vl = (values.length * q + q) / 4;
+ return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];
+ } else { //even
+ vl = (values.length * q + 2) / 4;
+ return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];
+
+ }
+ }
+ };
+
+ normalizeValue = function (val) {
+ var nf;
+ switch (val) {
+ case 'undefined':
+ val = undefined;
+ break;
+ case 'null':
+ val = null;
+ break;
+ case 'true':
+ val = true;
+ break;
+ case 'false':
+ val = false;
+ break;
+ default:
+ nf = parseFloat(val);
+ if (val == nf) {
+ val = nf;
+ }
+ }
+ return val;
+ };
+
+ normalizeValues = function (vals) {
+ var i, result = [];
+ for (i = vals.length; i--;) {
+ result[i] = normalizeValue(vals[i]);
+ }
+ return result;
+ };
+
+ remove = function (vals, filter) {
+ var i, vl, result = [];
+ for (i = 0, vl = vals.length; i < vl; i++) {
+ if (vals[i] !== filter) {
+ result.push(vals[i]);
+ }
+ }
+ return result;
+ };
+
+ isNumber = function (num) {
+ return !isNaN(parseFloat(num)) && isFinite(num);
+ };
+
+ formatNumber = function (num, prec, groupsize, groupsep, decsep) {
+ var p, i;
+ num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split('');
+ p = (p = $.inArray('.', num)) < 0 ? num.length : p;
+ if (p < num.length) {
+ num[p] = decsep;
+ }
+ for (i = p - groupsize; i > 0; i -= groupsize) {
+ num.splice(i, 0, groupsep);
+ }
+ return num.join('');
+ };
+
+ // determine if all values of an array match a value
+ // returns true if the array is empty
+ all = function (val, arr, ignoreNull) {
+ var i;
+ for (i = arr.length; i--; ) {
+ if (ignoreNull && arr[i] === null) continue;
+ if (arr[i] !== val) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ // sums the numeric values in an array, ignoring other values
+ sum = function (vals) {
+ var total = 0, i;
+ for (i = vals.length; i--;) {
+ total += typeof vals[i] === 'number' ? vals[i] : 0;
+ }
+ return total;
+ };
+
+ ensureArray = function (val) {
+ return $.isArray(val) ? val : [val];
+ };
+
+ // http://paulirish.com/2008/bookmarklet-inject-new-css-rules/
+ addCSS = function(css) {
+ var tag;
+ //if ('\v' == 'v') /* ie only */ {
+ if (document.createStyleSheet) {
+ document.createStyleSheet().cssText = css;
+ } else {
+ tag = document.createElement('style');
+ tag.type = 'text/css';
+ document.getElementsByTagName('head')[0].appendChild(tag);
+ tag[(typeof document.body.style.WebkitAppearance == 'string') /* webkit only */ ? 'innerText' : 'innerHTML'] = css;
+ }
+ };
+
+ // Provide a cross-browser interface to a few simple drawing primitives
+ $.fn.simpledraw = function (width, height, useExisting, interact) {
+ var target, mhandler;
+ if (useExisting && (target = this.data('_jqs_vcanvas'))) {
+ return target;
+ }
+ if (width === undefined) {
+ width = $(this).innerWidth();
+ }
+ if (height === undefined) {
+ height = $(this).innerHeight();
+ }
+ if ($.fn.sparkline.hasCanvas) {
+ target = new VCanvas_canvas(width, height, this, interact);
+ } else if ($.fn.sparkline.hasVML) {
+ target = new VCanvas_vml(width, height, this);
+ } else {
+ return false;
+ }
+ mhandler = $(this).data('_jqs_mhandler');
+ if (mhandler) {
+ mhandler.registerCanvas(target);
+ }
+ return target;
+ };
+
+ $.fn.cleardraw = function () {
+ var target = this.data('_jqs_vcanvas');
+ if (target) {
+ target.reset();
+ }
+ };
+
+ $.RangeMapClass = RangeMap = createClass({
+ init: function (map) {
+ var key, range, rangelist = [];
+ for (key in map) {
+ if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) {
+ range = key.split(':');
+ range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]);
+ range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]);
+ range[2] = map[key];
+ rangelist.push(range);
+ }
+ }
+ this.map = map;
+ this.rangelist = rangelist || false;
+ },
+
+ get: function (value) {
+ var rangelist = this.rangelist,
+ i, range, result;
+ if ((result = this.map[value]) !== undefined) {
+ return result;
+ }
+ if (rangelist) {
+ for (i = rangelist.length; i--;) {
+ range = rangelist[i];
+ if (range[0] <= value && range[1] >= value) {
+ return range[2];
+ }
+ }
+ }
+ return undefined;
+ }
+ });
+
+ // Convenience function
+ $.range_map = function(map) {
+ return new RangeMap(map);
+ };
+
+ MouseHandler = createClass({
+ init: function (el, options) {
+ var $el = $(el);
+ this.$el = $el;
+ this.options = options;
+ this.currentPageX = 0;
+ this.currentPageY = 0;
+ this.el = el;
+ this.splist = [];
+ this.tooltip = null;
+ this.over = false;
+ this.displayTooltips = !options.get('disableTooltips');
+ this.highlightEnabled = !options.get('disableHighlight');
+ },
+
+ registerSparkline: function (sp) {
+ this.splist.push(sp);
+ if (this.over) {
+ this.updateDisplay();
+ }
+ },
+
+ registerCanvas: function (canvas) {
+ var $canvas = $(canvas.canvas);
+ this.canvas = canvas;
+ this.$canvas = $canvas;
+ $canvas.mouseenter($.proxy(this.mouseenter, this));
+ $canvas.mouseleave($.proxy(this.mouseleave, this));
+ $canvas.click($.proxy(this.mouseclick, this));
+ },
+
+ reset: function (removeTooltip) {
+ this.splist = [];
+ if (this.tooltip && removeTooltip) {
+ this.tooltip.remove();
+ this.tooltip = undefined;
+ }
+ },
+
+ mouseclick: function (e) {
+ var clickEvent = $.Event('sparklineClick');
+ clickEvent.originalEvent = e;
+ clickEvent.sparklines = this.splist;
+ this.$el.trigger(clickEvent);
+ },
+
+ mouseenter: function (e) {
+ $(document.body).unbind('mousemove.jqs');
+ $(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this));
+ this.over = true;
+ this.currentPageX = e.pageX;
+ this.currentPageY = e.pageY;
+ this.currentEl = e.target;
+ if (!this.tooltip && this.displayTooltips) {
+ this.tooltip = new Tooltip(this.options);
+ this.tooltip.updatePosition(e.pageX, e.pageY);
+ }
+ this.updateDisplay();
+ },
+
+ mouseleave: function () {
+ $(document.body).unbind('mousemove.jqs');
+ var splist = this.splist,
+ spcount = splist.length,
+ needsRefresh = false,
+ sp, i;
+ this.over = false;
+ this.currentEl = null;
+
+ if (this.tooltip) {
+ this.tooltip.remove();
+ this.tooltip = null;
+ }
+
+ for (i = 0; i < spcount; i++) {
+ sp = splist[i];
+ if (sp.clearRegionHighlight()) {
+ needsRefresh = true;
+ }
+ }
+
+ if (needsRefresh) {
+ this.canvas.render();
+ }
+ },
+
+ mousemove: function (e) {
+ this.currentPageX = e.pageX;
+ this.currentPageY = e.pageY;
+ this.currentEl = e.target;
+ if (this.tooltip) {
+ this.tooltip.updatePosition(e.pageX, e.pageY);
+ }
+ this.updateDisplay();
+ },
+
+ updateDisplay: function () {
+ var splist = this.splist,
+ spcount = splist.length,
+ needsRefresh = false,
+ offset = this.$canvas.offset(),
+ localX = this.currentPageX - offset.left,
+ localY = this.currentPageY - offset.top,
+ tooltiphtml, sp, i, result, changeEvent;
+ if (!this.over) {
+ return;
+ }
+ for (i = 0; i < spcount; i++) {
+ sp = splist[i];
+ result = sp.setRegionHighlight(this.currentEl, localX, localY);
+ if (result) {
+ needsRefresh = true;
+ }
+ }
+ if (needsRefresh) {
+ changeEvent = $.Event('sparklineRegionChange');
+ changeEvent.sparklines = this.splist;
+ this.$el.trigger(changeEvent);
+ if (this.tooltip) {
+ tooltiphtml = '';
+ for (i = 0; i < spcount; i++) {
+ sp = splist[i];
+ tooltiphtml += sp.getCurrentRegionTooltip();
+ }
+ this.tooltip.setContent(tooltiphtml);
+ }
+ if (!this.disableHighlight) {
+ this.canvas.render();
+ }
+ }
+ if (result === null) {
+ this.mouseleave();
+ }
+ }
+ });
+
+
+ Tooltip = createClass({
+ sizeStyle: 'position: static !important;' +
+ 'display: block !important;' +
+ 'visibility: hidden !important;' +
+ 'float: left !important;',
+
+ init: function (options) {
+ var tooltipClassname = options.get('tooltipClassname', 'jqstooltip'),
+ sizetipStyle = this.sizeStyle,
+ offset;
+ this.container = options.get('tooltipContainer') || document.body;
+ this.tooltipOffsetX = options.get('tooltipOffsetX', 10);
+ this.tooltipOffsetY = options.get('tooltipOffsetY', 12);
+ // remove any previous lingering tooltip
+ $('#jqssizetip').remove();
+ $('#jqstooltip').remove();
+ this.sizetip = $('', {
+ id: 'jqssizetip',
+ style: sizetipStyle,
+ 'class': tooltipClassname
+ });
+ this.tooltip = $('', {
+ id: 'jqstooltip',
+ 'class': tooltipClassname
+ }).appendTo(this.container);
+ // account for the container's location
+ offset = this.tooltip.offset();
+ this.offsetLeft = offset.left;
+ this.offsetTop = offset.top;
+ this.hidden = true;
+ $(window).unbind('resize.jqs scroll.jqs');
+ $(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));
+ this.updateWindowDims();
+ },
+
+ updateWindowDims: function () {
+ this.scrollTop = $(window).scrollTop();
+ this.scrollLeft = $(window).scrollLeft();
+ this.scrollRight = this.scrollLeft + $(window).width();
+ this.updatePosition();
+ },
+
+ getSize: function (content) {
+ this.sizetip.html(content).appendTo(this.container);
+ this.width = this.sizetip.width() + 1;
+ this.height = this.sizetip.height();
+ this.sizetip.remove();
+ },
+
+ setContent: function (content) {
+ if (!content) {
+ this.tooltip.css('visibility', 'hidden');
+ this.hidden = true;
+ return;
+ }
+ this.getSize(content);
+ this.tooltip.html(content)
+ .css({
+ 'width': this.width,
+ 'height': this.height,
+ 'visibility': 'visible'
+ });
+ if (this.hidden) {
+ this.hidden = false;
+ this.updatePosition();
+ }
+ },
+
+ updatePosition: function (x, y) {
+ if (x === undefined) {
+ if (this.mousex === undefined) {
+ return;
+ }
+ x = this.mousex - this.offsetLeft;
+ y = this.mousey - this.offsetTop;
+
+ } else {
+ this.mousex = x = x - this.offsetLeft;
+ this.mousey = y = y - this.offsetTop;
+ }
+ if (!this.height || !this.width || this.hidden) {
+ return;
+ }
+
+ y -= this.height + this.tooltipOffsetY;
+ x += this.tooltipOffsetX;
+
+ if (y < this.scrollTop) {
+ y = this.scrollTop;
+ }
+ if (x < this.scrollLeft) {
+ x = this.scrollLeft;
+ } else if (x + this.width > this.scrollRight) {
+ x = this.scrollRight - this.width;
+ }
+
+ this.tooltip.css({
+ 'left': x,
+ 'top': y
+ });
+ },
+
+ remove: function () {
+ this.tooltip.remove();
+ this.sizetip.remove();
+ this.sizetip = this.tooltip = undefined;
+ $(window).unbind('resize.jqs scroll.jqs');
+ }
+ });
+
+ initStyles = function() {
+ addCSS(defaultStyles);
+ };
+
+ $(initStyles);
+
+ pending = [];
+ $.fn.sparkline = function (userValues, userOptions) {
+ return this.each(function () {
+ var options = new $.fn.sparkline.options(this, userOptions),
+ $this = $(this),
+ render, i;
+ render = function () {
+ var values, width, height, tmp, mhandler, sp, vals;
+ if (userValues === 'html' || userValues === undefined) {
+ vals = this.getAttribute(options.get('tagValuesAttribute'));
+ if (vals === undefined || vals === null) {
+ vals = $this.html();
+ }
+ values = vals.replace(/(^\s*\s*$)|\s+/g, '').split(',');
+ } else {
+ values = userValues;
+ }
+
+ width = options.get('width') === 'auto' ? values.length * options.get('defaultPixelsPerValue') : options.get('width');
+ if (options.get('height') === 'auto') {
+ if (!options.get('composite') || !$.data(this, '_jqs_vcanvas')) {
+ // must be a better way to get the line height
+ tmp = document.createElement('span');
+ tmp.innerHTML = 'a';
+ $this.html(tmp);
+ height = $(tmp).innerHeight() || $(tmp).height();
+ $(tmp).remove();
+ tmp = null;
+ }
+ } else {
+ height = options.get('height');
+ }
+
+ if (!options.get('disableInteraction')) {
+ mhandler = $.data(this, '_jqs_mhandler');
+ if (!mhandler) {
+ mhandler = new MouseHandler(this, options);
+ $.data(this, '_jqs_mhandler', mhandler);
+ } else if (!options.get('composite')) {
+ mhandler.reset();
+ }
+ } else {
+ mhandler = false;
+ }
+
+ if (options.get('composite') && !$.data(this, '_jqs_vcanvas')) {
+ if (!$.data(this, '_jqs_errnotify')) {
+ alert('Attempted to attach a composite sparkline to an element with no existing sparkline');
+ $.data(this, '_jqs_errnotify', true);
+ }
+ return;
+ }
+
+ sp = new $.fn.sparkline[options.get('type')](this, values, options, width, height);
+
+ sp.render();
+
+ if (mhandler) {
+ mhandler.registerSparkline(sp);
+ }
+ };
+ // jQuery 1.3.0 completely changed the meaning of :hidden :-/
+ if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || ($.fn.jquery < '1.3.0' && $(this).parents().is(':hidden')) || !$(this).parents('body').length) {
+ if (!options.get('composite') && $.data(this, '_jqs_pending')) {
+ // remove any existing references to the element
+ for (i = pending.length; i; i--) {
+ if (pending[i - 1][0] == this) {
+ pending.splice(i - 1, 1);
+ }
+ }
+ }
+ pending.push([this, render]);
+ $.data(this, '_jqs_pending', true);
+ } else {
+ render.call(this);
+ }
+ });
+ };
+
+ $.fn.sparkline.defaults = getDefaults();
+
+
+ $.sparkline_display_visible = function () {
+ var el, i, pl;
+ var done = [];
+ for (i = 0, pl = pending.length; i < pl; i++) {
+ el = pending[i][0];
+ if ($(el).is(':visible') && !$(el).parents().is(':hidden')) {
+ pending[i][1].call(el);
+ $.data(pending[i][0], '_jqs_pending', false);
+ done.push(i);
+ } else if (!$(el).closest('html').length && !$.data(el, '_jqs_pending')) {
+ // element has been inserted and removed from the DOM
+ // If it was not yet inserted into the dom then the .data request
+ // will return true.
+ // removing from the dom causes the data to be removed.
+ $.data(pending[i][0], '_jqs_pending', false);
+ done.push(i);
+ }
+ }
+ for (i = done.length; i; i--) {
+ pending.splice(done[i - 1], 1);
+ }
+ };
+
+
+ /**
+ * User option handler
+ */
+ $.fn.sparkline.options = createClass({
+ init: function (tag, userOptions) {
+ var extendedOptions, defaults, base, tagOptionType;
+ this.userOptions = userOptions = userOptions || {};
+ this.tag = tag;
+ this.tagValCache = {};
+ defaults = $.fn.sparkline.defaults;
+ base = defaults.common;
+ this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix);
+
+ tagOptionType = this.getTagSetting('type');
+ if (tagOptionType === UNSET_OPTION) {
+ extendedOptions = defaults[userOptions.type || base.type];
+ } else {
+ extendedOptions = defaults[tagOptionType];
+ }
+ this.mergedOptions = $.extend({}, base, extendedOptions, userOptions);
+ },
+
+
+ getTagSetting: function (key) {
+ var prefix = this.tagOptionsPrefix,
+ val, i, pairs, keyval;
+ if (prefix === false || prefix === undefined) {
+ return UNSET_OPTION;
+ }
+ if (this.tagValCache.hasOwnProperty(key)) {
+ val = this.tagValCache.key;
+ } else {
+ val = this.tag.getAttribute(prefix + key);
+ if (val === undefined || val === null) {
+ val = UNSET_OPTION;
+ } else if (val.substr(0, 1) === '[') {
+ val = val.substr(1, val.length - 2).split(',');
+ for (i = val.length; i--;) {
+ val[i] = normalizeValue(val[i].replace(/(^\s*)|(\s*$)/g, ''));
+ }
+ } else if (val.substr(0, 1) === '{') {
+ pairs = val.substr(1, val.length - 2).split(',');
+ val = {};
+ for (i = pairs.length; i--;) {
+ keyval = pairs[i].split(':', 2);
+ val[keyval[0].replace(/(^\s*)|(\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\s*)|(\s*$)/g, ''));
+ }
+ } else {
+ val = normalizeValue(val);
+ }
+ this.tagValCache.key = val;
+ }
+ return val;
+ },
+
+ get: function (key, defaultval) {
+ var tagOption = this.getTagSetting(key),
+ result;
+ if (tagOption !== UNSET_OPTION) {
+ return tagOption;
+ }
+ return (result = this.mergedOptions[key]) === undefined ? defaultval : result;
+ }
+ });
+
+
+ $.fn.sparkline._base = createClass({
+ disabled: false,
+
+ init: function (el, values, options, width, height) {
+ this.el = el;
+ this.$el = $(el);
+ this.values = values;
+ this.options = options;
+ this.width = width;
+ this.height = height;
+ this.currentRegion = undefined;
+ },
+
+ /**
+ * Setup the canvas
+ */
+ initTarget: function () {
+ var interactive = !this.options.get('disableInteraction');
+ if (!(this.target = this.$el.simpledraw(this.width, this.height, this.options.get('composite'), interactive))) {
+ this.disabled = true;
+ } else {
+ this.canvasWidth = this.target.pixelWidth;
+ this.canvasHeight = this.target.pixelHeight;
+ }
+ },
+
+ /**
+ * Actually render the chart to the canvas
+ */
+ render: function () {
+ if (this.disabled) {
+ this.el.innerHTML = '';
+ return false;
+ }
+ return true;
+ },
+
+ /**
+ * Return a region id for a given x/y co-ordinate
+ */
+ getRegion: function (x, y) {
+ },
+
+ /**
+ * Highlight an item based on the moused-over x,y co-ordinate
+ */
+ setRegionHighlight: function (el, x, y) {
+ var currentRegion = this.currentRegion,
+ highlightEnabled = !this.options.get('disableHighlight'),
+ newRegion;
+ if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) {
+ return null;
+ }
+ newRegion = this.getRegion(el, x, y);
+ if (currentRegion !== newRegion) {
+ if (currentRegion !== undefined && highlightEnabled) {
+ this.removeHighlight();
+ }
+ this.currentRegion = newRegion;
+ if (newRegion !== undefined && highlightEnabled) {
+ this.renderHighlight();
+ }
+ return true;
+ }
+ return false;
+ },
+
+ /**
+ * Reset any currently highlighted item
+ */
+ clearRegionHighlight: function () {
+ if (this.currentRegion !== undefined) {
+ this.removeHighlight();
+ this.currentRegion = undefined;
+ return true;
+ }
+ return false;
+ },
+
+ renderHighlight: function () {
+ this.changeHighlight(true);
+ },
+
+ removeHighlight: function () {
+ this.changeHighlight(false);
+ },
+
+ changeHighlight: function (highlight) {},
+
+ /**
+ * Fetch the HTML to display as a tooltip
+ */
+ getCurrentRegionTooltip: function () {
+ var options = this.options,
+ header = '',
+ entries = [],
+ fields, formats, formatlen, fclass, text, i,
+ showFields, showFieldsKey, newFields, fv,
+ formatter, format, fieldlen, j;
+ if (this.currentRegion === undefined) {
+ return '';
+ }
+ fields = this.getCurrentRegionFields();
+ formatter = options.get('tooltipFormatter');
+ if (formatter) {
+ return formatter(this, options, fields);
+ }
+ if (options.get('tooltipChartTitle')) {
+ header += '
' + options.get('tooltipChartTitle') + '
\n';
+ }
+ formats = this.options.get('tooltipFormat');
+ if (!formats) {
+ return '';
+ }
+ if (!$.isArray(formats)) {
+ formats = [formats];
+ }
+ if (!$.isArray(fields)) {
+ fields = [fields];
+ }
+ showFields = this.options.get('tooltipFormatFieldlist');
+ showFieldsKey = this.options.get('tooltipFormatFieldlistKey');
+ if (showFields && showFieldsKey) {
+ // user-selected ordering of fields
+ newFields = [];
+ for (i = fields.length; i--;) {
+ fv = fields[i][showFieldsKey];
+ if ((j = $.inArray(fv, showFields)) != -1) {
+ newFields[j] = fields[i];
+ }
+ }
+ fields = newFields;
+ }
+ formatlen = formats.length;
+ fieldlen = fields.length;
+ for (i = 0; i < formatlen; i++) {
+ format = formats[i];
+ if (typeof format === 'string') {
+ format = new SPFormat(format);
+ }
+ fclass = format.fclass || 'jqsfield';
+ for (j = 0; j < fieldlen; j++) {
+ if (!fields[j].isNull || !options.get('tooltipSkipNull')) {
+ $.extend(fields[j], {
+ prefix: options.get('tooltipPrefix'),
+ suffix: options.get('tooltipSuffix')
+ });
+ text = format.render(fields[j], options.get('tooltipValueLookups'), options);
+ entries.push('
- Not target invoicing define
+ Not target invoicing defined
From 40f387e2d0ab2a6dcd34a9808cf83a1ffff9f575 Mon Sep 17 00:00:00 2001
From: Christophe Matthieu
Date: Thu, 25 Apr 2013 15:38:09 +0200
Subject: [PATCH 152/373] [FIX] user_creation: test yml, add context
no_reset_password
bzr revid: chm@openerp.com-20130425133809-11n44mzahzk2kk52
---
addons/crm/test/lead2opportunity_assign_salesmen.yml | 7 +++++++
.../test/worktask_entry_to_timesheetline_entry.yml | 1 +
2 files changed, 8 insertions(+)
diff --git a/addons/crm/test/lead2opportunity_assign_salesmen.yml b/addons/crm/test/lead2opportunity_assign_salesmen.yml
index 0edd3b8edce..1c68c682533 100644
--- a/addons/crm/test/lead2opportunity_assign_salesmen.yml
+++ b/addons/crm/test/lead2opportunity_assign_salesmen.yml
@@ -24,38 +24,45 @@
name: 'Test lead 4'
contact_name: 'Fabrice Lepoilu'
stage_id: stage_lead1
+ context: {'no_reset_password': True}
-
!record {model: crm.lead, id: test_crm_lead_05}:
type: 'lead'
name: 'Test lead 5'
contact_name: 'Fabrice Lepoilu'
stage_id: stage_lead1
+ context: {'no_reset_password': True}
-
!record {model: crm.lead, id: test_crm_lead_06}:
type: 'lead'
name: 'Test lead 6'
partner_name: 'Agrolait SuperSeed SA'
stage_id: stage_lead1
+ context: {'no_reset_password': True}
-
!record {model: res.users, id: test_res_user_01}:
name: 'Test user A'
login: 'tua'
new_password: 'tua'
+ context: {'no_reset_password': True}
-
!record {model: res.users, id: test_res_user_02}:
name: 'Test user B'
login: 'tub'
new_password: 'tub'
+ context: {'no_reset_password': True}
-
!record {model: res.users, id: test_res_user_03}:
name: 'Test user C'
login: 'tuc'
new_password: 'tuc'
+ context: {'no_reset_password': True}
-
!record {model: res.users, id: test_res_user_04}:
name: 'Test user D'
login: 'tud'
new_password: 'tud'
+ context: {'no_reset_password': True}
-
I create a mass convert wizard and convert all the leads.
-
diff --git a/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml b/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml
index 3efd133ffb6..68f1d1adbdf 100644
--- a/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml
+++ b/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml
@@ -8,6 +8,7 @@
password: hr
groups_id:
- base.group_hr_manager
+ context: {'no_reset_password': True}
-
Create a product with type service used to specify employees designation
-
From 7841bac687c98d29efa3b2529e44d0631f3d101a Mon Sep 17 00:00:00 2001
From: ggh-openerp
Date: Mon, 29 Apr 2013 11:08:51 +0530
Subject: [PATCH 153/373] [IMP] Improved typo in Warning
bzr revid: ggh@tinyerp.com-20130429053851-ipatcoxtjwrwfijk
---
addons/account/account_invoice.py | 2 +-
addons/account/wizard/account_validate_account_move.py | 2 +-
addons/analytic/analytic.py | 2 +-
addons/l10n_be/wizard/l10n_be_partner_vat_listing.py | 2 +-
addons/l10n_be/wizard/l10n_be_vat_intra.py | 2 +-
addons/point_of_sale/point_of_sale.py | 2 +-
addons/stock/wizard/stock_partial_picking.py | 4 ++--
7 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index c47cf70b673..dd016dd8ef0 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -600,7 +600,7 @@ class account_invoice(osv.osv):
obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id'])
if obj_l.company_id.id != company_id:
raise osv.except_osv(_('Configuration Error!'),
- _('Invoice line account\'s company and invoice\'s compnay does not match.'))
+ _('Invoice line account\'s company and invoice\'s company does not match.'))
else:
continue
if company_id and type:
diff --git a/addons/account/wizard/account_validate_account_move.py b/addons/account/wizard/account_validate_account_move.py
index 324248284f1..050191db187 100644
--- a/addons/account/wizard/account_validate_account_move.py
+++ b/addons/account/wizard/account_validate_account_move.py
@@ -57,7 +57,7 @@ class validate_account_move_lines(osv.osv_memory):
move_ids.append(line.move_id.id)
move_ids = list(set(move_ids))
if not move_ids:
- raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move enties in draft state.'))
+ raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move entries in draft state.'))
obj_move.button_validate(cr, uid, move_ids, context)
return {'type': 'ir.actions.act_window_close'}
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py
index ac298713b04..ce79c4d5ffb 100644
--- a/addons/analytic/analytic.py
+++ b/addons/analytic/analytic.py
@@ -157,7 +157,7 @@ class account_analytic_account(osv.osv):
for account in self.browse(cr, uid, ids, context=context):
if account.company_id:
if account.company_id.currency_id.id != value:
- raise osv.except_osv(_('Error!'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really usefull for consolidation purposes of several companies charts with different currencies, for example."))
+ raise osv.except_osv(_('Error!'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really useful for consolidation purposes of several companies charts with different currencies, for example."))
if value:
return cr.execute("""update account_analytic_account set currency_id=%s where id=%s""", (value, account.id, ))
diff --git a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
index 29a1a1508a4..a6c642ea789 100644
--- a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
+++ b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
@@ -65,7 +65,7 @@ class partner_vat(osv.osv_memory):
partners = []
partner_ids = obj_partner.search(cr, uid, [('vat_subjected', '!=', False), ('vat','ilike','BE%')], context=context)
if not partner_ids:
- raise osv.except_osv(_('Error'),_('No belgian contact with a VAT number in your database.'))
+ raise osv.except_osv(_('Error'),_('No belgium contact with a VAT number in your database.'))
cr.execute("""SELECT sub1.partner_id, sub1.name, sub1.vat, sub1.turnover, sub2.vat_amount
FROM (SELECT l.partner_id, p.name, p.vat, SUM(CASE WHEN c.code ='49' THEN -l.tax_amount ELSE l.tax_amount END) as turnover
FROM account_move_line l
diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py
index 703ab9db59b..fa298ca5124 100644
--- a/addons/l10n_be/wizard/l10n_be_vat_intra.py
+++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py
@@ -120,7 +120,7 @@ class partner_vat_intra(osv.osv_memory):
p_id_list = obj_partner.search(cr, uid, [('vat','!=',False)], context=context)
if not p_id_list:
- raise osv.except_osv(_('Insufficient Data!'),_('No partner has a VAT number asociated with him.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No partner has a VAT number associated with him.'))
seq_declarantnum = obj_sequence.get(cr, uid, 'declarantnum')
dnum = company_vat[2:] + seq_declarantnum[-4:]
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 349ad8b4f81..a4f2a30387a 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -407,7 +407,7 @@ class pos_session(osv.osv):
# The pos manager can close statements with maximums.
if not self.pool.get('ir.model.access').check_groups(cr, uid, "point_of_sale.group_pos_manager"):
raise osv.except_osv( _('Error!'),
- _("Your ending balance is too different from the theorical cash closing (%.2f), the maximum allowed is: %.2f. You can contact your manager to force it.") % (st.difference, st.journal_id.amount_authorized_diff))
+ _("Your ending balance is too different from the theoretical cash closing (%.2f), the maximum allowed is: %.2f. You can contact your manager to force it.") % (st.difference, st.journal_id.amount_authorized_diff))
if (st.journal_id.type not in ['bank', 'cash']):
raise osv.except_osv(_('Error!'),
_("The type of the journal for your payment method should be bank or cash "))
diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py
index 47599d5f99e..46e5223e43a 100644
--- a/addons/stock/wizard/stock_partial_picking.py
+++ b/addons/stock/wizard/stock_partial_picking.py
@@ -178,7 +178,7 @@ class stock_partial_picking(osv.osv_memory):
if line_uom.factor and line_uom.factor <> 0:
if float_compare(qty_in_line_uom, wizard_line.quantity, precision_rounding=line_uom.rounding) != 0:
- raise osv.except_osv(_('Warning!'), _('The unit of measure rounding does not allow you to ship "%s %s", only roundings of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name))
+ raise osv.except_osv(_('Warning!'), _('The unit of measure rounding does not allow you to ship "%s %s", only rounding of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name))
if move_id:
#Check rounding Quantity.ex.
#picking: 1kg, uom kg rounding = 0.01 (rounding to 10g),
@@ -189,7 +189,7 @@ class stock_partial_picking(osv.osv_memory):
qty_in_initial_uom = uom_obj._compute_qty(cr, uid, line_uom.id, wizard_line.quantity, initial_uom.id)
without_rounding_qty = (wizard_line.quantity / line_uom.factor) * initial_uom.factor
if float_compare(qty_in_initial_uom, without_rounding_qty, precision_rounding=initial_uom.rounding) != 0:
- raise osv.except_osv(_('Warning!'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only roundings of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name))
+ raise osv.except_osv(_('Warning!'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only rounding of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name))
else:
seq_obj_name = 'stock.picking.' + picking_type
move_id = stock_move.create(cr,uid,{'name' : self.pool.get('ir.sequence').get(cr, uid, seq_obj_name),
From 1cdda962840b48d4e63a68c5ee8ec8313e7eca59 Mon Sep 17 00:00:00 2001
From: ggh-openerp
Date: Mon, 29 Apr 2013 11:22:49 +0530
Subject: [PATCH 154/373] [IMP] Improved Capitalize title
bzr revid: ggh@tinyerp.com-20130429055249-7wwd6zwek1pddlhl
---
addons/l10n_be/wizard/l10n_be_account_vat_declaration.py | 2 +-
addons/l10n_be/wizard/l10n_be_partner_vat_listing.py | 4 ++--
addons/l10n_be/wizard/l10n_be_vat_intra.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
index b74cfa21b8a..0576e1d5f8f 100644
--- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
+++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
@@ -84,7 +84,7 @@ class l10n_be_vat_declaration(osv.osv_memory):
obj_company = obj_user.browse(cr, uid, uid, context=context).company_id
vat_no = obj_company.partner_id.vat
if not vat_no:
- raise osv.except_osv(_('insufficient data!'), _('No VAT number associated with your company.'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No VAT number associated with your company.'))
vat_no = vat_no.replace(' ','').upper()
vat = vat_no[2:]
diff --git a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
index a6c642ea789..0ffa0c16a24 100644
--- a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
+++ b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
@@ -60,7 +60,7 @@ class partner_vat(osv.osv_memory):
company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
period_ids = obj_period.search(cr, uid, [('date_start' ,'>=', date_start), ('date_stop','<=',date_stop), ('company_id','=',company_id)])
if not period_ids:
- raise osv.except_osv(_('insufficient data!'), _('No data for the selected year.'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No data for the selected year.'))
partners = []
partner_ids = obj_partner.search(cr, uid, [('vat_subjected', '!=', False), ('vat','ilike','BE%')], context=context)
@@ -90,7 +90,7 @@ class partner_vat(osv.osv_memory):
partners.append(id_client)
if not partners:
- raise osv.except_osv(_('insufficient data!'), _('No data found for the selected year.'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No data found for the selected year.'))
context.update({'partner_ids': partners, 'year': data['year'], 'limit_amount': data['limit_amount']})
model_data_ids = obj_model_data.search(cr, uid, [('model','=','ir.ui.view'), ('name','=','view_vat_listing')])
resource_id = obj_model_data.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py
index fa298ca5124..a572c3b83b4 100644
--- a/addons/l10n_be/wizard/l10n_be_vat_intra.py
+++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py
@@ -108,7 +108,7 @@ class partner_vat_intra(osv.osv_memory):
# Get Company vat
company_vat = data_company.partner_id.vat
if not company_vat:
- raise osv.except_osv(_('insufficient data!'),_('No VAT number associated with your company.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No VAT number associated with your company.'))
company_vat = company_vat.replace(' ','').upper()
issued_by = company_vat[:2]
From 3b73e2b2a48f0e9b48256f97fa361156f58756c4 Mon Sep 17 00:00:00 2001
From: ggh-openerp
Date: Mon, 29 Apr 2013 12:45:57 +0530
Subject: [PATCH 155/373] [IMP]Removed space before Exclamation marks [!]
bzr revid: ggh@tinyerp.com-20130429071557-vnxo5nni03vc886j
---
addons/account/account.py | 12 ++++++------
addons/account/account_bank_statement.py | 2 +-
addons/account/account_cash_statement.py | 2 +-
addons/account/account_invoice.py | 10 +++++-----
addons/account/account_move_line.py | 6 +++---
addons/account/installer.py | 2 +-
.../account_analytic_analysis.py | 2 +-
.../account_analytic_plans.py | 4 ++--
addons/account_voucher/account_voucher.py | 2 +-
.../analytic_user_function.py | 4 ++--
addons/anonymization/anonymization.py | 10 +++++-----
addons/base_status/base_state.py | 2 +-
addons/crm/wizard/crm_lead_to_opportunity.py | 2 +-
addons/delivery/sale.py | 4 ++--
.../hr_attendance/wizard/hr_attendance_error.py | 2 +-
.../wizard/hr_payroll_payslips_by_employees.py | 2 +-
.../hr_timesheet_invoice/hr_timesheet_invoice.py | 2 +-
addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py | 8 ++++----
addons/l10n_lu/wizard/print_vat.py | 2 +-
addons/mrp_operations/mrp_operations.py | 4 ++--
addons/mrp_repair/mrp_repair.py | 4 ++--
addons/point_of_sale/point_of_sale.py | 4 ++--
.../point_of_sale/wizard/pos_open_statement.py | 2 +-
addons/procurement/procurement.py | 2 +-
addons/project/project.py | 4 ++--
addons/project_gtd/wizard/project_gtd_empty.py | 2 +-
addons/project_timesheet/project_timesheet.py | 10 +++++-----
addons/sale/sale.py | 4 ++--
addons/sale_crm/wizard/crm_make_sale.py | 2 +-
addons/stock/stock.py | 4 ++--
addons/subscription/subscription.py | 4 ++--
addons/warning/warning.py | 16 ++++++++--------
32 files changed, 71 insertions(+), 71 deletions(-)
diff --git a/addons/account/account.py b/addons/account/account.py
index 3959799f1bb..cca3db63d29 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -648,10 +648,10 @@ class account_account(osv.osv):
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
#Check for 'Closed' type
if old_type == 'closed' and new_type !='closed':
- raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!"))
+ raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!"))
# Forbid to change an account type for restricted_groups as it contains journal items (or if one of its children does)
if (new_type in restricted_groups):
- raise osv.except_osv(_('Warning !'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,))
+ raise osv.except_osv(_('Warning!'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,))
return True
@@ -1015,14 +1015,14 @@ class account_period(osv.osv):
if not result:
result = self.search(cr, uid, args, context=context)
if not result:
- raise osv.except_osv(_('Error !'), _('There is no period defined for this date: %s.\nPlease create one.')%dt)
+ raise osv.except_osv(_('Error!'), _('There is no period defined for this date: %s.\nPlease create one.')%dt)
return result
def action_draft(self, cr, uid, ids, *args):
mode = 'draft'
for period in self.browse(cr, uid, ids):
if period.fiscalyear_id.state == 'done':
- raise osv.except_osv(_('Warning !'), _('You can not re-open a period which belongs to closed fiscal year'))
+ raise osv.except_osv(_('Warning!'), _('You can not re-open a period which belongs to closed fiscal year'))
cr.execute('update account_journal_period set state=%s where period_id in %s', (mode, tuple(ids),))
cr.execute('update account_period set state=%s where id in %s', (mode, tuple(ids),))
return True
@@ -2307,7 +2307,7 @@ class account_model(osv.osv):
try:
entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')}
except:
- raise osv.except_osv(_('Wrong model !'), _('You have a wrong expression "%(...)s" in your model !'))
+ raise osv.except_osv(_('Wrong model!'), _('You have a wrong expression "%(...)s" in your model !'))
move_id = account_move_obj.create(cr, uid, {
'ref': entry['name'],
'period_id': period_id,
@@ -2319,7 +2319,7 @@ class account_model(osv.osv):
analytic_account_id = False
if line.analytic_account_id:
if not model.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,))
analytic_account_id = line.analytic_account_id.id
val = {
'move_id': move_id,
diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py
index 023765d73f0..8a15321b9c6 100644
--- a/addons/account/account_bank_statement.py
+++ b/addons/account/account_bank_statement.py
@@ -420,7 +420,7 @@ class account_bank_statement(osv.osv):
for st_line in st.line_ids:
if st_line.analytic_account_id:
if not st.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,))
if not st_line.amount:
continue
st_line_number = self.get_next_st_line_number(cr, uid, st_number, st_line, context)
diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py
index 40f0ca80738..8e3e250d41c 100644
--- a/addons/account/account_cash_statement.py
+++ b/addons/account/account_cash_statement.py
@@ -252,7 +252,7 @@ class account_cash_statement(osv.osv):
for statement in statement_pool.browse(cr, uid, ids, context=context):
vals = {}
if not self._user_allow(cr, uid, statement.id, context=context):
- raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal !') % (statement.journal_id.name, )))
+ raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal!') % (statement.journal_id.name, )))
if statement.name and statement.name == '/':
c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id}
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index dd016dd8ef0..2a530da30d9 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -69,7 +69,7 @@ class account_invoice(osv.osv):
tt = type2journal.get(type_inv, 'sale')
result = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=',tt)], context=context)
if not result:
- raise osv.except_osv(_('No Analytic Journal !'),_("You must define an analytic journal of type '%s'!") % (tt,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You must define an analytic journal of type '%s'!") % (tt,))
return result[0]
def _get_type(self, cr, uid, context=None):
@@ -736,7 +736,7 @@ class account_invoice(osv.osv):
else:
ref = self._convert_ref(cr, uid, inv.number)
if not inv.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,))
il['analytic_lines'] = [(0,0, {
'name': il['name'],
'date': inv['date_invoice'],
@@ -861,7 +861,7 @@ class account_invoice(osv.osv):
if not inv.journal_id.sequence_id:
raise osv.except_osv(_('Error!'), _('Please define sequence on the journal related to this invoice.'))
if not inv.invoice_line:
- raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
+ raise osv.except_osv(_('No Invoice Lines!'), _('Please create some invoice lines.'))
if inv.move_id:
continue
@@ -882,7 +882,7 @@ class account_invoice(osv.osv):
group_check_total = self.pool.get('res.groups').browse(cr, uid, group_check_total_id, context=context)
if group_check_total and uid in [x.id for x in group_check_total.users]:
if (inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0)):
- raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe encoded total does not match the computed total.'))
+ raise osv.except_osv(_('Bad total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.'))
if inv.payment_term:
total_fixed = total_percent = 0
@@ -1423,7 +1423,7 @@ class account_invoice_line(osv.osv):
context = dict(context)
context.update({'company_id': company_id, 'force_company': company_id})
if not partner_id:
- raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") )
+ raise osv.except_osv(_('No Partner Defined!'),_("You must first select a partner!") )
if not product:
if type in ('in_invoice', 'in_refund'):
return {'value': {}, 'domain':{'product_uom':[]}}
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 006e2c55f5f..a7d32cc53f9 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -192,7 +192,7 @@ class account_move_line(osv.osv):
for obj_line in self.browse(cr, uid, ids, context=context):
if obj_line.analytic_account_id:
if not obj_line.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, ))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, ))
vals_line = self._prepare_analytic_line(cr, uid, obj_line, context=context)
acc_ana_line_obj.create(cr, uid, vals_line)
return True
@@ -1101,7 +1101,7 @@ class account_move_line(osv.osv):
period = period_obj.browse(cr, uid, period_id, context=context)
for (state,) in result:
if state == 'done':
- raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
+ raise osv.except_osv(_('Error!'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
if not result:
jour_period_obj.create(cr, uid, {
'name': (journal.code or journal.name)+':'+(period.name or ''),
@@ -1181,7 +1181,7 @@ class account_move_line(osv.osv):
move_id = move_obj.create(cr, uid, v, context)
vals['move_id'] = move_id
else:
- raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
+ raise osv.except_osv(_('No piece number!'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
ok = not (journal.type_control_ids or journal.account_control_ids)
if ('account_id' in vals):
account = account_obj.browse(cr, uid, vals['account_id'], context=context)
diff --git a/addons/account/installer.py b/addons/account/installer.py
index 537371d0f64..fc1161db29b 100644
--- a/addons/account/installer.py
+++ b/addons/account/installer.py
@@ -111,7 +111,7 @@ class account_installer(osv.osv_memory):
def check_unconfigured_cmp(self, cr, uid, context=None):
""" check if there are still unconfigured companies """
if not self.get_unconfigured_cmp(cr, uid, context=context):
- raise osv.except_osv(_('No unconfigured company !'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
+ raise osv.except_osv(_('No unconfigured company!'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if context is None: context = {}
diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py
index 33ab3be209c..c318bbc3363 100644
--- a/addons/account_analytic_analysis/account_analytic_analysis.py
+++ b/addons/account_analytic_analysis/account_analytic_analysis.py
@@ -641,7 +641,7 @@ class account_analytic_account(osv.osv):
fpos_obj = self.pool.get('account.fiscal.position')
if not contract.partner_id:
- raise osv.except_osv(_('No Customer Defined !'),_("You must first select a Customer for Contract %s!") % contract.name )
+ raise osv.except_osv(_('No Customer Defined!'),_("You must first select a Customer for Contract %s!") % contract.name )
fpos = contract.partner_id.property_account_position.id or False
journal_ids = journal_obj.search(cr, uid, [('type', '=','sale'),('company_id', '=', contract.company_id.id or False)], limit=1)
diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py
index 54b15ad565b..4cf12098fff 100644
--- a/addons/account_analytic_plans/account_analytic_plans.py
+++ b/addons/account_analytic_plans/account_analytic_plans.py
@@ -332,7 +332,7 @@ class account_move_line(osv.osv):
for line in self.browse(cr, uid, ids, context=context):
if line.analytics_id:
if not line.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (line.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal.") % (line.journal_id.name,))
toremove = analytic_line_obj.search(cr, uid, [('move_id','=',line.id)], context=context)
if toremove:
@@ -471,7 +471,7 @@ class account_bank_statement(osv.osv):
for st_line in st.line_ids:
if st_line.analytics_id:
if not st.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (st.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal.") % (st.journal_id.name,))
if not st_line.amount:
continue
return True
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index b176c3b8fd9..52d44e84d48 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -965,7 +965,7 @@ class account_voucher(osv.osv):
name = voucher_brw.number
elif voucher_brw.journal_id.sequence_id:
if not voucher_brw.journal_id.sequence_id.active:
- raise osv.except_osv(_('Configuration Error !'),
+ raise osv.except_osv(_('Configuration Error!'),
_('Please activate the sequence of selected journal !'))
c = dict(context)
c.update({'fiscalyear_id': voucher_brw.period_id.fiscalyear_id.id})
diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py
index 0573292c1f6..1adefb2d59d 100644
--- a/addons/analytic_user_function/analytic_user_function.py
+++ b/addons/analytic_user_function/analytic_user_function.py
@@ -104,7 +104,7 @@ class hr_analytic_timesheet(osv.osv):
a = r.product_id.categ_id.property_account_expense_categ.id
if not a:
raise osv.except_osv(_('Error!'),
- _('There is no expense account define ' \
+ _('There is no expense account defined ' \
'for this product: "%s" (id:%d)') % \
(r.product_id.name, r.product_id.id,))
# Compute based on pricetype
@@ -133,7 +133,7 @@ class hr_analytic_timesheet(osv.osv):
a = r.product_id.categ_id.property_account_expense_categ.id
if not a:
raise osv.except_osv(_('Error!'),
- _('There is no expense account define ' \
+ _('There is no expense account defined ' \
'for this product: "%s" (id:%d)') % \
(r.product_id.name, r.product_id.id,))
# Compute based on pricetype
diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py
index 025f1f79f70..a79305ea5b7 100644
--- a/addons/anonymization/anonymization.py
+++ b/addons/anonymization/anonymization.py
@@ -86,11 +86,11 @@ class ir_model_fields_anonymization(osv.osv):
if context.get('manual'):
global_state = self._get_global_state(cr, uid, context=context)
if global_state == 'anonymized':
- raise osv.except_osv('Error !', "The database is currently anonymized, you cannot create, modify or delete fields.")
+ raise osv.except_osv('Error!', "The database is currently anonymized, you cannot create, modify or delete fields.")
elif global_state == 'unstable':
msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \
" while some fields are not anonymized. You should try to solve this problem before trying to create, write or delete fields.")
- raise osv.except_osv('Error !', msg)
+ raise osv.except_osv('Error!', msg)
return True
@@ -357,7 +357,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
else:
msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \
" while some fields are not anonymized. You should try to solve this problem before trying to do anything else.")
- raise osv.except_osv('Error !', msg)
+ raise osv.except_osv('Error!', msg)
res['arch'] = etree.tostring(eview)
@@ -521,11 +521,11 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
# check that all the defined fields are in the 'anonymized' state
state = ir_model_fields_anonymization_model._get_global_state(cr, uid, context=context)
if state == 'clear':
- raise osv.except_osv_('Error !', "The database is not currently anonymized, you cannot reverse the anonymization.")
+ raise osv.except_osv_('Error!', "The database is not currently anonymized, you cannot reverse the anonymization.")
elif state == 'unstable':
msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \
" while some fields are not anonymized. You should try to solve this problem before trying to do anything.")
- raise osv.except_osv('Error !', msg)
+ raise osv.except_osv('Error!', msg)
wizards = self.browse(cr, uid, ids, context=context)
for wizard in wizards:
diff --git a/addons/base_status/base_state.py b/addons/base_status/base_state.py
index b856bbd74ad..3fe59ecbd21 100644
--- a/addons/base_status/base_state.py
+++ b/addons/base_status/base_state.py
@@ -104,7 +104,7 @@ class base_state(object):
if parent_id.change_responsible and parent_id.user_id:
data['user_id'] = parent_id.user_id.id
else:
- raise osv.except_osv(_('Error !'), _('You can not escalate, you are already at the top level regarding your sales-team category.'))
+ raise osv.except_osv(_('Error!'), _('You can not escalate, you are already at the top level regarding your sales-team category.'))
self.write(cr, uid, [case.id], data, context=context)
case.case_escalate_send_note(parent_id, context=context)
return True
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index e67b7c0c7be..3c847ade42a 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -86,7 +86,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
lead_obj = self.pool.get('crm.lead')
for lead in lead_obj.browse(cr, uid, context.get('active_ids', []), context=context):
if lead.state in ['done', 'cancel']:
- raise osv.except_osv(_("Warning !"), _("Closed/Cancelled leads cannot be converted into opportunities."))
+ raise osv.except_osv(_("Warning!"), _("Closed/Cancelled leads cannot be converted into opportunities."))
return False
def _convert_opportunity(self, cr, uid, ids, vals, context=None):
diff --git a/addons/delivery/sale.py b/addons/delivery/sale.py
index 86a518ebca9..de7411bec67 100644
--- a/addons/delivery/sale.py
+++ b/addons/delivery/sale.py
@@ -51,10 +51,10 @@ class sale_order(osv.osv):
for order in self.browse(cr, uid, ids, context=context):
grid_id = carrier_obj.grid_get(cr, uid, [order.carrier_id.id], order.partner_shipping_id.id)
if not grid_id:
- raise osv.except_osv(_('No grid available !'), _('No grid matching for this carrier !'))
+ raise osv.except_osv(_('No Grid Available!'), _('No grid matching for this carrier!'))
if not order.state in ('draft'):
- raise osv.except_osv(_('Order not in draft state !'), _('The order state have to be draft to add delivery lines.'))
+ raise osv.except_osv(_('Order Not In Draft State!'), _('The order state have to be draft to add delivery lines.'))
grid = grid_obj.browse(cr, uid, grid_id, context=context)
diff --git a/addons/hr_attendance/wizard/hr_attendance_error.py b/addons/hr_attendance/wizard/hr_attendance_error.py
index 137bac30215..82d75149428 100644
--- a/addons/hr_attendance/wizard/hr_attendance_error.py
+++ b/addons/hr_attendance/wizard/hr_attendance_error.py
@@ -46,7 +46,7 @@ class hr_attendance_error(osv.osv_memory):
cr.execute("SELECT id FROM hr_attendance WHERE employee_id IN %s AND to_char(name,'YYYY-mm-dd')<=%s AND to_char(name,'YYYY-mm-dd')>=%s AND action IN %s ORDER BY name" ,(tuple(context['active_ids']), date_to, date_from, tuple(['sign_in','sign_out'])))
attendance_ids = [x[0] for x in cr.fetchall()]
if not attendance_ids:
- raise osv.except_osv(_('No Data Available !'), _('No records are found for your selection!'))
+ raise osv.except_osv(_('No Data Available!'), _('No records are found for your selection!'))
attendance_records = self.pool.get('hr.attendance').browse(cr, uid, attendance_ids, context=context)
for rec in attendance_records:
diff --git a/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py b/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
index 5837472be5f..3bf8b339300 100644
--- a/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
+++ b/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
@@ -49,7 +49,7 @@ class hr_payslip_employees(osv.osv_memory):
to_date = run_data.get('date_end', False)
credit_note = run_data.get('credit_note', False)
if not data['employee_ids']:
- raise osv.except_osv(_("Warning !"), _("You must select employee(s) to generate payslip(s)."))
+ raise osv.except_osv(_("Warning!"), _("You must select employee(s) to generate payslip(s)."))
for emp in emp_pool.browse(cr, uid, data['employee_ids'], context=context):
slip_data = slip_pool.onchange_employee_id(cr, uid, [], from_date, to_date, emp.id, contract_id=False, context=context)
res = {
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index f8c27bded5e..4e2e7911094 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -181,7 +181,7 @@ class account_analytic_line(osv.osv):
for account in analytic_account_obj.browse(cr, uid, list(account_ids), context=context):
partner = account.partner_id
if (not partner) or not (account.pricelist_id):
- raise osv.except_osv(_('Analytic Account incomplete !'),
+ raise osv.except_osv(_('Analytic Account incomplete!'),
_('Contract incomplete. Please fill in the Customer and Pricelist fields.'))
date_due = False
diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py
index 348bb71c95e..fc715ece5b8 100644
--- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py
+++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py
@@ -103,7 +103,7 @@ class payroll_advice(osv.osv):
slip_ids = payslip_pool.search(cr, uid, [('date_from', '<=', advice.date), ('date_to', '>=', advice.date), ('state', '=', 'done')], context=context)
for slip in payslip_pool.browse(cr, uid, slip_ids, context=context):
if not slip.employee_id.bank_account_id and not slip.employee_id.bank_account_id.acc_number:
- raise osv.except_osv(_('Error !'), _('Please define bank account for the %s employee') % (slip.employee_id.name))
+ raise osv.except_osv(_('Error!'), _('Please define bank account for the %s employee') % (slip.employee_id.name))
line_ids = payslip_line_pool.search(cr, uid, [ ('slip_id', '=', slip.id), ('code', '=', 'NET')], context=context)
if line_ids:
line = payslip_line_pool.browse(cr, uid, line_ids, context=context)[0]
@@ -129,7 +129,7 @@ class payroll_advice(osv.osv):
seq_obj = self.pool.get('ir.sequence')
for advice in self.browse(cr, uid, ids, context=context):
if not advice.line_ids:
- raise osv.except_osv(_('Error !'), _('You can not confirm Payment advice without advice lines.'))
+ raise osv.except_osv(_('Error!'), _('You can not confirm Payment advice without advice lines.'))
advice_date = datetime.strptime(advice.date, DATETIME_FORMAT)
advice_year = advice_date.strftime('%m') + '-' + advice_date.strftime('%Y')
number = seq_obj.get(cr, uid, 'payment.advice')
@@ -183,7 +183,7 @@ class hr_payslip_run(osv.osv):
users = self.pool.get('res.users').browse(cr, uid, [uid], context=context)
for run in self.browse(cr, uid, ids, context=context):
if run.available_advice:
- raise osv.except_osv(_('Error !'), _("Payment advice already exists for %s, 'Set to Draft' to create a new advice.") %(run.name))
+ raise osv.except_osv(_('Error!'), _("Payment advice already exists for %s, 'Set to Draft' to create a new advice.") %(run.name))
advice_data = {
'batch_id': run.id,
'company_id': users[0].company_id.id,
@@ -201,7 +201,7 @@ class hr_payslip_run(osv.osv):
for slip in payslip_pool.browse(cr, uid, slip_ids, context=context):
if not slip.employee_id.bank_account_id or not slip.employee_id.bank_account_id.acc_number:
- raise osv.except_osv(_('Error !'), _('Please define bank account for the %s employee') % (slip.employee_id.name))
+ raise osv.except_osv(_('Error!'), _('Please define bank account for the %s employee') % (slip.employee_id.name))
line_ids = payslip_line_pool.search(cr, uid, [('slip_id', '=', slip.id), ('code', '=', 'NET')], context=context)
if line_ids:
line = payslip_line_pool.browse(cr, uid, line_ids, context=context)[0]
diff --git a/addons/l10n_lu/wizard/print_vat.py b/addons/l10n_lu/wizard/print_vat.py
index bfa058720d3..74b8a80b1c8 100644
--- a/addons/l10n_lu/wizard/print_vat.py
+++ b/addons/l10n_lu/wizard/print_vat.py
@@ -64,7 +64,7 @@ class report_custom(report_int):
self.obj.render()
return (self.obj.pdf, 'pdf')
except Exception:
- raise osv.except_osv(_('pdf not created !'), _('Please check if package pdftk is installed!'))
+ raise osv.except_osv(_('pdf not created!'), _('Please check if package pdftk is installed!'))
report_custom('report.l10n_lu.tax.report.print')
diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py
index d6f026530dc..87861ba8fc6 100644
--- a/addons/mrp_operations/mrp_operations.py
+++ b/addons/mrp_operations/mrp_operations.py
@@ -128,7 +128,7 @@ class mrp_production_workcenter_line(osv.osv):
elif prod_obj.state =='in_production':
return
else:
- raise osv.except_osv(_('Error!'),_('Manufacturing order cannot start in state "%s"!') % (prod_obj.state,))
+ raise osv.except_osv(_('Error!'),_('Manufacturing order cannot be started in state "%s"!') % (prod_obj.state,))
else:
oper_ids = self.search(cr,uid,[('production_id','=',prod_obj.id)])
obj = self.browse(cr,uid,oper_ids)
@@ -443,7 +443,7 @@ class mrp_operations_operation(osv.osv):
if not oper_objs:
if code.start_stop!='start':
- raise osv.except_osv(_('Sorry!'),_('Operation is not started yet !'))
+ raise osv.except_osv(_('Sorry!'),_('Operation is not started yet!'))
return False
else:
for oper in oper_objs:
diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py
index 43ee34b0c05..f7b082db74b 100644
--- a/addons/mrp_repair/mrp_repair.py
+++ b/addons/mrp_repair/mrp_repair.py
@@ -365,7 +365,7 @@ class mrp_repair(osv.osv):
if repair.state in ('draft','cancel') or repair.invoice_id:
continue
if not (repair.partner_id.id and repair.partner_invoice_id.id):
- raise osv.except_osv(_('No partner !'),_('You have to select a Partner Invoice Address in the repair form !'))
+ raise osv.except_osv(_('No partner!'),_('You have to select a Partner Invoice Address in the repair form!'))
comment = repair.quotation_notes
if (repair.invoice_method != 'none'):
if group and repair.partner_invoice_id.id in invoices_group:
@@ -582,7 +582,7 @@ class ProductChangeMixin(object):
result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id or False
if not pricelist:
warning = {
- 'title':'No Pricelist !',
+ 'title':'No Pricelist!',
'message':
'You have to select a pricelist in the Repair form !\n'
'Please set one before choosing a product.'
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index a4f2a30387a..089c577e940 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -545,7 +545,7 @@ class pos_order(osv.osv):
def unlink(self, cr, uid, ids, context=None):
for rec in self.browse(cr, uid, ids, context=context):
if rec.state not in ('draft','cancel'):
- raise osv.except_osv(_('Unable to Delete !'), _('In order to delete a sale, it must be new or cancelled.'))
+ raise osv.except_osv(_('Unable to Delete!'), _('In order to delete a sale, it must be new or cancelled.'))
return super(pos_order, self).unlink(cr, uid, ids, context=context)
def onchange_partner_id(self, cr, uid, ids, part=False, context=None):
@@ -1163,7 +1163,7 @@ class pos_order_line(osv.osv):
if not product_id:
return {}
if not pricelist:
- raise osv.except_osv(_('No Pricelist !'),
+ raise osv.except_osv(_('No Pricelist!'),
_('You have to select a pricelist in the sale form !\n' \
'Please set one before choosing a product.'))
diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py
index 97ffad805b7..30e407d2ad0 100644
--- a/addons/point_of_sale/wizard/pos_open_statement.py
+++ b/addons/point_of_sale/wizard/pos_open_statement.py
@@ -46,7 +46,7 @@ class pos_open_statement(osv.osv_memory):
st_ids = []
j_ids = journal_obj.search(cr, uid, [('journal_user','=',1)], context=context)
if not j_ids:
- raise osv.except_osv(_('No Cash Register Defined !'), _('You have to define which payment method must be available in the point of sale by reusing existing bank and cash through "Accounting / Configuration / Journals / Journals". Select a journal and check the field "PoS Payment Method" from the "Point of Sale" tab. You can also create new payment methods directly from menu "PoS Backend / Configuration / Payment Methods".'))
+ raise osv.except_osv(_('No Cash Register Defined!'), _('You have to define which payment method must be available in the point of sale by reusing existing bank and cash through "Accounting / Configuration / Journals / Journals". Select a journal and check the field "PoS Payment Method" from the "Point of Sale" tab. You can also create new payment methods directly from menu "PoS Backend / Configuration / Payment Methods".'))
for journal in journal_obj.browse(cr, uid, j_ids, context=context):
ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)], context=context)
diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py
index 672859db909..93b9417bded 100644
--- a/addons/procurement/procurement.py
+++ b/addons/procurement/procurement.py
@@ -307,7 +307,7 @@ class procurement_order(osv.osv):
move_obj = self.pool.get('stock.move')
for procurement in self.browse(cr, uid, ids, context=context):
if procurement.product_qty <= 0.00:
- raise osv.except_osv(_('Data Insufficient !'),
+ raise osv.except_osv(_('Data Insufficient!'),
_('Please check the quantity in procurement order(s) for the product "%s", it should not be 0 or less!' % procurement.product_id.name))
if procurement.product_id.type in ('product', 'consu'):
if not procurement.move_id:
diff --git a/addons/project/project.py b/addons/project/project.py
index 0b99356a9de..6435fef0be9 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -436,7 +436,7 @@ class project(osv.osv):
for project in projects:
if (not project.members) and force_members:
- raise osv.except_osv(_('Warning!'),_("You must assign members on the project '%s' !") % (project.name,))
+ raise osv.except_osv(_('Warning!'),_("You must assign members on the project '%s'!") % (project.name,))
resource_pool = self.pool.get('resource.resource')
@@ -941,7 +941,7 @@ class task(base_stage, osv.osv):
if task.child_ids:
for child in task.child_ids:
if child.state in ['draft', 'open', 'pending']:
- raise osv.except_osv(_("Warning !"), _("Child task still open.\nPlease cancel or complete child task first."))
+ raise osv.except_osv(_("Warning!"), _("Child task still open.\nPlease cancel or complete child task first."))
return True
def action_close(self, cr, uid, ids, context=None):
diff --git a/addons/project_gtd/wizard/project_gtd_empty.py b/addons/project_gtd/wizard/project_gtd_empty.py
index 36c64cbc224..3233e2534af 100644
--- a/addons/project_gtd/wizard/project_gtd_empty.py
+++ b/addons/project_gtd/wizard/project_gtd_empty.py
@@ -49,7 +49,7 @@ class project_timebox_empty(osv.osv_memory):
ids = obj_tb.search(cr, uid, [], context=context)
if not len(ids):
- raise osv.except_osv(_('Error!'), _('No timebox child of this one !'))
+ raise osv.except_osv(_('Error!'), _('No timebox child of this one!'))
tids = obj_task.search(cr, uid, [('timebox_id', '=', context['active_id'])])
for task in obj_task.browse(cr, uid, tids, context):
if (task.state in ('cancel','done')) or (task.user_id.id <> uid):
diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py
index ffee600f5a7..767cb4893b5 100644
--- a/addons/project_timesheet/project_timesheet.py
+++ b/addons/project_timesheet/project_timesheet.py
@@ -79,22 +79,22 @@ class project_work(osv.osv):
emp_id = emp_obj.search(cr, uid, [('user_id', '=', user_id)])
if not emp_id:
user_name = self.pool.get('res.users').read(cr, uid, [user_id], ['name'])[0]['name']
- raise osv.except_osv(_('Bad Configuration !'),
+ raise osv.except_osv(_('Bad Configuration!'),
_('Please define employee for user "%s". You must create one.')% (user_name,))
emp = emp_obj.browse(cr, uid, emp_id[0])
if not emp.product_id:
- raise osv.except_osv(_('Bad Configuration !'),
+ raise osv.except_osv(_('Bad Configuration!'),
_('Please define product and product category property account on the related employee.\nFill in the HR Settings tab of the employee form.'))
if not emp.journal_id:
- raise osv.except_osv(_('Bad Configuration !'),
+ raise osv.except_osv(_('Bad Configuration!'),
_('Please define journal on the related employee.\nFill in the timesheet tab of the employee form.'))
acc_id = emp.product_id.property_account_expense.id
if not acc_id:
acc_id = emp.product_id.categ_id.property_account_expense_categ.id
if not acc_id:
- raise osv.except_osv(_('Bad Configuration !'),
+ raise osv.except_osv(_('Bad Configuration!'),
_('Please define product and product category property account on the related employee.\nFill in the timesheet tab of the employee form.'))
res['product_id'] = emp.product_id.id
@@ -286,7 +286,7 @@ class account_analytic_line(osv.osv):
st = acc.to_invoice.id
res['value']['to_invoice'] = st or False
if acc.state == 'close' or acc.state == 'cancelled':
- raise osv.except_osv(_('Invalid Analytic Account !'), _('You cannot select a Analytic Account which is in Close or Cancelled state.'))
+ raise osv.except_osv(_('Invalid Analytic Account!'), _('You cannot select a Analytic Account which is in Close or Cancelled state.'))
return res
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 210e4dd3be6..0f54f3fc133 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -273,7 +273,7 @@ class sale_order(osv.osv):
if s['state'] in ['draft', 'cancel']:
unlink_ids.append(s['id'])
else:
- raise osv.except_osv(_('Invalid Action!'), _('In order to delete a confirmed sales order, you must cancel it before !'))
+ raise osv.except_osv(_('Invalid Action!'), _('In order to delete a confirmed sales order, you must cancel it before!'))
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
@@ -870,7 +870,7 @@ class sale_order_line(osv.osv):
context = context or {}
lang = lang or context.get('lang',False)
if not partner_id:
- raise osv.except_osv(_('No Customer Defined !'), _('Before choosing a product,\n select a customer in the sales form.'))
+ raise osv.except_osv(_('No Customer Defined!'), _('Before choosing a product,\n select a customer in the sales form.'))
warning = {}
product_uom_obj = self.pool.get('product.uom')
partner_obj = self.pool.get('res.partner')
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
index 6bea6286456..0470bab4f8b 100644
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ b/addons/sale_crm/wizard/crm_make_sale.py
@@ -87,7 +87,7 @@ class crm_make_sale(osv.osv_memory):
['default', 'invoice', 'delivery', 'contact'])
pricelist = partner.property_product_pricelist.id
if False in partner_addr.values():
- raise osv.except_osv(_('Insufficient Data!'), _('No addresse(s) defined for this customer.'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No addresse(es) defined for this customer.'))
vals = {
'origin': _('Opportunity: %s') % str(case.id),
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 764d9de453e..2c293ab896c 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1109,7 +1109,7 @@ class stock_picking(osv.osv):
if isinstance(partner, int):
partner = partner_obj.browse(cr, uid, [partner], context=context)[0]
if not partner:
- raise osv.except_osv(_('Error, no partner !'),
+ raise osv.except_osv(_('Error, no partner!'),
_('Please put a partner on the picking list if you want to generate invoice.'))
if not inv_type:
@@ -1763,7 +1763,7 @@ class stock_move(osv.osv):
for move in self.browse(cr, uid, ids, context=context):
if move.state == 'done':
if frozen_fields.intersection(vals):
- raise osv.except_osv(_('Operation forbidden !'),
+ raise osv.except_osv(_('Operation Forbidden!'),
_('Quantities, Units of Measure, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator).'))
return super(stock_move, self).write(cr, uid, ids, vals, context=context)
diff --git a/addons/subscription/subscription.py b/addons/subscription/subscription.py
index b7ae720c187..98e1d78b3be 100644
--- a/addons/subscription/subscription.py
+++ b/addons/subscription/subscription.py
@@ -115,7 +115,7 @@ class subscription_subscription(osv.osv):
id = int(id)
model = self.pool[model_name]
except:
- raise osv.except_osv(_('Wrong Source Document !'), _('Please provide another source document.\nThis one does not exist !'))
+ raise osv.except_osv(_('Wrong Source Document!'), _('Please provide another source document.\nThis one does not exist!'))
default = {'state':'draft'}
doc_obj = self.pool.get('subscription.document')
@@ -142,7 +142,7 @@ class subscription_subscription(osv.osv):
def unlink(self, cr, uid, ids, context=None):
for record in self.browse(cr, uid, ids, context or {}):
if record.state=="running":
- raise osv.except_osv(_('Error!'),_('You cannot delete an active subscription !'))
+ raise osv.except_osv(_('Error!'),_('You cannot delete an active subscription!'))
return super(subscription_subscription, self).unlink(cr, uid, ids, context)
def set_done(self, cr, uid, ids, context=None):
diff --git a/addons/warning/warning.py b/addons/warning/warning.py
index e9e9161bacb..8e1168e5d35 100644
--- a/addons/warning/warning.py
+++ b/addons/warning/warning.py
@@ -63,7 +63,7 @@ class sale_order(osv.osv):
partner = self.pool.get('res.partner').browse(cr, uid, part, context=context)
if partner.sale_warn != 'no-message':
if partner.sale_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.sale_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.sale_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.sale_warn_msg
warning = {
@@ -91,7 +91,7 @@ class purchase_order(osv.osv):
partner = self.pool.get('res.partner').browse(cr, uid, part)
if partner.purchase_warn != 'no-message':
if partner.purchase_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.purchase_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.purchase_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.purchase_warn_msg
warning = {
@@ -124,7 +124,7 @@ class account_invoice(osv.osv):
partner = self.pool.get('res.partner').browse(cr, uid, partner_id)
if partner.invoice_warn != 'no-message':
if partner.invoice_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.invoice_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.invoice_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.invoice_warn_msg
@@ -155,7 +155,7 @@ class stock_picking(osv.osv):
message = False
if partner.picking_warn != 'no-message':
if partner.picking_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.picking_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.picking_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.picking_warn_msg
warning = {
@@ -184,7 +184,7 @@ class stock_picking_in(osv.osv):
message = False
if partner.picking_warn != 'no-message':
if partner.picking_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.picking_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.picking_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.picking_warn_msg
warning = {
@@ -210,7 +210,7 @@ class stock_picking_out(osv.osv):
message = False
if partner.picking_warn != 'no-message':
if partner.picking_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.picking_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.picking_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.picking_warn_msg
warning = {
@@ -257,7 +257,7 @@ class sale_order_line(osv.osv):
if product_info.sale_line_warn != 'no-message':
if product_info.sale_line_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (product_info.name), product_info.sale_line_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (product_info.name), product_info.sale_line_warn_msg)
title = _("Warning for %s") % product_info.name
message = product_info.sale_line_warn_msg
warning['title'] = title
@@ -289,7 +289,7 @@ class purchase_order_line(osv.osv):
if product_info.purchase_line_warn != 'no-message':
if product_info.purchase_line_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (product_info.name), product_info.purchase_line_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (product_info.name), product_info.purchase_line_warn_msg)
title = _("Warning for %s") % product_info.name
message = product_info.purchase_line_warn_msg
warning['title'] = title
From dd7614e71623848d84c7f89c5416dd6dc6c0023c Mon Sep 17 00:00:00 2001
From: ggh-openerp
Date: Mon, 29 Apr 2013 12:59:38 +0530
Subject: [PATCH 156/373] [IMP] Remove space before Exclamation marks [!] in
Warning
bzr revid: ggh@tinyerp.com-20130429072938-knas9ymmny5o2z0v
---
openerp/addons/base/ir/ir_actions.py | 2 +-
openerp/addons/base/ir/ir_values.py | 4 ++--
openerp/addons/base/module/wizard/base_module_import.py | 6 +++---
openerp/addons/base/module/wizard/base_module_upgrade.py | 2 +-
openerp/addons/base/res/res_lang.py | 6 +++---
openerp/addons/base/res/res_partner.py | 6 +++---
6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/openerp/addons/base/ir/ir_actions.py b/openerp/addons/base/ir/ir_actions.py
index a130ab13a32..aaaa8513925 100644
--- a/openerp/addons/base/ir/ir_actions.py
+++ b/openerp/addons/base/ir/ir_actions.py
@@ -657,7 +657,7 @@ class actions_server(osv.osv):
if action.state=='client_action':
if not action.action_id:
- raise osv.except_osv(_('Error'), _("Please specify an action to launch !"))
+ raise osv.except_osv(_('Error'), _("Please specify an action to launch!"))
return self.pool[action.action_id.type].read(cr, uid, action.action_id.id, context=context)
if action.state=='code':
diff --git a/openerp/addons/base/ir/ir_values.py b/openerp/addons/base/ir/ir_values.py
index dd8501230ec..a21b034d1b0 100644
--- a/openerp/addons/base/ir/ir_values.py
+++ b/openerp/addons/base/ir/ir_values.py
@@ -411,8 +411,8 @@ class ir_values(osv.osv):
(tuple(groups), uid))
if not cr.fetchone():
if action['name'] == 'Menuitem':
- raise osv.except_osv('Error !',
- 'You do not have the permission to perform this operation !!!')
+ raise osv.except_osv('Error!',
+ 'You do not have the permission to perform this operation!!!')
continue
# keep only the first action registered for each action name
results[action['name']] = (action['id'], action['name'], action_def)
diff --git a/openerp/addons/base/module/wizard/base_module_import.py b/openerp/addons/base/module/wizard/base_module_import.py
index 67408b60669..61694d5f8c3 100644
--- a/openerp/addons/base/module/wizard/base_module_import.py
+++ b/openerp/addons/base/module/wizard/base_module_import.py
@@ -55,7 +55,7 @@ class base_module_import(osv.osv_memory):
try:
file_data = zipfile.ZipFile(fp, 'r')
except zipfile.BadZipfile:
- raise osv.except_osv(_('Error !'), _('File is not a zip file!'))
+ raise osv.except_osv(_('Error!'), _('File is not a zip file!'))
init_file_name = sorted(file_data.namelist())[0]
module_name = os.path.split(init_file_name)[0]
@@ -63,8 +63,8 @@ class base_module_import(osv.osv_memory):
try:
zip_file = open(file_path, 'wb')
except IOError:
- raise osv.except_osv(_('Error !'),
- _('Can not create the module file: %s !') % \
+ raise osv.except_osv(_('Error!'),
+ _('Can not create the module file: %s!') % \
(file_path,) )
zip_file.write(zip_data)
zip_file.close()
diff --git a/openerp/addons/base/module/wizard/base_module_upgrade.py b/openerp/addons/base/module/wizard/base_module_upgrade.py
index c081663d8ed..c75058ab835 100644
--- a/openerp/addons/base/module/wizard/base_module_upgrade.py
+++ b/openerp/addons/base/module/wizard/base_module_upgrade.py
@@ -81,7 +81,7 @@ class base_module_upgrade(osv.osv_memory):
(tuple(ids), ('uninstalled',)))
unmet_packages = [x[0] for x in cr.fetchall()]
if unmet_packages:
- raise osv.except_osv(_('Unmet dependency !'),
+ raise osv.except_osv(_('Unmet Dependency!'),
_('Following modules are not installed or unknown: %s') % ('\n\n' + '\n'.join(unmet_packages)))
ir_module.download(cr, uid, ids, context=context)
diff --git a/openerp/addons/base/res/res_lang.py b/openerp/addons/base/res/res_lang.py
index 9abab79e46c..160e86fd8d2 100644
--- a/openerp/addons/base/res/res_lang.py
+++ b/openerp/addons/base/res/res_lang.py
@@ -182,11 +182,11 @@ class lang(osv.osv):
for language in languages:
ctx_lang = context.get('lang')
if language['code']=='en_US':
- raise osv.except_osv(_('User Error'), _("Base Language 'en_US' can not be deleted !"))
+ raise osv.except_osv(_('User Error'), _("Base Language 'en_US' can not be deleted!"))
if ctx_lang and (language['code']==ctx_lang):
- raise osv.except_osv(_('User Error'), _("You cannot delete the language which is User's Preferred Language !"))
+ raise osv.except_osv(_('User Error'), _("You cannot delete the language which is User's Preferred Language!"))
if language['active']:
- raise osv.except_osv(_('User Error'), _("You cannot delete the language which is Active !\nPlease de-activate the language first."))
+ raise osv.except_osv(_('User Error'), _("You cannot delete the language which is Active!\nPlease de-activate the language first."))
trans_obj = self.pool.get('ir.translation')
trans_ids = trans_obj.search(cr, uid, [('lang','=',language['code'])], context=context)
trans_obj.unlink(cr, uid, trans_ids, context=context)
diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py
index 404fe5696c7..5ac5f1212f7 100644
--- a/openerp/addons/base/res/res_partner.py
+++ b/openerp/addons/base/res/res_partner.py
@@ -446,7 +446,7 @@ class res_partner(osv.osv, format_address):
commercial_fields = self._commercial_fields(cr, uid, context=context)
sync_vals = self._update_fields_values(cr, uid, partner.commercial_partner_id,
commercial_fields, context=context)
- return self.write(cr, uid, partner.id, sync_vals, context=context)
+ partner.write(sync_vals)
def _commercial_sync_to_children(self, cr, uid, partner, context=None):
""" Handle sync of commercial fields to descendants """
@@ -472,7 +472,7 @@ class res_partner(osv.osv, format_address):
use_parent_address=partner.use_parent_address,
parent_id=partner.parent_id.id,
context=context).get('value', {})
- self.update_address(cr, uid, partner.id, onchange_vals, context=context)
+ partner.update_address(onchange_vals)
# 2. To DOWNSTREAM: sync children
if partner.child_ids:
@@ -575,7 +575,7 @@ class res_partner(osv.osv, format_address):
context = {}
name, email = self._parse_partner_name(name, context=context)
if context.get('force_email') and not email:
- raise osv.except_osv(_('Warning'), _("Couldn't create contact without email address !"))
+ raise osv.except_osv(_('Warning'), _("Couldn't create contact without email address!"))
if not name and email:
name = email
rec_id = self.create(cr, uid, {self._rec_name: name or email, 'email': email or False}, context=context)
From e8ef63e0c0120cc8381551def5852c7e64311406 Mon Sep 17 00:00:00 2001
From: ggh-openerp
Date: Mon, 29 Apr 2013 14:59:24 +0530
Subject: [PATCH 157/373] [IMP] Improve warning title
bzr revid: ggh@tinyerp.com-20130429092924-2qgaxvkfb801q4dl
---
addons/account_voucher/account_voucher.py | 2 +-
addons/edi/models/edi.py | 2 +-
addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 2 +-
addons/l10n_lu/wizard/print_vat.py | 2 +-
addons/portal/wizard/portal_wizard.py | 2 +-
addons/share/wizard/share_wizard.py | 4 ++--
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index 52d44e84d48..2163c735735 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -1535,7 +1535,7 @@ class account_bank_statement(osv.osv):
for bk_st in self.browse(cr, uid, ids, context=context):
if vals.get('journal_id') and bk_st.line_ids:
if any([x.voucher_id and True or False for x in bk_st.line_ids]):
- raise osv.except_osv(_('Unable to change journal !'), _('You can not change the journal as you already reconciled some statement lines!'))
+ raise osv.except_osv(_('Unable To Change Journal!'), _('You can not change the journal as you already reconciled some statement lines!'))
return super(account_bank_statement, self).write(cr, uid, ids, vals, context=context)
diff --git a/addons/edi/models/edi.py b/addons/edi/models/edi.py
index bfd59dae15a..1b9e0c4df08 100644
--- a/addons/edi/models/edi.py
+++ b/addons/edi/models/edi.py
@@ -126,7 +126,7 @@ class edi(osv.AbstractModel):
module = edi_document.get('__import_module') or edi_document.get('__module')
assert module, 'a `__module` or `__import_module` attribute is required in each EDI document.'
if module != 'base' and not ir_module.search(cr, uid, [('name','=',module),('state','=','installed')]):
- raise osv.except_osv(_('Missing application.'),
+ raise osv.except_osv(_('Missing Application.'),
_("The document you are trying to import requires the OpenERP `%s` application. "
"You can install it by connecting as the administrator and opening the configuration assistant.")%(module,))
model = edi_document.get('__import_model') or edi_document.get('__model')
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index 4e2e7911094..6c4f6022c39 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -181,7 +181,7 @@ class account_analytic_line(osv.osv):
for account in analytic_account_obj.browse(cr, uid, list(account_ids), context=context):
partner = account.partner_id
if (not partner) or not (account.pricelist_id):
- raise osv.except_osv(_('Analytic Account incomplete!'),
+ raise osv.except_osv(_('Analytic Account Incomplete!'),
_('Contract incomplete. Please fill in the Customer and Pricelist fields.'))
date_due = False
diff --git a/addons/l10n_lu/wizard/print_vat.py b/addons/l10n_lu/wizard/print_vat.py
index 74b8a80b1c8..04d4fe9a3b7 100644
--- a/addons/l10n_lu/wizard/print_vat.py
+++ b/addons/l10n_lu/wizard/print_vat.py
@@ -64,7 +64,7 @@ class report_custom(report_int):
self.obj.render()
return (self.obj.pdf, 'pdf')
except Exception:
- raise osv.except_osv(_('pdf not created!'), _('Please check if package pdftk is installed!'))
+ raise osv.except_osv(_('PDF Not Created!'), _('Please check if package pdftk is installed!'))
report_custom('report.l10n_lu.tax.report.print')
diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py
index e3047cd5edb..61b23f4f07b 100644
--- a/addons/portal/wizard/portal_wizard.py
+++ b/addons/portal/wizard/portal_wizard.py
@@ -190,7 +190,7 @@ class wizard_user(osv.osv_memory):
this_context = context
this_user = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context)
if not this_user.email:
- raise osv.except_osv(_('Email required'),
+ raise osv.except_osv(_('Email Required'),
_('You must have an email address in your User Preferences to send emails.'))
# determine subject and body in the portal user's language
diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py
index 3a26dcb9e6b..c70164749fd 100644
--- a/addons/share/wizard/share_wizard.py
+++ b/addons/share/wizard/share_wizard.py
@@ -831,7 +831,7 @@ class share_wizard(osv.TransientModel):
notification_obj = self.pool.get('mail.notification')
user = self.pool.get('res.users').browse(cr, UID_ROOT, uid)
if not user.email:
- raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
+ raise osv.except_osv(_('Email Required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
# TODO: also send an HTML version of this mail
for result_line in wizard_data.result_line_ids:
@@ -862,7 +862,7 @@ class share_wizard(osv.TransientModel):
mail_mail = self.pool.get('mail.mail')
user = self.pool.get('res.users').browse(cr, UID_ROOT, uid)
if not user.email:
- raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
+ raise osv.except_osv(_('Email Required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
# TODO: also send an HTML version of this mail
mail_ids = []
From b15a01ff1e9131b363c0a695912ee39aa1d1a590 Mon Sep 17 00:00:00 2001
From: ggh-openerp
Date: Mon, 29 Apr 2013 15:58:55 +0530
Subject: [PATCH 158/373] [IMP] Improved typos in warning
bzr revid: ggh@tinyerp.com-20130429102855-jrixaqvo4xqc2fix
---
addons/web/static/src/js/chrome.js | 21 +++---
addons/web/static/src/js/view_form.js | 97 ++++++++++++++++++++-------
2 files changed, 80 insertions(+), 38 deletions(-)
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index 3870a7999b4..f357f6ac2e6 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -251,9 +251,9 @@ instance.web.CrashManager = instance.web.Class.extend({
if (handler) {
new (handler)(this, error).display();
return;
- };
+ }
if (error.data.name === "openerp.addons.web.session SessionExpiredException") {
- this.show_warning({type: "Session Expired", data: { message: "Your OpenERP session expired. Please refresh the current web page." }});
+ this.show_warning({type: "Session Expired", data: { message: _t("Your OpenERP session expired. Please refresh the current web page.") }});
return;
}
if (error.data.exception_type === "except_osv" || error.data.exception_type === "warning"
@@ -530,16 +530,11 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
'login': 'admin',
'password': form_obj['create_admin_pwd'],
'login_successful': function() {
- var action = {
- type: "ir.actions.client",
- tag: 'reload',
- params: {
- url_search : {
- db: form_obj['db_name'],
- },
- }
- };
- self.do_action(action);
+ var url = '/?db=' + form_obj['db_name'];
+ if (self.session.debug) {
+ url += '&debug';
+ }
+ instance.web.redirect(url);
},
},
_push_me: false,
@@ -1374,7 +1369,7 @@ instance.web.WebClient = instance.web.Client.extend({
if (browser_offset !== user_offset) {
var $icon = $(QWeb.render('WebClient.timezone_systray'));
$icon.on('click', function() {
- var notification = self.do_warn(_t("Timezone mismatch"), QWeb.render('WebClient.timezone_notification', {
+ var notification = self.do_warn(_t("Timezone Mismatch"), QWeb.render('WebClient.timezone_notification', {
user_timezone: instance.session.user_context.tz || 'UTC',
user_offset: user_offset,
browser_offset: browser_offset,
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 53a7425c036..3269e07c186 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -765,7 +765,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
this.has_been_loaded.done(function() {
if (self.datarecord.id && confirm(_t("Do you really want to delete this record?"))) {
self.dataset.unlink([self.datarecord.id]).done(function() {
- self.execute_pager_action('next');
+ if (self.dataset.size()) {
+ self.execute_pager_action('next');
+ } else {
+ self.do_action('history_back');
+ }
def.resolve();
});
} else {
@@ -802,6 +806,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
if (save_obj.error)
return $.Deferred().reject();
return $.when.apply($, save_obj.ret);
+ }).done(function() {
+ self.$el.removeClass('oe_form_dirty');
});
},
_process_save: function(save_obj) {
@@ -1021,7 +1027,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
return value;
}
var fields = _.chain(this.fields)
- .map(function (field, name) {
+ .map(function (field) {
var value = field.get_value();
// ignore fields which are empty, invisible, readonly, o2m
// or m2m
@@ -1036,7 +1042,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
}
return {
- name: name,
+ name: field.name,
string: field.string,
value: value,
displayed: display(field, value),
@@ -1047,10 +1053,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
.value();
var conditions = _.chain(self.fields)
.filter(function (field) { return field.field.change_default; })
- .map(function (field, name) {
+ .map(function (field) {
var value = field.get_value();
return {
- name: name,
+ name: field.name,
string: field.string,
value: value,
displayed: display(field, value),
@@ -1444,6 +1450,9 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
$(this).children().each(function() {
var $td = $(this),
$child = $td.children(':first');
+ if ($child.attr('cell-class')) {
+ $td.addClass($child.attr('cell-class'));
+ }
switch ($child[0].tagName.toLowerCase()) {
case 'separator':
break;
@@ -1520,7 +1529,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
if (! page.__ic)
return;
page.__ic.on("change:effective_invisible", null, function() {
- if (!page.__ic.get('effective_invisible')) {
+ if (!page.__ic.get('effective_invisible') && page.autofocus) {
$new_notebook.tabs('select', i);
return;
}
@@ -2126,7 +2135,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
value without triggering a re-rendering.
*/
internal_set_value: function(value_) {
- var tmp = this.no_render;
+ var tmp = this.no_rerender;
this.no_rerender = true;
this.set({'value': value_});
this.no_rerender = tmp;
@@ -2296,7 +2305,8 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
return this.get('value') === '' || this._super();
},
focus: function() {
- this.$('input:first')[0].focus();
+ var input = this.$('input:first')[0];
+ return input ? input.focus() : false;
},
set_dimensions: function (height, width) {
this._super(height, width);
@@ -2333,7 +2343,7 @@ instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({
},
on_button_clicked: function() {
if (!this.get('value') || !this.is_syntax_valid()) {
- this.do_warn(_t("E-mail error"), _t("Can't send email to invalid e-mail address"));
+ this.do_warn(_t("E-mail Error"), _t("Can't send email to invalid e-mail address"));
} else {
location.href = 'mailto:' + this.get('value');
}
@@ -2363,7 +2373,7 @@ instance.web.form.FieldUrl = instance.web.form.FieldChar.extend({
},
on_button_clicked: function() {
if (!this.get('value')) {
- this.do_warn(_t("Resource error"), _t("This resource is empty"));
+ this.do_warn(_t("Resource Error"), _t("This resource is empty"));
} else {
var url = $.trim(this.get('value'));
if(/^www\./i.test(url))
@@ -2393,7 +2403,8 @@ instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({
this._super.apply(this, [value_]);
},
focus: function () {
- this.$('input:first').select();
+ var $input = this.$('input:first');
+ return $input.length ? $input.select() : false;
}
});
@@ -2413,6 +2424,42 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({
this.$input = this.$el.find('input.oe_datepicker_master');
this.$input_picker = this.$el.find('input.oe_datepicker_container');
+ $.datepicker.setDefaults({
+ clearText: _t('Clear'),
+ clearStatus: _t('Erase the current date'),
+ closeText: _t('Done'),
+ closeStatus: _t('Close without change'),
+ prevText: _t(''),
+ nextStatus: _t('Show the next month'),
+ currentText: _t('Today'),
+ currentStatus: _t('Show the current month'),
+ monthNames: Date.CultureInfo.monthNames,
+ monthNamesShort: Date.CultureInfo.abbreviatedMonthNames,
+ monthStatus: _t('Show a different month'),
+ yearStatus: _t('Show a different year'),
+ weekHeader: _t('Wk'),
+ weekStatus: _t('Week of the year'),
+ dayNames: Date.CultureInfo.dayNames,
+ dayNamesShort: Date.CultureInfo.abbreviatedDayNames,
+ dayNamesMin: Date.CultureInfo.shortestDayNames,
+ dayStatus: _t('Set DD as first week day'),
+ dateStatus: _t('Select D, M d'),
+ firstDay: Date.CultureInfo.firstDayOfWeek,
+ initStatus: _t('Select a date'),
+ isRTL: false
+ });
+ $.timepicker.setDefaults({
+ timeOnlyTitle: _t('Choose Time'),
+ timeText: _t('Time'),
+ hourText: _t('Hour'),
+ minuteText: _t('Minute'),
+ secondText: _t('Second'),
+ currentText: _t('Now'),
+ closeText: _t('Done')
+ });
+
this.picker({
onClose: this.on_picker_select,
onSelect: this.on_picker_select,
@@ -2539,9 +2586,8 @@ instance.web.form.FieldDatetime = instance.web.form.AbstractField.extend(instanc
return this.get('value') === '' || this._super();
},
focus: function() {
- if (this.datewidget && this.datewidget.$input) {
- this.datewidget.$input[0].focus();
- }
+ var input = this.datewidget && this.datewidget.$input[0];
+ return input ? input.focus() : false;
},
set_dimensions: function (height, width) {
this._super(height, width);
@@ -2622,9 +2668,8 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
return this.get('value') === '' || this._super();
},
focus: function($el) {
- if (!this.get("effective_readonly") && this.$textarea) {
- this.$textarea[0].focus();
- }
+ var input = !this.get("effective_readonly") && this.$textarea && this.$textarea[0];
+ return input ? input.focus() : false;
},
set_dimensions: function (height, width) {
this._super(height, width);
@@ -2707,7 +2752,8 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({
this.$checkbox[0].checked = this.get('value');
},
focus: function() {
- this.$checkbox[0].focus();
+ var input = this.$checkbox && this.$checkbox[0];
+ return input ? input.focus() : false;
}
});
@@ -2793,7 +2839,8 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instan
}
},
focus: function() {
- this.$('select:first')[0].focus();
+ var input = this.$('select:first')[0];
+ return input ? input.focus() : false;
},
set_dimensions: function (height, width) {
this._super(height, width);
@@ -3336,7 +3383,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
}
if (! no_recurse) {
var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.build_context());
- dataset.name_get([self.get("value")]).done(function(data) {
+ this.alive(dataset.name_get([self.get("value")])).done(function(data) {
self.display_value["" + self.get("value")] = data[0][1];
self.render_value(true);
});
@@ -3401,9 +3448,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
return ! this.get("value");
},
focus: function () {
- if (!this.get('effective_readonly')) {
- this.$input && this.$input[0].focus();
- }
+ var input = !this.get('effective_readonly') && this.$input && this.$input[0];
+ return input ? input.focus() : false;
},
_quick_create: function() {
this.no_ed = true;
@@ -4263,7 +4309,8 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
this.set({'value': _.uniq(this.get('value').concat([id]))});
},
focus: function () {
- this.$text[0].focus();
+ var input = this.$text && this.$text[0];
+ return input ? input.focus() : false;
},
set_dimensions: function (height, width) {
this._super(height, width);
@@ -5311,7 +5358,7 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
}
if (result.error || !result.id ) {
- this.do_warn( _t('Uploading error'), result.error);
+ this.do_warn( _t('Uploading Error'), result.error);
delete this.data[0];
} else {
if (this.data[0] && this.data[0].filename == result.filename && this.data[0].upload) {
From 058c816a8e79dcef85528f0ab418887e03007215 Mon Sep 17 00:00:00 2001
From: ggh-openerp
Date: Mon, 29 Apr 2013 16:28:49 +0530
Subject: [PATCH 159/373] [IMP] Improved code
bzr revid: ggh@tinyerp.com-20130429105849-2peih2y8kknt65tu
---
openerp/addons/base/ir/ir_mail_server.py | 4 ++--
openerp/addons/base/ir/ir_model.py | 2 +-
openerp/addons/base/ir/workflow/workflow.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/openerp/addons/base/ir/ir_mail_server.py b/openerp/addons/base/ir/ir_mail_server.py
index 10fc5f82187..93b213461a7 100644
--- a/openerp/addons/base/ir/ir_mail_server.py
+++ b/openerp/addons/base/ir/ir_mail_server.py
@@ -213,14 +213,14 @@ class ir_mail_server(osv.osv):
password=smtp_server.smtp_pass, encryption=smtp_server.smtp_encryption,
smtp_debug=smtp_server.smtp_debug)
except Exception, e:
- raise osv.except_osv(_("Connection test failed!"), _("Here is what we got instead:\n %s") % tools.ustr(e))
+ raise osv.except_osv(_("Connection Test Failed!"), _("Here is what we got instead:\n %s") % tools.ustr(e))
finally:
try:
if smtp: smtp.quit()
except Exception:
# ignored, just a consequence of the previous exception
pass
- raise osv.except_osv(_("Connection test succeeded!"), _("Everything seems properly set up!"))
+ raise osv.except_osv(_("Connection Test Succeeded!"), _("Everything seems properly set up!"))
def connect(self, host, port, user=None, password=None, encryption=False, smtp_debug=False):
"""Returns a new SMTP connection to the give SMTP server, authenticated
diff --git a/openerp/addons/base/ir/ir_model.py b/openerp/addons/base/ir/ir_model.py
index 222d8f34c9c..165fd8a4be9 100644
--- a/openerp/addons/base/ir/ir_model.py
+++ b/openerp/addons/base/ir/ir_model.py
@@ -82,7 +82,7 @@ class ir_model(osv.osv):
return []
__, operator, value = domain[0]
if operator not in ['=', '!=']:
- raise osv.except_osv(_('Invalid search criterions'), _('The osv_memory field can only be compared with = and != operator.'))
+ raise osv.except_osv(_("Invalid Search Criteria"), _('The osv_memory field can only be compared with = and != operator.'))
value = bool(value) if operator == '=' else not bool(value)
all_model_ids = self.search(cr, uid, [], context=context)
is_osv_mem = self._is_osv_memory(cr, uid, all_model_ids, 'osv_memory', arg=None, context=context)
diff --git a/openerp/addons/base/ir/workflow/workflow.py b/openerp/addons/base/ir/workflow/workflow.py
index 0ce951940a9..a7e792072e3 100644
--- a/openerp/addons/base/ir/workflow/workflow.py
+++ b/openerp/addons/base/ir/workflow/workflow.py
@@ -94,7 +94,7 @@ class wkf_activity(osv.osv):
def unlink(self, cr, uid, ids, context=None):
if context is None: context = {}
if not context.get('_force_unlink') and self.pool.get('workflow.workitem').search(cr, uid, [('act_id', 'in', ids)]):
- raise osv.except_osv(_('Operation forbidden'),
+ raise osv.except_osv(_('Operation Forbidden'),
_('Please make sure no workitems refer to an activity before deleting it!'))
super(wkf_activity, self).unlink(cr, uid, ids, context=context)
From de13720f0e09c36c2a65d8bf16c88deee7db8c84 Mon Sep 17 00:00:00 2001
From: Xavier Morel
Date: Mon, 29 Apr 2013 14:24:23 +0200
Subject: [PATCH 160/373] [IMP] rng of field tag in data xml
also fix nonsensical XML files specifying @ref and @model
bzr revid: xmo@openerp.com-20130429122423-qubsy2ccwo5tb8bq
---
openerp/addons/base/ir/ir_actions.xml | 2 +-
openerp/addons/base/ir/ir_filters.xml | 2 +-
openerp/addons/base/res/res_security.xml | 4 +-
openerp/import_xml.rng | 94 ++++++++++++++++++------
4 files changed, 75 insertions(+), 27 deletions(-)
diff --git a/openerp/addons/base/ir/ir_actions.xml b/openerp/addons/base/ir/ir_actions.xml
index 82514692c06..145627058ef 100644
--- a/openerp/addons/base/ir/ir_actions.xml
+++ b/openerp/addons/base/ir/ir_actions.xml
@@ -297,7 +297,7 @@
Property multi-company
-
+ ['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]
diff --git a/openerp/addons/base/ir/ir_filters.xml b/openerp/addons/base/ir/ir_filters.xml
index 72c5dad8885..88cc4b9838a 100644
--- a/openerp/addons/base/ir/ir_filters.xml
+++ b/openerp/addons/base/ir/ir_filters.xml
@@ -4,7 +4,7 @@
ir.filters.owner
-
+ [('user_id','in',[False,user.id])]
diff --git a/openerp/addons/base/res/res_security.xml b/openerp/addons/base/res/res_security.xml
index 783243411ef..0c8c0202d60 100644
--- a/openerp/addons/base/res/res_security.xml
+++ b/openerp/addons/base/res/res_security.xml
@@ -16,7 +16,7 @@
company rule
-
+ [('id','child_of',[user.company_id.id])]
@@ -25,7 +25,7 @@
user rule
-
+ [('company_ids','child_of',[user.company_id.id])]
diff --git a/openerp/import_xml.rng b/openerp/import_xml.rng
index 5f4c40b65d3..c055009a35d 100644
--- a/openerp/import_xml.rng
+++ b/openerp/import_xml.rng
@@ -1,17 +1,18 @@
-
+
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -125,19 +126,66 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ char
+ file
+
+
-
-
+
+
+ int
+
+
+ None
+
+
+
+ float
+
+
+
+
+
+ list
+ tuple
+
+
+
+
+
+
+
+ html
+ xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From de4c781392fbf6a818e0f98605bb6277762c0fa2 Mon Sep 17 00:00:00 2001
From: Xavier Morel
Date: Mon, 29 Apr 2013 14:38:31 +0200
Subject: [PATCH 161/373] [FIX] turns out @model is optional on field when
using @search
it's required on @value though.
or on recursive @field calls, but let's just ignore that eldritch horror
bzr revid: xmo@openerp.com-20130429123831-waj3snv8pqcfda1n
---
openerp/import_xml.rng | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openerp/import_xml.rng b/openerp/import_xml.rng
index c055009a35d..716a525b496 100644
--- a/openerp/import_xml.rng
+++ b/openerp/import_xml.rng
@@ -178,7 +178,7 @@
-
+
From 7a2d912964ee6d6f4076c31bb4e4e8213846df75 Mon Sep 17 00:00:00 2001
From: Xavier Morel
Date: Mon, 29 Apr 2013 14:43:33 +0200
Subject: [PATCH 162/373] [REM] bunch of nonsensical @model + @ref
bzr revid: xmo@openerp.com-20130429124333-p1h11fpy04y3sljy
---
.../security/account_analytic_default_security.xml | 2 +-
.../account_followup/security/account_followup_security.xml | 2 +-
.../account_payment/security/account_payment_security.xml | 6 +++---
.../account_voucher/security/account_voucher_security.xml | 4 ++--
addons/analytic/security/analytic_security.xml | 4 ++--
addons/hr/security/hr_security.xml | 4 ++--
addons/hr_attendance/security/ir_rule.xml | 4 ++--
addons/hr_evaluation/security/hr_evaluation_security.xml | 4 ++--
addons/hr_expense/security/ir_rule.xml | 6 +++---
addons/hr_holidays/security/ir_rule.xml | 4 ++--
addons/hr_payroll/security/hr_security.xml | 4 ++--
addons/hr_recruitment/security/hr_recruitment_security.xml | 2 +-
addons/hr_timesheet/security/hr_timesheet_security.xml | 4 ++--
addons/mrp_repair/security/mrp_repair_security.xml | 2 +-
addons/note/security/ir.rule.xml | 4 ++--
15 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/addons/account_analytic_default/security/account_analytic_default_security.xml b/addons/account_analytic_default/security/account_analytic_default_security.xml
index 63c6e30eb22..cdce2a9955e 100644
--- a/addons/account_analytic_default/security/account_analytic_default_security.xml
+++ b/addons/account_analytic_default/security/account_analytic_default_security.xml
@@ -4,7 +4,7 @@
Analytic Default multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/addons/account_followup/security/account_followup_security.xml b/addons/account_followup/security/account_followup_security.xml
index 1586403d701..69c9a44a1b9 100644
--- a/addons/account_followup/security/account_followup_security.xml
+++ b/addons/account_followup/security/account_followup_security.xml
@@ -4,7 +4,7 @@
Account Follow-up multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/addons/account_payment/security/account_payment_security.xml b/addons/account_payment/security/account_payment_security.xml
index 4bca00eaa6d..fbe29699e86 100644
--- a/addons/account_payment/security/account_payment_security.xml
+++ b/addons/account_payment/security/account_payment_security.xml
@@ -15,21 +15,21 @@
Payment Mode company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]Payment order multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]Payment line multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/addons/account_voucher/security/account_voucher_security.xml b/addons/account_voucher/security/account_voucher_security.xml
index 04540fd8aa0..daa5934b256 100644
--- a/addons/account_voucher/security/account_voucher_security.xml
+++ b/addons/account_voucher/security/account_voucher_security.xml
@@ -3,13 +3,13 @@
Voucher multi-company
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]Voucher Line multi-company
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/addons/analytic/security/analytic_security.xml b/addons/analytic/security/analytic_security.xml
index 70688275de2..bf103ca8988 100644
--- a/addons/analytic/security/analytic_security.xml
+++ b/addons/analytic/security/analytic_security.xml
@@ -4,14 +4,14 @@
Analytic multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]Analytic line multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml
index 8f3697f234a..4383f2d6c74 100644
--- a/addons/hr/security/hr_security.xml
+++ b/addons/hr/security/hr_security.xml
@@ -25,13 +25,13 @@
Department multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]Job multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/addons/hr_attendance/security/ir_rule.xml b/addons/hr_attendance/security/ir_rule.xml
index 857fc2f54ae..0bf3b73d76e 100644
--- a/addons/hr_attendance/security/ir_rule.xml
+++ b/addons/hr_attendance/security/ir_rule.xml
@@ -9,13 +9,13 @@
Manager Attendance
-
+ [(1,'=',1)]Employee Attendance
-
+ [('employee_id.user_id','=',user.id)]
diff --git a/addons/hr_evaluation/security/hr_evaluation_security.xml b/addons/hr_evaluation/security/hr_evaluation_security.xml
index 7c7d6f43ee3..209ca281396 100644
--- a/addons/hr_evaluation/security/hr_evaluation_security.xml
+++ b/addons/hr_evaluation/security/hr_evaluation_security.xml
@@ -31,14 +31,14 @@
Evaluation Plan multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]Evaluation Plan Phase multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/addons/hr_expense/security/ir_rule.xml b/addons/hr_expense/security/ir_rule.xml
index b9ad5778d1e..3c3cb018489 100644
--- a/addons/hr_expense/security/ir_rule.xml
+++ b/addons/hr_expense/security/ir_rule.xml
@@ -4,19 +4,19 @@
Manager Expense
-
+ [(1,'=',1)]Employee Expense
-
+ [('employee_id.user_id','=',user.id)]Expense multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/addons/hr_holidays/security/ir_rule.xml b/addons/hr_holidays/security/ir_rule.xml
index ff0270026a4..e2c0ffb1a6f 100644
--- a/addons/hr_holidays/security/ir_rule.xml
+++ b/addons/hr_holidays/security/ir_rule.xml
@@ -3,14 +3,14 @@
Employee Holidays
-
+ [('employee_id.user_id','=',user.id)]Holidays Officer
-
+ [(1,'=',1)]
diff --git a/addons/hr_payroll/security/hr_security.xml b/addons/hr_payroll/security/hr_security.xml
index d55f1c81cce..e410eae7250 100644
--- a/addons/hr_payroll/security/hr_security.xml
+++ b/addons/hr_payroll/security/hr_security.xml
@@ -8,10 +8,10 @@
Employee Payslip
-
+ ['|', ('employee_id.user_id', '=', user.id), ('employee_id.department_id.manager_id.user_id', '=', user.id)]
-
\ No newline at end of file
+
diff --git a/addons/hr_recruitment/security/hr_recruitment_security.xml b/addons/hr_recruitment/security/hr_recruitment_security.xml
index 570b0f036cd..4fccca1a791 100644
--- a/addons/hr_recruitment/security/hr_recruitment_security.xml
+++ b/addons/hr_recruitment/security/hr_recruitment_security.xml
@@ -4,7 +4,7 @@
Applicant multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/addons/hr_timesheet/security/hr_timesheet_security.xml b/addons/hr_timesheet/security/hr_timesheet_security.xml
index d7cf34fa1fd..c5549d1ed27 100644
--- a/addons/hr_timesheet/security/hr_timesheet_security.xml
+++ b/addons/hr_timesheet/security/hr_timesheet_security.xml
@@ -4,14 +4,14 @@
Manager HR Analytic Timesheet
-
+ [(1,'=',1)]Employee HR Analytic Timesheet
-
+ [('user_id', '=', user.id)]
diff --git a/addons/mrp_repair/security/mrp_repair_security.xml b/addons/mrp_repair/security/mrp_repair_security.xml
index 0b34310fc4e..e94b675b57f 100644
--- a/addons/mrp_repair/security/mrp_repair_security.xml
+++ b/addons/mrp_repair/security/mrp_repair_security.xml
@@ -11,4 +11,4 @@
-
\ No newline at end of file
+
diff --git a/addons/note/security/ir.rule.xml b/addons/note/security/ir.rule.xml
index b0c79561355..2c6e9f3bc7f 100644
--- a/addons/note/security/ir.rule.xml
+++ b/addons/note/security/ir.rule.xml
@@ -3,7 +3,7 @@
Only followers can access a sticky notes
-
+ [('message_follower_ids','=',user.partner_id.id)]
@@ -14,7 +14,7 @@
Each user have his stage name
-
+ ['|',('user_id','=',False),('user_id','=',user.id)]
From 07607f054bc8f3b427a98f479f0b3d3cb92224c1 Mon Sep 17 00:00:00 2001
From: Xavier Morel
Date: Mon, 29 Apr 2013 14:52:17 +0200
Subject: [PATCH 163/373] [REM] more nonsensical @model + @ref
bzr revid: xmo@openerp.com-20130429125217-slmp1v9t7uri6ev6
---
.../process/customer_invoice_process.xml | 32 ++++++-------
addons/account/process/statement_process.xml | 14 +++---
.../process/supplier_invoice_process.xml | 28 +++++------
.../crm/process/crm_configuration_process.xml | 12 ++---
addons/hr/process/hr_process.xml | 10 ++--
.../hr_expense/process/hr_expense_process.xml | 26 +++++-----
.../process/hr_holidays_process.xml | 26 +++++-----
.../process/hr_timesheet_sheet_process.xml | 24 +++++-----
.../membership/process/membership_process.xml | 22 ++++-----
addons/mrp/process/procurement_process.xml | 48 +++++++++----------
.../mrp/process/service_product_process.xml | 6 +--
.../mrp/process/stockable_product_process.xml | 8 ++--
.../process/mrp_operation_process.xml | 16 +++----
addons/product/process/product_process.xml | 4 +-
addons/project/process/task_process.xml | 12 ++---
.../process/project_mrp_process.xml | 12 ++---
.../process/project_timesheet_process.xml | 12 ++---
addons/purchase/process/purchase_process.xml | 36 +++++++-------
addons/sale/process/sale_process.xml | 12 ++---
addons/sale_crm/process/sale_crm_process.xml | 16 +++----
.../sale_stock/process/sale_stock_process.xml | 20 ++++----
21 files changed, 198 insertions(+), 198 deletions(-)
diff --git a/addons/account/process/customer_invoice_process.xml b/addons/account/process/customer_invoice_process.xml
index 8971235c1f7..e45f8080518 100644
--- a/addons/account/process/customer_invoice_process.xml
+++ b/addons/account/process/customer_invoice_process.xml
@@ -123,24 +123,24 @@
-
-
+
+
-
-
+
+
-
-
+
+
@@ -148,40 +148,40 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/addons/sale_stock/process/sale_stock_process.xml b/addons/sale_stock/process/sale_stock_process.xml
index c10b34c8866..1ebebec7809 100644
--- a/addons/sale_stock/process/sale_stock_process.xml
+++ b/addons/sale_stock/process/sale_stock_process.xml
@@ -72,40 +72,40 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -403,8 +403,8 @@
TOEJsituation
-
-
+
+
@@ -413,8 +413,8 @@
USD Bank Journal - (test)TUBKbank
-
-
+
+ SJ
- San José
-
+ San José
+ AAlajuela
-
+ HHeredia
-
+ CCartago
-
+ PPuntarenas
-
+ GGuanacaste
-
+ L
- Limón
-
+ Limón
+
@@ -66,13 +65,13 @@
-
-
+
+
-
-
+
+
@@ -85,9 +84,9 @@
OpenERP Partnercreate_date
-
+
-
+
\ No newline at end of file
diff --git a/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml b/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml
index 141981a21d6..f6eb8a1d905 100644
--- a/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml
+++ b/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml
@@ -1,11 +1,10 @@
-
Dummy Actiondummy
-
+
@@ -40,10 +39,10 @@
- Hello,
-
Thanks for the genuine interest you have shown in OpenERP.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <p>Hello,</p>
+ <p>Thanks for the genuine interest you have shown in OpenERP.</p>
+ <p>If any further information is required, do not hesitate to reply to this message.</p>
+ <p>Regards,OpenERP Team,</p>For OpenERP OnDemand Free Trial 2010
@@ -53,11 +52,11 @@
- Hello,
-
We have very good offer that might suit you.
- We suggest you subscribe to the OpenERP Discovery Day on May 2010.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <p>Hello,</p>
+ <p>We have very good offer that might suit you.
+ We suggest you subscribe to the OpenERP Discovery Day on May 2010.</p>
+ <p>If any further information is required, do not hesitate to reply to this message.</p>
+ <p>Regards,OpenERP Team,</p>For OpenERP Discovery Day on May 2010
@@ -68,10 +67,10 @@
- Hello,
-
Thanks for showing interest and for subscribing to the OpenERP Discovery Day.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <p>Hello,</p>
+ <p>Thanks for showing interest and for subscribing to the OpenERP Discovery Day.</p>
+ <p>If any further information is required, do not hesitate to reply to this message.</p>
+ <p>Regards,OpenERP Team,</p>For OpenERP Discovery Day
@@ -82,10 +81,10 @@
- Hello,
-
Thanks for showing interest and buying the OpenERP book.
+ <p>Hello,</p>
+ <p>Thanks for showing interest and buying the OpenERP book.</p>
If any further information required kindly revert back.
-
We have very good offer that might suit you.
- For our gold partners,We are arranging free technical training on june,2010.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <p>Hello,</p>
+ <p>We have very good offer that might suit you.
+ For our gold partners,We are arranging free technical training on june,2010.</p>
+ <p>If any further information is required, do not hesitate to reply to this message.</p>
+ <p>Regards,OpenERP Team,</p>technical training to gold partners
@@ -110,11 +109,11 @@
- Hello,
-
We have very good offer that might suit you.
- For our silver partners,We are paid technical training on june,2010.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <p>Hello,</p>
+ <p>We have very good offer that might suit you.
+ For our silver partners,We are paid technical training on june,2010.</p>
+ <p>If any further information is required, do not hesitate to reply to this message.</p>
+ <p>Regards,OpenERP Team,</p>training to silver partners
@@ -125,11 +124,11 @@
- Hello,
-
We have very good offer that might suit you.
- For our silver partners, we are offering Gold partnership.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <p>Hello,</p>
+ <p>We have very good offer that might suit you.
+ For our silver partners, we are offering Gold partnership.</p>
+ <p>If any further information is required, do not hesitate to reply to this message.</p>
+ <p>Regards,OpenERP Team,</p>gold partnership to silver partners
@@ -140,11 +139,11 @@
- Hello,
-
Thanks for showing interest and for subscribing to technical training.
- If any further information required kindly revert back.I really appreciate your co-operation on this.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <p>Hello,</p>
+ <p>Thanks for showing interest and for subscribing to technical training.</p>
+ If any further information required kindly revert back.I really appreciate your co-operation on this.</p>
+ <p>If any further information is required, do not hesitate to reply to this message.</p>
+ <p>Regards,OpenERP Team,</p>subscribing to technical training
@@ -171,7 +170,7 @@
Propose a 1 month free trial for an OnDemand offer
-
+ report
@@ -180,27 +179,27 @@
Thanks for showing interest
-
+ Propose to subscribe to the OpenERP Discovery Day on May 2010
-
+ Thanks for subscribing to the OpenERP Discovery Day
-
+ Propose to buy the OpenERP Book
-
+ report
@@ -209,81 +208,81 @@
Thanks for buying the OpenERP book
-
+ Propose a free technical training to Gold partners
-
+ Propose paid training to Silver partners
-
+ Propose gold partnership to silver partners
-
+ Thanks for subscribing to technical training
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -296,4 +295,4 @@
-
+
\ No newline at end of file
diff --git a/addons/procurement/stock_orderpoint.xml b/addons/procurement/stock_orderpoint.xml
index 31c48046d64..67d610c65c9 100644
--- a/addons/procurement/stock_orderpoint.xml
+++ b/addons/procurement/stock_orderpoint.xml
@@ -1,4 +1,3 @@
-
@@ -7,50 +6,50 @@
25.05.0
-
+
-
+ 10.05.0
-
+
-
+ 12.05.0
-
+
-
+ 50.010.0
-
+
-
+ 15.05.0
-
+
-
+ 5.03.0
-
+
-
+
-
+
\ No newline at end of file
diff --git a/addons/purchase/purchase_workflow.xml b/addons/purchase/purchase_workflow.xml
index 11936db0bed..68a6cd12733 100644
--- a/addons/purchase/purchase_workflow.xml
+++ b/addons/purchase/purchase_workflow.xml
@@ -57,7 +57,7 @@
invoicesubflow
-
+ action_invoice_create()
diff --git a/addons/stock_location/stock_location_demo_cpu1.xml b/addons/stock_location/stock_location_demo_cpu1.xml
index 6578a961ff3..d9a220daef6 100644
--- a/addons/stock_location/stock_location_demo_cpu1.xml
+++ b/addons/stock_location/stock_location_demo_cpu1.xml
@@ -1,4 +1,3 @@
-
@@ -73,7 +72,7 @@
-
+
@@ -89,4 +88,4 @@
-
+
\ No newline at end of file
From 1b08798b52df8f0a3a72d116577cd7451b45b30c Mon Sep 17 00:00:00 2001
From: "Vishmita Jadeja (openerp)"
Date: Tue, 30 Apr 2013 12:55:47 +0530
Subject: [PATCH 166/373] [TYPO]changes in typo
bzr revid: vja@tinyerp.com-20130430072547-7gyl7nivdc8717ua
---
addons/account/account.py | 2 +-
addons/account/account_invoice.py | 2 +-
addons/account/account_move_line.py | 2 +-
addons/account/installer.py | 2 +-
addons/account_voucher/account_voucher.py | 2 +-
addons/delivery/sale.py | 2 +-
addons/sale_crm/wizard/crm_make_sale.py | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/addons/account/account.py b/addons/account/account.py
index cca3db63d29..322207b515b 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -2307,7 +2307,7 @@ class account_model(osv.osv):
try:
entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')}
except:
- raise osv.except_osv(_('Wrong model!'), _('You have a wrong expression "%(...)s" in your model !'))
+ raise osv.except_osv(_('Wrong Model!'), _('You have a wrong expression "%(...)s" in your model!'))
move_id = account_move_obj.create(cr, uid, {
'ref': entry['name'],
'period_id': period_id,
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 2a530da30d9..6fd045fc1e8 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -882,7 +882,7 @@ class account_invoice(osv.osv):
group_check_total = self.pool.get('res.groups').browse(cr, uid, group_check_total_id, context=context)
if group_check_total and uid in [x.id for x in group_check_total.users]:
if (inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0)):
- raise osv.except_osv(_('Bad total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.'))
+ raise osv.except_osv(_('Bad Total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.'))
if inv.payment_term:
total_fixed = total_percent = 0
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index a7d32cc53f9..13fc4e502ae 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -1181,7 +1181,7 @@ class account_move_line(osv.osv):
move_id = move_obj.create(cr, uid, v, context)
vals['move_id'] = move_id
else:
- raise osv.except_osv(_('No piece number!'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
+ raise osv.except_osv(_('No Piece Number!'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
ok = not (journal.type_control_ids or journal.account_control_ids)
if ('account_id' in vals):
account = account_obj.browse(cr, uid, vals['account_id'], context=context)
diff --git a/addons/account/installer.py b/addons/account/installer.py
index fc1161db29b..961b8f9e763 100644
--- a/addons/account/installer.py
+++ b/addons/account/installer.py
@@ -111,7 +111,7 @@ class account_installer(osv.osv_memory):
def check_unconfigured_cmp(self, cr, uid, context=None):
""" check if there are still unconfigured companies """
if not self.get_unconfigured_cmp(cr, uid, context=context):
- raise osv.except_osv(_('No unconfigured company!'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
+ raise osv.except_osv(_('No Unconfigured Company!'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if context is None: context = {}
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index 2163c735735..a9a70291f6a 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -1535,7 +1535,7 @@ class account_bank_statement(osv.osv):
for bk_st in self.browse(cr, uid, ids, context=context):
if vals.get('journal_id') and bk_st.line_ids:
if any([x.voucher_id and True or False for x in bk_st.line_ids]):
- raise osv.except_osv(_('Unable To Change Journal!'), _('You can not change the journal as you already reconciled some statement lines!'))
+ raise osv.except_osv(_('Unable to Change Journal!'), _('You can not change the journal as you already reconciled some statement lines!'))
return super(account_bank_statement, self).write(cr, uid, ids, vals, context=context)
diff --git a/addons/delivery/sale.py b/addons/delivery/sale.py
index de7411bec67..1b797290632 100644
--- a/addons/delivery/sale.py
+++ b/addons/delivery/sale.py
@@ -54,7 +54,7 @@ class sale_order(osv.osv):
raise osv.except_osv(_('No Grid Available!'), _('No grid matching for this carrier!'))
if not order.state in ('draft'):
- raise osv.except_osv(_('Order Not In Draft State!'), _('The order state have to be draft to add delivery lines.'))
+ raise osv.except_osv(_('Order not in Draft State!'), _('The order state have to be draft to add delivery lines.'))
grid = grid_obj.browse(cr, uid, grid_id, context=context)
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
index 0470bab4f8b..da770af6d82 100644
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ b/addons/sale_crm/wizard/crm_make_sale.py
@@ -87,7 +87,7 @@ class crm_make_sale(osv.osv_memory):
['default', 'invoice', 'delivery', 'contact'])
pricelist = partner.property_product_pricelist.id
if False in partner_addr.values():
- raise osv.except_osv(_('Insufficient Data!'), _('No addresse(es) defined for this customer.'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No address(es) defined for this customer.'))
vals = {
'origin': _('Opportunity: %s') % str(case.id),
From 847c51b1d7b898d8726bd711b431ba55eba935d4 Mon Sep 17 00:00:00 2001
From: "Vishmita Jadeja (openerp)"
Date: Wed, 1 May 2013 11:17:15 +0530
Subject: [PATCH 167/373] [IMP]css change
bzr revid: vja@tinyerp.com-20130501054715-ssssf5pgj7c7pn1c
---
addons/web/static/src/css/base.css | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 1e82daeb4ff..500ae1857bb 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -2648,6 +2648,16 @@ div.ui-widget-overlay {
width: 80px; }
.openerp_ie .oe_form_field_boolean input {
background: white; }
+.openerp .oe_form_field_boolean .boolean{
+ position: relative;
+ top: -14px;
+ width: 14px;
+ height: 14px;
+ z-index:10000;
+ // IE needs a color in order for the layer to respond to mouse events
+ backgroundColor: "#fff";
+ opacity: 0;
+}
.openerp_ie .db_option_table .oe_form_field_selection {
width: auto; }
.openerp_ie input[type='checkbox'] {
From 23687ef653b9d5fb11dcac5cf71dabdf8448e976 Mon Sep 17 00:00:00 2001
From: "Vishmita Jadeja (openerp)"
Date: Wed, 1 May 2013 11:26:18 +0530
Subject: [PATCH 168/373] [IMP]Improve code
bzr revid: vja@tinyerp.com-20130501055618-06xc6fgj50npvk3u
---
addons/web/static/src/js/view_form.js | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 0373af78358..514d3dad51c 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2757,14 +2757,10 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({
return input ? input.focus() : false;
},
click_disabled_boolean: function(){
- var $disabled = $(document).find('input[type=checkbox]:disabled');
+ var $disabled = this.$el.find('input[type=checkbox]:disabled');
$disabled.each(function (){
- var $parent = $(this).closest("span");
- if($(this).next('div')){
- $(this).next('div').remove();
- }
- var $overlay = $("");
- $parent.append($overlay);
+ $(this).next('div').remove();
+ $(this).closest("span").append($(''));
});
}
});
From 330cf7949768f9851fe3956d8d7db5e3260ef631 Mon Sep 17 00:00:00 2001
From: "Vishmita Jadeja (openerp)"
Date: Thu, 2 May 2013 12:50:52 +0530
Subject: [PATCH 169/373] [IMP]Minor change
bzr revid: vja@tinyerp.com-20130502072052-2jo04lhsz3y3fhxi
---
addons/web/static/src/js/view_form.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 514d3dad51c..eae34b678b0 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2760,7 +2760,7 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({
var $disabled = this.$el.find('input[type=checkbox]:disabled');
$disabled.each(function (){
$(this).next('div').remove();
- $(this).closest("span").append($(''));
+ $(this).closest("span").append($(''));
});
}
});
From 3c0bc3aad8534bc1f7e681a36639432710a212ce Mon Sep 17 00:00:00 2001
From: "Vishmita Jadeja (openerp)"
Date: Thu, 2 May 2013 13:07:06 +0530
Subject: [PATCH 170/373] [IMP]Improve in css
bzr revid: vja@tinyerp.com-20130502073706-onxr8vdi3f3vhqvs
---
addons/web/static/src/css/base.css | 2 +-
addons/web/static/src/css/base.sass | 19 +++++++++----------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 500ae1857bb..7921b40d7d7 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -2648,7 +2648,7 @@ div.ui-widget-overlay {
width: 80px; }
.openerp_ie .oe_form_field_boolean input {
background: white; }
-.openerp .oe_form_field_boolean .boolean{
+.openerp .oe_form_readonly .oe_form_field_boolean .boolean{
position: relative;
top: -14px;
width: 14px;
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index b4e70e6bdc9..b39fb7748be 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -1695,6 +1695,15 @@ $sheet-padding: 16px
display: none !important
.oe_form .oe_form_field_date
width: auto
+ .oe_form_field_boolean.boolean
+ position: relative
+ top: -20px
+ width: 14px
+ height: 14px
+ z-index: 10000
+ // IE needs a color in order for the layer to respond to mouse events
+ backgroundColor: "#fff"
+ opacity: 0
// Sheet and padding
.oe_form_nosheet
margin: 16px
@@ -1930,16 +1939,6 @@ $sheet-padding: 16px
white-space: nowrap
.oe_form_field_boolean
width: auto
- height: 14px
- .boolean
- position: relative
- top: -20px
- width: 14px
- height: 14px
- z-index: 10000
- // IE needs a color in order for the layer to respond to mouse events
- backgroundColor: "#fff"
- opacity: 0
.oe_datepicker_container
display: none
.oe_datepicker_root
From f8dad517525da1913d6266e45b93d33a455aa426 Mon Sep 17 00:00:00 2001
From: Christophe Matthieu
Date: Fri, 3 May 2013 15:43:56 +0200
Subject: [PATCH 171/373] [IMP] crm: change access right for crm.case.section.
Only manager can write, create and unlink
bzr revid: chm@openerp.com-20130503134356-9wxf9i9cifj3b7q6
---
addons/crm/security/ir.model.access.csv | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/crm/security/ir.model.access.csv b/addons/crm/security/ir.model.access.csv
index 52648c8e347..f3c6bdf5c1f 100644
--- a/addons/crm/security/ir.model.access.csv
+++ b/addons/crm/security/ir.model.access.csv
@@ -12,7 +12,7 @@ access_crm_phonecall_manager,crm.phonecall.manager,model_crm_phonecall,base.grou
access_crm_case_categ,crm.case.categ,model_crm_case_categ,base.group_user,1,0,0,0
access_crm_lead,crm.lead,model_crm_lead,base.group_sale_salesman,1,1,1,0
access_crm_phonecall,crm.phonecall,model_crm_phonecall,base.group_sale_salesman,1,1,1,0
-access_crm_case_section_user,crm.case.section.user,model_crm_case_section,base.group_sale_salesman,1,1,1,0
+access_crm_case_section_user,crm.case.section.user,model_crm_case_section,base.group_sale_salesman,1,0,0,0
access_crm_case_section_manager,crm.case.section.manager,model_crm_case_section,base.group_sale_manager,1,1,1,1
access_crm_case_stage,crm.case.stage,model_crm_case_stage,,1,0,0,0
access_crm_case_stage_manager,crm.case.stage,model_crm_case_stage,base.group_sale_manager,1,1,1,1
From 0c9110c7f719a7701c2d9f45a6a09c1840a0b253 Mon Sep 17 00:00:00 2001
From: Christophe Matthieu
Date: Fri, 3 May 2013 17:46:52 +0200
Subject: [PATCH 172/373] [IMP] crm,sale_crm: kanban widget
bzr revid: chm@openerp.com-20130503154652-r9mv3zovs8lnpj3e
---
addons/crm/__openerp__.py | 1 -
addons/crm/crm_case_section_view.xml | 4 +-
addons/crm/static/src/css/crm.css | 26 ++---
addons/crm/static/src/js/crm_case_section.js | 101 +++---------------
addons/sale_crm/__openerp__.py | 4 +
addons/sale_crm/sale_crm_view.xml | 19 ++--
.../{crm => sale_crm}/static/lib/justgage.js | 0
addons/sale_crm/static/src/js/sale_crm.js | 44 ++++++++
8 files changed, 80 insertions(+), 119 deletions(-)
rename addons/{crm => sale_crm}/static/lib/justgage.js (100%)
create mode 100644 addons/sale_crm/static/src/js/sale_crm.js
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index 8bd87db35b1..937e0790aed 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -122,7 +122,6 @@ Dashboard for CRM will include:
'js': [
'static/src/js/crm_case_section.js',
'static/lib/sparkline/jquery.sparkline.min.js',
- 'static/lib/justgage.js',
],
'installable': True,
'application': True,
diff --git a/addons/crm/crm_case_section_view.xml b/addons/crm/crm_case_section_view.xml
index 79a0abebe6e..f9591ff873c 100644
--- a/addons/crm/crm_case_section_view.xml
+++ b/addons/crm/crm_case_section_view.xml
@@ -101,11 +101,11 @@