Yannick Vaucher @ Camptocamp has proposed merging 
lp:~camptocamp/carriers-deliveries/7.0-postlogistics-file_type-imp 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-postlogistics-file_type-imp/+merge/212560

This follow the change made in 
https://code.launchpad.net/~akretion-team/carriers-deliveries/base-deliv-carr-label--improve-file_type-inheritance-shipping-label-dbl/+merge/211287
-- 
https://code.launchpad.net/~camptocamp/carriers-deliveries/7.0-postlogistics-file_type-imp/+merge/212560
Your team Stock and Logistic Core Editors is requested to review the proposed 
merge of lp:~camptocamp/carriers-deliveries/7.0-postlogistics-file_type-imp 
into lp:carriers-deliveries.
=== modified file 'delivery_carrier_label_postlogistics/stock.py'
--- delivery_carrier_label_postlogistics/stock.py	2014-02-25 14:28:29 +0000
+++ delivery_carrier_label_postlogistics/stock.py	2014-03-25 08:19:33 +0000
@@ -18,7 +18,7 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
-from openerp.osv import orm, fields
+from openerp.osv import orm
 
 from postlogistics.web_service import PostlogisticsWebService
 
@@ -91,7 +91,10 @@
     _inherit = 'shipping.label'
 
     def _get_file_type_selection(self, cr, uid, context=None):
-        """ Return a sorted list of extensions of label file format
+        """ Return a concatenated list of extensions of label file format
+        plus file format from super
+
+        This will be filtered and sorted in __get_file_type_selection
 
         :return: list of tuple (code, name)
 
@@ -105,11 +108,5 @@
                      ('pdf', 'PDF'),
                      ('spdf', 'sPDF'), # sPDF is a pdf without integrated font
                      ('zpl2', 'ZPL2')]
-        add_types = [t for t in new_types if not t in file_types]
-        file_types.extend(add_types)
-        file_types.sort(key=lambda t: t[0])
+        file_types.extend(new_types)
         return file_types
-
-    _columns = {
-        'file_type': fields.selection(_get_file_type_selection, 'File type')
-    }

-- 
Mailing list: https://launchpad.net/~openerp-community-reviewer
Post to     : openerp-community-reviewer@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community-reviewer
More help   : https://help.launchpad.net/ListHelp

Reply via email to