parameters: (self, acc_template_ref, company)
return_statement: return True
docstring: This method used for creating properties.
  
          :param acc_template_ref: Mapping between ids of account templates and real accounts created from them
          :param company_id: company to generate properties for.
          :returns: True
docstring_summary: This method used for creating properties.
docstring_tokens: This method used for creating properties .
function: def generate_properties(self, acc_template_ref, company):
          """
          This method used for creating properties.
  
          :param acc_template_ref: Mapping between ids of account templates and real accounts created from them
          :param company_id: company to generate properties for.
          :returns: True
          """
          self.ensure_one()
          PropertyObj = self.env['ir.property']
          todo_list = [
              ('property_account_receivable_id', 'res.partner'),
              ('property_account_payable_id', 'res.partner'),
              ('property_account_expense_categ_id', 'product.category'),
              ('property_account_income_categ_id', 'product.category'),
              ('property_account_expense_id', 'product.template'),
              ('property_account_income_id', 'product.template'),
              ('property_tax_payable_account_id', 'account.tax.group'),
              ('property_tax_receivable_account_id', 'account.tax.group'),
              ('property_advance_tax_payment_account_id', 'account.tax.group'),
          ]
          for field, model in todo_list:
              account = self[field]
              value = acc_template_ref[account].id if account else False
              if value:
                  PropertyObj._set_default(field, model, value, company=company)
  
          stock_properties = [
              'property_stock_account_input_categ_id',
              'property_stock_account_output_categ_id',
              'property_stock_valuation_account_id',
          ]
          for stock_property in stock_properties:
              account = getattr(self, stock_property)
              value = account and acc_template_ref[account].id or False
              if value:
                  company.write({stock_property: value})
          return True
function_tokens: def generate_properties ( self , acc_template_ref , company ) : self . ensure_one ( ) PropertyObj = self . env [ 'ir.property' ] todo_list = [ ( 'property_account_receivable_id' , 'res.partner' ) , ( 'property_account_payable_id' , 'res.partner' ) , ( 'property_account_expense_categ_id' , 'product.category' ) , ( 'property_account_income_categ_id' , 'product.category' ) , ( 'property_account_expense_id' , 'product.template' ) , ( 'property_account_income_id' , 'product.template' ) , ( 'property_tax_payable_account_id' , 'account.tax.group' ) , ( 'property_tax_receivable_account_id' , 'account.tax.group' ) , ( 'property_advance_tax_payment_account_id' , 'account.tax.group' ) , ] for field , model in todo_list : account = self [ field ] value = acc_template_ref [ account ] . id if account else False if value : PropertyObj . _set_default ( field , model , value , company = company ) stock_properties = [ 'property_stock_account_input_categ_id' , 'property_stock_account_output_categ_id' , 'property_stock_valuation_account_id' , ] for stock_property in stock_properties : account = getattr ( self , stock_property ) value = account and acc_template_ref [ account ] . id or False if value : company . write ( { stock_property : value } ) return True