'This method generates a dictionnary of all the values for the account that will be created.'

def _get_account_vals(self, company, account_template, code_acc, tax_template_ref):

    self.ensure_one()
    tax_ids = []
    for tax in account_template.tax_ids:
        tax_ids.append(tax_template_ref[tax.id])
    val = {'name': account_template.name, 'currency_id': ((account_template.currency_id and account_template.currency_id.id) or False), 'code': code_acc, 'user_type_id': ((account_template.user_type_id and account_template.user_type_id.id) or False), 'reconcile': account_template.reconcile, 'note': account_template.note, 'tax_ids': [(6, 0, tax_ids)], 'company_id': company.id, 'tag_ids': [(6, 0, [t.id for t in account_template.tag_ids])]}
    return val
