[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) <xmo@odoo.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user