title: Odoo - Confirm Sales Order
body: <p>Hi I am using Odoo10 and trying to create a sales order in POS, below code creates the Sales orders quotation. I want to Confirm the Sale and create Sales order not quotation.</p>
  
  <pre><code>@api.model
      def create_sales_order(self, orderline, customer_id, sign):
          sale_pool = self.env['sale.order']
          prod_pool = self.env['product.product']
          sale_line_pool = self.env['sale.order.line']
          sale_no = ''
          sale = {}
          if customer_id:
              customer_id = int(customer_id)
              sale = {'partner_id': customer_id, 
                      'partner_invoice_id': customer_id,
                      'partner_shipping_id': customer_id, 
                      'signature': sign}
              sale_id = sale_pool.create(sale)
              if sale_id:
                  sale_brw = sale_id
                  sale_brw.onchange_partner_id()
                  #create sale order line
                  for line in orderline:
                      sale_line = {}
                      if line.get('product_id'):
                          prod_rec = prod_pool.browse(line['product_id'])
                          sale_line.update({'name': prod_rec.name or False,
                                            'product_id': prod_rec.id,
                                            'product_uom_qty': line['qty'],
                                            'discount': line.get('discount'),
                                            'order_id': sale_id.id})
                          sale_line_id = sale_line_pool.create(sale_line)
                          for line in sale_line_id:
                              line.product_id_change()
          return {"name": sale_brw.name, "id": sale_brw.id } 
  </code></pre>
  
  <p>How do I create sales order not quotation?</p>