'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):
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)
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)
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}):
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:
('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):
<newline/>
<field name="chart_tax_id" widget='selection'/>
<field name="fiscalyear_id"/>
+ <field name="display_detail"/>
<!--- <field name="based_on"/>--> <!-- the option based_on 'payment' is probably not fully compliant with what the users understand with that term. So, currently, it's seems better to remove it from the view to avoid further problems -->
<separator string="Periods" colspan="4"/>
<field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]"/>