← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~akretion-team/carriers-deliveries/7-base-delivery-carrier-dbl into lp:carriers-deliveries

 

David BEAL has proposed merging lp:~akretion-team/carriers-deliveries/7-base-delivery-carrier-dbl into lp:carriers-deliveries.

Requested reviews:
  Yannick Vaucher @ Camptocamp (yvaucher-c2c)

For more details, see:
https://code.launchpad.net/~akretion-team/carriers-deliveries/7-base-delivery-carrier-dbl/+merge/221226

add _customize_sender_address method to base_delivery_carrier_label module

Some companies have differents brands, shop or backend and they ship 
parcels from each brands without customer knows the real name of the company.

This method does nothing by itself.

It's just a common way to set this info. Python 'super' use allow to override values

Each module carrier module have to implement its own method.
-- 
https://code.launchpad.net/~akretion-team/carriers-deliveries/7-base-delivery-carrier-dbl/+merge/221226
Your team Stock and Logistic Core Editors is subscribed to branch lp:carriers-deliveries.
=== modified file 'base_delivery_carrier_label/stock.py'
--- base_delivery_carrier_label/stock.py	2014-03-28 13:19:50 +0000
+++ base_delivery_carrier_label/stock.py	2014-05-28 13:08:29 +0000
@@ -355,6 +355,10 @@
         return picking_obj.action_generate_carrier_label(
             cr, uid, ids, context=context)
 
+    def _customize_sender_address(self, cr, uid, picking, context=None):
+        "You may inherit if you want to customize address"
+        return None
+
     def carrier_id_change(self, cr, uid, ids, carrier_id, context=None):
         """ Inherit this method in your module """
         picking_obj = self.pool.get('stock.picking')


Follow ups