odoo_xmlrpc_twisted.functions.create_order

Create the records for moving an object in the Stock Move flow.

Functions

create_order(product_id, transfer)

The function creates the main datasets during the move of a product from one location to another:

odoo_xmlrpc_twisted.functions.create_order.create_order(product_id, transfer)[source]

The function creates the main datasets during the move of a product from one location to another:

  • Stock Move

  • Stock Picking

  • Procurement Group

  • Sales Order

  • Account Move

3 main operations are execucuted in Odoo:

  • create a sales order in the “Sales” module

  • create the corresponding stock move in the “Inventory” module

  • create the corresponding invoice in the “Accounting” module

Parameter:

  • “product_id”: product of the customer which will be moved

  • “transfer”: type of transfer to be used