From 7a4c3a0bf8ab7439ca34d674fb799499091564c8 Mon Sep 17 00:00:00 2001 From: "Tiffany Chang (tic)" Date: Fri, 26 May 2023 09:38:38 +0000 Subject: [PATCH] [REM] base: remove unnecessary datamatrix code Followup cleanup of https://github.com/odoo/odoo/pull/106620 where Datamatrix of pylibdmtx was replaced with built-in reportlab ECC200DataMatrix option. For stable compatibility, some parts could only be deleted in master, so let's delete them now. closes odoo/odoo#122704 Signed-off-by: Xavier Morel (xmo) --- odoo/addons/base/models/ir_actions_report.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/odoo/addons/base/models/ir_actions_report.py b/odoo/addons/base/models/ir_actions_report.py index fde6e6bace8..3d763ba2cfc 100644 --- a/odoo/addons/base/models/ir_actions_report.py +++ b/odoo/addons/base/models/ir_actions_report.py @@ -214,16 +214,6 @@ class IrActionsReport(models.Model): ''' return wkhtmltopdf_state - @api.model - def datamatrix_available(self): - '''Returns whether or not datamatrix creation is possible. - * True: Reportlab seems to be able to create datamatrix without error. - * False: Reportlab cannot seem to create datamatrix, most likely due to missing package dependency - - :return: Boolean - ''' - return True - def get_paperformat(self): return self.paperformat_id or self.env.company.paperformat_id @@ -547,9 +537,6 @@ class IrActionsReport(models.Model): elif barcode_type == 'auto': symbology_guess = {8: 'EAN8', 13: 'EAN13'} barcode_type = symbology_guess.get(len(value), 'Code128') - elif barcode_type == 'DataMatrix': - # Prevent a crash due to a lib change from pylibdmtx to reportlab - barcode_type = 'ECC200DataMatrix' elif barcode_type == 'QR': # for `QR` type, `quiet` is not supported. And is simply ignored. # But we can use `barBorder` to get a similar behaviour.