Nick Huang
Action: Action to run
Server URL: Provided by the client
Database Name: Provided by the client
Username: Provided by the client
Password: Provided by the client
Status Filters: Filter the objects by status when pulling the objects
Get Generic Fields
true - Get all fields
false - Get fields that are specified in the model (only set to false if there's a permission issue)
Days To Check (only in Incoming Odoo transport)
Days to check for the created date of the record
Use Advanced Middleware Checking (only in Incoming Odoo transport)
In normal middleware checking, it checks if the orders, invoices, and shipments are against the order that we created by order number. We ran into an issue where multiple orders could have the same order number, but only one of them was created by us. So, we were pulling the invoices that didn't belong to us.
So advanced middleware checking will prevent this issue by checking the order with the Odoo order ID because the order ID is unique for each record.
This option will make extra API calls, so there may be a minor delay in pulling items on the Incoming Odoo transport.
Note: This is still in Beta, so if you run into an issue with this option, then please just use the normal middleware checking by turning off this setting.
Get Quotation Order Number (only in Incoming Odoo transport)
This will pull the Quotation Order number, as some objects, such as Shipment, only pull the Sales Order number.
Note: Currently, only the Incoming Shipments action supports this setting.
Skip Failed Items (only in Incoming Odoo transport)
If there is an issue pulling records in bulk from Odoo, it will pull them one by one, skip any that failed to pull and log the exception.
Fields To Exclude (only in Incoming Odoo transport)
Exclude the fields to pull when pulling the records from Odoo.
Pull invoices from Odoo
Query the account.move model:
Filter by create_date (e.g., last X days).
Filter the invoice status if needed (move_type).
For each invoice:
Load invoice lines from account.move.line using the invoice_line_ids field.
Load the customer from the partner_id field.
Action: INVOICES
Invoice Type Filters: Filter the invoice type when pulling the invoices
These are the general invoice types. There might be additional types for different clients.
entry -> Journal Entry
out_invoice -> Customer Invoice
out_refund -> Customer Credit Note
in_invoice -> Vendor Bill
in_refund -> Vendor Credit Note
out_receipt -> Sales Receipt
in_receipt -> Purchase Receipt
Pull shipments/delivery from Odoo
Query the stock.picking model:
Filter by create_date.
Filter the shipment status (state) with the value “done”.
For each shipment:
Load shipment lines from stock.move via move_lines.
Load customer from the partner_id field.
Optional (only if required by client):
Retrieve shipment packages (stock.quant.package) via package_ids.
Retrieve package contents (stock.quant) via quant_ids.
Action: SHIPMENTNOTIFICATIONS
Get Packages For Shipment:
true - Get all the packages of the shipment, including the package lines
false - Just a normal pulling shipment from Odoo
Pull sale orders from Odoo
Query the sale.order model:
Filter by create_date.
Filter the sale order status if needed (state).
For each sale order:
Load order lines from sale.order.line via order_line.
Load customer information:
partner_id (customer)
partner_invoice_id (invoice recipient)
partner_shipping_id (delivery recipient)
Action: ORDERS (was ORDERACKNOWLEDGEMENTS)
Creating order in Odoo with the following steps:
Optional (only if required by client) (if the Cancel Existing Orders setting is turned on):
Search for existing sale orders with the same order reference (reference).
For each matching order:
Call the action_cancel function to cancel it.
Create the parent sale.order record and its lines sale.order.line using the order_line field.
Get and update the system order ID and number in Crossfire middleware
Optional (only if required by client):
Confirm the sale order after creating it by calling the action_confirm method.
Action: ORDERS
Cancel Existing Orders: if true, find all the existing orders in Odoo with the same order.reference and then cancel them all. Otherwise, run it normally.
Confirm shipment in Odoo with the following steps:
Update the shipment
Set Status to “Ready”
Call action_confirm
Sets the picking to “Waiting” if moves require availability checks.
Call action_assign
Reserves stock.
Transfers the picking to the “Ready” state.
Confirm / Validate the Shipment
Call button_validate on the picking record.
This performs the final transfer and completes the stock move.
Set the date_done if needed.
Action: CONFIRMSHIPMENT