Updated from template

This commit is contained in:
Ivan Sokolov 2023-11-06 19:23:04 +01:00 committed by Anusha
parent caff15dac9
commit 245c2d2c2d
2 changed files with 3 additions and 4 deletions

View File

@ -47,7 +47,6 @@ except Exception:
class DocumentPage(models.Model):
_inherit = "document.page"
reference = fields.Char(
@ -144,7 +143,7 @@ class DocumentPage(models.Model):
try:
self._validate_reference(reference=reference)
vals["reference"] = reference
except ValidationError: # pylint: disable=W7938
except ValidationError: # pylint: disable=W8138
# Do not fill reference.
pass
return super(DocumentPage, self).create(vals_list)
return super().create(vals_list)

View File

@ -8,7 +8,7 @@ from odoo.tests.common import TransactionCase
class TestDocumentReference(TransactionCase):
@classmethod
def setUpClass(cls):
super(TestDocumentReference, cls).setUpClass()
super().setUpClass()
cls.page_obj = cls.env["document.page"]
cls.history_obj = cls.env["document.page.history"]
cls.page1 = cls.page_obj.create(