diff --git a/document_ocr/models/ir_attachment.py b/document_ocr/models/ir_attachment.py index ef683a37..7247d3e4 100644 --- a/document_ocr/models/ir_attachment.py +++ b/document_ocr/models/ir_attachment.py @@ -126,14 +126,14 @@ OCR_LANGUAGE = [('afr', 'Afrikaans'), class IrAttachment(models.Model): _inherit = 'ir.attachment' - language = fields.Selection(OCR_LANGUAGE, _('Language')) + language = fields.Selection(OCR_LANGUAGE, 'Language') # We need to redefine index_content field to be able to update it # on the onchange_language() - index_content = fields.Text(_('Indexed Content'), + index_content = fields.Text('Indexed Content', readonly=False, prefetch=False) index_content_rel = fields.Text(related='index_content', - string=_('Indexed Content Rel')) + string='Indexed Content Rel') @api.onchange('language') def onchange_language(self): diff --git a/document_ocr/tests/test_document_ocr.py b/document_ocr/tests/test_document_ocr.py index 10c253c6..8a72a9d9 100644 --- a/document_ocr/tests/test_document_ocr.py +++ b/document_ocr/tests/test_document_ocr.py @@ -5,7 +5,7 @@ from StringIO import StringIO from PIL import Image, ImageDraw, ImageFont -from models.ir_attachment import _MARKER_PHRASE +from document_ocr.models.ir_attachment import _MARKER_PHRASE from odoo.tests.common import TransactionCase