Tracking Number or Notes

Asked by Ali on 2010-10-06

Hello,

Is it possible to add a tracking number from Open ERP to Magento? If so, how ? And is it also possible to notify the customer about the tracking number?

Could someone help me? Thanks in advance.

Ali

Question information

Language:
English Edit question
Status:
Solved
For:
Magento OpenERP Connector Edit question
Assignee:
No assignee Edit question
Solved by:
ntrubert-cobweb
Solved:
2010-10-07
Last query:
2010-10-07
Last reply:
2010-10-07
Best ntrubert-cobweb (ntrubert) said : #1

Magento API already has web service to add tracking number.

sales_order_shipment.addTrackAdd new tracking number

But it is not implemented yet in this module.
As it is a generic feature why not adding a blueprint.

http://www.magentocommerce.com/wiki/doc/webservices-api/api/sales_order_shipment#methods

Return: int

Arguments:

    * string shipmentIncrementId - shipment increment id
    * string carrier - carrier code
    * string title - tracking title
    * string trackNumber - tracking number

Aliases:

Ali (ali-monkeytails) said : #2

Hello Nico,

I have solved this problem as next:

Add the following code in your Open ERP module (delivery/delivery_view.xml)

at line 141

<field name="arch" type="xml">
<field name="address_id" position="after">
<field name="carrier_id"/>
+ <field name="carrier_tracking_ref" groups="base.group_extended"/>
<field name="weight"/>
</field>
</field>

and at delivery/stock.py search for the code 'stock.picking' and make the code look like

'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
}),
+ 'carrier_tracking_ref': fields.char('Carrier Tracking Ref', size=32),
}

note: the + sign is the code that needs 2 be added. After that reinstall your module and you will have a carriere reference number field available at outgoing stocks screen.

When you do a picking for an order and you ente ra value in that field, Magento will take over that tracking number from that field and put it at Shipments.

ntrubert-cobweb (ntrubert) said : #3

Ok Ali,

You add a field to the delivery module, it is interesting.
So, the information stay on OpenERP side.

My first understanding was that you need to push this information on Magento side to notify the customer.

Ali (ali-monkeytails) said : #4

The information is being pushed to Magento, when its pushed the customer receives a mail that the order is sent. After that the customer can trace his order at magento / account information / order information section

ntrubert-cobweb (ntrubert) said : #5

Hello Ali,

I was not on same branch and did not see the new feature with delivery.py overcrowded.
it is interesting, I gonna test it.

Ali (ali-monkeytails) said : #6

Hello Nico,

ok let me know if it works for you.