From fecc8156cf302fc753b53e953e230738b1da400b Mon Sep 17 00:00:00 2001 From: Adrian Torres Date: Fri, 9 Nov 2018 09:06:07 +0000 Subject: [PATCH] [REM] *: remove pycompat py2 helpers/shims This commit complements the removal of pycompat PY2 helpers and shims from base by removing / adapting references to these helpers from the enterprise code. --- models/sale_coupon.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/sale_coupon.py b/models/sale_coupon.py index 964bb76cc6b..1a2e8ed51d2 100644 --- a/models/sale_coupon.py +++ b/models/sale_coupon.py @@ -4,7 +4,6 @@ import random from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ -from odoo.tools import pycompat class SaleCoupon(models.Model): @@ -23,7 +22,7 @@ class SaleCoupon(models.Model): Generate 8 bytes (64 bits) barcodes as 16 bytes barcodes are not compatible with all scanners. """ - return pycompat.text_type(random.getrandbits(64)) + return str(random.getrandbits(64)) code = fields.Char(default=_generate_code, required=True, readonly=True) expiration_date = fields.Date('Expiration Date', compute='_compute_expiration_date')