Odoo Sales Module

Odoo Overview → Sales

Tổng quan

Module Sales trong Odoo quản lý toàn bộ quy trình bán hàng từ quote đến invoice.

Flow chính

  1. Quotationsale.order trạng thái draft
  2. Confirm → Tạo delivery order (stock.picking)
  3. Deliver → Hoàn thành picking
  4. Invoice → Tạo account.move

Models chính

ModelMô tả
sale.orderĐơn hàng
sale.order.lineDòng đơn hàng
sale.teamTổ bán hàng
sale.subscriptionHợp đồng định kỳ

API access

# XML-RPC example
sale_order = models.execute_kw(
    db, uid, password, 'sale.order', 'create', [{
        'partner_id': customer_id,
        'order_line': [(0, 0, {
            'product_id': product_id,
            'product_uom_qty': 1,
            'price_unit': 1000000
        })]
    }])