old_contents: ##############################################################################
  # For copyright and license notices, see __manifest__.py file in module root
  # directory
  ##############################################################################
  from odoo import models, api
  
  
  class SaleAdvancePaymentInv(models.TransientModel):
      _inherit = "sale.advance.payment.inv"
  
      @api.multi
      def _create_invoice(self, order, so_line, amount):
          invoice = super(SaleAdvancePaymentInv, self)._create_invoice(
              order=order, so_line=so_line, amount=amount)
          if order.company_id.internal_notes:
              invoice.internal_notes = order.internal_notes
          if order.company_id.external_notes:
              invoice.comment = order.note
          return invoice
  
new_contents: ##############################################################################
  # For copyright and license notices, see __manifest__.py file in module root
  # directory
  ##############################################################################
  from odoo import models, api
  
  
  class SaleAdvancePaymentInv(models.TransientModel):
      _inherit = "sale.advance.payment.inv"
  
      @api.multi
      def _create_invoice(self, order, so_line, amount):
          invoice = super(SaleAdvancePaymentInv, self)._create_invoice(
              order=order, so_line=so_line, amount=amount)
          propagate_internal_notes = self.env['ir.config_parameter'].sudo(
          ).get_param('sale.propagate_internal_notes') == 'True'
          propagate_note = self.env['ir.config_parameter'].sudo(
          ).get_param('sale.propagate_note') == 'True'
          if propagate_internal_notes:
              invoice.internal_notes = order.internal_notes
          if not propagate_note:
              invoice.comment = False
          return invoice
  
subject: change internal code and notes using parametres insted of fields in companies (#41)