API References

contents:

Company

Customizes company to have UPS API Information

copyright:
  1. 2010-2011, Open Labs Business Solution
copyright:
  1. 2011 by Openlabs Technologies & Consulting (P) Ltd.
license:

AGPL, see LICENSE for more details.

class ups_shipping.res_company.ResCompany(pool, cr)

Company is the highest level of abstraction in open ERP This will add four fields for license key, username, password

and shipper no.
get_ups_credentials(cursor, user, context=None)

Returns the credentials in tuple :param cursor: DB Cursor :param User: Integer ID of curr user :param context: Context dictionary, no direct usage

Returns:(license_key, user_id, password, ups_test)
get_ups_shipper(cursor, user, context=None)

Returns the UPS Shipper

get_ups_uoms(cursor, user, context=None)

Returns the codes of weight and length UOM used by UPS

Partner

Customizes Address to return UPS API style address

copyright:
  1. 2010-2011, Open Labs Business Solution
copyright:
  1. 2011 by Openlabs Technologies & Consulting (P) Ltd.
license:

AGPL, see LICENSE for more details.

class ups_shipping.res_partner.ResPartnerAddress(pool, cr)

Add method to return address in UPS format

address_to_ups_dict(cursor, user, id, context=None)

This method creates the dictionary of all the details of the recipient of the package. These details are to be used by the UPS integration API.

Parameters:
  • cursor – Database Cursor
  • user – ID of User
  • id – ID of the Record sent by the calling statement
  • context – Context from parent method.(no direct use)
Returns:

Returns the dictionary comprising of the details of the package recipient.

Shipping

Shipping register

copyright:
  1. 2010-2011, Open Labs Business Solution
copyright:
  1. 2011 by Openlabs Technologies & Consulting (P) Ltd.
license:

AGPL, see LICENSE for more details.

class ups_shipping.shipping_register.UpsCodes(pool, cr)

Model to store the UPS Service Types and Packaging Types

class ups_shipping.shipping_register.UpsShippingRegister(pool, cr)

General register to record all shipments and keep track of it.

accept_price(cursor, user, ids, context=None)

This method calls the Accept Price function of the wizard . :param cursor: Database Cursor :param user: ID of User :param ids: ID of Current record. :param context: Context(no direct use). :return: True

do_shipping_request(cursor, user, ids, context=None)

This method calls the UPS API, sends the ShipmentConfirm Request to the API and gets the total cost of shipment and tracking number.

Parameters:
  • cursor – Database Cursor
  • user – ID of User
  • context – Context directly uses active id.
get_ups_api(cursor, user, call='confirm', context=None)

Returns API with credentials set

on_change_shipper(cursor, user, ids, shipper_address, from_address, context=None)

Sets from address as shipper address if nothing is specified

set_to_draft(cursor, user, ids, context=None)

This method will set this record back to draft and editable mode

class ups_shipping.shipping_register.UpsShippingRegisterPackage(pool, cr)

Model to record all packages corresponding to a shipment record and keep track of it.

Stock

Inherits stock.picking to create a new page for ‘Shipping Information’ which appears only in ‘done’ state.

copyright:
  1. 2010-2011, Open Labs Business Solution
copyright:
  1. 2011 by Openlabs Technologies & Consulting (P) Ltd.
license:

AGPL, see LICENSE for more details.

class ups_shipping.stock.StockPicking(pool, cr)

Inherits stock.picking to integrate UPS API with OpenERP.

generate_shipping(cursor, user, ids, context=None)

Generates shipping record from given information

onchange_existing(cursor, user, ids, is_existing, required_packing, context=None)

On change of shipping of existing set the packings

Table Of Contents

Previous topic

About Openlabs Technologies and Consulting Private Limited

This Page