Trytond would definitely benefit from a module that define a generic interface to the different shipping provider (like UPS, FedEx, etc). Some effort has already been done in this direction by OpenLabs / Fulfil.io: https://github.com/fulfilio/trytond-shipping (and other related modules)
But there are some shortcomings in their modules:
- The shipping labels are stored as attachment of a shipment
- The shipping labels are generated only in the
done states of the shipments
- It has its own way to compute the shipment cost
- The credentials used to be log-in on the carrier webservice are stored in the database
- The address validation feature should probably be a separate module
We add a
stock.package.shipping which will have a
number Char field and a
label Binary field. Specialized module might want to extend this Model to add tracking historization and so on.
stock.package object will be extended with a link to a
stock.package.shipping and a function field to compute the weight of the package in kg (it will be up to the specific shipping packages to make the required conversion to other unit of measure).
stock.package.type will gain additional fields to encode the dimension of the package. Specialized module might have to extend it to provide additional information (like the package code in their proprietary system).
A new object
carrier.conditions will be created in order to store all the different configurations possibilities that applies to a carrier. In the generic module only the field
family which is a selection is present. Additional module will extended it if necessary with additional fields.
stock.shipment.out will also be extend to include an
identification_number Char field. A button will be added to shipment in order to request from the carrier an identification number. This button will call a method named
<family> is the family of the carrier. It's up to additional module to define this method. Validation of the packings will also use the same schema by calling
<family>_validate_packing. This validation occurs on the packing state.