parameters: (self, kw, render_values)
return_statement: return res
docstring: This method provides fields related to the country to render the website sale form
docstring_summary: This method provides fields related to the country to render the website sale form
docstring_tokens: This method provides fields related to the country to render the website sale form
function: def _get_country_related_render_values(self, kw, render_values):
          '''
          This method provides fields related to the country to render the website sale form
          '''
          values = render_values['checkout']
          mode = render_values['mode']
          order = render_values['website_sale_order']
  
          def_country_id = order.partner_id.country_id
          # IF PUBLIC ORDER
          if order.partner_id.id == request.website.user_id.sudo().partner_id.id:
              country_code = request.session['geoip'].get('country_code')
              if country_code:
                  def_country_id = request.env['res.country'].search([('code', '=', country_code)], limit=1)
              else:
                  def_country_id = request.website.user_id.sudo().country_id
  
          country = 'country_id' in values and values['country_id'] != '' and request.env['res.country'].browse(int(values['country_id']))
          country = country and country.exists() or def_country_id
  
          res = {
              'country': country,
              'country_states': country.get_website_sale_states(mode=mode[1]),
              'countries': country.get_website_sale_countries(mode=mode[1]),
          }
          return res
function_tokens: def _get_country_related_render_values ( self , kw , render_values ) : values = render_values [ 'checkout' ] mode = render_values [ 'mode' ] order = render_values [ 'website_sale_order' ] def_country_id = order . partner_id . country_id # IF PUBLIC ORDER if order . partner_id . id == request . website . user_id . sudo ( ) . partner_id . id : country_code = request . session [ 'geoip' ] . get ( 'country_code' ) if country_code : def_country_id = request . env [ 'res.country' ] . search ( [ ( 'code' , '=' , country_code ) ] , limit = 1 ) else : def_country_id = request . website . user_id . sudo ( ) . country_id country = 'country_id' in values and values [ 'country_id' ] != '' and request . env [ 'res.country' ] . browse ( int ( values [ 'country_id' ] ) ) country = country and country . exists ( ) or def_country_id res = { 'country' : country , 'country_states' : country . get_website_sale_states ( mode = mode [ 1 ] ) , 'countries' : country . get_website_sale_countries ( mode = mode [ 1 ] ) , } return res