|
@@ -87,7 +87,7 @@ def process_data(data=None):
|
|
|
def drafting_order(currency_id, supplier_id, cart_items, date_now, payment_term_id, warehouse_id=None, user_id=None):
|
|
|
pricelist_id = get_pricelist_id(currency_id)
|
|
|
|
|
|
- order = create_purchase_order(supplier_id, cart_items, date_now, currency_id, pricelist_id, payment_term_id, warehouse_id)
|
|
|
+ order = create_purchase_order(supplier_id, cart_items, date_now, currency_id, pricelist_id, payment_term_id, warehouse_id, user_id)
|
|
|
|
|
|
return order.id, currency_id
|
|
|
|
|
@@ -110,7 +110,7 @@ def process_data(data=None):
|
|
|
'price': l.price_unit
|
|
|
} for l in order.order_line]
|
|
|
|
|
|
- invoice = create_invoice(order.partner_id.id, lines, order.currency_id.id, payment_term_id, supplier_invoice_number, user_id)
|
|
|
+ invoice = create_invoice(order.name, order.partner_id.id, lines, order.currency_id.id, payment_term_id, supplier_invoice_number, user_id)
|
|
|
|
|
|
invoice_ids = invoice.mapped(lambda x: x.id)
|
|
|
|