4 List of the methods used in the Magento XML RPC API
Guewen Baconnier edited this page 2015-03-19 13:33:20 +01:00

Used methods per model

List the methods used by the Odoo connector.

Invoices

model method extension comment
sales_order_invoice create
sales_order_invoice info
sales_order_invoice list

Websites

model method extension comment
ol_websites list X to rename
ol_websites info X to rename

Stores

model method extension comment
ol_groups list X to rename
ol_groups info X to rename

Store views

model method extension comment
ol_storeviews list X could be replaced by the core API store.list
ol_storeviews info X could be replaced by the core API store.info

Customers

model method extension comment
customer create
customer info
ol_customer search X to rename; to improve: do not load the records in memory

Addresses

model method extension comment
customer_address create
customer_address info
customer_address list

Customer Groups

model method extension comment
customer_address info
customer_address list

Products

model method extension comment
ol_catalog_product info X to rename, it adds 'bundle' information (or add the same behavior in the core method
catalog_product list should be replaced by search
ol_catalog_product update X not used in the core magentoerpconnect but in extension. I don't know why the normal catalog_product.update is not used

Inventory

model method extension comment
oerp_cataloginventory_stock_item update X to rename

Product Images

model method extension comment
product_media info
product_media list

Product Categories

model method extension comment
catalog_category info
catalog_category tree
catalog_category move not used in the core magentoerpconnect
catalog_category assignedProducts not used in the core magentoerpconnect
catalog_category assignProduct not used in the core magentoerpconnect
catalog_category updateProduct not used in the core magentoerpconnect
catalog_category removeProduct not used in the core magentoerpconnect
oerp_catalog_category search X to rename

Sales Orders

model method extension comment
sales_order search X should be simplified: no more 'imported' flag, no more limit, it should work like the other search methods: filter like list but return ids
sales_order info
sales_order get_parent X
sales_order addComment

Shipments

model method extension comment
sales_order_shipment create
sales_order_shipment addTrack
sales_order_shipment getCarrier

Required extension methods

Summarize the methods of the extension that we need to keep. Since I don't know what is the best practice for new methods in the API between the prefixing or extend the core model, I won't impose the new names, but I think that it should either be, for instance, odoo_catalog_category.xxx either catalog_category.xxx.

Existing methods (to rename in a consistent manner):

  • ol_websites.list
  • ol_websites.info
  • ol_groups.list
  • ol_groups.info
  • ol_storeviews.list (probably replaced by the core method store.list)
  • ol_storeviews.info (probably replaced by the core method store.info)
  • ol_customer.search
  • ol_catalog_product.info
  • ol_catalog_product.update
  • oerp_cataloginventory_stock_item.update
  • oerp_catalog_category.search
  • sales_order.search (without the limit and imported stuff)
  • sales_order.get_parent

All the methods in the old extension that are not in this list can be dropped.

Improvements:

  • search method needed on products, addresses, customer groups
  • the existing search method has to be corrected, because it loads the full data of the records to only keep the ids. We want only the ids so we shouldn't load the full data (same behaviour than list but returns only a list of ids)

Other notes:

The old module adds an imported flag on sales orders, this is not needed anymore.