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

def _get_tax_vals(self, company):

    self.ensure_one()
    val = {'name': self.name, 'type_tax_use': self.type_tax_use, 'amount_type': self.amount_type, 'active': self.active, 'company_id': company.id, 'sequence': self.sequence, 'amount': self.amount, 'description': self.description, 'price_include': self.price_include, 'include_base_amount': self.include_base_amount, 'analytic': self.analytic, 'tag_ids': [(6, 0, [t.id for t in self.tag_ids])], 'tax_adjustment': self.tax_adjustment}
    if self.tax_group_id:
        val['tax_group_id'] = self.tax_group_id.id
    return val
