← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/carriers-deliveries/7.0-delivery_carrier_label_postlogistics-spdf-are-pdf into lp:carriers-deliveries

 

Yannick Vaucher @ Camptocamp has proposed merging lp:~camptocamp/carriers-deliveries/7.0-delivery_carrier_label_postlogistics-spdf-are-pdf 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-delivery_carrier_label_postlogistics-spdf-are-pdf/+merge/208143

Consider spdf as pdf to define correct file_type

>From postlogistics doc
1)
 Format sPDF is a PDF file without embedded fonts. In order to display this 
format correctly, the Arial font must be installed on your computer.  
The generation and transmission times are faster with sPDF than with PDF.
-- 
https://code.launchpad.net/~camptocamp/carriers-deliveries/7.0-delivery_carrier_label_postlogistics-spdf-are-pdf/+merge/208143
Your team Stock and Logistic Core Editors is requested to review the proposed merge of lp:~camptocamp/carriers-deliveries/7.0-delivery_carrier_label_postlogistics-spdf-are-pdf into lp:carriers-deliveries.
=== modified file 'delivery_carrier_label_postlogistics/postlogistics/web_service.py'
--- delivery_carrier_label_postlogistics/postlogistics/web_service.py	2013-12-17 07:45:50 +0000
+++ delivery_carrier_label_postlogistics/postlogistics/web_service.py	2014-02-25 14:31:03 +0000
@@ -355,11 +355,12 @@
                     message = '[%s] %s' % (error.Code, error.Message)
                     error_messages.append(message)
             else:
+                file_type = output_format if output_format != 'spdf' else 'pdf'
                 res['value'].append({
                     'item_id': item.ItemID,
                     'binary': item.Label,
                     'tracking_number': item.IdentCode,
-                    'file_type': output_format,
+                    'file_type': file_type,
                 })
 
             if hasattr(item, 'Warnings') and item.Warnings:

=== modified file 'delivery_carrier_label_postlogistics/stock.py'
--- delivery_carrier_label_postlogistics/stock.py	2013-12-23 12:46:25 +0000
+++ delivery_carrier_label_postlogistics/stock.py	2014-02-25 14:31:03 +0000
@@ -103,7 +103,7 @@
                      ('jpg', 'JPG'),
                      ('png', 'PNG'),
                      ('pdf', 'PDF'),
-                     ('spdf', 'sPDF'),
+                     ('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)


Follow ups