diff --git a/addons/account/account.py b/addons/account/account.py
index 02c8f822b56..92e698448a9 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1773,6 +1773,7 @@ class account_tax_code(osv.osv):
'company_id': fields.many2one('res.company', 'Company', required=True),
'sign': fields.float('Coefficent for parent', required=True, help='You can specify here the coefficient that will be used when consolidating the amount of this case into its parent. For example, set 1/-1 if you want to add/substract it.'),
'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any VAT related to this Tax Code to appear on invoices"),
+ 'sequence': fields.integer('Sequence', help="Determine the display order in the report 'Accounting \ Reporting \ Generic Reporting \ Taxes \ Taxes Report'"),
}
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
diff --git a/addons/account/report/account_tax_report.py b/addons/account/report/account_tax_report.py
index a3bdc1a75f6..2a0c5987b47 100644
--- a/addons/account/report/account_tax_report.py
+++ b/addons/account/report/account_tax_report.py
@@ -32,6 +32,7 @@ class tax_report(report_sxw.rml_parse, common_report_header):
res = {}
self.period_ids = []
period_obj = self.pool.get('account.period')
+ self.display_detail = data['form']['display_detail']
res['periods'] = ''
res['fiscalyear'] = data['form'].get('fiscalyear_id', False)
@@ -104,6 +105,8 @@ class tax_report(report_sxw.rml_parse, common_report_header):
return top_result
def _get_general(self, tax_code_id, period_list, company_id, based_on, context=None):
+ if not self.display_detail:
+ return []
res = []
obj_account = self.pool.get('account.account')
periods_ids = tuple(period_list)
@@ -159,7 +162,7 @@ class tax_report(report_sxw.rml_parse, common_report_header):
def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=[], context=None):
obj_tc = self.pool.get('account.tax.code')
- ids = obj_tc.search(self.cr, self.uid, [('parent_id','=',parent),('company_id','=',company_id)], context=context)
+ ids = obj_tc.search(self.cr, self.uid, [('parent_id','=',parent),('company_id','=',company_id)], order='sequence', context=context)
res = []
for code in obj_tc.browse(self.cr, self.uid, ids, {'based_on': based_on}):
@@ -229,4 +232,4 @@ class tax_report(report_sxw.rml_parse, common_report_header):
report_sxw.report_sxw('report.account.vat.declaration', 'account.tax.code',
'addons/account/report/account_tax_report.rml', parser=tax_report, header="internal")
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/wizard/account_vat.py b/addons/account/wizard/account_vat.py
index cbdf18d314a..0770cbe246c 100644
--- a/addons/account/wizard/account_vat.py
+++ b/addons/account/wizard/account_vat.py
@@ -30,6 +30,7 @@ class account_vat_declaration(osv.osv_memory):
('payments', 'Payments'),],
'Based on', required=True),
'chart_tax_id': fields.many2one('account.tax.code', 'Chart of Tax', help='Select Charts of Taxes', required=True, domain = [('parent_id','=', False)]),
+ 'display_detail': fields.boolean('Display Detail'),
}
def _get_tax(self, cr, uid, context=None):
diff --git a/addons/account/wizard/account_vat_view.xml b/addons/account/wizard/account_vat_view.xml
index f0e5dcb1c13..d8e7560e029 100644
--- a/addons/account/wizard/account_vat_view.xml
+++ b/addons/account/wizard/account_vat_view.xml
@@ -13,6 +13,7 @@
+