parameters: (self, company_id, sale_tax_rate, purchase_tax_rate)
return_statement: return True
docstring: This function checks if this chart template is configured as containing a full set of taxes, and if
          it's not the case, it creates the templates for account.tax object accordingly to the provided sale/purchase rates.
          Then it saves the new tax templates as default taxes to use for this chart template.
  
          :param company_id: id of the company for which the wizard is running
          :param sale_tax_rate: the rate to use for created sales tax
          :param purchase_tax_rate: the rate to use for created purchase tax
          :return: True
docstring_summary: This function checks if this chart template is configured as containing a full set of taxes, and if
          it's not the case, it creates the templates for account.tax object accordingly to the provided sale/purchase rates.
          Then it saves the new tax templates as default taxes to use for this chart template.
docstring_tokens: This function checks if this chart template is configured as containing a full set of taxes and if it s not the case it creates the templates for account . tax object accordingly to the provided sale / purchase rates . Then it saves the new tax templates as default taxes to use for this chart template .
function: def _create_tax_templates_from_rates(self, company_id, sale_tax_rate, purchase_tax_rate):
          '''
          This function checks if this chart template is configured as containing a full set of taxes, and if
          it's not the case, it creates the templates for account.tax object accordingly to the provided sale/purchase rates.
          Then it saves the new tax templates as default taxes to use for this chart template.
  
          :param company_id: id of the company for which the wizard is running
          :param sale_tax_rate: the rate to use for created sales tax
          :param purchase_tax_rate: the rate to use for created purchase tax
          :return: True
          '''
          self.ensure_one()
          obj_tax_temp = self.env['account.tax.template']
          all_parents = self._get_chart_parent_ids()
          # create tax templates from purchase_tax_rate and sale_tax_rate fields
          if not self.complete_tax_set:
              ref_taxs = obj_tax_temp.search([('type_tax_use', '=', 'sale'), ('chart_template_id', 'in', all_parents)], order="sequence, id desc", limit=1)
              ref_taxs.write({'amount': sale_tax_rate, 'name': _('Tax %.2f%%') % sale_tax_rate, 'description': '%.2f%%' % sale_tax_rate})
              ref_taxs = obj_tax_temp.search([('type_tax_use', '=', 'purchase'), ('chart_template_id', 'in', all_parents)], order="sequence, id desc", limit=1)
              ref_taxs.write({'amount': purchase_tax_rate, 'name': _('Tax %.2f%%') % purchase_tax_rate, 'description': '%.2f%%' % purchase_tax_rate})
          return True
function_tokens: def _create_tax_templates_from_rates ( self , company_id , sale_tax_rate , purchase_tax_rate ) : self . ensure_one ( ) obj_tax_temp = self . env [ 'account.tax.template' ] all_parents = self . _get_chart_parent_ids ( ) # create tax templates from purchase_tax_rate and sale_tax_rate fields if not self . complete_tax_set : ref_taxs = obj_tax_temp . search ( [ ( 'type_tax_use' , '=' , 'sale' ) , ( 'chart_template_id' , 'in' , all_parents ) ] , order = "sequence, id desc" , limit = 1 ) ref_taxs . write ( { 'amount' : sale_tax_rate , 'name' : _ ( 'Tax %.2f%%' ) % sale_tax_rate , 'description' : '%.2f%%' % sale_tax_rate } ) ref_taxs = obj_tax_temp . search ( [ ( 'type_tax_use' , '=' , 'purchase' ) , ( 'chart_template_id' , 'in' , all_parents ) ] , order = "sequence, id desc" , limit = 1 ) ref_taxs . write ( { 'amount' : purchase_tax_rate , 'name' : _ ( 'Tax %.2f%%' ) % purchase_tax_rate , 'description' : '%.2f%%' % purchase_tax_rate } ) return True