diff --git a/addons/account/account.py b/addons/account/account.py index d76b762442e..f51f41e845c 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1266,8 +1266,18 @@ class account_tax(osv.osv): 'include_base_amount': fields.boolean('Include in base amount', help="Indicate if the amount of tax must be included in the base amount for the computation of the next taxes"), 'company_id': fields.many2one('res.company', 'Company', required=True), 'description': fields.char('Tax Code',size=32), - 'price_include': fields.boolean('Tax Included in Price', help="Check this is the price you use on the product and invoices is including this tax.") + 'price_include': fields.boolean('Tax Included in Price', help="Check this is the price you use on the product and invoices is including this tax."), + 'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase')], 'Tax Use in') + } + def search(self, cr, uid, args, offset=0, limit=None, order=None, + context=None, count=False): + if context and context.has_key('type'): + if context['type'] in ('out_invoice','out_refund'): + args.append(('type_tax_use','=','sale')) + elif context['type'] in ('in_invoice','in_refund'): + args.append(('type_tax_use','=','purchase')) + return super(account_tax, self).search(cr, uid, args, offset, limit, order, context, count) def name_get(self, cr, uid, ids, context={}): if not len(ids): @@ -1898,6 +1908,7 @@ class account_tax_template(osv.osv): 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), 'include_base_amount': fields.boolean('Include in base amount', help="Indicate if the amount of tax must be included in the base amount for the computation of the next taxes."), 'description': fields.char('Internal Name', size=32), + 'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase')], 'Tax Use in') } def name_get(self, cr, uid, ids, context={}): @@ -2073,6 +2084,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): 'include_base_amount': tax.include_base_amount, 'description':tax.description, 'company_id': company_id, + 'type_tax_use': tax.type_tax_use } new_tax = obj_acc_tax.create(cr,uid,vals_tax) #as the accounts have not been created yet, we have to wait before filling these fields diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 2b1e42cde7e..c130803aa82 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -63,7 +63,7 @@ - + @@ -156,7 +156,7 @@ - + diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index e35f4b942e8..08bb4c15877 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -608,6 +608,7 @@ + @@ -1550,6 +1551,7 @@ + diff --git a/addons/account/product.py b/addons/account/product.py index bbad07e02ff..78ad60ab9ae 100644 --- a/addons/account/product.py +++ b/addons/account/product.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution +# OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved # $Id$ # @@ -54,10 +54,10 @@ class product_template(osv.osv): _columns = { 'taxes_id': fields.many2many('account.tax', 'product_taxes_rel', 'prod_id', 'tax_id', 'Customer Taxes', - domain=[('parent_id','=',False)]), + domain=[('parent_id','=',False),('type_tax_use','=','sale')]), 'supplier_taxes_id': fields.many2many('account.tax', 'product_supplier_taxes_rel', 'prod_id', 'tax_id', - 'Supplier Taxes', domain=[('parent_id', '=', False)]), + 'Supplier Taxes', domain=[('parent_id', '=', False),('type_tax_use','=','purchase')]), 'property_account_income': fields.property( 'account.account', type='many2one', diff --git a/addons/auction/auction_view.xml b/addons/auction/auction_view.xml index adaa263fa86..d45cc8e1612 100644 --- a/addons/auction/auction_view.xml +++ b/addons/auction/auction_view.xml @@ -103,8 +103,8 @@ Auction Management/Auction Dates/New Auction Dates - - + + @@ -208,7 +208,7 @@ Auction Management/Auction Dates/Reporting - + @@ -319,7 +319,7 @@ Auction Management/Auction Dates/Reporting - + @@ -430,7 +430,7 @@ Auction Management/Auction Dates/Reporting - + @@ -510,7 +510,7 @@ Auction Management/Auction Dates/Reporting - + @@ -545,7 +545,7 @@ Auction Management/Auction Dates/Reporting - + diff --git a/addons/l10n_be/account_pcmn_belgium.xml b/addons/l10n_be/account_pcmn_belgium.xml index 85a19681293..fc3baa0203e 100644 --- a/addons/l10n_be/account_pcmn_belgium.xml +++ b/addons/l10n_be/account_pcmn_belgium.xml @@ -6637,6 +6637,7 @@ + sale @@ -6645,6 +6646,7 @@ percent + purchase @@ -6653,6 +6655,7 @@ percent + sale @@ -6661,6 +6664,7 @@ percent + purchase @@ -6673,6 +6677,7 @@ + sale @@ -6680,6 +6685,7 @@ percent + purchase @@ -6693,6 +6699,8 @@ + purchase + @@ -6702,6 +6710,7 @@ percent + purchase @@ -6710,6 +6719,7 @@ percent + sale @@ -6721,6 +6731,7 @@ + purchase @@ -6732,6 +6743,7 @@ + purchase @@ -6743,6 +6755,7 @@ + purchase @@ -6751,6 +6764,7 @@ percent + sale @@ -6760,6 +6774,7 @@ + sale @@ -6771,6 +6786,7 @@ + sale @@ -6782,6 +6798,7 @@ + sale @@ -6791,6 +6808,7 @@ + sale @@ -6802,6 +6820,7 @@ + sale @@ -6813,6 +6832,7 @@ + sale diff --git a/addons/l10n_chart_uk_minimal/account_tax.xml b/addons/l10n_chart_uk_minimal/account_tax.xml index 51d5c3f349f..a030925f8fa 100755 --- a/addons/l10n_chart_uk_minimal/account_tax.xml +++ b/addons/l10n_chart_uk_minimal/account_tax.xml @@ -1,128 +1,128 @@ - + - + - + - + - + Plan Fees UK - + VAT Balance to Pay - + Input VAT - + Input VAT Rate S (15%) - + Input VAT Rate R (5%) - + - + Output VAT - + Output VAT Rate S (15%) - + Output VAT Rate R (5%) - + - + - + Tax Bases - + Taxable Purchases Base - + Taxable Purchases Rated S (15%) - + Taxable Purchases Rated R (5%) - + Taxable Purchases Rated Z (0%) - + Taxable Purchases Type X (Exempt) - + Taxable Purchases Type O (Out of scope) - + - + Base of Taxable Sales - + Taxable Sales Rated S (15%) - + Taxable Sales Rated R (5%) - + Taxable Sales Rated Z (0%) - + Taxable Sales Type X (Exempt) - + Taxable Sales Type O (Out of scope) - + - + UK Minimal Account Chart Template @@ -133,10 +133,10 @@ - + - + IVAT S @@ -148,8 +148,9 @@ + purchase - + IVAT R @@ -161,8 +162,9 @@ + purchase - + IVAT Z @@ -170,8 +172,9 @@ percent + purchase - + IVAT X @@ -179,8 +182,9 @@ percent + purchase - + IVAT O @@ -188,10 +192,11 @@ percent + purchase - + OVAT S @@ -203,8 +208,9 @@ + sale - + OVAT R @@ -216,8 +222,9 @@ + sale - + OVAT Z @@ -225,8 +232,9 @@ percent + sale - + OVAT X @@ -234,8 +242,9 @@ percent + sale - + OVAT O @@ -243,7 +252,8 @@ percent + sale - + \ No newline at end of file diff --git a/addons/mrp_repair/mrp_repair_view.xml b/addons/mrp_repair/mrp_repair_view.xml index 15dfd109b59..68754d1e789 100644 --- a/addons/mrp_repair/mrp_repair_view.xml +++ b/addons/mrp_repair/mrp_repair_view.xml @@ -1,7 +1,7 @@ - + mrp.repair.form mrp.repair @@ -26,25 +26,25 @@ -
+ - - - + + + - - + + - + - + @@ -52,7 +52,7 @@ - +
@@ -88,7 +88,7 @@