parameters: (self, invoice)
return_statement: return {
              **invoice._prepare_edi_vals_to_export(),
              'tax_details': invoice._prepare_edi_tax_details(),
              'ubl_version': 2.1,
              'type_code': 380 if invoice.move_type == 'out_invoice' else 381,
              'payment_means_code': 42 if invoice.journal_id.bank_account_id else 31,
              'bank_account': invoice.partner_bank_id,
              'note': html2plaintext(invoice.narration) if invoice.narration else False,
              'format_monetary': format_monetary,
              'customer_vals': {'partner': invoice.commercial_partner_id},
              'supplier_vals': {'partner': invoice.company_id.partner_id.commercial_partner_id},
          }
docstring: Get the necessary values to generate the XML. These values will be used in the qweb template when
          rendering. Needed values differ depending on the implementation of the UBL, as (sub)template can be overriden
          or called dynamically.
          :returns:   a dictionary with the value used in the template has key and the value as value.
docstring_summary: Get the necessary values to generate the XML. These values will be used in the qweb template when
          rendering. Needed values differ depending on the implementation of the UBL, as (sub)template can be overriden
          or called dynamically.
          :returns:   a dictionary with the value used in the template has key and the value as value.
docstring_tokens: Get the necessary values to generate the XML . These values will be used in the qweb template when rendering . Needed values differ depending on the implementation of the UBL as ( sub ) template can be overriden or called dynamically . : returns : a dictionary with the value used in the template has key and the value as value .
function: def _get_ubl_values(self, invoice):
          ''' Get the necessary values to generate the XML. These values will be used in the qweb template when
          rendering. Needed values differ depending on the implementation of the UBL, as (sub)template can be overriden
          or called dynamically.
          :returns:   a dictionary with the value used in the template has key and the value as value.
          '''
          def format_monetary(amount):
              # Format the monetary values to avoid trailing decimals (e.g. 90.85000000000001).
              return float_repr(amount, invoice.currency_id.decimal_places)
  
          return {
              **invoice._prepare_edi_vals_to_export(),
              'tax_details': invoice._prepare_edi_tax_details(),
              'ubl_version': 2.1,
              'type_code': 380 if invoice.move_type == 'out_invoice' else 381,
              'payment_means_code': 42 if invoice.journal_id.bank_account_id else 31,
              'bank_account': invoice.partner_bank_id,
              'note': html2plaintext(invoice.narration) if invoice.narration else False,
              'format_monetary': format_monetary,
              'customer_vals': {'partner': invoice.commercial_partner_id},
              'supplier_vals': {'partner': invoice.company_id.partner_id.commercial_partner_id},
          }
function_tokens: def _get_ubl_values ( self , invoice ) : def format_monetary ( amount ) : # Format the monetary values to avoid trailing decimals (e.g. 90.85000000000001). return float_repr ( amount , invoice . currency_id . decimal_places ) return { * * invoice . _prepare_edi_vals_to_export ( ) , 'tax_details' : invoice . _prepare_edi_tax_details ( ) , 'ubl_version' : 2.1 , 'type_code' : 380 if invoice . move_type == 'out_invoice' else 381 , 'payment_means_code' : 42 if invoice . journal_id . bank_account_id else 31 , 'bank_account' : invoice . partner_bank_id , 'note' : html2plaintext ( invoice . narration ) if invoice . narration else False , 'format_monetary' : format_monetary , 'customer_vals' : { 'partner' : invoice . commercial_partner_id } , 'supplier_vals' : { 'partner' : invoice . company_id . partner_id . commercial_partner_id } , }