-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrfq_create.py
44 lines (41 loc) · 1.34 KB
/
rfq_create.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import xmlrpc.client
from endpoint import models
from establish import *
new_rfq = models.execute_kw(db, uid, password, 'purchase.order', 'create', [{
'state': "draft",
'partner_id': 18,
'client_order_ref': "000000",
'picking_policy': "direct",
'order_line' : [
# First line of Order Lines
(0, 0, {
'product_id': product_ID,
'name': "Your Product Name",
'product_qty': 10,
'date_planned': "06/05/2021 15:28:55",
'product_uom': UnitOfMeasure_ID,
'price_unit': 20000,
}
),
# Second line of Order Lines
(0, 0, {
'product_id': product_ID,
'name': "Your Product Name",
'product_qty': 10,
'date_planned': "06/05/2021 15:28:55",
'product_uom': UnitOfMeasure_ID,
'price_unit': 20000,
}
)
],
}])
# Description
# State = #Select either "sent", "sale", "done", "cancel"
# partner_id = #Customer ID
# client_order_ref = Order Reference Number
# picking_policy = Select either "direct" or "one"
# product_id = Product ID
# name = Product ID name, will automatically follow the product ID
# product_qty = Quantity
# date_planned = This is the scheduled date
# product_uom = Product UoM will also follow product_id