Skip to content

Commit

Permalink
[FIX] Set tax code sequence from template
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan@therp.nl committed Jul 2, 2014
1 parent 38b14bc commit 95f00a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions addons/account/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -2703,6 +2703,11 @@ class account_tax_code_template(osv.osv):
'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Child Codes'),
'sign': fields.float('Sign For Parent', required=True),
'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any tax 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'"),
),
}

_defaults = {
Expand Down Expand Up @@ -2735,6 +2740,7 @@ def generate_tax_code(self, cr, uid, tax_code_root_id, company_id, context=None)
'parent_id': tax_code_template.parent_id and ((tax_code_template.parent_id.id in tax_code_template_ref) and tax_code_template_ref[tax_code_template.parent_id.id]) or False,
'company_id': company_id,
'sign': tax_code_template.sign,
'sequence': tax_code_template.sequence,
}
#check if this tax code already exists
rec_list = obj_tax_code.search(cr, uid, [('name', '=', vals['name']),('code', '=', vals['code']),('company_id', '=', vals['company_id'])], context=context)
Expand Down

0 comments on commit 95f00a0

Please sign in to comment.