← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/carriers-deliveries/7.0-base_delivery_carrier_label-improve-carrier-type into lp:carriers-deliveries

 

Yannick Vaucher @ Camptocamp has proposed merging lp:~camptocamp/carriers-deliveries/7.0-base_delivery_carrier_label-improve-carrier-type into lp:carriers-deliveries.

Requested reviews:
  Stock and Logistic Core Editors (stock-logistic-core-editors)

For more details, see:
https://code.launchpad.net/~camptocamp/carriers-deliveries/7.0-base_delivery_carrier_label-improve-carrier-type/+merge/208384

As discussed on community list this is a better way to handle field selection inheritance.
-- 
https://code.launchpad.net/~camptocamp/carriers-deliveries/7.0-base_delivery_carrier_label-improve-carrier-type/+merge/208384
Your team Stock and Logistic Core Editors is requested to review the proposed merge of lp:~camptocamp/carriers-deliveries/7.0-base_delivery_carrier_label-improve-carrier-type into lp:carriers-deliveries.
=== modified file 'base_delivery_carrier_label/delivery.py'
--- base_delivery_carrier_label/delivery.py	2013-11-27 06:54:16 +0000
+++ base_delivery_carrier_label/delivery.py	2014-02-26 14:44:30 +0000
@@ -70,9 +70,13 @@
         """ To inherit to add carrier type """
         return []
 
+    def __get_carrier_type_selection(self, cr, uid, context=None):
+        """ To inherit to add carrier type """
+        return self._get_carrier_type_selection(cr, uid, context=context)
+
     _columns = {
         'type': fields.selection(
-            _get_carrier_type_selection, 'Type',
+            __get_carrier_type_selection, 'Type',
             help="Carrier type (combines several delivery methods)"),
         'code': fields.char(
             'Code', size=10,


References