From 2d4ec5c0f704c22bc4383253496c1bc8790ccc1e Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Thu, 14 Mar 2013 18:54:17 +0530
Subject: [PATCH 01/43] [IMP] l10n_in: improve dat of tax codes
bzr revid: tpa@tinyerp.com-20130314132417-g02a9j5cf6s112bh
---
addons/l10n_in/l10n_in_tax_code_template.xml | 269 ++++++++++++++++++-
1 file changed, 265 insertions(+), 4 deletions(-)
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index 94217d79c3c..a5bcfd8524a 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -4,7 +4,7 @@
- Tax
+ Your Company
@@ -27,16 +27,277 @@
-
- Base of Taxed Sales
+ Taxable Sale Bases
- Base of Taxed Purchases
+ Taxable Purchase Bases
+
+ Cst 5% on Purchase
+
+ CSTP5
+
+
+
+ Purchase CST 5%
+
+ PCST5
+
+
+
+ Education Cess 2%
+
+
+
+
+ Education Cess 2% - Purchase
+
+
+
+
+ Input Credit - Import Duty
+
+
+
+
+ Input Credit On Capital Goods - Edu. Cess
+
+
+
+
+ Input Credit on Capital Goods - Modvate
+
+
+
+
+ Input Credit on Capital Goods - Seco. & HEC
+
+
+
+
+ Input Credit - Service Tax
+
+
+
+
+ Input Credit - Service Tax Edu. Cess.
+
+
+
+
+ Input Credit - Service Tax Seco. & HEC
+
+
+
+
+ Seco. & Higher Edu. Cess 1% - Purchase
+
+
+
+
+ Seco. & Higher Edu. Cess 1% - Sales
+
+
+
+
+ CST 2% on Sales
+
+
+
+
+ CST 5% on Sales
+
+
+
+
+ Input Additional Vat 1%
+
+
+
+
+ Input Additional Vat 2.5%
+
+
+
+
+ Input VAT 12.5%
+
+
+
+
+ Input Vat 15%
+
+
+
+
+ Input Vat 4%
+
+
+
+
+ Output Adi. Vat @1%
+
+
+
+
+ Output Vat @4%
+
+
+
+
+ Cst 2% on Purchase
+
+
+
+
+ Excise Duty 12% - Purchase
+
+
+
+
+ Excise Duty - 12% - Sales
+
+
+
+
+ Excise Duty 5% - Purchase
+
+
+
+
+ Excise Duty 6% on Purchase
+
+
+
+
+ Input Credit - URD
+
+
+
+
+ Tds on Audit Fees - 94J
+
+
+
+
+ TDS on Commission Or Brokerage- 94H
+
+
+
+
+ TDS on Contractor-94C
+
+
+
+
+ TDS On Director's Interest
+
+
+
+
+ TDS on Director's Remuneration - 92B
+
+
+
+
+ TDS on Interest
+
+
+
+
+ TDS on Professional Fees - 94J
+
+
+
+
+ TDS on Rent-94I
+
+
+
+
+ TDS on Salary - 92B
+
+
+
+
+ Import Purchase
+
+
+
+
+ Purchase Vat 4% / Vat12.5% / Vat15% / Cst2% / Cst5%
+
+
+
+
+ Plant & Machinery
+
+
+
+
+ Expense Accounts
+
+
+
+
+ Sales Vat 4% / Sales CST2% / Sales CST5%
+
+
+
+
+ Sales CST2%
+
+
+
+
+ Sales CST5%
+
+
+
+
+ Purchase Vat 4%
+
+
+
+
+ Purchase Vat12.5% / Vat15%
+
+
+
+
+ Purchase Vat12.5%
+
+
+
+
+ Purchase Vat15%
+
+
+
+
+ Sales Vat 4%
+
+
+
+
+ Purchase Cst2%
+
+
+
+
+ Purchase URD
+
+
+
+
+ Base Expenses for TDS
+
+
+
From 96aa7aa6ea79c4927e8a7f65624cf7480d7356c9 Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Fri, 15 Mar 2013 16:28:46 +0530
Subject: [PATCH 02/43] [IMP] l10n_in:improved demo data of account tax
bzr revid: tpa@tinyerp.com-20130315105846-sgdli94fp6d8i8dp
---
.../l10n_in/l10n_in_public_tax_template.xml | 772 ++++++++++++------
addons/l10n_in/l10n_in_tax_code_template.xml | 7 +-
2 files changed, 513 insertions(+), 266 deletions(-)
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index 03dbfa7cc75..79472c3e4b9 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -1,295 +1,537 @@
-
-
-
-
- Sale Tax-15%
-
-
-
- 0.15
- percent
- sale
-
-
-
-
-
-
-
-
- Sale Tax-12%
-
-
-
- 0.12
- percent
- sale
-
-
-
-
-
-
-
-
- Sale Tax-4%
-
-
-
- 0.04
- percent
- sale
-
-
-
-
-
-
-
-
-
-
- Purchase Tax-15%
-
-
-
- 0.15
- percent
+
+
+ CST 5% - Purchase
+ CST 5% - Purchasepurchase
-
-
-
-
-
-
-
-
-
-
-
-
- VAT-5%(4% VAT+1% Add. Tax.)
-
-
-
- 0.05percent
- all
-
- 1
-
- 1
-
- 1
-
- 1
-
+ 0.01
+
+
+
+
+
-
- VAT-15% (12.5% VAT + 2.5% Add. Tax.)
-
-
-
- 0.15
+
+ Input Credit - Service Tax Seco. & HEC
+ Input Credit - Service Tax Seco. & HEC
+ purchasepercent
- all
-
- 1
-
- 1
-
- 1
-
- 1
-
-
-
-
-
- VAT-8%
-
-
-
- 0.08
- percent
- all
-
- 1
-
- 1
-
- 1
-
- 1
-
-
-
-
-
- VAT-10%
-
-
-
- 0.10
- percent
- all
-
- 1
-
- 1
-
- 1
-
- 1
-
+ 0.0100
+
+
+
-
- VAT-12.5%
-
-
-
- 12.5
+
+ Input Credit - URD
+ Input Credit - URD
+ purchasepercent
- all
-
- 1
-
- 1
-
- 1
-
- 1
-
+ 0.0400
+
+
+
-
-
-
- Service Tax-12.30%
-
-
+
+ Tds on Audit Fees - 94J
+ Tds on Audit Fees - 94J
+ purchase
+ percent
+ 0.1000
+
+
+
+
+
+
+
+ TDS on Commission Or Brokerage- 94H
+ TDS on Commission Or Brokerage- 94H
+ purchase
+ percent
+ 0.1000
+
+
+
+
+
+
+
+ Input Credit - Import Duty
+ Input Credit - Import Duty
+ purchase
+ percent
+ 0.0750
+ 1
+
+
+
+
+
+
+
+ Additional Duty (Imports) 4%
+ Additional Duty (Imports) 4%
+ purchase
+ percent
+ 0.0400
+ 1
+
+
+
+
+
+
+
+ Input Credit - Service Tax
+ Input Credit - Service Tax
+ purchase
+ percent
+ 0.1200
+ 1
+
+
+
+
+
+
+
+ Input Credit - Service Tax Edu. Cess.
+ Input Credit - Service Tax Edu. Cess.
+ purchase
+ percent
+ 0.0200
+
+
+
+
+
+
+
+ TDS on Salary - 92B
+ TDS on Salary - 92B
+ purchase
+ percent
+ 0.3000
+
+
+
+
+
+
+
+ Excise Duty 6% on Purchase
+ Excise Duty 6% on Purchase
+ purchase
+ percent
+ 0.0600
+
+
+
+
+
+
+
+ Excise Duty 5% - Purchase
+
+ purchase
+ percent
+ 0.0500
+
+
+
+
+
+
+
+ Excise Duty 12% - Purchase
+ Excise Duty 12% - Purchase
+ purchase
+ percent
+ 0.1200
+
+
+
+
+
+
+
+ Education Cess 2% - Purchase
+ Education Cess 2% - Purchase
+ all
+ percent
+ 0.0200
+ 21
+
+
+
+
+
+
+
+
+ Seco. & Higher Edu. Cess 1% - Purchase
+ Seco. & Higher Edu. Cess 1% - Purchase
+ all
+ percent
+ 0.0100
+ 22
+
+
+
+
+
+
+
+
+ Excise Duty - 12% - Sales
+ Excise Duty - 12% - Sales
+ sale
+ percent
+ 0.1200
+
+
+
+
+
+
+
+
+ Education Cess 2%
+ Education Cess 2%
+ all
+ percent
+ 0.0200
+ 2
+
+
+
+
+
+
+
+
+ Seco. & Higher Edu. Cess 1% - Sales
+ Seco. & Higher Edu. Cess 1% - Sales
+ all
+ percent
+ 0.0100
+ 3
+
+
+
+
+
+
+
+
+ CST
+ CST
+ all
+ percent
+ 0.0000
+
+
+
+
+
+ ADV
+ ADV
+ all
+ percent
+ 0.0
+
+
+
+
+
+ Input Credit on Capital Goods - Seco. & HEC
+ Input Credit on Capital Goods - Seco. & HEC
+ purchase
+ percent
+ 0.01
+
+
+
+
+
+
+
+ TDS on Contractor-94C
+ TDS on Contractor-94C
+ purchase
+ percent
+ 0.0200
+
+
+
+
+
+
+
+ TDS On Director's Interest
+ TDS On Director's Interest
+ purchase
+ percent
+ 0.1
+
+
+
+
+
+
+
+ TDS on Director's Remuneration - 92B
+ TDS on Director's Remuneration - 92B
+ purchase
+ percent
+ 0.3
+
+
+
+
+
+
+
+ TDS on Interest
+ TDS on Interest
+ purchase
+ percent
+ 0.1
+
+
+
+
+
+
+
+ TDS on Professional Fees - 94J
+ TDS on Professional Fees - 94J
+ purchase
+ percent
+ 0.1
+ 1
+
+
+
+
+
+
+
+ TDS on Rent-94I
+ TDS on Rent-94I
+ purchase
+ percent
+ 0.1
+
+
+
+
+
+
+
+ Input Credit On Capital Goods - Edu. Cess
+ Input Credit On Capital Goods - Edu. Cess
+ purchase
+ percent
+ 0.02
+
+
+
+
+
+
+
+ Input Credit on Capital Goods - Modvate
+
+ purchase
+ percent0.12
- percent
- all
-
- 1
-
- 1
-
- 1
-
- 1
-
+
+
+
-
- Service Tax-%2
-
-
-
-
- 1
-
- 1
-
- 1
-
- 1
- 0.02
- percent
- all
-
-
-
-
-
- Service Tax-%1
- 0.01
-
-
-
-
- 1
-
- 1
-
- 1
-
- 1
- percent
- all
-
-
-
-
-
-
- Excise Duty-10.30%
-
-
-
- 0.10
+
+ Input Vat 4%
+ Input Vat 4%
+ purchasepercent
- sale
-
- 1
-
- 1
-
- 1
-
- 1
-
+ 0.04
+ 4
+
+
+
+
-
-
- Excise Duty-2%
- 0.02
+
+
+ Input Additional Vat 1%
+ Input Additional Vat 1%
+ purchasepercent
- sale
-
-
-
- 1
-
- 1
-
- 1
-
- 1
-
-
-
-
-
- Excise Duty-1%0.01
- percent
- sale
-
-
-
- 1
-
- 1
-
- 1
-
- 1
-
+ 5
+
+
+
-
+
+
+ Input Vat 15%
+ Input Vat 15%
+ purchase
+ percent
+ 0.15
+ 7
+
+
+
+
+
+
+
+ Output Vat @4%
+ Output Vat @4%
+ sale
+ percent
+ 0.04
+ 11
+
+
+
+
+
+
+
+ Output Adi. Vat @1%
+ Output Adi. Vat @1%
+ sale
+ percent
+ 0.01
+ 12
+
+
+
+
+
+
+
+ CST 2% on Sales
+ CST 2% on Sales
+ sale
+ percent
+ 0.02
+ 13
+
+
+
+
+
+
+
+
+ CST 5% on Sales
+ CST 5% on Sales
+ sale
+ percent
+ 0.05
+ 14
+
+
+
+
+
+
+
+ Input VAT 12.5%
+ Input VAT 12.5%
+ purchase
+ percent
+ 0.1250
+ 60
+
+
+
+
+
+
+
+ Input Additional Vat 2.5%
+ Input Additional Vat 2.5%
+ purchase
+ percent
+ 0.0250
+ 80
+
+
+
+
+
+
+
+ Cst 2% on Purchase
+ Cst 2% on Purchase
+ purchase
+ percent
+ 0.02
+ 9333
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index a5bcfd8524a..ff2cd352bbf 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -199,7 +199,7 @@
-
+ TDS on Director's Remuneration - 92B
@@ -299,5 +299,10 @@
+
+ Additional Duty (Imports) 4%
+
+
+
From 4a0e878584bff40db03c78cb8e9a4d13538261a1 Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Mon, 18 Mar 2013 12:02:24 +0530
Subject: [PATCH 03/43] [IMP] addd data of related accounts
bzr revid: tpa@tinyerp.com-20130318063224-0lefhgsq3l1ddd1q
---
addons/l10n_in/l10n_in_public_chart.xml | 299 +++++++++++++++++-
.../l10n_in/l10n_in_public_tax_template.xml | 154 +++++----
2 files changed, 373 insertions(+), 80 deletions(-)
diff --git a/addons/l10n_in/l10n_in_public_chart.xml b/addons/l10n_in/l10n_in_public_chart.xml
index 9612afddc39..49568826c4b 100644
--- a/addons/l10n_in/l10n_in_public_chart.xml
+++ b/addons/l10n_in/l10n_in_public_chart.xml
@@ -658,7 +658,304 @@
-
+
+
+ CST 5% on Purchase
+ 21000102
+ other
+
+
+
+
+
+ Input Credit - Service Tax Seco. & HEC
+ 121101010
+ other
+
+
+
+
+
+ Input Credit - URD
+ 121102012
+ other
+
+
+
+
+
+ Tds on Audit Fees - 94J
+ 121103001
+ other
+
+
+
+
+
+ TDS on Commission Or Brokerage- 94H
+ 121103002
+ other
+
+
+
+
+
+ Input Credit - Import Duty - CVD
+ 121101004
+ other
+
+
+
+
+
+ Input Credit Additional Duty on Imports 4%
+ 121101001
+ other
+
+
+
+
+
+ Input Credit - Service Tax
+ 121101008
+ other
+
+
+
+
+
+ Input Credit - Service Tax Edu. Cess.
+ 121101009
+ other
+
+
+
+
+
+ TDS on Salary - 92B
+ 121103009
+ other
+
+
+
+
+
+ Excise Duty 6% on Purchase
+ 121101015
+ other
+
+
+
+
+
+ Excise Duty 5% - Purchase
+ 1211010131
+ other
+
+
+
+
+
+ Excise Duty 12% - Purchase
+ 121101013
+ other
+
+
+
+
+
+ Education Cess 2% - Purchase
+ 121101003
+ other
+
+
+
+
+
+ Seco. & Higher Edu. Cess 1% - Purchase
+ 121101011
+ other
+
+
+
+
+
+ Excise Duty - 12% - Sales
+ 121101014
+ other
+
+
+
+
+
+ Education Cess 2%
+ 121101002
+ other
+
+
+
+
+
+ Seco. & Higher Edu. Cess 1% - Sales
+ 121101012
+ other
+
+
+
+
+
+
+ Input Credit on Capital Goods - Seco. & HEC
+ 121101007
+ other
+
+
+
+
+
+ TDS on Contractor-94C
+ 121103003
+ other
+
+
+
+
+
+ TDS On Director's Interest
+ 121103004
+ other
+
+
+
+
+
+ TDS on Director's Remuneration - 92B
+ 121103005
+ other
+
+
+
+
+
+ TDS on Interest
+ 121103006
+ other
+
+
+
+
+
+ TDS on Professional Fees - 94J
+ 121103007
+ other
+
+
+
+
+
+ TDS on Rent-94I
+ 121103008
+ other
+
+
+
+
+
+ Input Credit On Capital Goods - Edu. Cess
+ 121101005
+ other
+
+
+
+
+
+ Input Credit on Capital Goods - Modvate
+ 121101006
+ other
+
+
+
+
+
+ Input Vat 4%
+ 121102007
+ other
+
+
+
+
+
+ Input Additional Vat 1%
+ 121102003
+ other
+
+
+
+
+
+ Input Vat 15%
+ 121102006
+ other
+
+
+
+
+
+ Output Vat @4%
+ 121102009
+ other
+
+
+
+
+
+ Output Adi. Vat @1%
+ 121102008
+ other
+
+
+
+
+
+ CST 2% on Sales
+ 121102001
+ other
+
+
+
+
+
+ CST 5% on Sales
+ 121102002
+ other
+
+
+
+
+
+ Input VAT 12.5%
+ 121102005
+ other
+
+
+
+
+
+ Input Additional Vat 2.5%
+ 121102004
+ other
+
+
+
+
+
+ Cst 2% on Purchase - New
+ 121102011
+ other
+
+
+
+
India - Chart of Accounts for Public Ltd
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index 79472c3e4b9..db77a63bdca 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -8,8 +8,8 @@
purchasepercent0.01
-
+
+
@@ -23,8 +23,8 @@
purchasepercent0.0100
-
+
+
@@ -36,8 +36,8 @@
purchasepercent0.0400
-
+
+
@@ -49,8 +49,8 @@
purchasepercent0.1000
-
+
+
@@ -62,8 +62,8 @@
purchasepercent0.1000
-
+
+
@@ -76,8 +76,8 @@
percent0.07501
-
+
+
@@ -90,8 +90,8 @@
percent0.04001
-
+
+
@@ -104,8 +104,8 @@
percent0.12001
-
+
+
@@ -117,8 +117,8 @@
purchasepercent0.0200
-
+
+
@@ -130,8 +130,8 @@
purchasepercent0.3000
-
+
+
@@ -143,8 +143,8 @@
purchasepercent0.0600
-
+
+
@@ -156,8 +156,8 @@
purchasepercent0.0500
-
+
+
@@ -170,8 +170,8 @@
percent0.1200
-
+
+
@@ -184,8 +184,8 @@
percent0.020021
-
+
+
@@ -199,8 +199,8 @@
percent0.010022
-
+
+
@@ -214,8 +214,8 @@
percent0.1200
-
+
+
@@ -228,8 +228,8 @@
percent0.02002
-
+
+
@@ -243,8 +243,8 @@
percent0.01003
-
+
+
@@ -257,8 +257,6 @@
allpercent0.0000
-
@@ -268,8 +266,6 @@
allpercent0.0
-
@@ -279,8 +275,8 @@
purchasepercent0.01
-
+
+
@@ -292,8 +288,8 @@
purchasepercent0.0200
-
+
+
@@ -305,8 +301,8 @@
purchasepercent0.1
-
+
+
@@ -318,8 +314,8 @@
purchasepercent0.3
-
+
+
@@ -331,8 +327,8 @@
purchasepercent0.1
-
+
+
@@ -345,8 +341,8 @@
percent0.11
-
+
+
@@ -358,8 +354,8 @@
purchasepercent0.1
-
+
+
@@ -371,8 +367,8 @@
purchasepercent0.02
-
+
+
@@ -380,12 +376,12 @@
Input Credit on Capital Goods - Modvate
-
+ Input Credit on Capital Goods - Modvatepurchasepercent0.12
-
+
+
@@ -398,8 +394,8 @@
percent0.044
-
+
+
@@ -413,8 +409,8 @@
percent0.015
-
+
+
@@ -427,8 +423,8 @@
percent0.157
-
+
+
@@ -441,8 +437,8 @@
percent0.0411
-
+
+
@@ -455,8 +451,8 @@
percent0.0112
-
+
+
@@ -470,8 +466,8 @@
0.0213
-
+
+
@@ -484,8 +480,8 @@
percent0.0514
-
+
+
@@ -498,8 +494,8 @@
percent0.125060
-
+
+
@@ -512,8 +508,8 @@
percent0.025080
-
+
+
@@ -526,8 +522,8 @@
percent0.029333
-
+
+
From df42be7f5d873fe7003dfd6a155b5ce6cf23571b Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Mon, 18 Mar 2013 16:20:27 +0530
Subject: [PATCH 04/43] [IMP] new improved data of tax code
bzr revid: tpa@tinyerp.com-20130318105027-r9vf27o3sx8lw9g7
---
.../l10n_in/l10n_in_public_tax_template.xml | 64 ++--
addons/l10n_in/l10n_in_tax_code_template.xml | 288 ++++++++++++------
2 files changed, 221 insertions(+), 131 deletions(-)
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index 92b154643f2..1cfc0cf5d5a 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -26,7 +26,7 @@
-
+
@@ -39,7 +39,7 @@
-
+
@@ -52,7 +52,7 @@
-
+
@@ -65,7 +65,7 @@
-
+
@@ -79,7 +79,7 @@
-
+
@@ -93,7 +93,7 @@
-
+
@@ -107,7 +107,7 @@
-
+
@@ -120,7 +120,7 @@
-
+
@@ -133,7 +133,7 @@
-
+
@@ -146,7 +146,7 @@
-
+
@@ -159,7 +159,7 @@
-
+
@@ -173,7 +173,7 @@
-
+
@@ -187,7 +187,7 @@
-
+
@@ -202,7 +202,7 @@
-
+
@@ -217,7 +217,7 @@
-
+
@@ -246,7 +246,7 @@
-
+
@@ -278,7 +278,7 @@
-
+
@@ -291,7 +291,7 @@
-
+
@@ -304,7 +304,7 @@
-
+
@@ -317,7 +317,7 @@
-
+
@@ -330,7 +330,7 @@
-
+
@@ -344,7 +344,7 @@
-
+
@@ -357,7 +357,7 @@
-
+
@@ -370,7 +370,7 @@
-
+
@@ -383,7 +383,7 @@
-
+
@@ -426,7 +426,7 @@
-
+
@@ -440,7 +440,7 @@
-
+
@@ -469,7 +469,7 @@
-
+
@@ -483,7 +483,7 @@
-
+
@@ -497,7 +497,7 @@
-
+
@@ -511,7 +511,7 @@
-
+
@@ -525,7 +525,7 @@
-
+
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index ff2cd352bbf..1d721c76a94 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -39,7 +39,7 @@
Cst 5% on Purchase
-
+ CSTP5
@@ -49,179 +49,179 @@
PCST5
-
- Education Cess 2%
-
-
-
+ Education Cess 2%
+
+
+
+ Education Cess 2% - Purchase
-
+
-
+ Input Credit - Import Duty
-
+
-
+ Input Credit On Capital Goods - Edu. Cess
-
+
-
+ Input Credit on Capital Goods - Modvate
-
+
-
+ Input Credit on Capital Goods - Seco. & HEC
-
+
-
+ Input Credit - Service Tax
-
+
-
+ Input Credit - Service Tax Edu. Cess.
-
+
-
+ Input Credit - Service Tax Seco. & HEC
-
+
-
+ Seco. & Higher Edu. Cess 1% - Purchase
-
+
-
+ Seco. & Higher Edu. Cess 1% - Sales
-
-
-
-
- CST 2% on Sales
-
-
-
-
- CST 5% on Sales
-
-
-
-
- Input Additional Vat 1%
-
-
-
-
- Input Additional Vat 2.5%
-
-
-
-
- Input VAT 12.5%
-
-
-
-
- Input Vat 15%
-
-
-
-
- Input Vat 4%
-
-
-
-
- Output Adi. Vat @1%
-
-
-
-
- Output Vat @4%
- Cst 2% on Purchase
+ CST 2% on Sales
-
- Excise Duty 12% - Purchase
+
+ CST 5% on Sales
-
- Excise Duty - 12% - Sales
+
+ Input Additional Vat 1%
-
+
+ Input Additional Vat 2.5%
+
+
+
+
+ Input VAT 12.5%
+
+
+
+
+ Input Vat 15%
+
+
+
+
+ Input Vat 4%
+
+
+
+
+ Output Adi. Vat @1%
+
+
+
+
+ Output Vat @4%
+
+
+
+
+ Cst 2% on Purchase
+
+
+
+
+ Excise Duty 12% - Purchase
+
+
+
+
+ Excise Duty - 12% - Sales
+
+
+
+ Excise Duty 5% - Purchase
-
+
-
+ Excise Duty 6% on Purchase
-
+
-
+ Input Credit - URD
-
+
-
+ Tds on Audit Fees - 94J
-
+
-
+ TDS on Commission Or Brokerage- 94H
-
+
-
+ TDS on Contractor-94C
-
+
-
+ TDS On Director's Interest
-
+
-
+ TDS on Director's Remuneration - 92B
-
+
-
+ TDS on Interest
-
+
-
+ TDS on Professional Fees - 94J
-
+
-
+ TDS on Rent-94I
-
+
-
+ TDS on Salary - 92B
-
+
@@ -299,10 +299,100 @@
-
+ Additional Duty (Imports) 4%
+
+
+
+
+ Sales Export - Form H - With Tax
+
+
+
+
+ CST 2% on Sales CT3
+
+ Sales CT3 VAT
+
+
+
+
+ Output VAT 4% on Sales CT3
+
+
+
+
+ Output Adi. Vat 1% on Sales CT3
+
+
+
+
+ Sales CT3 CST
+
+
+
+
+ Sales Export - Form H - With CT1
+
+
+
+
+ Sales Export - SEZ - Out of Gujarat
+
+
+
+
+ Sales Export - SEZ - In Gujarat
+
+
+
+
+ No Tax SEZ OGS
+
+
+
+
+ No Tax SEZ Gujarat
+
+
+
+
+ Sales Export - Out of Country
+
+
+
+
+ Sales Others (Projects)
+
+
+
+
+ No Tax Form H with BED
+
+
+
+
+ No Tax Form H
+
+
+
+
+ No Tax Export Out of Country
+
+
+
+
+ No Tax Projects
+
+
+
+
+ Base for Input Service
+
+
+
From f5800836f29247953b67564e4a39ff5acace15b0 Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Mon, 18 Mar 2013 18:38:21 +0530
Subject: [PATCH 05/43] [IMP] improved taxes
bzr revid: tpa@tinyerp.com-20130318130821-07ylst5u9iogaa3z
---
addons/l10n_in/l10n_in_public_chart.xml | 28 ++-
.../l10n_in/l10n_in_public_tax_template.xml | 170 ++++++++++++++----
2 files changed, 161 insertions(+), 37 deletions(-)
diff --git a/addons/l10n_in/l10n_in_public_chart.xml b/addons/l10n_in/l10n_in_public_chart.xml
index 49568826c4b..67093812c63 100644
--- a/addons/l10n_in/l10n_in_public_chart.xml
+++ b/addons/l10n_in/l10n_in_public_chart.xml
@@ -901,7 +901,7 @@
- Output Vat @4%
+ Output Vat 4%121102009other
@@ -909,7 +909,7 @@
- Output Adi. Vat @1%
+ Output Adi. Vat 1%121102008other
@@ -956,6 +956,30 @@
+
+ CST 2% on Sales - CT3 Against Form C
+ 121102017
+ other
+
+
+
+
+
+ Output Vat 4% on Sales - CT3
+ 121102018
+ other
+
+
+
+
+
+ Output Adi. Vat 1% Sales CT3
+ 121102019
+ other
+
+
+
+
India - Chart of Accounts for Public Ltd
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index 1cfc0cf5d5a..03c2cfd2d23 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -3,8 +3,8 @@
- CST 5% - Purchase
- CST 5% - Purchase
+ Input CST 5%
+ Input CST 5%purchasepercent0.01
@@ -18,8 +18,8 @@
- Input Credit - Service Tax Seco. & HEC
- Input Credit - Service Tax Seco. & HEC
+ Input Sec. & HEC - Service Tax
+ Input Sec. & HEC - Service Taxpurchasepercent0.0100
@@ -98,8 +98,8 @@
- Input Credit - Service Tax
- Input Credit - Service Tax
+ Input Credit - Service Tax 12.36%
+ Input Credit - Service Tax 12.36%purchasepercent0.1200
@@ -111,9 +111,9 @@
-
- Input Credit - Service Tax Edu. Cess.
- Input Credit - Service Tax Edu. Cess.
+
+ Input Edu. Cess - Service Tax
+ Input Edu. Cess - Service Taxpurchasepercent0.0200
@@ -138,8 +138,8 @@
- Excise Duty 6% on Purchase
- Excise Duty 6% on Purchase
+ Input Excise Duty 6%
+ Input Excise Duty 6% purchasepercent0.0600
@@ -151,8 +151,8 @@
- Excise Duty 5% - Purchase
-
+ Input Excise Duty 5%
+ Input Excise Duty 5% purchasepercent0.0500
@@ -164,8 +164,8 @@
- Excise Duty 12% - Purchase
- Excise Duty 12% - Purchase
+ Input Excise Duty 12%
+ Input Excise Duty 12%purchasepercent0.1200
@@ -208,8 +208,8 @@
- Excise Duty - 12% - Sales
- Excise Duty - 12% - Sales
+ Excise Duty - 12.36% - Sales
+ Excise Duty - 12.36% - Salessalepercent0.1200
@@ -269,9 +269,9 @@
-
- Input Credit on Capital Goods - Seco. & HEC
- Input Credit on Capital Goods - Seco. & HEC
+
+ Input Sec. & HEC - Capital Goods
+ Input Sec. & HEC - Capital Goodspurchasepercent0.01
@@ -362,8 +362,8 @@
- Input Credit On Capital Goods - Edu. Cess
- Input Credit On Capital Goods - Edu. Cess
+ Input Edu. Cess - Capital Goods
+ Input Edu. Cess - Capital Goodspurchasepercent0.02
@@ -374,9 +374,9 @@
-
- Input Credit on Capital Goods - Modvate
- Input Credit on Capital Goods - Modvate
+
+ Input Excise Duty 12% - Capital Goods
+ Input Excise Duty 12% - Capital Goodspurchasepercent0.12
@@ -423,16 +423,16 @@
percent0.157
-
-
+
+
- Output Vat @4%
- Output Vat @4%
+ Output Vat 4%
+ Output Vat 4%salepercent0.04
@@ -445,8 +445,8 @@
- Output Adi. Vat @1%
- Output Adi. Vat @1%
+ Output Adi. Vat 1%
+ Output Adi. Vat 1%salepercent0.01
@@ -459,8 +459,8 @@
- CST 2% on Sales
- CST 2% on Sales
+ CST 2% on Sales - Against Form - C
+ CST 2% on Sales - Against Form - Csalepercent0.02
@@ -516,8 +516,8 @@
- Cst 2% on Purchase
- Cst 2% on Purchase
+ Input CST 2%
+ Input CST 2%purchasepercent0.02
@@ -529,5 +529,105 @@
+
+ No Tax Form H
+ No Tax Form H
+ purchase
+ percent
+ 0.02
+
+
+
+
+
+
+ CST 2% on Sales - CT3 Against Form - C
+ CST 2% on Sales - CT3 Against Form - C
+ purchase
+ percent
+ 0.02
+
+
+
+
+
+
+
+
+ Output Vat 4% on Sales - CT3
+ Output Vat 4% on Sales - CT3
+ purchase
+ percent
+ 0.04
+
+
+
+
+
+
+
+
+ Output Adi. Vat 1% Sales CT3
+ Output Adi. Vat 1% Sales CT3
+ purchase
+ percent
+ 0.01
+
+
+
+
+
+
+
+
+ No Tax SEZ OGS
+ No Tax SEZ OGS
+ purchase
+ fixed
+
+
+
+
+
+
+ No Tax SEZ Gujarat
+ No Tax SEZ Gujarat
+ purchase
+ percent
+
+
+
+
+
+
+ No Tax Form H with BED
+ No Tax Form H with BED
+ purchase
+ percent
+
+
+
+
+
+
+ No Tax Exports - Out of Country
+ No Tax Exports - Out of Country
+ purchase
+ percent
+
+
+
+
+
+
+ No Tax Projects
+ No Tax Projects
+ purchase
+ percent
+
+
+
+
+
\ No newline at end of file
From 10d8c8d8fbea100fc05948a6ce8d33157c7954aa Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Wed, 20 Mar 2013 14:39:34 +0530
Subject: [PATCH 06/43] [IMP] l10n_in : improved parent_id of accounts, and
improved typo
bzr revid: tpa@tinyerp.com-20130320090934-0f3w2v7uq3cikmeb
---
addons/l10n_in/l10n_in_public_chart.xml | 273 +++++++++---------
.../l10n_in/l10n_in_public_tax_template.xml | 236 +++++++--------
addons/l10n_in/l10n_in_tax_code_template.xml | 53 ++--
3 files changed, 268 insertions(+), 294 deletions(-)
diff --git a/addons/l10n_in/l10n_in_public_chart.xml b/addons/l10n_in/l10n_in_public_chart.xml
index 67093812c63..477df493bf6 100644
--- a/addons/l10n_in/l10n_in_public_chart.xml
+++ b/addons/l10n_in/l10n_in_public_chart.xml
@@ -116,7 +116,7 @@
Tax Receivable15400
- other
+ view
@@ -659,325 +659,324 @@
-
+ CST 5% on Purchase
- 21000102
+ 154001other
-
+
-
+ Input Credit - Service Tax Seco. & HEC
- 121101010
+ 154002other
-
+
-
+ Input Credit - URD
- 121102012
+ 154003other
-
+
-
- Tds on Audit Fees - 94J
- 121103001
+
+ TDS on Audit Fees - 94J
+ 154004other
-
+
-
- TDS on Commission Or Brokerage- 94H
- 121103002
+
+ TDS on Commission Or Brokerage - 94H
+ 154005other
-
+
-
+ Input Credit - Import Duty - CVD
- 121101004
+ 154006other
-
+
-
+ Input Credit Additional Duty on Imports 4%
- 121101001
+ 154007other
-
+
-
+ Input Credit - Service Tax
- 121101008
+ 154008other
-
+
-
+ Input Credit - Service Tax Edu. Cess.
- 121101009
+ 154009other
-
+
-
+ TDS on Salary - 92B
- 121103009
+ 154010other
-
+
-
+ Excise Duty 6% on Purchase
- 121101015
+ 154011other
-
+
-
+ Excise Duty 5% - Purchase
- 1211010131
+ 154012other
-
+
-
+ Excise Duty 12% - Purchase
- 121101013
+ 154013other
-
+
-
+ Education Cess 2% - Purchase
- 121101003
+ 154014other
-
+
-
+ Seco. & Higher Edu. Cess 1% - Purchase
- 121101011
+ 154015other
-
+
-
+ Excise Duty - 12% - Sales
- 121101014
+ 247001other
-
+
-
+ Education Cess 2%
- 121101002
+ 247010other
-
+
-
+ Seco. & Higher Edu. Cess 1% - Sales
- 121101012
+ 247002other
-
-
+
-
+ Input Credit on Capital Goods - Seco. & HEC
- 121101007
+ 154016other
-
+
-
- TDS on Contractor-94C
- 121103003
+
+ TDS on Contractor - 94C
+ 154017other
-
+
-
+ TDS On Director's Interest
- 121103004
+ 154018other
-
+
-
+ TDS on Director's Remuneration - 92B
- 121103005
+ 154019other
-
+
-
+ TDS on Interest
- 121103006
+ 154020other
-
+
-
+ TDS on Professional Fees - 94J
- 121103007
+ 154021other
-
+
-
- TDS on Rent-94I
- 121103008
+
+ TDS on Rent - 94I
+ 154022other
-
+
-
+ Input Credit On Capital Goods - Edu. Cess
- 121101005
+ 154023other
-
+
-
- Input Credit on Capital Goods - Modvate
- 121101006
+
+ Input Excise Duty 12% - Capital Goods
+ 154024other
-
+
-
- Input Vat 4%
- 121102007
+
+ Input VAT 4%
+ 154025other
-
+
-
- Input Additional Vat 1%
- 121102003
+
+ Input Additional VAT 1%
+ 154026other
-
+
-
- Input Vat 15%
- 121102006
+
+ Input VAT 15%
+ 154027other
-
+
-
- Output Vat 4%
- 121102009
+
+ Output VAT 4%
+ 247003other
-
+
-
- Output Adi. Vat 1%
- 121102008
+
+ Output Adi. VAT 1%
+ 247004other
-
+
-
+ CST 2% on Sales
- 121102001
+ 247005other
-
+
-
+ CST 5% on Sales
- 121102002
+ 247006other
-
+
-
+ Input VAT 12.5%
- 121102005
+ 154028other
-
+
-
- Input Additional Vat 2.5%
- 121102004
+
+ Input Additional VAT 2.5%
+ 154029other
-
+
-
- Cst 2% on Purchase - New
- 121102011
+
+ CST 2% on Purchase
+ 154030other
-
-
+
+
-
+ CST 2% on Sales - CT3 Against Form C
- 121102017
+ 247007other
-
+
-
- Output Vat 4% on Sales - CT3
- 121102018
+
+ Output VAT 4% on Sales - CT3
+ 247008other
-
+
-
- Output Adi. Vat 1% Sales CT3
- 121102019
+
+ Output Adi. VAT 1% Sales CT3
+ 247009other
-
+
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index 03c2cfd2d23..09b2c41d7aa 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -8,8 +8,8 @@
purchasepercent0.01
-
-
+
+
@@ -23,8 +23,8 @@
purchasepercent0.0100
-
-
+
+
@@ -36,21 +36,21 @@
purchasepercent0.0400
-
-
+
+
- Tds on Audit Fees - 94J
- Tds on Audit Fees - 94J
+ TDS on Audit Fees - 94J
+ TDS on Audit Fees - 94Jpurchasepercent0.1000
-
-
+
+
@@ -62,8 +62,8 @@
purchasepercent0.1000
-
-
+
+
@@ -76,8 +76,8 @@
percent0.07501
-
-
+
+
@@ -90,22 +90,22 @@
percent0.04001
-
-
+
+
- Input Credit - Service Tax 12.36%
- Input Credit - Service Tax 12.36%
+ Input Credit - Service Tax 12%
+ Input Credit - Service Tax 12%purchasepercent0.12001
-
-
+
+
@@ -117,8 +117,8 @@
purchasepercent0.0200
-
-
+
+
@@ -130,8 +130,8 @@
purchasepercent0.3000
-
-
+
+
@@ -143,8 +143,8 @@
purchasepercent0.0600
-
-
+
+
@@ -156,8 +156,8 @@
purchasepercent0.0500
-
-
+
+
@@ -170,8 +170,8 @@
percent0.1200
-
-
+
+
@@ -184,8 +184,8 @@
percent0.020021
-
-
+
+
@@ -199,8 +199,8 @@
percent0.010022
-
-
+
+
@@ -208,14 +208,14 @@
- Excise Duty - 12.36% - Sales
- Excise Duty - 12.36% - Sales
+ Excise Duty - 12% - Sales
+ Excise Duty - 12% - Salessalepercent0.1200
-
-
+
+
@@ -224,12 +224,12 @@
Education Cess 2%Education Cess 2%
- all
+ salepercent0.02002
-
-
+
+
@@ -239,57 +239,39 @@
Seco. & Higher Edu. Cess 1% - SalesSeco. & Higher Edu. Cess 1% - Sales
- all
+ salepercent0.01003
-
-
+
+
-
+
-
- CST
- CST
- all
- percent
- 0.0000
-
-
-
-
- ADV
- ADV
- all
- percent
- 0.0
-
-
-
Input Sec. & HEC - Capital GoodsInput Sec. & HEC - Capital Goodspurchasepercent0.01
-
-
+
+
- TDS on Contractor-94C
- TDS on Contractor-94C
+ TDS on Contractor - 94C
+ TDS on Contractor - 94Cpurchasepercent0.0200
-
-
+
+
@@ -301,8 +283,8 @@
purchasepercent0.1
-
-
+
+
@@ -314,8 +296,8 @@
purchasepercent0.3
-
-
+
+
@@ -327,8 +309,8 @@
purchasepercent0.1
-
-
+
+
@@ -341,21 +323,21 @@
percent0.11
-
-
+
+
- TDS on Rent-94I
+ TDS on Rent - 94ITDS on Rent-94Ipurchasepercent0.1
-
-
+
+
@@ -367,8 +349,8 @@
purchasepercent0.02
-
-
+
+
@@ -380,22 +362,22 @@
purchasepercent0.12
-
-
+
+
-
+
- Input Vat 4%
- Input Vat 4%
+ Input VAT 4%
+ Input VAT 4%purchasepercent0.044
-
-
+
+
@@ -403,56 +385,56 @@
- Input Additional Vat 1%
- Input Additional Vat 1%
+ Input Additional VAT 1%
+ Input Additional VAT 1%purchasepercent0.015
-
-
+
+
- Input Vat 15%
- Input Vat 15%
+ Input VAT 15%
+ Input VAT 15%purchasepercent0.157
-
-
+
+
- Output Vat 4%
- Output Vat 4%
+ Output VAT 4%
+ Output VAT 4%salepercent0.0411
-
-
+
+
- Output Adi. Vat 1%
- Output Adi. Vat 1%
+ Output Adi. VAT 1%
+ Output Adi. VAT 1%salepercent0.0112
-
-
+
+
@@ -466,8 +448,8 @@
0.0213
-
-
+
+
@@ -480,8 +462,8 @@
percent0.0514
-
-
+
+
@@ -494,22 +476,22 @@
percent0.125060
-
-
+
+
- Input Additional Vat 2.5%
- Input Additional Vat 2.5%
+ Input Additional VAT 2.5%
+ Input Additional VAT 2.5%purchasepercent0.025080
-
-
+
+
@@ -522,8 +504,8 @@
percent0.029333
-
-
+
+
@@ -546,34 +528,34 @@
purchasepercent0.02
-
-
+
+
- Output Vat 4% on Sales - CT3
- Output Vat 4% on Sales - CT3
+ Output VAT 4% on Sales - CT3
+ Output VAT 4% on Sales - CT3purchasepercent0.04
-
-
+
+
- Output Adi. Vat 1% Sales CT3
- Output Adi. Vat 1% Sales CT3
+ Output Adi. VAT 1% Sales CT3
+ Output Adi. VAT 1% Sales CT3purchasepercent0.01
-
-
+
+
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index 1d721c76a94..1abccc181bb 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -38,15 +38,13 @@
- Cst 5% on Purchase
+ CST 5% on Purchase
- CSTP5Purchase CST 5%
- PCST5
@@ -69,8 +67,8 @@
-
- Input Credit on Capital Goods - Modvate
+
+ Input Excise Duty 12% - Capital Goods
@@ -99,9 +97,9 @@
-
+ Seco. & Higher Edu. Cess 1% - Sales
-
+
@@ -115,7 +113,7 @@
- Input Additional Vat 1%
+ Input Additional VAT 1%
@@ -130,7 +128,7 @@
- Input Vat 15%
+ Input VAT 15%
@@ -140,17 +138,17 @@
- Output Adi. Vat @1%
+ Output Adi. VAT 1%
- Output Vat @4%
+ Output VAT 4%
- Cst 2% on Purchase
+ CST 2% on Purchase
@@ -180,7 +178,7 @@
- Tds on Audit Fees - 94J
+ TDS on Audit Fees - 94J
@@ -230,7 +228,7 @@
- Purchase Vat 4% / Vat12.5% / Vat15% / Cst2% / Cst5%
+ Purchase VAT 4% / VAT 12.5% / VAT 15% / CST 2% / CST 5%
@@ -245,47 +243,47 @@
- Sales Vat 4% / Sales CST2% / Sales CST5%
-
+ Sales VAT 4% / Sales CST 2% / Sales CST 5%
+
- Sales CST2%
+ Sales CST 2%
- Sales CST5%
+ Sales CST 5%
- Purchase Vat 4%
+ Purchase VAT 4%
- Purchase Vat12.5% / Vat15%
+ Purchase VAT 12.5% / VAT 15%
- Purchase Vat12.5%
+ Purchase VAT 12.5%
- Purchase Vat15%
+ Purchase VAT 15%
- Sales Vat 4%
+ Sales VAT 4%
- Purchase Cst2%
+ Purchase CST 2%
@@ -325,7 +323,7 @@
- Output Adi. Vat 1% on Sales CT3
+ Output Adi. VAT 1% on Sales CT3
@@ -389,10 +387,5 @@
-
- Base for Input Service
-
-
-
From 6624bf9675a54e93be5983163722e183b8e3cefd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Wed, 27 Mar 2013 15:14:26 +0100
Subject: [PATCH 07/43] [FIX] point_of_sale: add scrollbar when there are too
much payment methods
bzr revid: fva@openerp.com-20130327141426-ivgfxlsxlpazehar
---
addons/point_of_sale/static/src/css/pos.css | 7 ++++++-
addons/point_of_sale/static/src/xml/pos.xml | 1 -
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css
index d9a4d6d00a9..16355240f25 100644
--- a/addons/point_of_sale/static/src/css/pos.css
+++ b/addons/point_of_sale/static/src/css/pos.css
@@ -291,10 +291,15 @@
display: inline-block;
text-align: center;
vertical-align: top;
+ width: 205px;
+ max-height: 232px;
+ overflow-y: auto;
+ overflow-x: hidden;
}
.point-of-sale #paypad button {
height: 50px;
- width: 208px;
+ display: block;
+ width: 100%;
margin: 0px -6px 4px -2px;
font-weight: bold;
vertical-align: middle;
diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml
index 3da76ec12d8..1dce368b9cb 100644
--- a/addons/point_of_sale/static/src/xml/pos.xml
+++ b/addons/point_of_sale/static/src/xml/pos.xml
@@ -538,7 +538,6 @@
-
From 28ed62fd7e22fe79d856926e6ce91aba5f0dd429 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Wed, 27 Mar 2013 16:15:18 +0100
Subject: [PATCH 08/43] [IMP] point_of_sale: adding visual feedback when
clicking on buttons
bzr revid: fva@openerp.com-20130327151518-t4h67hqn02s80tai
---
addons/point_of_sale/static/src/css/pos.css | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css
index 16355240f25..e328054aa28 100644
--- a/addons/point_of_sale/static/src/css/pos.css
+++ b/addons/point_of_sale/static/src/css/pos.css
@@ -307,6 +307,17 @@
border-top: 1px solid #efefef;
font-size: 14px;
}
+.point-of-sale #paypad button, .point-of-sale #numpad button, .point-of-sale .popup button{
+ position: relative;
+ top: 0;
+ -webkit-transition: top 150ms linear;
+ -moz-transition: top 150ms linear;
+ -ms-transition: top 150ms linear;
+ transition: top 150ms linear;
+}
+.point-of-sale #paypad button:active, .point-of-sale #numpad button:active, .point-of-sale .popup button:active{
+ top:3px;
+}
.point-of-sale #paypad button:hover, .point-of-sale #numpad button:hover, .point-of-sale #numpad .selected-mode, .point-of-sale .popup button:hover {
border: none;
color: white;
From 74b3538dd17b291c47fcb5697484506c66d6429d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Wed, 27 Mar 2013 16:40:54 +0100
Subject: [PATCH 09/43] [IMP] point_of_sale: add an invoice button (does
nothing yet)
bzr revid: fva@openerp.com-20130327154054-nhfy6ak73v1gwj09
---
.../static/src/img/icons/png48/invoice.png | Bin 0 -> 2086 bytes
addons/point_of_sale/static/src/js/screens.js | 18 ++++++++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
create mode 100644 addons/point_of_sale/static/src/img/icons/png48/invoice.png
diff --git a/addons/point_of_sale/static/src/img/icons/png48/invoice.png b/addons/point_of_sale/static/src/img/icons/png48/invoice.png
new file mode 100644
index 0000000000000000000000000000000000000000..e65d2ec5a67398a6aa245c89d66355ae3e5a0d46
GIT binary patch
literal 2086
zcmV+>2-)|EP)3$g6o3^(HlyMaw}_JX0}^BWW6(b){xLDe#69s3KTTXhkf3a>RIF5r#a2ppT9Cp(
zX**@6oo>(~2BX!1(q-Cdk)@Sx)0w_5vrp%E&h6>Dym>5nbq1ri`7+a)dGDR?oOADe
zGj{;Mf13ZVKy!1=qbHi{iyE71{S7B=K-8b8(NNb|t)aHTs$#1rEGjj1$B9T?qxFid
z!D_SCR;{&KtxFOn(AZ?l86Fv$hB%IJBn)2P6bug!z}Yst-&R*WQC(+FZf00aVl@C$t4^LxSP^NK*Gyu>6-PE8==Fflm};}Z%p2Fkbx#t@I<2G7_i
zxRFth3&s==p2LUd4T2m0x1VqESJzhkQr1{@Ut9%h8>++jD1!F;IdB96Cn#`z@RN!V
zP-X=bLJCm8qwW!KxrgyJHw1$Lah#*OJ!G+&`z)5S6>$^5z7+y8Xc@SG0%tG?L;;z7
zf`cb!gBQ#Q3=aPVSNbkN043-cXRl+rs=8dMtSoyeE&|oH$A!R@ZzkXi7cM}1dwbky
zYiol}M>`A-4UmM8?ETXTW=pxZqT
z(BWtk0yM-D>lzXgzx?)d;8>;U=$r-2mSZHKwntBoGwv0z+wE}r^l3PC>JKkgj2M_Q6U`_%RRYyrcW|$e%AhRwrKT4SwxCPkzoP7aT0Kp*p!P(OV
zzuSL<=ATZ2#aac2O{HM2s({{$Jz_qXj+OQUz@3H#um@2f3JR^|h%*5dXl-qUGiS~~
zeSJNc&1NV)REh$JplDwK6c!c0#Y??VQ+s^kK3=5Q1m`FfwMk<Am
zM`izO=KwT6}YBZfX0Y{FRQ0O3>J8y@Bhl&pv7C2gdC>$jL
z4wNg9a5_6X#T*zK8Gyd4mua&@fs)IH1x#h7BtRLaYzjOQ{r?(V-1`Dq1^4V6kbA+1
zUx!xAh|Se$2E0M}j?a3#C~
z-2c=*ETAF;@{4ke3+(@~P$MAFXPV%BK<*6$?-zvJCloz=en!7<&_a?|xYxMAz5@lC
z7V7G9+>TXrkF`$>Uu~a8hiF;Mp9A?
z3gqPNApz=1UEunlwE@%pix&Dt<0jzyF~_LqqLG!o+qgh>ZWi4OsgsevktH05!$AV7
z6phRuGK>rC$;l)E%D5)$+}FBn%Z!R2z!)F+iNGxW8{m^apvC-%Mq_u@F5?1NwlD|*
zu}WYCdTv_B`!s2K3NF*Ydo|Z(22q8WbBQhgFW9P0N#s$9Hy%PmM73k^hxgFn!
zDFM`4Y9(l-?MyW;ke-po0=iX4_C8NG+4s8aQ+7G?(=Z*K7PrSV=#dbwb0uUIv;sT6
z{o1$ymW^9TSAm4n-QBGbNKO07m;jDD)6!E(;1(;8S6hW3!Yhxgf}96j4T-M*^%I%K
z*WYZ5tY5!=@y!J|aAy9FZ>7Na+*cvGi>01s89gCQ;DmN5rIC`F99gqw%~FhO9>u2@
z;NbZKcOi>X)3yr%1qE)s1AA}27x3KB5gW7&T-}*zZ2KxHvU>IE2QjX@DY-167vSI*
zBM*F&w%tn;i~?75w-Gnk(5@BH%CHc_fvN;JXc@S=JV)^_Ib~~j*|KHJF|K=&g;GK*
zFpmxILzaKOX@jNp{JAI&_%}zlvkTUJ_Ng6XdJcI6S;C3d3$We&$WyDHUG?_bb)WpY
zZF^GW%apCaU^ccu^0pb01e+o0%Ne#3$(vNR5J?+VHWORF5Nsm0e6F&Q*t|jT1%uC{
zAAS5`$I6u}*J4c1Bab3WZziySKkzW}4Dtf<3i2BA2J$BIF7h7pe%z4fe21^|I`S&=
zG6(-8vJ6>t{TAZYhudfgSK=YIewhpD;Kpx|^d64^mF=u~XjDUV6
zVv&VxyqKi8I`<@)rOXn(?jnw30Vh}uUJB?WSVS^kf^vyvz7~#w 0);
+ this.pos_widget.action_bar.set_button_disabled('invoice', remaining > 0);
}
},
set_numpad_state: function(numpadState) {
From 0fdf9066ddb12b5058b055433b9b98e62189c83a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Thu, 28 Mar 2013 16:07:18 +0100
Subject: [PATCH 10/43] [FIX] point_of_sale: fixing potential timeout issues
when sending orders over bad connection
bzr revid: fva@openerp.com-20130328150718-zj91ljrlkvv59tkj
---
addons/point_of_sale/static/src/js/db.js | 16 ++-
addons/point_of_sale/static/src/js/models.js | 133 +++++++++++++------
2 files changed, 109 insertions(+), 40 deletions(-)
diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js
index a79b111b5c5..c28c08950db 100644
--- a/addons/point_of_sale/static/src/js/db.js
+++ b/addons/point_of_sale/static/src/js/db.js
@@ -267,11 +267,12 @@ function openerp_pos_db(instance, module){
return results;
},
add_order: function(order){
- var last_id = this.load('last_order_id',0);
+ var order_id = this.load('last_order_id',0) + 1;
var orders = this.load('orders',[]);
- orders.push({id: last_id + 1, data: order});
- this.save('last_order_id',last_id+1);
+ orders.push({id: order_id, data: order});
+ this.save('last_order_id', order_id);
this.save('orders',orders);
+ return order_id;
},
remove_order: function(order_id){
var orders = this.load('orders',[]);
@@ -283,5 +284,14 @@ function openerp_pos_db(instance, module){
get_orders: function(){
return this.load('orders',[]);
},
+ get_order: function(order_id){
+ var orders = this.get_orders();
+ for(var i = 0, len = orders.length; i < len; i++){
+ if(orders[i].id === order_id){
+ return orders[i];
+ }
+ }
+ return undefined;
+ },
});
}
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 660434ba53e..ac86ee852e0 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -120,7 +120,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return self.fetch('res.currency',['symbol','position','rounding','accuracy'],[['id','=',self.get('company').currency_id[0]]]);
}).then(function(currencies){
- console.log('Currency:',currencies[0]);
self.set('currency',currencies[0]);
return self.fetch('product.uom', null, null);
@@ -256,12 +255,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
}
},
- // saves the order locally and try to send it to the backend. 'record' is a bizzarely defined JSON version of the Order
- push_order: function(record) {
- this.db.add_order(record);
- this.flush();
- },
-
//creates a new empty order and sets it as the current order
add_new_order: function(){
var order = new module.Order({pos:this});
@@ -269,45 +262,111 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
this.set('selectedOrder', order);
},
+ // saves the order locally and try to send it to the backend. 'record' is a bizzarely defined JSON version of the Order
+ // it returns a deferred that succeeds or fail when the pushed order is successfully posted on the server, previously failed orders
+ // will try to be re-sent but don't make this method return false if they fail. ( So that in the unlikely case of an order making
+ // the server crash, the other orders can still be sent )
+ // payment process )
+ push_order: function(record) {
+ var self = this;
+ var order_id = this.db.add_order(record);
+ var pushed = new $.Deferred();
+
+ this.set('nbr_pending_operations',self.db.get_orders().length);
+
+ this.flush_mutex.exec(function(){
+
+ //first we try to push all orders (the one we added and the one that were not sent)
+ var tried_all = self._flush_all_orders();
+ var done = new $.Deferred();
+
+ tried_all.always(function(){
+ // then we verify that the one we just added has been sent successfuly.
+ self._flush_order(order_id)
+ .done( function(){ pushed.resolve();})
+ .fail( function(){ pushed.reject(); })
+ .always( function(){ done.resolve(); });
+ });
+
+ return done;
+ });
+
+ return pushed;
+ },
+
+
// attemps to send all pending orders ( stored in the pos_db ) to the server,
// and remove the successfully sent ones from the db once
// it has been confirmed that they have been sent correctly.
flush: function() {
- //TODO make the mutex work
- //this makes sure only one _int_flush is called at the same time
- /*
- return this.flush_mutex.exec(_.bind(function() {
- return this._flush(0);
- }, this));
- */
- this._flush(0);
+ var self = this;
+ var flushed = new $.Deferred();
+
+ this.flush_mutex.exec(function(){
+ var done = new $.Deferred();
+
+ self._flush_all_orders()
+ .done( function(){ flushed.resolve();})
+ .fail( function(){ flushed.reject(); })
+ .always(function(){ done.resolve(); });
+
+ return done;
+ });
+
+ return flushed;
},
- // attempts to send an order of index 'index' in the list of order to send. The index
- // is used to skip orders that failed. do not call this method outside the mutex provided
- // by flush()
- _flush: function(index){
+
+ // attempts to send the locally stored order of id 'order_id'
+ // the sending is asynchronous and can take a long time to decide if it is successful or not (60s)
+ // it is therefore important to only call this method from inside a mutex
+ // this method returns a deferred indicating wether the sending was successful or not
+ _flush_order: function(order_id){
+ var self = this;
+ var order = this.db.get_order(order_id);
+
+ if(!order){
+ // flushing a non existing order always succeeds
+ return (new $.Deferred()).resolve();
+ }
+
+ //we try to send the order. shadow prevents a spinner if it takes too long.
+ var rpc = (new instance.web.Model('pos.order')).call('create_from_ui',[[order]],undefined,{shadow: true, timeout: 2000});
+
+ rpc.fail(function(unused,event){
+ //prevent an error popup creation by the rpc failure
+ event.preventDefault();
+ console.error('Failed to send order:',order);
+ });
+
+ rpc.done(function(){
+ self.db.remove_order(order_id);
+ self.set('nbr_pending_operations',self.db.get_orders().length);
+ });
+
+ return rpc;
+ },
+
+ // attempts to send all the locally stored orders. As with _flush_order, it should only be
+ // called from within a mutex.
+ // this method returns a deferred that always succeeds when all orders have been tried to be sent,
+ // even if none of them could actually be sent.
+ _flush_all_orders: function(){
var self = this;
var orders = this.db.get_orders();
- self.set('nbr_pending_operations',orders.length);
+ var tried_all = new $.Deferred();
- var order = orders[index];
- if(!order){
- return;
+ function rec_flush(index){
+ if(index < orders.length){
+ self._flush_order(orders[index].id).always(function(){
+ rec_flush(index+1);
+ })
+ }else{
+ tried_all.resolve();
+ }
}
- //try to push an order to the server
- // shadow : true is to prevent a spinner to appear in case of timeout
- (new instance.web.Model('pos.order')).call('create_from_ui',[[order]],undefined,{ shadow:true })
- .fail(function(unused, event){
- //don't show error popup if it fails
- event.preventDefault();
- console.error('Failed to send order:',order);
- self._flush(index+1);
- })
- .done(function(){
- //remove from db if success
- self.db.remove_order(order.id);
- self._flush(index);
- });
+ rec_flush(0);
+
+ return tried_all;
},
scan_product: function(parsed_ean){
From 96a74ae6ad1872a519cbe70d07fe2fbc00b40cf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Thu, 28 Mar 2013 16:35:37 +0100
Subject: [PATCH 11/43] [IMP] point_of_sale: ...
bzr revid: fva@openerp.com-20130328153537-ohdc3243lcu3dgbj
---
addons/point_of_sale/static/src/js/models.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index ac86ee852e0..6a9d54ce608 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -294,7 +294,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return pushed;
},
-
// attemps to send all pending orders ( stored in the pos_db ) to the server,
// and remove the successfully sent ones from the db once
// it has been confirmed that they have been sent correctly.
From 703039f7c6cd660210e2d1cf4b59c19323557956 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Thu, 28 Mar 2013 16:39:51 +0100
Subject: [PATCH 12/43] [IMP] web corelib: adding timeout option to the rpc api
bzr revid: fva@openerp.com-20130328153951-om7hrs5l10oc0vm2
---
addons/web/static/src/js/corelib.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js
index bfde707312c..c31b4ff5606 100644
--- a/addons/web/static/src/js/corelib.js
+++ b/addons/web/static/src/js/corelib.js
@@ -1011,6 +1011,9 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
var deferred = $.Deferred();
if (! options.shadow)
this.trigger('request', url, payload);
+
+ if (options.timeout)
+ url.timeout = options.timeout;
this.rpc_function(url, payload).then(
function (response, textStatus, jqXHR) {
From cae96ed4543abc9f05dbc4398a1832a1468639c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Fri, 29 Mar 2013 12:00:48 +0100
Subject: [PATCH 13/43] [FIX] point_of_sale: correctly set the customer on the
order
bzr revid: fva@openerp.com-20130329110048-1cx2sr4hp98cue0f
---
addons/point_of_sale/point_of_sale.py | 3 ++-
addons/point_of_sale/static/src/js/models.js | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 44139f7a499..9ee5b944718 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -489,7 +489,8 @@ class pos_order(osv.osv):
'user_id': order['user_id'] or False,
'session_id': order['pos_session_id'],
'lines': order['lines'],
- 'pos_reference':order['name']
+ 'pos_reference':order['name'],
+ 'partner_id': order['partner_id'] or False
}, context)
for payments in order['statement_ids']:
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 6a9d54ce608..426bea9a9b7 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -330,7 +330,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
//we try to send the order. shadow prevents a spinner if it takes too long.
var rpc = (new instance.web.Model('pos.order')).call('create_from_ui',[[order]],undefined,{shadow: true, timeout: 2000});
-
+
rpc.fail(function(unused,event){
//prevent an error popup creation by the rpc failure
event.preventDefault();
@@ -863,7 +863,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
lines: orderLines,
statement_ids: paymentLines,
pos_session_id: this.pos.get('pos_session').id,
- partner_id: this.pos.get('client') ? this.pos.get('client').id : undefined,
+ partner_id: this.get_client() ? this.get_client().id : false,
user_id: this.pos.get('cashier') ? this.pos.get('cashier').id : this.pos.get('user').id,
};
},
From 4822b6332ee01685fdbced96c37d54e8d615dfe6 Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Thu, 4 Apr 2013 13:02:53 +0530
Subject: [PATCH 14/43] [IMP] improved code
bzr revid: tpa@tinyerp.com-20130404073253-6bxc9rnc94q80cd5
---
addons/l10n_in/l10n_in_public_chart.xml | 2 +-
.../l10n_in/l10n_in_public_tax_template.xml | 86 +++++++++++++++++--
addons/l10n_in/l10n_in_tax_code_template.xml | 75 +++++++++++-----
3 files changed, 136 insertions(+), 27 deletions(-)
diff --git a/addons/l10n_in/l10n_in_public_chart.xml b/addons/l10n_in/l10n_in_public_chart.xml
index 477df493bf6..f39a42c0f53 100644
--- a/addons/l10n_in/l10n_in_public_chart.xml
+++ b/addons/l10n_in/l10n_in_public_chart.xml
@@ -820,7 +820,7 @@
- TDS On Director's Interest
+ TDS on Director's Interest154018other
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index 09b2c41d7aa..4bfe26a3e01 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -150,6 +150,36 @@
+
+ Education Cess 2% -Purchase
+ Education Cess 2% -Purchase
+ purchase
+ percent
+ 0.0200
+ 21
+
+
+
+
+
+
+
+
+
+ Seco. & Higher Edu. Cess 1% -Purchase
+ Seco. & Higher Edu. Cess 1% -Purchase
+ all
+ percent
+ 0.0100
+ 22
+
+
+
+
+
+
+
+
Input Excise Duty 5% Input Excise Duty 5%
@@ -180,7 +210,7 @@
Education Cess 2% - PurchaseEducation Cess 2% - Purchase
- all
+ purchasepercent0.020021
@@ -222,8 +252,8 @@
- Education Cess 2%
- Education Cess 2%
+ Education Cess 2% - Sales
+ Education Cess 2% - Salessalepercent0.0200
@@ -231,7 +261,7 @@
-
+
@@ -278,8 +308,8 @@
- TDS On Director's Interest
- TDS On Director's Interest
+ TDS on Director's Interest
+ TDS on Director's Interestpurchasepercent0.1
@@ -611,5 +641,49 @@
+
+ Service Tax 12% - Sales
+ Service Tax 12% - Sales
+ sale
+ percent
+ 0.12
+ 1
+
+
+
+
+
+
+
+
+ Service Tax 2% - Sales
+ Service Tax 2% - Sales
+ sale
+ percent
+ 0.02
+ 1
+
+
+
+
+
+
+
+
+
+ Service Tax 1% - Sales
+ Service Tax 1% - Sales
+ sale
+ percent
+ 0.01
+ 1
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index 1abccc181bb..b230600d640 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -47,14 +47,34 @@
-
- Education Cess 2%
+
+ Excise Duty - (12% + 2% +1%) Sales
+
+ Excise Duty - 12% - Sales
+
+
+
+
+ Input Credit - Service Tax (12% + 2% + 1%) purchase
+
+
+
+
+ Excise Duty 12% - Purchase
+
+
+
+
+ Education Cess 2% - Sales
+
+
+
Education Cess 2% - Purchase
-
+
@@ -77,29 +97,34 @@
+
+ Input Credit - Service Tax (12% + 2% + 1%)
+
+
+
Input Credit - Service Tax
-
+ Input Credit - Service Tax Edu. Cess.
-
+ Input Credit - Service Tax Seco. & HEC
-
+ Seco. & Higher Edu. Cess 1% - Purchase
-
+ Seco. & Higher Edu. Cess 1% - Sales
-
+
@@ -133,7 +158,7 @@
- Input Vat 4%
+ Input VAT 4%
@@ -152,16 +177,6 @@
-
- Excise Duty 12% - Purchase
-
-
-
-
- Excise Duty - 12% - Sales
-
-
-
Excise Duty 5% - Purchase
@@ -193,7 +208,7 @@
- TDS On Director's Interest
+ TDS on Director's Interest
@@ -387,5 +402,25 @@
+
+ Service Tax (12% + 2% + 1%) Sales
+
+
+
+
+ Service Tax 12% - Sales
+
+
+
+
+ Service Tax 2% - Sales
+
+
+
+
+ Service Tax 1% - Sales
+
+
+
From f5ff7acbb62ba0980e368ed2d38a43b0d7c2500d Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Fri, 5 Apr 2013 12:25:19 +0530
Subject: [PATCH 15/43] [IMP] improved code
bzr revid: tpa@tinyerp.com-20130405065519-jfb6rbtdts616uy7
---
addons/l10n_in/l10n_in_public_chart.xml | 30 +++++-----
.../l10n_in/l10n_in_public_tax_template.xml | 60 ++++++++++---------
addons/l10n_in/l10n_in_tax_code_template.xml | 22 +++----
3 files changed, 57 insertions(+), 55 deletions(-)
diff --git a/addons/l10n_in/l10n_in_public_chart.xml b/addons/l10n_in/l10n_in_public_chart.xml
index f39a42c0f53..9a743dfd080 100644
--- a/addons/l10n_in/l10n_in_public_chart.xml
+++ b/addons/l10n_in/l10n_in_public_chart.xml
@@ -660,7 +660,7 @@
- CST 5% on Purchase
+ Input CST 5%154001other
@@ -668,7 +668,7 @@
- Input Credit - Service Tax Seco. & HEC
+ Input Credit - Service Tax Seco. & HEC 1%154002other
@@ -700,7 +700,7 @@
- Input Credit - Import Duty - CVD
+ Input Credit - Import Duty154006other
@@ -708,7 +708,7 @@
- Input Credit Additional Duty on Imports 4%
+ Additional Duty (Imports) 4%154007other
@@ -716,7 +716,7 @@
- Input Credit - Service Tax
+ Input Credit - Service Tax 12%154008other
@@ -724,7 +724,7 @@
- Input Credit - Service Tax Edu. Cess.
+ Input Credit - Service Tax Edu. Cess. 2%154009other
@@ -740,7 +740,7 @@
- Excise Duty 6% on Purchase
+ Input Excise Duty 6%154011other
@@ -748,7 +748,7 @@
- Excise Duty 5% - Purchase
+ Input Excise Duty 5%154012other
@@ -756,7 +756,7 @@
- Excise Duty 12% - Purchase
+ Input Excise Duty 12%154013other
@@ -780,7 +780,7 @@
- Excise Duty - 12% - Sales
+ Excise Duty 12% - Sales247001other
@@ -788,7 +788,7 @@
- Education Cess 2%
+ Education Cess 2% - Sales247010other
@@ -804,7 +804,7 @@
- Input Credit on Capital Goods - Seco. & HEC
+ Input Sec. & HEC - Capital Goods154016other
@@ -860,7 +860,7 @@
- Input Credit On Capital Goods - Edu. Cess
+ Input Edu. Cess - Capital Goods154023other
@@ -916,7 +916,7 @@
- CST 2% on Sales
+ CST 2% on Sales - Against Form - C247005other
@@ -948,7 +948,7 @@
- CST 2% on Purchase
+ Input CST 2%154030other
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index 4bfe26a3e01..6c0a63f0090 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -17,19 +17,6 @@
-
- Input Sec. & HEC - Service Tax
- Input Sec. & HEC - Service Tax
- purchase
- percent
- 0.0100
-
-
-
-
-
-
-
Input Credit - URDInput Credit - URD
@@ -104,16 +91,16 @@
percent0.12001
-
-
+
+
- Input Edu. Cess - Service Tax
- Input Edu. Cess - Service Tax
+ Input Credit - Service Tax Edu. Cess. 2%
+ Input Credit - Service Tax Edu. Cess. 2%purchasepercent0.0200
@@ -121,6 +108,21 @@
+
+
+
+
+
+ Input Credit - Service Tax Seco. & HEC 1%
+ Input Credit - Service Tax Seco. & HEC 1%
+ purchase
+ percent
+ 0.0100
+
+
+
+
+
@@ -138,8 +140,8 @@
- Input Excise Duty 6%
- Input Excise Duty 6%
+ Input Excise Duty 6%
+ Input Excise Duty 6%purchasepercent0.0600
@@ -151,8 +153,8 @@
- Education Cess 2% -Purchase
- Education Cess 2% -Purchase
+ Education Cess 2% Purchase
+ Education Cess 2% Purchasepurchasepercent0.0200
@@ -166,8 +168,8 @@
- Seco. & Higher Edu. Cess 1% -Purchase
- Seco. & Higher Edu. Cess 1% -Purchase
+ Seco. & Higher Edu. Cess 1% Purchase
+ Seco. & Higher Edu. Cess 1% Purchaseallpercent0.0100
@@ -181,8 +183,8 @@
- Input Excise Duty 5%
- Input Excise Duty 5%
+ Input Excise Duty 5%
+ Input Excise Duty 5%purchasepercent0.0500
@@ -238,8 +240,8 @@
- Excise Duty - 12% - Sales
- Excise Duty - 12% - Sales
+ Excise Duty 12% - Sales
+ Excise Duty 12% - Salessalepercent0.1200
@@ -579,8 +581,8 @@
- Output Adi. VAT 1% Sales CT3
- Output Adi. VAT 1% Sales CT3
+ Output Adi. VAT 1% on Sales - CT3
+ Output Adi. VAT 1% on Sales - CT3purchasepercent0.01
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index b230600d640..e9bbcc28faa 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -38,7 +38,7 @@
- CST 5% on Purchase
+ Input CST 5%
@@ -53,12 +53,12 @@
- Excise Duty - 12% - Sales
+ Excise Duty 12% - Sales
- Input Credit - Service Tax (12% + 2% + 1%) purchase
+ Input Credit - Service Tax (12% + 2% + 1%) Purchase
@@ -103,17 +103,17 @@
- Input Credit - Service Tax
+ Input Credit - Service Tax 12%
- Input Credit - Service Tax Edu. Cess.
+ Input Credit - Service Tax Edu. Cess. 2%
- Input Credit - Service Tax Seco. & HEC
+ Input Credit - Service Tax Seco. & HEC 1%
@@ -178,12 +178,12 @@
- Excise Duty 5% - Purchase
+ Input Excise Duty 5%
- Excise Duty 6% on Purchase
+ Input Excise Duty 6%
@@ -228,7 +228,7 @@
- TDS on Rent-94I
+ TDS on Rent - 94I
@@ -268,7 +268,7 @@
- Sales CST 5%
+ CST 5% on Sales
@@ -298,7 +298,7 @@
- Purchase CST 2%
+ Input CST 2%
From 3aa6f4add577b153df2518f8681d0fbe2a84e8a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Thu, 11 Apr 2013 14:07:19 +0200
Subject: [PATCH 16/43] [IMP] point_of_sale: the invoicing should now work
reliably and validate the orders
bzr revid: fva@openerp.com-20130411120719-colzjq4l8eaiotdf
---
addons/point_of_sale/point_of_sale.py | 11 ++
addons/point_of_sale/static/src/js/db.js | 13 ++-
addons/point_of_sale/static/src/js/models.js | 105 +++++++++++++-----
addons/point_of_sale/static/src/js/screens.js | 74 ++++++++++--
addons/point_of_sale/static/src/js/widgets.js | 9 ++
addons/point_of_sale/static/src/xml/pos.xml | 37 +++++-
6 files changed, 206 insertions(+), 43 deletions(-)
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 9ee5b944718..9363afe01ea 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -483,7 +483,10 @@ class pos_order(osv.osv):
#_logger.info("orders: %r", orders)
order_ids = []
for tmp_order in orders:
+ to_invoice = tmp_order['to_invoice']
order = tmp_order['data']
+
+
order_id = self.create(cr, uid, {
'name': order['name'],
'user_id': order['user_id'] or False,
@@ -522,6 +525,13 @@ class pos_order(osv.osv):
order_ids.append(order_id)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'pos.order', order_id, 'paid', cr)
+
+ if to_invoice:
+ self.action_invoice(cr, uid, [order_id], context)
+ order_obj = self.browse(cr, uid, order_id, context)
+ wf_service = netsvc.LocalService('workflow')
+ wf_service.trg_validate(uid,'account.invoice', order_obj.invoice_id.id,'invoice_open',cr)
+
return order_ids
def unlink(self, cr, uid, ids, context=None):
@@ -859,6 +869,7 @@ class pos_order(osv.osv):
inv_line_ref.create(cr, uid, inv_line, context=context)
inv_ref.button_reset_taxes(cr, uid, [inv_id], context=context)
wf_service.trg_validate(uid, 'pos.order', order.id, 'invoice', cr)
+ wf_service.trg_validate(uid, 'account.invoice', inv_id, 'validate', cr)
if not inv_ids: return {}
diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js
index c28c08950db..aad6ed8ca69 100644
--- a/addons/point_of_sale/static/src/js/db.js
+++ b/addons/point_of_sale/static/src/js/db.js
@@ -267,10 +267,19 @@ function openerp_pos_db(instance, module){
return results;
},
add_order: function(order){
- var order_id = this.load('last_order_id',0) + 1;
+ var order_id = order.uid;
var orders = this.load('orders',[]);
+
+ // if the order was already stored, we overwrite its data
+ for(var i = 0, len = orders.length; i < len; i++){
+ if(orders[i].id === order_id){
+ orders[i].data = order;
+ this.save('orders',orders);
+ return order_id;
+ }
+ }
+
orders.push({id: order_id, data: order});
- this.save('last_order_id', order_id);
this.save('orders',orders);
return order_id;
},
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 426bea9a9b7..ec4924c6068 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -262,36 +262,80 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
this.set('selectedOrder', order);
},
- // saves the order locally and try to send it to the backend. 'record' is a bizzarely defined JSON version of the Order
- // it returns a deferred that succeeds or fail when the pushed order is successfully posted on the server, previously failed orders
- // will try to be re-sent but don't make this method return false if they fail. ( So that in the unlikely case of an order making
- // the server crash, the other orders can still be sent )
- // payment process )
- push_order: function(record) {
+ // saves the order locally and try to send it to the backend.
+ // it returns a deferred that succeeds after having tried to send the order and all the other pending orders.
+ push_order: function(order) {
var self = this;
- var order_id = this.db.add_order(record);
+ var order_id = this.db.add_order(order.export_as_JSON());
var pushed = new $.Deferred();
this.set('nbr_pending_operations',self.db.get_orders().length);
this.flush_mutex.exec(function(){
+ var flushed = self._flush_all_orders();
- //first we try to push all orders (the one we added and the one that were not sent)
- var tried_all = self._flush_all_orders();
- var done = new $.Deferred();
+ flushed.always(function(){
+ pushed.resolve();
+ });
- tried_all.always(function(){
- // then we verify that the one we just added has been sent successfuly.
- self._flush_order(order_id)
- .done( function(){ pushed.resolve();})
- .fail( function(){ pushed.reject(); })
- .always( function(){ done.resolve(); });
+ return flushed;
+ });
+ return pushed;
+ },
+
+ // saves the order locally and try to send it to the backend and make an invoice
+ // returns a deferred that succeeds when the order has been posted and successfully generated
+ // an invoice. This method can fail in various ways:
+ // error-no-client: the order must have an associated partner_id. You can retry to make an invoice once
+ // this error is solved
+ // error-transfer: there was a connection error during the transfer. You can retry to make the invoice once
+ // the network connection is up
+
+ push_and_invoice_order: function(order){
+ var self = this;
+ var invoiced = new $.Deferred();
+
+ if(!order.get_client()){
+ invoiced.reject('error-no-client');
+ return invoiced;
+ }
+
+ var order_id = this.db.add_order(order.export_as_JSON());
+
+ this.set('nbr_pending_operations',self.db.get_orders().length);
+
+ this.flush_mutex.exec(function(){
+ var done = new $.Deferred(); // holds the mutex
+
+ // send the order to the server
+ // we have a 30 seconds timeout on this push.
+ // FIXME: if the server takes more than 30 seconds to accept the order,
+ // the client will believe it wasn't successfully sent, and very bad
+ // things will happen as a duplicate will be sent next time
+ // so we must make sure the server detects and ignores duplicated orders
+
+ var transfer = self._flush_order(order_id, {timeout:30000, to_invoice:true});
+
+ transfer.fail(function(){
+ invoiced.reject('error-transfer');
+ done.reject();
+ });
+
+ // on success, get the order id generated by the server
+ transfer.pipe(function(order_server_id){
+ // generate the pdf and download it
+ self.pos_widget.do_action('point_of_sale.pos_invoice_report',{additional_context:{
+ active_ids:order_server_id,
+ }});
+ invoiced.resolve();
+ done.resolve();
});
return done;
+
});
- return pushed;
+ return invoiced;
},
// attemps to send all pending orders ( stored in the pos_db ) to the server,
@@ -316,23 +360,30 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
},
// attempts to send the locally stored order of id 'order_id'
- // the sending is asynchronous and can take a long time to decide if it is successful or not (60s)
+ // the sending is asynchronous and can take some time to decide if it is successful or not
// it is therefore important to only call this method from inside a mutex
// this method returns a deferred indicating wether the sending was successful or not
- _flush_order: function(order_id){
+ // there is a timeout parameter which is set to 2 seconds by default.
+ _flush_order: function(order_id, options){
var self = this;
+ options = options || {};
+ timeout = typeof options.timeout === 'number' ? options.timeout : 5000;
+
var order = this.db.get_order(order_id);
+ order.to_invoice = options.to_invoice || false;
if(!order){
- // flushing a non existing order always succeeds
- return (new $.Deferred()).resolve();
+ // flushing a non existing order always fails
+ return (new $.Deferred()).reject();
}
- //we try to send the order. shadow prevents a spinner if it takes too long.
- var rpc = (new instance.web.Model('pos.order')).call('create_from_ui',[[order]],undefined,{shadow: true, timeout: 2000});
+ // we try to send the order. shadow prevents a spinner if it takes too long. (unless we are sending an invoice,
+ // then we want to notify the user that we are waiting on something )
+ var rpc = (new instance.web.Model('pos.order')).call('create_from_ui',[[order]],undefined,{shadow: !options.to_invoice, timeout:timeout});
rpc.fail(function(unused,event){
- //prevent an error popup creation by the rpc failure
+ // prevent an error popup creation by the rpc failure
+ // we want the failure to be silent as we send the orders in the background
event.preventDefault();
console.error('Failed to send order:',order);
});
@@ -664,11 +715,12 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
module.Order = Backbone.Model.extend({
initialize: function(attributes){
Backbone.Model.prototype.initialize.apply(this, arguments);
+ this.uid = this.generateUniqueId();
this.set({
creationDate: new Date(),
orderLines: new module.OrderlineCollection(),
paymentLines: new module.PaymentlineCollection(),
- name: "Order " + this.generateUniqueId(),
+ name: "Order " + this.uid,
client: null,
});
this.pos = attributes.pos;
@@ -844,7 +896,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
currency: this.pos.get('currency'),
};
},
- exportAsJSON: function() {
+ export_as_JSON: function() {
var orderLines, paymentLines;
orderLines = [];
(this.get('orderLines')).each(_.bind( function(item) {
@@ -865,6 +917,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
pos_session_id: this.pos.get('pos_session').id,
partner_id: this.get_client() ? this.get_client().id : false,
user_id: this.pos.get('cashier') ? this.pos.get('cashier').id : this.pos.get('user').id,
+ uid: this.uid,
};
},
getSelectedLine: function(){
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index a99de66988d..6c96d51748b 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -433,6 +433,14 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
template:'ErrorNegativePricePopupWidget',
});
+ module.ErrorNoClientPopupWidget = module.ErrorPopupWidget.extend({
+ template: 'ErrorNoClientPopupWidget',
+ });
+
+ module.ErrorInvoiceTransferPopupWidget = module.ErrorPopupWidget.extend({
+ template: 'ErrorInvoiceTransferPopupWidget',
+ });
+
module.ScaleInviteScreenWidget = module.ScreenWidget.extend({
template:'ScaleInviteScreenWidget',
@@ -639,7 +647,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
var cashregister = selfCheckoutRegisters[0] || self.pos.get('cashRegisters').models[0];
currentOrder.addPaymentLine(cashregister);
- self.pos.push_order(currentOrder.exportAsJSON())
+ self.pos.push_order(currentOrder)
currentOrder.destroy();
self.pos.proxy.transaction_end();
self.pos_widget.screen_selector.set_current_screen(self.next_screen);
@@ -807,19 +815,40 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this._super();
var self = this;
- this.add_action_button({
+ var print_button = this.add_action_button({
label: 'Print',
icon: '/point_of_sale/static/src/img/icons/png48/printer.png',
click: function(){ self.print(); },
});
- this.add_action_button({
+ var finish_button = this.add_action_button({
label: 'Next Order',
icon: '/point_of_sale/static/src/img/icons/png48/go-next.png',
click: function() { self.finishOrder(); },
});
window.print();
+
+ // THIS IS THE HACK OF THE CENTURY
+ //
+ // The problem is that in chrome the print() is asynchronous and doesn't
+ // execute until all rpc are finished. So it conflicts with the rpc used
+ // to send the orders to the backend, and the user is able to go to the next
+ // screen before the printing dialog is opened. The problem is that what's
+ // printed is whatever is in the page when the dialog is opened and not when it's called,
+ // and so you end up printing the product list instead of the receipt...
+ //
+ // Fixing this would need a re-architecturing
+ // of the code to postpone sending of orders after printing.
+ //
+ // But since the print dialog also blocks the other asynchronous calls, the
+ // button enabling in the setTimeout() is blocked until the printing dialog is
+ // closed. But this is not reliable ... if the timeout is too slow it doesn't work
+
+ finish_button.set_disabled(true);
+ setTimeout(function(){
+ finish_button.set_disabled(false);
+ }, 2000);
},
print: function() {
window.print();
@@ -896,7 +925,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
});
this.updatePaymentSummary();
- this.line_refocus();
+ this.line_refocus();this
},
close: function(){
this._super();
@@ -907,18 +936,43 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this.pos_widget.screen_selector.set_current_screen(self.back_screen);
},
validateCurrentOrder: function(options) {
+ var self = this;
options = options || {};
var currentOrder = this.pos.get('selectedOrder');
- this.pos.push_order(currentOrder.exportAsJSON())
+
if(options.invoice){
- console.log('send invoice');
- }else if(this.pos.iface_print_via_proxy){
- this.pos.proxy.print_receipt(currentOrder.export_for_printing());
- this.pos.get('selectedOrder').destroy(); //finish order and go back to scan screen
+ // deactivate the validation button while we try to send the order
+ this.pos_widget.action_bar.set_button_disabled('validation',true);
+ this.pos_widget.action_bar.set_button_disabled('invoice',true);
+
+ var invoiced = this.pos.push_and_invoice_order(currentOrder);
+
+ invoiced.fail(function(error){
+ if(error === 'error-no-client'){
+ self.pos_widget.screen_selector.show_popup('error-no-client');
+ }else{
+ self.pos_widget.screen_selector.show_popup('error-invoice-transfer');
+ }
+ self.pos_widget.action_bar.set_button_disabled('validation',false);
+ self.pos_widget.action_bar.set_button_disabled('invoice',false);
+ });
+
+ invoiced.done(function(){
+ self.pos_widget.action_bar.set_button_disabled('validation',false);
+ self.pos_widget.action_bar.set_button_disabled('invoice',false);
+ self.pos.get('selectedOrder').destroy();
+ });
+
}else{
- this.pos_widget.screen_selector.set_current_screen(this.next_screen);
+ this.pos.push_order(currentOrder)
+ if(this.pos.iface_print_via_proxy){
+ this.pos.proxy.print_receipt(currentOrder.export_for_printing());
+ this.pos.get('selectedOrder').destroy(); //finish order and go back to scan screen
+ }else{
+ this.pos_widget.screen_selector.set_current_screen(this.next_screen);
+ }
}
},
bindPaymentLineEvents: function() {
diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js
index cec48dbe72f..6a606652a8e 100644
--- a/addons/point_of_sale/static/src/js/widgets.js
+++ b/addons/point_of_sale/static/src/js/widgets.js
@@ -828,6 +828,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
instance.web.blockUI();
this.pos = new module.PosModel(this.session);
+ this.pos.pos_widget = this;
this.pos_widget = this; //So that pos_widget's childs have pos_widget set automatically
this.numpad_visible = true;
@@ -942,6 +943,12 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
this.error_negative_price_popup = new module.ErrorNegativePricePopupWidget(this, {});
this.error_negative_price_popup.appendTo($('.point-of-sale'));
+ this.error_no_client_popup = new module.ErrorNoClientPopupWidget(this, {});
+ this.error_no_client_popup.appendTo($('.point-of-sale'));
+
+ this.error_invoice_transfer_popup = new module.ErrorInvoiceTransferPopupWidget(this, {});
+ this.error_invoice_transfer_popup.appendTo($('.point-of-sale'));
+
// -------- Misc ---------
this.notification = new module.SynchNotificationWidget(this,{});
@@ -1003,6 +1010,8 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
'error-session': this.error_session_popup,
'error-negative-price': this.error_negative_price_popup,
'choose-receipt': this.choose_receipt_popup,
+ 'error-no-client': this.error_no_client_popup,
+ 'error-invoice-transfer': this.error_invoice_transfer_popup,
},
default_client_screen: 'welcome',
default_cashier_screen: 'products',
diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml
index 1dce368b9cb..e28ea1c06b0 100644
--- a/addons/point_of_sale/static/src/xml/pos.xml
+++ b/addons/point_of_sale/static/src/xml/pos.xml
@@ -336,11 +336,11 @@
The scanned product was not recognized Please wait, a cashier is on the way
-
-
-
@@ -361,6 +361,33 @@
+
+
+
+
An anonymous order cannot be invoiced
+
+
+
+
+
+
+
+
+
The Order could not be sent to the server for invoicing. Invoices cannot be generated
+ in offline mode. Please check your internet connection and try again.
+
+
+
+
+
From ef81f0bd43d0e218a68b959e23c26dc22015088b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?=
Date: Thu, 11 Apr 2013 14:22:50 +0200
Subject: [PATCH 17/43] [IMP] point_of_sale: add a configuration option to
enable invoicing from the Point of Sale (enabled by default)
bzr revid: fva@openerp.com-20130411122250-aju5cl91wduj2bj0
---
addons/point_of_sale/point_of_sale.py | 2 ++
addons/point_of_sale/point_of_sale_view.xml | 1 +
addons/point_of_sale/static/src/js/models.js | 3 +-
addons/point_of_sale/static/src/js/screens.js | 28 +++++++++++--------
4 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 9363afe01ea..fa7fcba6bf1 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -63,6 +63,7 @@ class pos_config(osv.osv):
'iface_electronic_scale' : fields.boolean('Electronic Scale Interface'),
'iface_vkeyboard' : fields.boolean('Virtual KeyBoard Interface'),
'iface_print_via_proxy' : fields.boolean('Print via Proxy'),
+ 'iface_invoicing': fields.boolean('Invoicing',help='Enables invoice generation from the Point of Sale'),
'state' : fields.selection(POS_CONFIG_STATE, 'Status', required=True, readonly=True),
'sequence_id' : fields.many2one('ir.sequence', 'Order IDs Sequence', readonly=True,
@@ -121,6 +122,7 @@ class pos_config(osv.osv):
'shop_id': _default_shop,
'journal_id': _default_sale_journal,
'group_by' : True,
+ 'iface_invoicing': True,
}
def set_active(self, cr, uid, ids, context=None):
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index 8a53015b7d7..cd2d01333bd 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -790,6 +790,7 @@
+
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index ec4924c6068..4f10d10fab3 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -160,7 +160,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
['name','journal_ids','shop_id','journal_id',
'iface_self_checkout', 'iface_led', 'iface_cashdrawer',
'iface_payment_terminal', 'iface_electronic_scale', 'iface_barscan', 'iface_vkeyboard',
- 'iface_print_via_proxy','iface_cashdrawer','state','sequence_id','session_ids'],
+ 'iface_print_via_proxy','iface_cashdrawer','iface_invoicing','state','sequence_id','session_ids'],
[['id','=', self.get('pos_session').config_id[0]]]
);
}).then(function(configs){
@@ -171,6 +171,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
self.iface_vkeyboard = !!pos_config.iface_vkeyboard;
self.iface_self_checkout = !!pos_config.iface_self_checkout;
self.iface_cashdrawer = !!pos_config.iface_cashdrawer;
+ self.iface_invoicing = !!pos_config.iface_invoicing;
return self.fetch('sale.shop',[],[['id','=',pos_config.shop_id[0]]]);
}).then(function(shops){
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index 6c96d51748b..651fe7bdea5 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -843,7 +843,9 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
//
// But since the print dialog also blocks the other asynchronous calls, the
// button enabling in the setTimeout() is blocked until the printing dialog is
- // closed. But this is not reliable ... if the timeout is too slow it doesn't work
+ // closed. But the timeout has to be big enough or else it doesn't work
+ // 2 seconds is the same as the default timeout for sending orders and so the dialog
+ // should have appeared before the timeout... so yeah that's not ultra reliable.
finish_button.set_disabled(true);
setTimeout(function(){
@@ -898,7 +900,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this.set_numpad_state(this.pos_widget.numpad.state);
- this.back_button = this.add_action_button({
+ this.add_action_button({
label: 'Back',
icon: '/point_of_sale/static/src/img/icons/png48/go-previous.png',
click: function(){
@@ -906,7 +908,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
},
});
- this.validate_button = this.add_action_button({
+ this.add_action_button({
label: 'Validate',
name: 'validation',
icon: '/point_of_sale/static/src/img/icons/png48/validate.png',
@@ -914,15 +916,17 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
self.validateCurrentOrder();
},
});
-
- this.invoice_button = this.add_action_button({
- label: 'Invoice',
- name: 'invoice',
- icon: '/point_of_sale/static/src/img/icons/png48/invoice.png',
- click: function(){
- self.validateCurrentOrder({invoice: true});
- },
- });
+
+ if(this.pos.iface_invoicing){
+ this.add_action_button({
+ label: 'Invoice',
+ name: 'invoice',
+ icon: '/point_of_sale/static/src/img/icons/png48/invoice.png',
+ click: function(){
+ self.validateCurrentOrder({invoice: true});
+ },
+ });
+ }
this.updatePaymentSummary();
this.line_refocus();this
From 5a5c6eeb7a9e89faae25786f59276de485c27faf Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Thu, 25 Apr 2013 16:16:33 +0530
Subject: [PATCH 18/43] [IMP] remove base tax code from childs.
bzr revid: tpa@tinyerp.com-20130425104633-uiwvtx74f45p3vs0
---
addons/l10n_in/l10n_in_public_tax_template.xml | 12 +-----------
addons/l10n_in/l10n_in_tax_code_template.xml | 13 +++++++++----
2 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index 6c0a63f0090..aaf51b535ed 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -106,7 +106,6 @@
0.0200
-
@@ -120,7 +119,6 @@
0.0100
-
@@ -161,7 +159,6 @@
21
-
@@ -176,7 +173,6 @@
22
-
@@ -218,7 +214,6 @@
21
-
@@ -233,7 +228,6 @@
22
-
@@ -262,7 +256,6 @@
2
-
@@ -277,7 +270,6 @@
3
-
@@ -652,7 +644,7 @@
1
-
+
@@ -666,7 +658,6 @@
1
-
@@ -681,7 +672,6 @@
1
-
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index e9bbcc28faa..c547b84821f 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -48,7 +48,7 @@
- Excise Duty - (12% + 2% +1%) Sales
+ Excise Duty 12.36% - Sales
@@ -58,7 +58,7 @@
- Input Credit - Service Tax (12% + 2% + 1%) Purchase
+ Input Credit - Service Tax 12.36% - Purchase
@@ -98,7 +98,7 @@
- Input Credit - Service Tax (12% + 2% + 1%)
+ Input Credit - Service Tax 12.36%
@@ -403,7 +403,7 @@
- Service Tax (12% + 2% + 1%) Sales
+ Service Tax 12.36% - Sales
@@ -422,5 +422,10 @@
+
+ Service Tax 12% - Sales
+
+
+
From d490560859771a16bf99b7a992ff4fd0247e908a Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Tue, 30 Apr 2013 16:58:38 +0530
Subject: [PATCH 19/43] [IMP] improved data and sign for tax paid.
bzr revid: tpa@tinyerp.com-20130430112838-ub3x3iko5pnui1yp
---
.../l10n_in/l10n_in_public_tax_template.xml | 93 ++++++++++---------
addons/l10n_in/l10n_in_tax_code_template.xml | 17 ++--
2 files changed, 57 insertions(+), 53 deletions(-)
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index aaf51b535ed..f848045e705 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -104,6 +104,7 @@
purchasepercent0.0200
+ 3
@@ -117,6 +118,7 @@
purchasepercent0.0100
+ 5
@@ -137,47 +139,6 @@
-
- Input Excise Duty 6%
- Input Excise Duty 6%
- purchase
- percent
- 0.0600
-
-
-
-
-
-
-
-
- Education Cess 2% Purchase
- Education Cess 2% Purchase
- purchase
- percent
- 0.0200
- 21
-
-
-
-
-
-
-
-
- Seco. & Higher Edu. Cess 1% Purchase
- Seco. & Higher Edu. Cess 1% Purchase
- all
- percent
- 0.0100
- 22
-
-
-
-
-
-
-
Input Excise Duty 5%Input Excise Duty 5%
@@ -253,7 +214,7 @@
salepercent0.0200
- 2
+ 3
@@ -267,7 +228,7 @@
salepercent0.0100
- 3
+ 5
@@ -635,6 +596,48 @@
+
+ Input Excise Duty 6%
+ Input Excise Duty 6%
+ purchase
+ percent
+ 0.0600
+ 1
+
+
+
+
+
+
+
+
+ Education Cess 2% Purchase
+ Education Cess 2% Purchase
+ purchase
+ percent
+ 0.0200
+ 21
+
+
+
+
+
+
+
+
+ Seco. & Higher Edu. Cess 1% Purchase
+ Seco. & Higher Edu. Cess 1% Purchase
+ all
+ percent
+ 0.0100
+ 22
+
+
+
+
+
+
+
Service Tax 12% - SalesService Tax 12% - Sales
@@ -655,7 +658,7 @@
salepercent0.02
- 1
+ 3
@@ -669,7 +672,7 @@
salepercent0.01
- 1
+ 5
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index c547b84821f..b067ef6a601 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -19,6 +19,7 @@
Tax Paid
+ -1
@@ -52,6 +53,11 @@
+
+ Sales Service Tax 12%
+
+
+
Excise Duty 12% - Sales
@@ -208,7 +214,7 @@
- TDS on Director's Interest
+ TDS on Director's Interest
@@ -268,7 +274,7 @@
- CST 5% on Sales
+ Sales CST 5%
@@ -358,7 +364,7 @@
- Sales Export - SEZ - In Gujarat
+ Sales Export - SEZ - In Gujarat
@@ -422,10 +428,5 @@
-
- Service Tax 12% - Sales
-
-
-
From 57c9a37374697df0103b389f4f1e17de05746e78 Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Thu, 2 May 2013 11:37:37 +0530
Subject: [PATCH 20/43] [ADD] Add Refund Base Code and Refund tax code for
public chart.
bzr revid: tpa@tinyerp.com-20130502060737-qhyev1c1u138ho1n
---
.../l10n_in/l10n_in_public_tax_template.xml | 183 +++++++++++++++++-
1 file changed, 182 insertions(+), 1 deletion(-)
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index f848045e705..124f0f6975e 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -13,7 +13,9 @@
+
+
@@ -27,6 +29,10 @@
+
+
+
+
@@ -40,6 +46,10 @@
+
+
+
+
@@ -53,6 +63,10 @@
+
+
+
+
@@ -67,6 +81,10 @@
+
+
+
+
@@ -81,6 +99,10 @@
+
+
+
+
@@ -95,6 +117,10 @@
+
+
+
+
@@ -108,6 +134,8 @@
+
+
@@ -122,6 +150,8 @@
+
+
@@ -136,6 +166,10 @@
+
+
+
+
@@ -149,6 +183,10 @@
+
+
+
+
@@ -163,6 +201,10 @@
+
+
+
+
@@ -176,6 +218,8 @@
+
+
@@ -190,6 +234,8 @@
+
+
@@ -205,6 +251,10 @@
+
+
+
+
@@ -218,6 +268,8 @@
+
+
@@ -232,6 +284,8 @@
+
+
@@ -246,6 +300,10 @@
+
+
+
+
@@ -259,6 +317,10 @@
+
+
+
+
@@ -272,6 +334,10 @@
+
+
+
+
@@ -285,6 +351,10 @@
+
+
+
+
@@ -298,6 +368,10 @@
+
+
+
+
@@ -312,6 +386,10 @@
+
+
+
+
@@ -325,6 +403,10 @@
+
+
+
+
@@ -338,6 +420,10 @@
+
+
+
+
@@ -351,6 +437,10 @@
+
+
+
+
@@ -365,7 +455,10 @@
-
+
+
+
+
@@ -380,6 +473,10 @@
+
+
+
+
@@ -394,6 +491,10 @@
+
+
+
+
@@ -408,6 +509,10 @@
+
+
+
+
@@ -422,6 +527,10 @@
+
+
+
+
@@ -437,6 +546,10 @@
+
+
+
+
@@ -451,6 +564,10 @@
+
+
+
+
@@ -465,6 +582,10 @@
+
+
+
+
@@ -479,6 +600,10 @@
+
+
+
+
@@ -493,6 +618,10 @@
+
+
+
+
@@ -504,6 +633,10 @@
0.02
+
+
+
+
@@ -517,6 +650,10 @@
+
+
+
+
@@ -530,6 +667,10 @@
+
+
+
+
@@ -543,6 +684,10 @@
+
+
+
+
@@ -553,6 +698,10 @@
fixed
+
+
+
+
@@ -563,6 +712,10 @@
percent
+
+
+
+
@@ -573,6 +726,10 @@
percent
+
+
+
+
@@ -583,6 +740,10 @@
percent
+
+
+
+
@@ -593,6 +754,10 @@
percent
+
+
+
+
@@ -607,6 +772,10 @@
+
+
+
+
@@ -620,6 +789,8 @@
+
+
@@ -634,6 +805,8 @@
+
+
@@ -649,6 +822,10 @@
+
+
+
+
@@ -662,6 +839,8 @@
+
+
@@ -676,6 +855,8 @@
+
+
From 2aa9e4b58d96aff4a94405140b107176551acce2 Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Thu, 2 May 2013 16:59:21 +0530
Subject: [PATCH 21/43] [IMP] improved chart of account for private LTD
bzr revid: tpa@tinyerp.com-20130502112921-12c0cfp4a7ix9lpw
---
addons/l10n_in/l10n_in_private_chart.xml | 40 +-
.../l10n_in/l10n_in_private_tax_template.xml | 530 +++++++++++-------
addons/l10n_in/l10n_in_public_chart.xml | 6 +-
.../l10n_in/l10n_in_public_tax_template.xml | 32 +-
addons/l10n_in/l10n_in_tax_code_template.xml | 178 +++++-
5 files changed, 550 insertions(+), 236 deletions(-)
diff --git a/addons/l10n_in/l10n_in_private_chart.xml b/addons/l10n_in/l10n_in_private_chart.xml
index 671fdc334d9..4b8e4be55bf 100644
--- a/addons/l10n_in/l10n_in_private_chart.xml
+++ b/addons/l10n_in/l10n_in_private_chart.xml
@@ -135,11 +135,47 @@
Tax Receivable189
- other
+ view
-
+
+
+ Purchase Tax Receivable
+ 189100
+ other
+
+
+
+
+
+
+ VAT Receivable
+ 189200
+ other
+
+
+
+
+
+
+ Service Tax Receivable
+ 189300
+ other
+
+
+
+
+
+
+ Exice Duty Receivable
+ 189400
+ other
+
+
+
+
+
diff --git a/addons/l10n_in/l10n_in_private_tax_template.xml b/addons/l10n_in/l10n_in_private_tax_template.xml
index 7aec30f0575..9516774c547 100644
--- a/addons/l10n_in/l10n_in_private_tax_template.xml
+++ b/addons/l10n_in/l10n_in_private_tax_template.xml
@@ -2,269 +2,417 @@
-
+
- Sale Tax-15%
-
+ Sale Tax 15%0.15percentsale
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
- Sale Tax-12%
-
+ Sale Tax 12%0.12percentsale
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
- Sale Tax-4%
-
+ Sale Tax 4%0.04percentsale
-
-
-
-
-
+
+
+
+
+
+
-
+
- Purchase Tax-15%
+ Purchase Tax 15%
-
-
+ 0.15percentpurchase
-
-
-
-
+
+
+
+
+
+
-
+
-
-
- VAT-5%(4% VAT+1% Add. Tax.)
-
+
+
+ Output VAT 5% (VAT 4% + Add. VAT 1%)
+ Output VAT 5%
+ sale
+ percent
+ 0.04
+
+
+
+
+
+
+
+
+
+
+
+
+ Input VAT 5% (VAT 4% + Add. VAT 1%)
+ Input VAT 5%0.05percent
- all
-
-
-
- 1
-
- 1
-
- 1
-
- 1
-
+ purchase
+
+
+
+
+
+
+
+
-
-
- VAT-15%(12.5% VAT+2.5% Add. Tax.)
-
+
+
+ Input VAT 15% (VAT 12.5% + Add. VAT 2.5%)
+ Input VAT 15%0.15percent
- all
-
-
-
- 1
-
- 1
-
- 1
-
- 1
-
+ purchase
+
+
+
+
+
+
+
+
-
-
- VAT-8%
-
+
+
+ Output VAT 15% (VAT 12.5% + Add. VAT 2.5%)
+ Output VAT 15%
+ 0.15
+ percent
+ sale
+
+
+
+
+
+
+
+
+
+
+
+
+ Input VAT 8%
+ Input VAT 8%0.08percent
- all
-
-
-
-
-
-
-
+ purchase
+
+
+
+
+
+
+
+
-
- VAT-10%
-
+
+ Output VAT 8%
+ Output VAT 8%
+ 0.08
+ percent
+ sale
+
+
+
+
+
+
+
+
+
+
+
+
+ Input VAT 10%
+ Input VAT 10%0.10percent
- all
-
-
-
-
-
-
-
+ purchase
+
+
+
+
+
+
+
+
-
- VAT-12.5%
-
- 12.5
- percent
- all
-
-
-
-
-
-
-
-
-
-
-
-
-
- Excise Duty-10.30%
-
+
+ Output VAT 10%
+ Output VAT 10%0.10percentsale
-
-
-
- 1
-
- 1
-
- 1
-
- 1
-
+
+
+
+
+
+
+
+
-
-
- Excise Duty-2%
- 0.02
+
+
+ Input VAT 12.5%
+ Input VAT 12.5%
+ 0.125
+ percent
+ purchase
+
+
+
+
+
+
+
+
+
+
+
+
+ Output VAT 12.5%
+ Output VAT 12.5%
+ 0.125percentsale
-
-
-
-
- 1
-
- 1
-
- 1
-
- 1
+
+
+
+
+
+
+
+
-
-
- Excise Duty-1%
- 0.01
- percent
+
+
+
+
+ Excise Duty 12% - Sales
+ Excise Duty 12% - Salessale
+ percent
+ 0.1200
-
-
- 1
-
- 1
-
- 1
-
- 1
-
+
+
+
+
+
+
+
-
+
+
+ Excise Duty 2% - Sales
+ Excise Duty 2% - Sales
+ sale
+ percent
+ 0.020
+
+
+
+
+
+
+
+
+
+
+
+
+ Excise Duty 1% - Sales
+ Excise Duty 1% - Sales
+ sale
+ percent
+ 0.0100
+
+
+
+
+
+
+
+
+
+
+
-
-
- all
- Service Tax-12.30%
-
+
+
+ Service Tax 12% - Sales
+ Service Tax 12% - Sales
+ sale
+ percent0.12
- percent
+ 1
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
- Service Tax-%2
+
+
+ Service Tax 2% - Sales
+ Service Tax 2% - Sales
+ sale
+ percent0.02
- percent
- all
+ 3
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
- Service Tax-%1
+
+
+ Service Tax 1% - Sales
+ Service Tax 1% - Sales
+ sale
+ percent0.01
- percent
- all
+ 5
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+ Service Tax 12% - Sales
+ Service Tax 12% - Sales
+ sale
+ percent
+ 0.12
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ Input Service Tax 12%
+ Input Service Tax 12%
+ purchase
+ percent
+ 0.1200
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ Input Service Tax Edu. Cess. 2%
+ Input Service Tax Edu. Cess. 2%
+ purchase
+ percent
+ 0.0200
+ 3
+
+
+
+
+
+
+
+
+
+
+ Input Service Tax Seco. & HEC 1%
+ Input Service Tax Seco. & HEC 1%
+ purchase
+ percent
+ 0.0100
+ 5
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/l10n_in/l10n_in_public_chart.xml b/addons/l10n_in/l10n_in_public_chart.xml
index 9a743dfd080..91d285408d5 100644
--- a/addons/l10n_in/l10n_in_public_chart.xml
+++ b/addons/l10n_in/l10n_in_public_chart.xml
@@ -668,7 +668,7 @@
- Input Credit - Service Tax Seco. & HEC 1%
+ Input Service Tax Seco. & HEC 1%154002other
@@ -716,7 +716,7 @@
- Input Credit - Service Tax 12%
+ Input Service Tax 12%154008other
@@ -724,7 +724,7 @@
- Input Credit - Service Tax Edu. Cess. 2%
+ Input Service Tax Edu. Cess. 2%154009other
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index 124f0f6975e..c97167f0b43 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -107,8 +107,8 @@
- Input Credit - Service Tax 12%
- Input Credit - Service Tax 12%
+ Input Service Tax 12%
+ Input Service Tax 12%purchasepercent0.1200
@@ -125,8 +125,8 @@
- Input Credit - Service Tax Edu. Cess. 2%
- Input Credit - Service Tax Edu. Cess. 2%
+ Input Service Tax Edu. Cess. 2%
+ Input Service Tax Edu. Cess. 2%purchasepercent0.0200
@@ -141,8 +141,8 @@
- Input Credit - Service Tax Seco. & HEC 1%
- Input Credit - Service Tax Seco. & HEC 1%
+ Input Service Tax Seco. & HEC 1%
+ Input Service Tax Seco. & HEC 1%purchasepercent0.0100
@@ -249,9 +249,9 @@
-
+
-
+
@@ -454,10 +454,10 @@
-
+
-
+
@@ -544,9 +544,9 @@
-
+
-
+
@@ -580,9 +580,9 @@
60
-
+
-
+
@@ -598,9 +598,9 @@
80
-
+
-
+
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index b067ef6a601..7d5e5a11736 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -48,23 +48,33 @@
-
- Excise Duty 12.36% - Sales
-
-
-
Sales Service Tax 12%
+
+ Excise Duty 12.36% - Sales
+
+
+
Excise Duty 12% - Sales
+
+ Excise Duty 2% - Sales
+
+
+
+
+ Excise Duty 1% - Sales
+
+
+
- Input Credit - Service Tax 12.36% - Purchase
+ Input Service Tax 12.36% - Purchase
@@ -104,22 +114,22 @@
- Input Credit - Service Tax 12.36%
+ Input Service Tax 12.36%
- Input Credit - Service Tax 12%
+ Input Service Tax 12%
- Input Credit - Service Tax Edu. Cess. 2%
+ Input Service Tax Edu. Cess. 2%
- Input Credit - Service Tax Seco. & HEC 1%
+ Input Service Tax Seco. & HEC 1%
@@ -163,13 +173,48 @@
+
+ Input VAT 10%
+
+
+
+
+ Input VAT 8%
+
+
+
+
+ Input VAT 5%
+
+
+
Input VAT 4%
-
- Output Adi. VAT 1%
+
+ Output VAT 15%
+
+
+
+
+ Output VAT 12.5%
+
+
+
+
+ Output VAT 10%
+
+
+
+
+ Output VAT 8%
+
+
+
+
+ Output VAT 5%
@@ -178,6 +223,11 @@
+
+ Output Adi. VAT 1%
+
+
+
CST 2% on Purchase
@@ -263,12 +313,12 @@
-
- Sales VAT 4% / Sales CST 2% / Sales CST 5%
+
+ Sales Excise
-
+ Sales CST 2%
@@ -278,13 +328,8 @@
-
- Purchase VAT 4%
-
-
-
-
- Purchase VAT 12.5% / VAT 15%
+
+ Purchase VAT 15%
@@ -293,11 +338,56 @@
-
- Purchase VAT 15%
+
+ Purchase VAT 10%
+
+ Purchase VAT 8%
+
+
+
+
+ Purchase VAT 5%
+
+
+
+
+ Purchase VAT 4%
+
+
+
+
+ Purchase VAT 2.5%
+
+
+
+
+ Sales VAT 15%
+
+
+
+
+ Sales VAT 12.5%
+
+
+
+
+ Sales VAT 10%
+
+
+
+
+ Sales VAT 8%
+
+
+
+
+ Sales VAT 5%
+
+
+
Sales VAT 4%
@@ -428,5 +518,45 @@
+
+ Sale Tax 15%
+
+
+
+
+ Sale Tax - 15%
+
+
+
+
+ Sale Tax 12%
+
+
+
+
+ Sale Tax - 12%
+
+
+
+
+ Sale Tax 4%
+
+
+
+
+ Sale Tax - 4%
+
+
+
+
+ Purchase Tax 15%
+
+
+
+
+ Purchase Tax - 15%
+
+
+
From 3946ab9daea8ba8c9f6cdddc116c365fbc62be0d Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Fri, 3 May 2013 15:26:52 +0530
Subject: [PATCH 22/43] [IMP] improved code.
bzr revid: tpa@tinyerp.com-20130503095652-6tjtg1hy08d43ssv
---
.../l10n_in/l10n_in_private_tax_template.xml | 76 ++++++++-----------
.../l10n_in/l10n_in_public_tax_template.xml | 44 +++++------
addons/l10n_in/l10n_in_tax_code_template.xml | 19 +++--
3 files changed, 65 insertions(+), 74 deletions(-)
diff --git a/addons/l10n_in/l10n_in_private_tax_template.xml b/addons/l10n_in/l10n_in_private_tax_template.xml
index 9516774c547..ede6f5c998e 100644
--- a/addons/l10n_in/l10n_in_private_tax_template.xml
+++ b/addons/l10n_in/l10n_in_private_tax_template.xml
@@ -4,7 +4,8 @@
- Sale Tax 15%
+ Sales Tax 15%
+ Sales Tax 15%0.15percentsale
@@ -20,7 +21,8 @@
- Sale Tax 12%
+ Sales Tax 12%
+ Sales Tax 12%0.12percentsale
@@ -36,7 +38,8 @@
- Sale Tax 4%
+ Sales Tax 4%
+ Sales Tax 4%0.04percentsale
@@ -55,6 +58,7 @@
Purchase Tax 15%
+ Purchase Tax 15%0.15
@@ -165,10 +169,10 @@
-
+
-
+
@@ -199,10 +203,10 @@
-
+
-
+
@@ -233,10 +237,10 @@
-
+
-
+
@@ -278,8 +282,8 @@
- Excise Duty 1% - Sales
- Excise Duty 1% - Sales
+ Output Excise Duty 1%
+ Output Excise Duty 1%salepercent0.0100
@@ -297,8 +301,8 @@
- Service Tax 12% - Sales
- Service Tax 12% - Sales
+ Output Service Tax 12%
+ Output Service Tax 12%salepercent0.12
@@ -311,12 +315,12 @@
-
+
- Service Tax 2% - Sales
- Service Tax 2% - Sales
+ Output Sales Service Tax 2%
+ Output Sales Service Tax 2%salepercent0.02
@@ -327,12 +331,12 @@
-
+
- Service Tax 1% - Sales
- Service Tax 1% - Sales
+ Output Service Tax 1%
+ Output Service Tax 1%salepercent0.01
@@ -343,25 +347,7 @@
-
-
-
-
- Service Tax 12% - Sales
- Service Tax 12% - Sales
- sale
- percent
- 0.12
- 1
-
-
-
-
-
-
-
-
-
+
@@ -373,13 +359,13 @@
1
-
+
-
+
-
+
@@ -394,8 +380,8 @@
-
-
+
+
@@ -410,8 +396,8 @@
-
-
+
+
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index c97167f0b43..77b897ccbd8 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -107,17 +107,17 @@
- Input Service Tax 12%
- Input Service Tax 12%
+ Service Tax 12% - Purchase
+ Service Tax 12% - Purchasepurchasepercent0.12001
-
+
-
+
@@ -125,8 +125,8 @@
- Input Service Tax Edu. Cess. 2%
- Input Service Tax Edu. Cess. 2%
+ Service Tax Edu. Cess. 2% - Purchase
+ Service Tax Edu. Cess. 2% - Purchasepurchasepercent0.0200
@@ -141,8 +141,8 @@
- Input Service Tax Seco. & HEC 1%
- Input Service Tax Seco. & HEC 1%
+ Service Tax Seco. & HEC 1% - Purchase
+ Service Tax Seco. & HEC 1% - Purchasepurchasepercent0.0100
@@ -472,10 +472,10 @@
-
+
-
+
@@ -526,10 +526,10 @@
-
+
-
+
@@ -628,7 +628,7 @@
No Tax Form HNo Tax Form H
- purchase
+ salepercent0.02
@@ -643,7 +643,7 @@
CST 2% on Sales - CT3 Against Form - CCST 2% on Sales - CT3 Against Form - C
- purchase
+ salepercent0.02
@@ -660,7 +660,7 @@
Output VAT 4% on Sales - CT3Output VAT 4% on Sales - CT3
- purchase
+ salepercent0.04
@@ -677,7 +677,7 @@
Output Adi. VAT 1% on Sales - CT3Output Adi. VAT 1% on Sales - CT3
- purchase
+ salepercent0.01
@@ -694,7 +694,7 @@
No Tax SEZ OGSNo Tax SEZ OGS
- purchase
+ salefixed
@@ -708,7 +708,7 @@
No Tax SEZ GujaratNo Tax SEZ Gujarat
- purchase
+ salepercent
@@ -722,7 +722,7 @@
No Tax Form H with BEDNo Tax Form H with BED
- purchase
+ salepercent
@@ -736,7 +736,7 @@
No Tax Exports - Out of CountryNo Tax Exports - Out of Country
- purchase
+ salepercent
@@ -750,7 +750,7 @@
No Tax ProjectsNo Tax Projects
- purchase
+ salepercent
@@ -798,7 +798,7 @@
Seco. & Higher Edu. Cess 1% PurchaseSeco. & Higher Edu. Cess 1% Purchase
- all
+ purchasepercent0.010022
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index 7d5e5a11736..1b6f0732ba1 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -48,6 +48,11 @@
+
+ Purchase Service Tax 12%
+
+
+
Sales Service Tax 12%
@@ -74,7 +79,7 @@
- Input Service Tax 12.36% - Purchase
+ Excise Duty 12.36% - Purchase
@@ -519,32 +524,32 @@
- Sale Tax 15%
+ Sales Tax 15%
- Sale Tax - 15%
+ Sales Tax - 15%
- Sale Tax 12%
+ Sales Tax 12%
- Sale Tax - 12%
+ Sales Tax - 12%
- Sale Tax 4%
+ Sales Tax 4%
- Sale Tax - 4%
+ Sales Tax - 4%
From 1cc8485b27cda35ed55b8af4c2354a3c0a778dc4 Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Fri, 3 May 2013 15:48:16 +0530
Subject: [PATCH 23/43] [IMP] improved code
bzr revid: tpa@tinyerp.com-20130503101816-yspfiqfkps6q49pn
---
addons/l10n_in/l10n_in_public_tax_template.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/l10n_in/l10n_in_public_tax_template.xml b/addons/l10n_in/l10n_in_public_tax_template.xml
index 77b897ccbd8..887e051121a 100644
--- a/addons/l10n_in/l10n_in_public_tax_template.xml
+++ b/addons/l10n_in/l10n_in_public_tax_template.xml
@@ -134,7 +134,7 @@
-
+
From 88dd2644d5cfc5f3282767fe26da67994bbd4853 Mon Sep 17 00:00:00 2001
From: "Turkesh Patel (Open ERP)"
Date: Mon, 6 May 2013 14:26:45 +0530
Subject: [PATCH 24/43] [IMP] improved tax code for vat 15%
bzr revid: tpa@tinyerp.com-20130506085645-z2h2hnl485xoxwap
---
addons/l10n_in/l10n_in_private_tax_template.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/l10n_in/l10n_in_private_tax_template.xml b/addons/l10n_in/l10n_in_private_tax_template.xml
index ede6f5c998e..5cb835d950c 100644
--- a/addons/l10n_in/l10n_in_private_tax_template.xml
+++ b/addons/l10n_in/l10n_in_private_tax_template.xml
@@ -135,10 +135,10 @@
-
+
-
+
From a7adac1189d062ad8797b8d7ead929b27715cf3c Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Thu, 11 Jul 2013 12:34:22 +0200
Subject: [PATCH 25/43] Now OpenERPSession is a subclass of werkzeug's session
bzr revid: nicolas.vanhoren@openerp.com-20130711103422-w7y05ox7tq0hz0og
---
addons/web/controllers/main.py | 2 +-
addons/web/http.py | 191 +++++++++-----------------
addons/web/static/src/js/chrome.js | 2 +-
addons/web/static/src/js/coresetup.js | 6 +-
4 files changed, 68 insertions(+), 133 deletions(-)
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 846b9099555..2734692b5e9 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -916,7 +916,7 @@ class Session(http.Controller):
@http.route('/web/session/destroy', type='json', auth="user")
def destroy(self):
- request.session._suicide = True
+ request.session.logout()
class Menu(http.Controller):
diff --git a/addons/web/http.py b/addons/web/http.py
index 2f9016cf5cc..8c84083794a 100644
--- a/addons/web/http.py
+++ b/addons/web/http.py
@@ -101,6 +101,8 @@ class WebRequest(object):
self.httprequest = httprequest
self.httpresponse = None
self.httpsession = httprequest.session
+ self.session = httprequest.session
+ self.session_id = httprequest.session.sid
self.db = None
self.uid = None
self.func = None
@@ -111,18 +113,10 @@ class WebRequest(object):
def init(self, params):
self.params = dict(params)
- # OpenERP session setup
- self.session_id = self.params.pop("session_id", None)
- if not self.session_id:
- i0 = self.httprequest.cookies.get("instance0|session_id", None)
- if i0:
- self.session_id = simplejson.loads(urllib2.unquote(i0))
- else:
- self.session_id = uuid.uuid4().hex
- self.session = self.httpsession.get(self.session_id)
- if not self.session:
- self.session = OpenERPSession()
- self.httpsession[self.session_id] = self.session
+
+ #remove now useless session id
+ if "session_id" in self.params:
+ del self.params["session_id"]
with set_request(self):
self.db = self.session._db or db_monodb()
@@ -130,7 +124,7 @@ class WebRequest(object):
# TODO: remove this
# set db/uid trackers - they're cleaned up at the WSGI
# dispatching phase in openerp.service.wsgi_server.application
- if self.session._db:
+ if self.db:
threading.current_thread().dbname = self.session._db
if self.session._uid:
threading.current_thread().uid = self.session._uid
@@ -334,6 +328,7 @@ class JsonRequest(WebRequest):
return self.jsonp_handler()
response = {"jsonrpc": "2.0" }
error = None
+
try:
#if _logger.isEnabledFor(logging.DEBUG):
# _logger.debug("--> %s.%s\n%s", func.im_class.__name__, func.__name__, pprint.pformat(self.jsonrequest))
@@ -626,32 +621,30 @@ class Model(object):
return result
return proxy
-class OpenERPSession(object):
- """
- An OpenERP RPC session, a given user can own multiple such sessions
- in a web session.
+class OpenERPSession(werkzeug.contrib.sessions.Session):
+ def __init__(self, *args, **kwargs):
+ self.inited = False
+ self.modified = False
+ super(OpenERPSession, self).__init__(*args, **kwargs)
+ self.inited = True
+ self.setdefault("_creation_time", time.time())
+ self.setdefault("_db", False)
+ self.setdefault("_uid", False)
+ self.setdefault("_login", False)
+ self.setdefault("_password", False)
+ self.setdefault("context", {})
+ self.setdefault("jsonp_requests", {})
+ self.setdefault("modified", False)
- .. attribute:: context
-
- The session context, a ``dict``. Can be reloaded by calling
- :meth:`openerpweb.openerpweb.OpenERPSession.get_context`
-
- .. attribute:: domains_store
-
- A ``dict`` matching domain keys to evaluable (but non-literal) domains.
-
- Used to store references to non-literal domains which need to be
- round-tripped to the client browser.
- """
- def __init__(self):
- self._creation_time = time.time()
- self._db = False
- self._uid = False
- self._login = False
- self._password = False
- self._suicide = False
- self.context = {}
- self.jsonp_requests = {} # FIXME use a LRU
+ def __getattr__(self, attr):
+ return self.get(attr, None)
+ def __setattr__(self, k, v):
+ if getattr(self, "inited", False):
+ try:
+ object.__getattribute__(self, k)
+ except:
+ return self.__setitem__(k, v)
+ object.__setattr__(self, k, v)
def authenticate(self, db, login=None, password=None, env=None, uid=None):
"""
@@ -660,6 +653,7 @@ class OpenERPSession(object):
:param uid: If not None, that user id will be used instead the login to authenticate the user.
"""
+
if uid is None:
uid = openerp.netsvc.dispatch_rpc('common', 'authenticate', [db, login, password, env])
else:
@@ -684,6 +678,10 @@ class OpenERPSession(object):
raise SessionExpiredException("Session expired")
security.check(self._db, self._uid, self._password)
+ def logout(self):
+ for k in self.keys():
+ del self[k]
+
def get_context(self):
"""
Re-initializes the current user's session context (based on
@@ -791,69 +789,6 @@ class OpenERPSession(object):
return Model(self, model)
-#----------------------------------------------------------
-# Session context manager
-#----------------------------------------------------------
-@contextlib.contextmanager
-def session_context(httprequest, session_store, session_lock, sid):
- with session_lock:
- if sid:
- httprequest.session = session_store.get(sid)
- else:
- httprequest.session = session_store.new()
- try:
- yield httprequest.session
- finally:
- # Remove all OpenERPSession instances with no uid, they're generated
- # either by login process or by HTTP requests without an OpenERP
- # session id, and are generally noise
- removed_sessions = set()
- for key, value in httprequest.session.items():
- if not isinstance(value, OpenERPSession):
- continue
- if getattr(value, '_suicide', False) or (
- not value._uid
- and not value.jsonp_requests
- # FIXME do not use a fixed value
- and value._creation_time + (60*5) < time.time()):
- _logger.debug('remove session %s', key)
- removed_sessions.add(key)
- del httprequest.session[key]
-
- with session_lock:
- if sid:
- # Re-load sessions from storage and merge non-literal
- # contexts and domains (they're indexed by hash of the
- # content so conflicts should auto-resolve), otherwise if
- # two requests alter those concurrently the last to finish
- # will overwrite the previous one, leading to loss of data
- # (a non-literal is lost even though it was sent to the
- # client and client errors)
- #
- # note that domains_store and contexts_store are append-only (we
- # only ever add items to them), so we can just update one with the
- # other to get the right result, if we want to merge the
- # ``context`` dict we'll need something smarter
- in_store = session_store.get(sid)
- for k, v in httprequest.session.iteritems():
- stored = in_store.get(k)
- if stored and isinstance(v, OpenERPSession):
- if hasattr(v, 'contexts_store'):
- del v.contexts_store
- if hasattr(v, 'domains_store'):
- del v.domains_store
- if not hasattr(v, 'jsonp_requests'):
- v.jsonp_requests = {}
- v.jsonp_requests.update(getattr(
- stored, 'jsonp_requests', {}))
-
- # add missing keys
- for k, v in in_store.iteritems():
- if k not in httprequest.session and k not in removed_sessions:
- httprequest.session[k] = v
-
- session_store.save(httprequest.session)
-
def session_gc(session_store):
if random.random() < 0.001:
# we keep session one week
@@ -931,8 +866,7 @@ class Root(object):
# Setup http sessions
path = session_path()
- self.session_store = werkzeug.contrib.sessions.FilesystemSessionStore(path)
- self.session_lock = threading.Lock()
+ self.session_store = werkzeug.contrib.sessions.FilesystemSessionStore(path, session_class=OpenERPSession)
_logger.debug('HTTP sessions stored in: %s', path)
@@ -953,39 +887,44 @@ class Root(object):
httprequest.parameter_storage_class = werkzeug.datastructures.ImmutableDict
httprequest.app = self
+ session_gc(self.session_store)
+
sid = httprequest.cookies.get('sid')
if not sid:
sid = httprequest.args.get('sid')
+ if sid is None:
+ httprequest.session = self.session_store.new()
+ else:
+ httprequest.session = self.session_store.get(sid)
- session_gc(self.session_store)
+ request = self._build_request(httprequest)
+ db = request.db
- with session_context(httprequest, self.session_store, self.session_lock, sid) as session:
- request = self._build_request(httprequest)
- db = request.db
+ if db:
+ updated = openerp.modules.registry.RegistryManager.check_registry_signaling(db)
+ if updated:
+ with self.db_routers_lock:
+ del self.db_routers[db]
- if db:
- updated = openerp.modules.registry.RegistryManager.check_registry_signaling(db)
- if updated:
- with self.db_routers_lock:
- del self.db_routers[db]
+ with set_request(request):
+ self.find_handler()
+ result = request.dispatch()
- with set_request(request):
- self.find_handler()
- result = request.dispatch()
+ if db:
+ openerp.modules.registry.RegistryManager.signal_caches_change(db)
- if db:
- openerp.modules.registry.RegistryManager.signal_caches_change(db)
+ if isinstance(result, basestring):
+ headers=[('Content-Type', 'text/html; charset=utf-8'), ('Content-Length', len(result))]
+ response = werkzeug.wrappers.Response(result, headers=headers)
+ else:
+ response = result
- if isinstance(result, basestring):
- headers=[('Content-Type', 'text/html; charset=utf-8'), ('Content-Length', len(result))]
- response = werkzeug.wrappers.Response(result, headers=headers)
- else:
- response = result
+ if httprequest.session.should_save:
+ self.session_store.save(httprequest.session)
+ if hasattr(response, 'set_cookie'):
+ response.set_cookie('sid', httprequest.session.sid)
- if hasattr(response, 'set_cookie'):
- response.set_cookie('sid', session.sid)
-
- return response(environ, start_response)
+ return response(environ, start_response)
except werkzeug.exceptions.HTTPException, e:
return e(environ, start_response)
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index 0c73a9b8a3c..1c976cb619e 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -1599,7 +1599,7 @@ instance.web.EmbeddedClient = instance.web.Client.extend({
if (s.session_is_valid() && s.db === this.dbname && s.login === this.login) {
return $.when();
}
- return instance.session.session_authenticate(this.dbname, this.login, this.key, true);
+ return instance.session.session_authenticate(this.dbname, this.login, this.key);
},
bind_credentials: function(dbname, login, key) {
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index 7d37dc2261d..81de547d0c1 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -58,7 +58,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
session_init: function () {
var self = this;
// TODO: session store in cookie should be optional
- this.session_id = this.get_cookie('session_id');
+ this.session_id = this.get_cookie('sid');
return this.session_reload().then(function(result) {
var modules = instance._modules.join(',');
var deferred = self.rpc('/web/webclient/qweblist', {mods: modules}).then(self.load_qweb.bind(self));
@@ -107,14 +107,10 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
return $.Deferred().reject();
}
_.extend(self, result);
- if (!_volatile) {
- self.set_cookie('session_id', self.session_id);
- }
return self.load_modules();
});
},
session_logout: function() {
- this.set_cookie('session_id', '');
$.bbq.removeState();
return this.rpc("/web/session/destroy", {});
},
From 47b5a82ae85e795ae888799426f098066583ecbc Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Thu, 11 Jul 2013 14:20:34 +0200
Subject: [PATCH 26/43] Completely removed all ways to specify session
identifiers and reduced them to 2 possibilities:
* The http argument 'session_id' (higher priority)
* The cookie 'session_id' (lower priority)
bzr revid: nicolas.vanhoren@openerp.com-20130711122034-3nvmkw4q5z4io4tm
---
addons/web/controllers/main.py | 2 --
addons/web/http.py | 14 ++++++--------
addons/web/static/src/js/corelib.js | 10 +++-------
addons/web/static/src/js/coresetup.js | 3 +--
4 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 2734692b5e9..124ca979c5c 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -362,8 +362,6 @@ def login_and_redirect(db, login, key, redirect_url='/'):
def set_cookie_and_redirect(redirect_url):
redirect = werkzeug.utils.redirect(redirect_url, 303)
redirect.autocorrect_location_header = False
- cookie_val = urllib2.quote(simplejson.dumps(request.session_id))
- redirect.set_cookie('instance0|session_id', cookie_val)
return redirect
def load_actions_from_ir_values(key, key2, models, meta):
diff --git a/addons/web/http.py b/addons/web/http.py
index 8c84083794a..1493f3b8f89 100644
--- a/addons/web/http.py
+++ b/addons/web/http.py
@@ -114,10 +114,6 @@ class WebRequest(object):
def init(self, params):
self.params = dict(params)
- #remove now useless session id
- if "session_id" in self.params:
- del self.params["session_id"]
-
with set_request(self):
self.db = self.session._db or db_monodb()
@@ -360,7 +356,7 @@ class JsonRequest(WebRequest):
# If we use jsonp, that's mean we are called from another host
# Some browser (IE and Safari) do no allow third party cookies
# We need then to manage http sessions manually.
- response['httpsessionid'] = self.httpsession.sid
+ response['session_id'] = self.session_id
mime = 'application/javascript'
body = "%s(%s);" % (self.jsonp, simplejson.dumps(response),)
else:
@@ -424,6 +420,8 @@ class HttpRequest(WebRequest):
def __init__(self, *args):
super(HttpRequest, self).__init__(*args)
params = dict(self.httprequest.args)
+ if "session_id" in params:
+ params.pop("session_id")
params.update(self.httprequest.form)
params.update(self.httprequest.files)
self.init(params)
@@ -889,9 +887,9 @@ class Root(object):
session_gc(self.session_store)
- sid = httprequest.cookies.get('sid')
+ sid = httprequest.args.get('session_id')
if not sid:
- sid = httprequest.args.get('sid')
+ sid = httprequest.cookies.get('session_id')
if sid is None:
httprequest.session = self.session_store.new()
else:
@@ -922,7 +920,7 @@ class Root(object):
if httprequest.session.should_save:
self.session_store.save(httprequest.session)
if hasattr(response, 'set_cookie'):
- response.set_cookie('sid', httprequest.session.sid)
+ response.set_cookie('session_id', httprequest.session.sid)
return response(environ, start_response)
except werkzeug.exceptions.HTTPException, e:
diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js
index 116ddf2e8c2..01ff92c88a0 100644
--- a/addons/web/static/src/js/corelib.js
+++ b/addons/web/static/src/js/corelib.js
@@ -1068,13 +1068,12 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
var data = {
session_id: this.session_id,
id: payload.id,
- sid: this.httpsessionid,
};
var set_sid = function (response, textStatus, jqXHR) {
// If response give us the http session id, we store it for next requests...
- if (response.httpsessionid) {
- self.httpsessionid = response.httpsessionid;
+ if (response.session_id) {
+ self.session_id = response.session_id;
}
};
@@ -1090,7 +1089,7 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
ajax.async = false;
var payload_str = JSON.stringify(payload);
var payload_url = $.param({r:payload_str});
- if(payload_url.length < 2000) {
+ if (payload_url.length < 2000) {
// Direct jsonp request
ajax.data.r = payload_str;
return $.ajax(ajax).done(set_sid);
@@ -1139,9 +1138,6 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
var qs = '';
if (!_.isNull(params)) {
params = _.extend(params || {}, {session_id: this.session_id});
- if (this.httpsessionid) {
- params.sid = this.httpsessionid;
- }
qs = '?' + $.param(params);
}
var prefix = _.any(['http://', 'https://', '//'], _.bind(_.str.startsWith, null, path)) ? '' : this.prefix;
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index 81de547d0c1..f153d3ad73a 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -23,7 +23,6 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
this.qweb_mutex = new $.Mutex();
},
rpc: function(url, params, options) {
- params.session_id = this.session_id;
return this._super(url, params, options);
},
/**
@@ -58,7 +57,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
session_init: function () {
var self = this;
// TODO: session store in cookie should be optional
- this.session_id = this.get_cookie('sid');
+ this.session_id = this.get_cookie('session_id');
return this.session_reload().then(function(result) {
var modules = instance._modules.join(',');
var deferred = self.rpc('/web/webclient/qweblist', {mods: modules}).then(self.load_qweb.bind(self));
From 034a5d5dcf00fcd81b2e3cd4d0f734bdff125cc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?=
Date: Thu, 11 Jul 2013 14:51:55 +0200
Subject: [PATCH 27/43] [FIX] point_of_sale: LocalService -> signal_ validation
bzr revid: tde@openerp.com-20130711125155-hmf0u0p0o45iac66
---
addons/point_of_sale/point_of_sale.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index d53b635ec21..efe8cd98689 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -539,8 +539,7 @@ class pos_order(osv.osv):
if to_invoice:
self.action_invoice(cr, uid, [order_id], context)
order_obj = self.browse(cr, uid, order_id, context)
- wf_service = netsvc.LocalService('workflow')
- wf_service.trg_validate(uid,'account.invoice', order_obj.invoice_id.id,'invoice_open',cr)
+ self.pool['account.invoice'].signal_invoice_open(cr, uid, [order_obj.invoice_id.id])
return order_ids
From 9aaf79ffd2f80e797481cf5bed9cba35dbea9625 Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Thu, 11 Jul 2013 15:23:01 +0200
Subject: [PATCH 28/43] more and more cleaning
bzr revid: nicolas.vanhoren@openerp.com-20130711132301-5fl5giqio4n9yzgk
---
addons/web/http.py | 55 +++++++++++------------------
addons/web/static/src/js/corelib.js | 5 ++-
2 files changed, 23 insertions(+), 37 deletions(-)
diff --git a/addons/web/http.py b/addons/web/http.py
index 1493f3b8f89..81435a6d577 100644
--- a/addons/web/http.py
+++ b/addons/web/http.py
@@ -110,37 +110,17 @@ class WebRequest(object):
self._cr_cm = None
self._cr = None
self.func_request_type = None
-
- def init(self, params):
- self.params = dict(params)
-
+ self.debug = self.httprequest.args.get('debug', False) is not False
with set_request(self):
self.db = self.session._db or db_monodb()
-
- # TODO: remove this
# set db/uid trackers - they're cleaned up at the WSGI
# dispatching phase in openerp.service.wsgi_server.application
if self.db:
threading.current_thread().dbname = self.session._db
if self.session._uid:
threading.current_thread().uid = self.session._uid
-
- self.context = self.params.pop('context', {})
- self.debug = self.params.pop('debug', False) is not False
- # Determine self.lang
- lang = self.params.get('lang', None)
- if lang is None:
- lang = self.context.get('lang')
- if lang is None:
- lang = self.httprequest.cookies.get('lang')
- if lang is None:
- lang = self.httprequest.accept_languages.best
- if not lang:
- lang = 'en_US'
- # tranform 2 letters lang like 'en' into 5 letters like 'en_US'
- lang = babel.core.LOCALE_ALIASES.get(lang, lang)
- # we use _ as seprator where RFC2616 uses '-'
- self.lang = lang.replace('-', '_')
+ self.context = self.session.context
+ self.lang = self.context["lang"]
def _authenticate(self):
if self.auth_method == "none":
@@ -313,7 +293,8 @@ class JsonRequest(WebRequest):
# Read POST content or POST Form Data named "request"
self.jsonrequest = simplejson.loads(request, object_hook=reject_nonliteral)
- self.init(self.jsonrequest.get("params", {}))
+ self.params = dict(self.jsonrequest.get("params", {}))
+ self.context = self.params.pop('context', self.session.context)
def dispatch(self):
""" Calls the method asked for by the JSON-RPC2 or JSONP request
@@ -420,11 +401,13 @@ class HttpRequest(WebRequest):
def __init__(self, *args):
super(HttpRequest, self).__init__(*args)
params = dict(self.httprequest.args)
- if "session_id" in params:
- params.pop("session_id")
+ ex = set(["session_id", "debug", "db"])
+ for k in params.keys():
+ if k in ex:
+ del params[k]
params.update(self.httprequest.form)
params.update(self.httprequest.files)
- self.init(params)
+ self.params = params
def dispatch(self):
akw = {}
@@ -630,9 +613,9 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
self.setdefault("_uid", False)
self.setdefault("_login", False)
self.setdefault("_password", False)
- self.setdefault("context", {})
+ self.setdefault("context", {'tz': "UTC", "uid": None})
self.setdefault("jsonp_requests", {})
- self.setdefault("modified", False)
+ self.modified = False
def __getattr__(self, attr):
return self.get(attr, None)
@@ -895,6 +878,11 @@ class Root(object):
else:
httprequest.session = self.session_store.get(sid)
+ if not "lang" in httprequest.session.context:
+ lang = httprequest.accept_languages.best or "en_US"
+ lang = babel.core.LOCALE_ALIASES.get(lang, lang).replace('-', '_')
+ httprequest.session.context["lang"] = lang
+
request = self._build_request(httprequest)
db = request.db
@@ -1053,19 +1041,18 @@ def db_list(force=False):
return dbs
def db_redirect(match_first_only_if_unique):
- req = request
db = False
redirect = False
# 1 try the db in the url
- db_url = req.params.get('db')
+ db_url = request.httprequest.args.get('db')
if db_url:
return (db_url, False)
dbs = db_list(True)
# 2 use the database from the cookie if it's listable and still listed
- cookie_db = req.httprequest.cookies.get('last_used_database')
+ cookie_db = request.httprequest.cookies.get('last_used_database')
if cookie_db in dbs:
db = cookie_db
@@ -1075,9 +1062,9 @@ def db_redirect(match_first_only_if_unique):
# redirect to the chosen db if multiple are available
if db and len(dbs) > 1:
- query = dict(urlparse.parse_qsl(req.httprequest.query_string, keep_blank_values=True))
+ query = dict(urlparse.parse_qsl(request.httprequest.query_string, keep_blank_values=True))
query.update({'db': db})
- redirect = req.httprequest.path + '?' + urllib.urlencode(query)
+ redirect = request.httprequest.path + '?' + urllib.urlencode(query)
return (db, redirect)
def db_monodb():
diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js
index 01ff92c88a0..007a0adc803 100644
--- a/addons/web/static/src/js/corelib.js
+++ b/addons/web/static/src/js/corelib.js
@@ -1000,8 +1000,6 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
context: this.user_context || {}
});
// Construct a JSON-RPC2 request, method is currently unused
- if (this.debug)
- params.debug = 1;
var payload = {
jsonrpc: '2.0',
method: 'call',
@@ -1011,7 +1009,8 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
var deferred = $.Deferred();
if (! options.shadow)
this.trigger('request', url, payload);
-
+ payload.debug = this.debug ? true : false;
+
this.rpc_function(url, payload).then(
function (response, textStatus, jqXHR) {
if (! options.shadow)
From 0d7ec71bc9d2c0fed4999d7a796166b05293ea6f Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Thu, 11 Jul 2013 15:39:28 +0200
Subject: [PATCH 29/43] Renamed all _shit in session to remove the underscore
bzr revid: nicolas.vanhoren@openerp.com-20130711133928-zp40wl2t5q54wrnv
---
addons/web/http.py | 86 ++++++++++++++++++++++++++++++----------------
1 file changed, 57 insertions(+), 29 deletions(-)
diff --git a/addons/web/http.py b/addons/web/http.py
index 81435a6d577..aed64cc9183 100644
--- a/addons/web/http.py
+++ b/addons/web/http.py
@@ -112,13 +112,13 @@ class WebRequest(object):
self.func_request_type = None
self.debug = self.httprequest.args.get('debug', False) is not False
with set_request(self):
- self.db = self.session._db or db_monodb()
+ self.db = self.session.db or db_monodb()
# set db/uid trackers - they're cleaned up at the WSGI
# dispatching phase in openerp.service.wsgi_server.application
if self.db:
- threading.current_thread().dbname = self.session._db
- if self.session._uid:
- threading.current_thread().uid = self.session._uid
+ threading.current_thread().dbname = self.session.db
+ if self.session.uid:
+ threading.current_thread().uid = self.session.uid
self.context = self.session.context
self.lang = self.context["lang"]
@@ -127,7 +127,7 @@ class WebRequest(object):
self.db = None
self.uid = None
elif self.auth_method == "admin":
- self.db = self.session._db or db_monodb()
+ self.db = self.session.db or db_monodb()
if not self.db:
raise SessionExpiredException("No valid database for request %s" % self.httprequest)
self.uid = openerp.SUPERUSER_ID
@@ -136,8 +136,8 @@ class WebRequest(object):
self.session.check_security()
except SessionExpiredException, e:
raise SessionExpiredException("Session expired for request %s" % self.httprequest)
- self.db = self.session._db
- self.uid = self.session._uid
+ self.db = self.session.db
+ self.uid = self.session.uid
@property
def registry(self):
@@ -584,8 +584,8 @@ class Model(object):
def proxy(*args, **kw):
# Can't provide any retro-compatibility for this case, so we check it and raise an Exception
# to tell the programmer to adapt his code
- if not request.db or not request.uid or self.session._db != request.db \
- or self.session._uid != request.uid:
+ if not request.db or not request.uid or self.session.db != request.db \
+ or self.session.uid != request.uid:
raise Exception("Trying to use Model with badly configured database or user.")
mod = request.registry.get(self.model)
@@ -608,11 +608,10 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
self.modified = False
super(OpenERPSession, self).__init__(*args, **kwargs)
self.inited = True
- self.setdefault("_creation_time", time.time())
- self.setdefault("_db", False)
- self.setdefault("_uid", False)
- self.setdefault("_login", False)
- self.setdefault("_password", False)
+ self.setdefault("db", False)
+ self.setdefault("uid", False)
+ self.setdefault("login", False)
+ self.setdefault("password", False)
self.setdefault("context", {'tz': "UTC", "uid": None})
self.setdefault("jsonp_requests", {})
self.modified = False
@@ -639,10 +638,10 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
uid = openerp.netsvc.dispatch_rpc('common', 'authenticate', [db, login, password, env])
else:
security.check(db, uid, password)
- self._db = db
- self._uid = uid
- self._login = login
- self._password = password
+ self.db = db
+ self.uid = uid
+ self.login = login
+ self.password = password
request.db = db
request.uid = uid
@@ -655,9 +654,9 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
should be called at each request. If the authentication fails, a ``SessionExpiredException``
is raised.
"""
- if not self._db or not self._uid:
+ if not self.db or not self.uid:
raise SessionExpiredException("Session expired")
- security.check(self._db, self._uid, self._password)
+ security.check(self.db, self.uid, self.password)
def logout(self):
for k in self.keys():
@@ -671,9 +670,9 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
:returns: the new context
"""
- assert self._uid, "The user needs to be logged-in to initialize his context"
+ assert self.uid, "The user needs to be logged-in to initialize his context"
self.context = request.registry.get('res.users').context_get(request.cr, request.uid) or {}
- self.context['uid'] = self._uid
+ self.context['uid'] = self.uid
self._fix_lang(self.context)
return self.context
@@ -697,6 +696,35 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
context['lang'] = lang or 'en_US'
+ """
+ Damn properties for retro-compatibility. All of that is deprecated, all
+ of that.
+ """
+ @property
+ def _db(self):
+ return self.db
+ @_db.setter
+ def _db(self, value):
+ self.db = value
+ @property
+ def _uid(self):
+ return self.uid
+ @_uid.setter
+ def _uid(self, value):
+ self.uid = value
+ @property
+ def _login(self):
+ return self.login
+ @_login.setter
+ def _login(self, value):
+ self.login = value
+ @property
+ def _password(self):
+ return self.password
+ @_password.setter
+ def _password(self, value):
+ self.password = value
+
def send(self, service_name, method, *args):
"""
.. deprecated:: 8.0
@@ -718,11 +746,11 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
Ensures this session is valid (logged into the openerp server)
"""
- if self._uid and not force:
+ if self.uid and not force:
return
# TODO use authenticate instead of login
- self._uid = self.proxy("common").login(self._db, self._login, self._password)
- if not self._uid:
+ self.uid = self.proxy("common").login(self.db, self.login, self.password)
+ if not self.uid:
raise AuthenticationError("Authentication failure")
def ensure_valid(self):
@@ -730,11 +758,11 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
.. deprecated:: 8.0
Use ``check_security()`` instead.
"""
- if self._uid:
+ if self.uid:
try:
self.assert_valid(True)
except Exception:
- self._uid = None
+ self.uid = None
def execute(self, model, func, *l, **d):
"""
@@ -751,7 +779,7 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
Use the resistry and cursor in ``openerp.addons.web.http.request`` instead.
"""
self.assert_valid()
- r = self.proxy('object').exec_workflow(self._db, self._uid, self._password, model, signal, id)
+ r = self.proxy('object').exec_workflow(self.db, self.uid, self.password, model, signal, id)
return r
def model(self, model):
@@ -765,7 +793,7 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
:type model: str
:rtype: a model object
"""
- if self._db == False:
+ if self.db == False:
raise SessionExpiredException("Session expired")
return Model(self, model)
From 89c8698cb3c1ea629d8027d7d157e33ad2f3b388 Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Thu, 11 Jul 2013 15:48:25 +0200
Subject: [PATCH 30/43] Make the server always check the identity of the logged
user and switch default values of db, uid, login and password to None
bzr revid: nicolas.vanhoren@openerp.com-20130711134825-teiuidqv7z2bzsuq
---
addons/web/http.py | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/addons/web/http.py b/addons/web/http.py
index aed64cc9183..612260fbdbd 100644
--- a/addons/web/http.py
+++ b/addons/web/http.py
@@ -61,8 +61,9 @@ class WebRequest(object):
.. attribute:: httpsession
- a :class:`~collections.Mapping` holding the HTTP session data for the
- current http session
+ .. deprecated:: 8.0
+
+ Use ``self.session`` instead.
.. attribute:: params
@@ -77,7 +78,8 @@ class WebRequest(object):
.. attribute:: session
- :class:`~session.OpenERPSession` instance for the current request
+ a :class:`OpenERPSession` holding the HTTP session data for the
+ current http session
.. attribute:: context
@@ -95,7 +97,7 @@ class WebRequest(object):
.. attribute:: uid
``int``, the id of the user related to the current request. Can be ``None``
- if the current request uses the ``none`` or the ``db`` authenticatoin.
+ if the current request uses the ``none`` authenticatoin.
"""
def __init__(self, httprequest):
self.httprequest = httprequest
@@ -123,6 +125,12 @@ class WebRequest(object):
self.lang = self.context["lang"]
def _authenticate(self):
+ if self.session.uid:
+ try:
+ self.session.check_security()
+ except SessionExpiredException, e:
+ self.session.logout()
+ raise SessionExpiredException("Session expired for request %s" % self.httprequest)
if self.auth_method == "none":
self.db = None
self.uid = None
@@ -132,10 +140,6 @@ class WebRequest(object):
raise SessionExpiredException("No valid database for request %s" % self.httprequest)
self.uid = openerp.SUPERUSER_ID
else: # auth
- try:
- self.session.check_security()
- except SessionExpiredException, e:
- raise SessionExpiredException("Session expired for request %s" % self.httprequest)
self.db = self.session.db
self.uid = self.session.uid
@@ -608,10 +612,10 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
self.modified = False
super(OpenERPSession, self).__init__(*args, **kwargs)
self.inited = True
- self.setdefault("db", False)
- self.setdefault("uid", False)
- self.setdefault("login", False)
- self.setdefault("password", False)
+ self.setdefault("db", None)
+ self.setdefault("uid", None)
+ self.setdefault("login", None)
+ self.setdefault("password", None)
self.setdefault("context", {'tz': "UTC", "uid": None})
self.setdefault("jsonp_requests", {})
self.modified = False
From 3569ff8654748e9fc12a5852dce42d9254672f0c Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Thu, 11 Jul 2013 16:05:19 +0200
Subject: [PATCH 31/43] Some details + documentation
bzr revid: nicolas.vanhoren@openerp.com-20130711140519-hdsu75efwvfq4h4q
---
addons/web/http.py | 72 +++++++++++++++++++---------------------------
1 file changed, 29 insertions(+), 43 deletions(-)
diff --git a/addons/web/http.py b/addons/web/http.py
index 612260fbdbd..0dbfd871667 100644
--- a/addons/web/http.py
+++ b/addons/web/http.py
@@ -192,21 +192,18 @@ def route(route, type="http", auth="user"):
Decorator marking the decorated method as being a handler for requests. The method must be part of a subclass
of ``Controller``.
- Decorator to put on a controller method to inform it does not require a user to be logged. When this decorator
- is used, ``request.uid`` will be ``None``. The request will still try to detect the database and an exception
- will be launched if there is no way to guess it.
-
:param route: string or array. The route part that will determine which http requests will match the decorated
method. Can be a single string or an array of strings. See werkzeug's routing documentation for the format of
route expression ( http://werkzeug.pocoo.org/docs/routing/ ).
:param type: The type of request, can be ``'http'`` or ``'json'``.
:param auth: The type of authentication method, can on of the following:
- * ``auth``: The user must be authenticated.
- * ``db``: There is no need for the user to be authenticated but there must be a way to find the current
- database.
+ * ``user``: The user must be authenticated and the current request will perform using the rights of the
+ user.
+ * ``admin``: The user may not be authenticated and the current request will perform using the admin user.
* ``none``: The method is always active, even if there is no database. Mainly used by the framework and
- authentication modules.
+ authentication modules. There request code will not have any facilities to access the database nor have any
+ configuration indicating the current database nor the current user.
"""
assert type in ["http", "json"]
assert auth in ["user", "admin", "none"]
@@ -234,8 +231,7 @@ class JsonRequest(WebRequest):
--> {"jsonrpc": "2.0",
"method": "call",
- "params": {"session_id": "SID",
- "context": {},
+ "params": {"context": {},
"arg1": "val1" },
"id": null}
@@ -247,8 +243,7 @@ class JsonRequest(WebRequest):
--> {"jsonrpc": "2.0",
"method": "call",
- "params": {"session_id": "SID",
- "context": {},
+ "params": {"context": {},
"arg1": "val1" },
"id": null}
@@ -302,8 +297,6 @@ class JsonRequest(WebRequest):
def dispatch(self):
""" Calls the method asked for by the JSON-RPC2 or JSONP request
-
- :returns: an utf8 encoded JSON-RPC2 or JSONP reply
"""
if self.jsonp_handler:
return self.jsonp_handler()
@@ -382,14 +375,10 @@ def to_jsonable(o):
return u"%s" % o
def jsonrequest(f):
- """ Decorator marking the decorated method as being a handler for a
- JSON-RPC request (the exact request path is specified via the
- ``$(Controller._cp_path)/$methodname`` combination.
+ """
+ .. deprecated:: 8.0
- If the method is called, it will be provided with a :class:`JsonRequest`
- instance and all ``params`` sent during the JSON-RPC request, apart from
- the ``session_id``, ``context`` and ``debug`` keys (which are stripped out
- beforehand)
+ Use the ``route()`` decorator instead.
"""
f.combine = True
base = f.__name__
@@ -469,14 +458,10 @@ class HttpRequest(WebRequest):
return werkzeug.exceptions.NotFound(description)
def httprequest(f):
- """ Decorator marking the decorated method as being a handler for a
- normal HTTP request (the exact request path is specified via the
- ``$(Controller._cp_path)/$methodname`` combination.
+ """
+ .. deprecated:: 8.0
- If the method is called, it will be provided with a :class:`HttpRequest`
- instance and all ``params`` sent during the request (``GET`` and ``POST``
- merged in the same dictionary), apart from the ``session_id``, ``context``
- and ``debug`` keys (which are stripped out beforehand)
+ Use the ``route()`` decorator instead.
"""
f.combine = True
base = f.__name__
@@ -797,7 +782,7 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
:type model: str
:rtype: a model object
"""
- if self.db == False:
+ if not self.db:
raise SessionExpiredException("Session expired")
return Model(self, model)
@@ -890,10 +875,7 @@ class Root(object):
def dispatch(self, environ, start_response):
"""
- Performs the actual WSGI dispatching for the application, may be
- wrapped during the initialization of the object.
-
- Call the object directly.
+ Performs the actual WSGI dispatching for the application.
"""
try:
httprequest = werkzeug.wrappers.Request(environ)
@@ -1042,12 +1024,7 @@ class Root(object):
def find_handler(self):
"""
- Tries to discover the controller handling the request for the path
- specified by the provided parameters
-
- :param path: path to match
- :returns: a callable matching the path sections
- :rtype: ``Controller | None``
+ Tries to discover the controller handling the request for the path specified in the request.
"""
path = request.httprequest.path
urls = self.get_db_router(request.db).bind("")
@@ -1073,13 +1050,13 @@ def db_list(force=False):
return dbs
def db_redirect(match_first_only_if_unique):
- db = False
- redirect = False
+ db = None
+ redirect = None
# 1 try the db in the url
db_url = request.httprequest.args.get('db')
if db_url:
- return (db_url, False)
+ return (db_url, None)
dbs = db_list(True)
@@ -1100,7 +1077,16 @@ def db_redirect(match_first_only_if_unique):
return (db, redirect)
def db_monodb():
- # if only one db exists, return it else return False
+ """
+ Magic function to find the current database.
+
+ Implementation details:
+
+ * Magic
+ * More magic
+
+ Return ``None`` if the magic is not magic enough.
+ """
return db_redirect(True)[0]
From e6fc23d9802d467c8229dba060c655b2b56cf24c Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Thu, 11 Jul 2013 16:18:32 +0200
Subject: [PATCH 32/43] Forgot some refactoring
bzr revid: nicolas.vanhoren@openerp.com-20130711141832-8y5yj3lj7h4gb94q
---
addons/web/controllers/main.py | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 124ca979c5c..d485d58443d 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -810,16 +810,16 @@ class Session(http.Controller):
request.session.ensure_valid()
return {
"session_id": request.session_id,
- "uid": request.session._uid,
- "user_context": request.session.get_context() if request.session._uid else {},
- "db": request.session._db,
- "username": request.session._login,
+ "uid": request.session.uid,
+ "user_context": request.session.get_context() if request.session.uid else {},
+ "db": request.session.db,
+ "username": request.session.login,
}
@http.route('/web/session/get_session_info', type='json', auth="none")
def get_session_info(self):
- request.uid = request.session._uid
- request.db = request.session._db
+ request.uid = request.session.uid
+ request.db = request.session.db
return self.session_info()
@http.route('/web/session/authenticate', type='json', auth="none")
@@ -853,7 +853,7 @@ class Session(http.Controller):
@http.route('/web/session/sc_list', type='json', auth="user")
def sc_list(self):
return request.session.model('ir.ui.view_sc').get_sc(
- request.session._uid, "ir.ui.menu", request.context)
+ request.session.uid, "ir.ui.menu", request.context)
@http.route('/web/session/get_lang_list', type='json', auth="none")
def get_lang_list(self):
@@ -928,7 +928,7 @@ class Menu(http.Controller):
s = request.session
Menus = s.model('ir.ui.menu')
# If a menu action is defined use its domain to get the root menu items
- user_menu_id = s.model('res.users').read([s._uid], ['menu_id'],
+ user_menu_id = s.model('res.users').read([s.uid], ['menu_id'],
request.context)[0]['menu_id']
menu_domain = [('parent_id', '=', False)]
@@ -1125,7 +1125,7 @@ class View(http.Controller):
def add_custom(self, view_id, arch):
CustomView = request.session.model('ir.ui.view.custom')
CustomView.create({
- 'user_id': request.session._uid,
+ 'user_id': request.session.uid,
'ref_id': view_id,
'arch': arch
}, request.context)
@@ -1134,7 +1134,7 @@ class View(http.Controller):
@http.route('/web/view/undo_custom', type='json', auth="user")
def undo_custom(self, view_id, reset=False):
CustomView = request.session.model('ir.ui.view.custom')
- vcustom = CustomView.search([('user_id', '=', request.session._uid), ('ref_id' ,'=', view_id)],
+ vcustom = CustomView.search([('user_id', '=', request.session.uid), ('ref_id' ,'=', view_id)],
0, False, False, request.context)
if vcustom:
if reset:
@@ -1317,9 +1317,9 @@ class Binary(http.Controller):
def company_logo(self, dbname=None):
# TODO add etag, refactor to use /image code for etag
uid = None
- if request.session._db:
- dbname = request.session._db
- uid = request.session._uid
+ if request.session.db:
+ dbname = request.session.db
+ uid = request.session.uid
elif dbname is None:
dbname = db_monodb()
@@ -1685,14 +1685,14 @@ class Reports(http.Controller):
raise ValueError("action['datas']['ids'] and context['active_ids'] are undefined")
report_id = report_srv.report(
- request.session._db, request.session._uid, request.session._password,
+ request.session.db, request.session.uid, request.session.password,
action["report_name"], report_ids,
report_data, context)
report_struct = None
while True:
report_struct = report_srv.report_get(
- request.session._db, request.session._uid, request.session._password, report_id)
+ request.session.db, request.session.uid, request.session.password, report_id)
if report_struct["state"]:
break
From a0a05454aa2e04c7b66425c40c3812890fc35458 Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Thu, 11 Jul 2013 17:41:37 +0200
Subject: [PATCH 33/43] Solved a problem appearing in share module
bzr revid: nicolas.vanhoren@openerp.com-20130711154137-vwgb5cd4wj26jed8
---
addons/web/http.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/web/http.py b/addons/web/http.py
index 0dbfd871667..5e48749df45 100644
--- a/addons/web/http.py
+++ b/addons/web/http.py
@@ -394,7 +394,7 @@ class HttpRequest(WebRequest):
def __init__(self, *args):
super(HttpRequest, self).__init__(*args)
params = dict(self.httprequest.args)
- ex = set(["session_id", "debug", "db"])
+ ex = set(["session_id", "debug"])
for k in params.keys():
if k in ex:
del params[k]
From 12f58092f2df0d7236dbadf346765bcb37ae5929 Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Thu, 11 Jul 2013 18:07:02 +0200
Subject: [PATCH 34/43] [IMP] some refactoring due to changes in the web client
bzr revid: nicolas.vanhoren@openerp.com-20130711160702-qs6pfyqsxmzd7cgy
---
addons/im/im.py | 16 +++++----
addons/im_livechat/im_livechat.py | 45 ++++++++++++++----------
addons/point_of_sale/controllers/main.py | 4 +--
3 files changed, 37 insertions(+), 28 deletions(-)
diff --git a/addons/im/im.py b/addons/im/im.py
index 4a867789cbc..505ca3627b6 100644
--- a/addons/im/im.py
+++ b/addons/im/im.py
@@ -101,17 +101,19 @@ class LongPollingController(http.Controller):
raise Exception("Not usable in a server not running gevent")
from openerp.addons.im.watcher import ImWatcher
if db is not None:
- request.session.authenticate(db=db, uid=uid, password=password)
+ openerp.service.security.check(db, uid, password)
else:
- request.session.authenticate(db=request.session._db, uid=request.session._uid, password=request.session._password)
+ uid = request.session.uid
+ db = request.session.db
- with request.registry.cursor() as cr:
- request.registry.get('im.user').im_connect(cr, request.uid, uuid=uuid, context=request.context)
- my_id = request.registry.get('im.user').get_by_user_id(cr, request.uid, uuid or request.session._uid, request.context)["id"]
+ registry = openerp.modules.registry.RegistryManager.get(db)
+ with registry.cursor() as cr:
+ registry.get('im.user').im_connect(cr, uid, uuid=uuid, context=request.context)
+ my_id = registry.get('im.user').get_by_user_id(cr, uid, uuid or uid, request.context)["id"]
num = 0
while True:
- with request.registry.cursor() as cr:
- res = request.registry.get('im.message').get_messages(cr, request.uid, last, users_watch, uuid=uuid, context=request.context)
+ with registry.cursor() as cr:
+ res = registry.get('im.message').get_messages(cr, uid, last, users_watch, uuid=uuid, context=request.context)
if num >= 1 or len(res["res"]) > 0:
return res
last = res["last"]
diff --git a/addons/im_livechat/im_livechat.py b/addons/im_livechat/im_livechat.py
index adceebc7cba..b68a0079c3a 100644
--- a/addons/im_livechat/im_livechat.py
+++ b/addons/im_livechat/im_livechat.py
@@ -37,36 +37,45 @@ env.filters["json"] = json.dumps
class LiveChatController(http.Controller):
- @http.route('/im_livechat/loader')
+ def _auth(self, db):
+ reg = openerp.modules.registry.RegistryManager.get(db)
+ uid = openerp.netsvc.dispatch_rpc('common', 'authenticate', [db, "anonymous", "anonymous", None])
+ return reg, uid
+
+ @http.route('/im_livechat/loader', auth="none")
def loader(self, **kwargs):
p = json.loads(kwargs["p"])
db = p["db"]
channel = p["channel"]
user_name = p.get("user_name", None)
- request.session.authenticate(db=db, login="anonymous", password="anonymous")
- info = request.session.model('im_livechat.channel').get_info_for_chat_src(channel)
- info["db"] = db
- info["channel"] = channel
- info["userName"] = user_name
- return request.make_response(env.get_template("loader.js").render(info),
- headers=[('Content-Type', "text/javascript")])
- @http.route('/im_livechat/web_page')
+ reg, uid = self._auth(db)
+ with reg.cursor() as cr:
+ info = reg.get('im_livechat.channel').get_info_for_chat_src(cr, uid, channel)
+ info["db"] = db
+ info["channel"] = channel
+ info["userName"] = user_name
+ return request.make_response(env.get_template("loader.js").render(info),
+ headers=[('Content-Type', "text/javascript")])
+
+ @http.route('/im_livechat/web_page', auth="none")
def web_page(self, **kwargs):
p = json.loads(kwargs["p"])
db = p["db"]
channel = p["channel"]
- request.session.authenticate(db=db, login="anonymous", password="anonymous")
- script = request.session.model('im_livechat.channel').read(channel, ["script"])["script"]
- info = request.session.model('im_livechat.channel').get_info_for_chat_src(channel)
- info["script"] = script
- return request.make_response(env.get_template("web_page.html").render(info),
- headers=[('Content-Type', "text/html")])
+ reg, uid = self._auth(db)
+ with reg.cursor() as cr:
+ script = reg.get('im_livechat.channel').read(cr, uid, channel, ["script"])["script"]
+ info = reg.get('im_livechat.channel').get_info_for_chat_src(cr, uid, channel)
+ info["script"] = script
+ return request.make_response(env.get_template("web_page.html").render(info),
+ headers=[('Content-Type', "text/html")])
- @http.route('/im_livechat/available', type='json')
+ @http.route('/im_livechat/available', type='json', auth="none")
def available(self, db, channel):
- request.session.authenticate(db=db, login="anonymous", password="anonymous")
- return request.session.model('im_livechat.channel').get_available_user(channel) > 0
+ reg, uid = self._auth(db)
+ with reg.cursor() as cr:
+ return reg.get('im_livechat.channel').get_available_user(cr, uid, channel) > 0
class im_livechat_channel(osv.osv):
_name = 'im_livechat.channel'
diff --git a/addons/point_of_sale/controllers/main.py b/addons/point_of_sale/controllers/main.py
index b189c8f204a..a4a06e94eaa 100644
--- a/addons/point_of_sale/controllers/main.py
+++ b/addons/point_of_sale/controllers/main.py
@@ -14,9 +14,7 @@ class PointOfSaleController(openerp.addons.web.http.Controller):
js = "\n ".join('' % i for i in manifest_list(req, None, 'js'))
css = "\n ".join('' % i for i in manifest_list(req, None, 'css'))
- cookie = req.httprequest.cookies.get("instance0|session_id")
- session_id = cookie.replace("%22","")
- template = html_template.replace('
Date: Fri, 12 Jul 2013 14:20:19 +0530
Subject: [PATCH 35/43] [IMP] revert change of rename tax code to 'Your
Company' from 'Tax'.
bzr revid: tpa@tinyerp.com-20130712085019-oq5ar8jtm2n5s7ae
---
addons/l10n_in/l10n_in_tax_code_template.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/l10n_in/l10n_in_tax_code_template.xml b/addons/l10n_in/l10n_in_tax_code_template.xml
index 1b6f0732ba1..983d2fa4910 100644
--- a/addons/l10n_in/l10n_in_tax_code_template.xml
+++ b/addons/l10n_in/l10n_in_tax_code_template.xml
@@ -4,7 +4,7 @@
- Your Company
+ Tax
From a7ab235c3a88dc817d61c526b9474c5537d5ed61 Mon Sep 17 00:00:00 2001
From: niv-openerp
Date: Fri, 12 Jul 2013 11:53:09 +0200
Subject: [PATCH 36/43] changed session handling
bzr revid: nicolas.vanhoren@openerp.com-20130712095309-41u7fi7ecs0y1lm1
---
addons/web/http.py | 19 ++++++++++++++++---
addons/web/static/src/js/corelib.js | 17 ++++++++++-------
addons/web/static/src/js/coresetup.js | 25 +++++++++++++++++--------
addons/web/static/src/xml/base.xml | 8 ++++----
4 files changed, 47 insertions(+), 22 deletions(-)
diff --git a/addons/web/http.py b/addons/web/http.py
index 5e48749df45..f3ae2f34d6a 100644
--- a/addons/web/http.py
+++ b/addons/web/http.py
@@ -885,8 +885,12 @@ class Root(object):
session_gc(self.session_store)
sid = httprequest.args.get('session_id')
+ explicit_session = True
+ if not sid:
+ sid = httprequest.headers.get("X-Openerp-Session-Id")
if not sid:
sid = httprequest.cookies.get('session_id')
+ explicit_session = False
if sid is None:
httprequest.session = self.session_store.new()
else:
@@ -921,7 +925,7 @@ class Root(object):
if httprequest.session.should_save:
self.session_store.save(httprequest.session)
- if hasattr(response, 'set_cookie'):
+ if not explicit_session and hasattr(response, 'set_cookie'):
response.set_cookie('session_id', httprequest.session.sid)
return response(environ, start_response)
@@ -1040,6 +1044,8 @@ class Root(object):
request.auth_method = getattr(original, "auth", "user")
request.func_request_type = original.exposed
+root = None
+
def db_list(force=False):
proxy = request.session.proxy("db")
dbs = proxy.list(force)
@@ -1090,14 +1096,21 @@ def db_monodb():
return db_redirect(True)[0]
-class JsonRpcController(Controller):
+class CommonController(Controller):
@route('/jsonrpc', type='json', auth="none")
def jsonrpc(self, service, method, args):
""" Method used by client APIs to contact OpenERP. """
return openerp.netsvc.dispatch_rpc(service, method, args)
+ @route('/gen_session_id', type='json', auth="none")
+ def gen_session_id(self):
+ nsession = root.session_store.new()
+ return nsession.sid
+
def wsgi_postload():
- openerp.wsgi.register_wsgi_handler(Root())
+ global root
+ root = Root()
+ openerp.wsgi.register_wsgi_handler(root)
# vim:et:ts=4:sw=4:
diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js
index 007a0adc803..3b328fb8765 100644
--- a/addons/web/static/src/js/corelib.js
+++ b/addons/web/static/src/js/corelib.js
@@ -967,6 +967,8 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
instance.web.PropertiesMixin.init.call(this);
this.server = null;
this.debug = ($.deparam($.param.querystring()).debug != undefined);
+ this.override_session = false;
+ this.session_id = undefined;
},
setup: function(origin) {
var window_origin = location.protocol+"//"+location.host, self=this;
@@ -1009,7 +1011,6 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
var deferred = $.Deferred();
if (! options.shadow)
this.trigger('request', url, payload);
- payload.debug = this.debug ? true : false;
this.rpc_function(url, payload).then(
function (response, textStatus, jqXHR) {
@@ -1055,7 +1056,10 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify(payload),
- processData: false
+ processData: false,
+ headers: {
+ "X-Openerp-Session-Id": this.override_session ? this.session_id : undefined,
+ },
}, url);
if (this.synch)
ajax.async = false;
@@ -1134,11 +1138,10 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
},
url: function(path, params) {
- var qs = '';
- if (!_.isNull(params)) {
- params = _.extend(params || {}, {session_id: this.session_id});
- qs = '?' + $.param(params);
- }
+ params = _.extend(params || {});
+ if (this.override_session)
+ params.session_id = this.session_id;
+ var qs = '?' + $.param(params);
var prefix = _.any(['http://', 'https://', '//'], _.bind(_.str.startsWith, null, path)) ? '' : this.prefix;
return prefix + path + qs;
},
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index f153d3ad73a..3ba5855533f 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -38,11 +38,10 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
var self = this;
this.setup(origin);
instance.web.qweb.default_dict['_s'] = this.origin;
- this.session_id = false;
- this.uid = false;
- this.username = false;
+ this.uid = null;
+ this.username = null;
this.user_context= {};
- this.db = false;
+ this.db = null;
this.module_list = instance._modules.slice();
this.module_loaded = {};
_(this.module_list).each(function (mod) {
@@ -56,8 +55,6 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
*/
session_init: function () {
var self = this;
- // TODO: session store in cookie should be optional
- this.session_id = this.get_cookie('session_id');
return this.session_reload().then(function(result) {
var modules = instance._modules.join(',');
var deferred = self.rpc('/web/webclient/qweblist', {mods: modules}).then(self.load_qweb.bind(self));
@@ -80,7 +77,19 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
*/
session_reload: function () {
var self = this;
- return this.rpc("/web/session/get_session_info", {}).done(function(result) {
+ var def = $.when();
+ if (this.override_session) {
+ if (! this.session_id) {
+ def = this.rpc("/gen_session_id", {}).then(function(result) {
+ self.session_id = result;
+ });
+ }
+ } else {
+ this.session_id = this.get_cookie('session_id');
+ }
+ return def.then(function() {
+ return self.rpc("/web/session/get_session_info", {})
+ }).then(function(result) {
// If immediately follows a login (triggered by trying to restore
// an invalid session or no session at all), refresh session data
// (should not change, but just in case...)
@@ -326,7 +335,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
}
_(_.extend({}, options.data || {},
- {session_id: this.session_id, token: token}))
+ {session_id: this.override_session ? this.session_id : undefined, token: token}))
.each(function (value, key) {
var $input = $form.find('[name=' + key +']');
if (!$input.length) {
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index a459486bf05..643bca0e798 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -654,7 +654,7 @@
/web/binary/upload_attachment
-
+
Add...
@@ -1320,7 +1320,7 @@
@@ -1835,7 +1835,7 @@
diff --git a/addons/account_voucher/static/description/index.html b/addons/account_voucher/static/description/index.html
index d59c110dde5..a363291f12e 100644
--- a/addons/account_voucher/static/description/index.html
+++ b/addons/account_voucher/static/description/index.html
@@ -17,7 +17,7 @@
automatically based on your activities.
diff --git a/addons/crm/static/description/index.html b/addons/crm/static/description/index.html
index 5ae542f5c91..70f52d0ca87 100644
--- a/addons/crm/static/description/index.html
+++ b/addons/crm/static/description/index.html
@@ -17,7 +17,7 @@
Manage your sales funnel with no effort. Attract leads, follow-up on phone calls and meetings. Analyse the quality of your leads to make informed decisions and save time by integrating emails directly into the application.
diff --git a/addons/hr/static/description/index.html b/addons/hr/static/description/index.html
index 0bc3db084a4..f97cb462fe3 100644
--- a/addons/hr/static/description/index.html
+++ b/addons/hr/static/description/index.html
@@ -17,7 +17,7 @@ Get all your HR operations managed easily: knowledge sharing, recruitments, appr
Each need is provided by a specific app that you activate on demand.
diff --git a/addons/mrp/static/description/index.html b/addons/mrp/static/description/index.html
index 5777eb5f147..d44da3f37b1 100644
--- a/addons/mrp/static/description/index.html
+++ b/addons/mrp/static/description/index.html
@@ -20,7 +20,7 @@ planning with the smart kanban and gantt views. Use the advanced analytics
features to detect bottleneck in resources capacities and inventory locations.
diff --git a/addons/note/static/description/index.html b/addons/note/static/description/index.html
index 7ef37c646e9..dc688859334 100644
--- a/addons/note/static/description/index.html
+++ b/addons/note/static/description/index.html
@@ -15,7 +15,7 @@
Organize yourself with efficient todo lists and notes. From personnal tasks to collaborative meeting minutes, increase your user's productivity by giving them the tools to prioritize their work, share their ideas and collaborate on documents.
diff --git a/addons/point_of_sale/static/description/index.html b/addons/point_of_sale/static/description/index.html
index 130806ddb11..7f1b7a5c097 100644
--- a/addons/point_of_sale/static/description/index.html
+++ b/addons/point_of_sale/static/description/index.html
@@ -22,7 +22,7 @@
consolidations amongst all shops without the hassle of integrating several applications.
diff --git a/addons/project/static/description/index.html b/addons/project/static/description/index.html
index 93f1be8a41d..2a1574c5d68 100644
--- a/addons/project/static/description/index.html
+++ b/addons/project/static/description/index.html
@@ -17,7 +17,7 @@ work done. Keep track of everything, from the big picture to the minute
details, from the customer contract to the billing.
diff --git a/addons/sale/static/description/index.html b/addons/sale/static/description/index.html
index 1eb6215db2f..52c84b82f12 100644
--- a/addons/sale/static/description/index.html
+++ b/addons/sale/static/description/index.html
@@ -17,7 +17,7 @@ you need, easily accessible. Keep track of long term contracts, automate invoici
and notify sales when they have things to do.
diff --git a/addons/stock/static/description/index.html b/addons/stock/static/description/index.html
index aac71e529ae..dd7fbe568f7 100644
--- a/addons/stock/static/description/index.html
+++ b/addons/stock/static/description/index.html
@@ -17,7 +17,7 @@
Decrease your process times, automate transactions, reduce your stock levels and get complete traceability on all operations with the OpenERP double entry inventory system.