From c52f55d335c64befe772d1a2b56c3729d4198813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 28 Mar 2021 19:20:37 +0200 Subject: [PATCH] Add support for avatar issue10085 review343561002 --- user.py | 5 +++-- view/user_form.xml | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/user.py b/user.py index ff32c8e7c4..861d54331b 100644 --- a/user.py +++ b/user.py @@ -26,7 +26,8 @@ from sql.operators import Equal from trytond.config import config from trytond.exceptions import RateLimitException from trytond.model import ( - ModelView, ModelSQL, DeactivableMixin, fields, Unique, Exclude) + ModelView, ModelSQL, DeactivableMixin, fields, Unique, Exclude, + avatar_mixin) from trytond.pool import Pool from trytond.pyson import Eval from trytond.report import Report, get_email @@ -63,7 +64,7 @@ def _extract_params(url): return urllib.parse.parse_qsl(urllib.parse.urlsplit(url).query) -class User(DeactivableMixin, ModelSQL, ModelView): +class User(avatar_mixin(100), DeactivableMixin, ModelSQL, ModelView): 'Web User' __name__ = 'web.user' _rec_name = 'email' diff --git a/view/user_form.xml b/view/user_form.xml index c1196d61ac..16a87b8ce9 100644 --- a/view/user_form.xml +++ b/view/user_form.xml @@ -2,13 +2,18 @@
-