From 1dceb70f3bf281f44cc746263a9a00a0fb6de2d8 Mon Sep 17 00:00:00 2001 From: Rifakat Date: Thu, 13 Jun 2013 15:13:30 +0530 Subject: [PATCH 001/225] [FIX] account: if tax is , total base is applied only on the main tax and does not carry the child tax amount into base, it is compulsory to add child tax amount to tax base becuase the next tax i.e. VAT is applied on total tax base amount --- addons/account/account.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index c2e75e889f0..418a4f7b161 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2088,12 +2088,15 @@ class account_tax(osv.osv): data['balance'] = cur_price_unit amount2 = data.get('amount', 0.0) + amount3 = 0.0 if tax.child_ids: if tax.child_depend: latest = res.pop() amount = amount2 child_tax = self._unit_compute(cr, uid, tax.child_ids, amount, product, partner, quantity) res.extend(child_tax) + for child in child_tax: + amount3 += child.get('amount', 0.0) if tax.child_depend: for r in res: for name in ('base','ref_base'): @@ -2109,7 +2112,7 @@ class account_tax(osv.osv): r['amount'] = data['amount'] latest[name+'_code_id'] = False if tax.include_base_amount: - cur_price_unit+=amount2 + cur_price_unit += amount2 + amount3 return res def compute_all(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, force_excluded=False): From b6c748ffe6fdc2e9de3861a5a8f3587b371bff5f Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 5 Mar 2014 12:30:24 +0530 Subject: [PATCH 002/225] [IMP]Added the 'Shopping Carts' sales team and improved code accordingly --- addons/sale/sale.py | 1 + addons/sale/sale_view.xml | 8 ++++---- addons/website_sale/controllers/main.py | 2 +- addons/website_sale/data/website_sale_data.xml | 6 ++++++ addons/website_sale/models/website.py | 2 ++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 667f15a375d..fb9657416c4 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -170,6 +170,7 @@ class sale_order(osv.osv): 'client_order_ref': fields.char('Customer Reference', size=64), 'state': fields.selection([ ('draft', 'Draft Quotation'), + ('shopping_cart', 'Shopping Cart'), ('sent', 'Quotation Sent'), ('cancel', 'Cancelled'), ('waiting_date', 'Waiting Schedule'), diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 35901b0131e..24d2feeecba 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -80,14 +80,14 @@