Skip to content

Commit

Permalink
[FIX] fastapi_auth_partner: Add default templates
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxxxzero committed May 13, 2024
1 parent 49e2888 commit 8e4abe3
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion fastapi_auth_partner/models/fastapi_auth_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,31 @@ class FastApiAuthDirectory(models.Model):
default=1440, help="In minute, default 1440 minutes => 24h", required=True
)
request_reset_password_template_id = fields.Many2one(
"mail.template", "Mail Template Forget Password", required=True
"mail.template",
"Mail Template Forget Password",
required=True,
default=lambda self: self.env.ref(
"fastapi_auth_partner.email_request_reset_password",
raise_if_not_found=False,
),
)
invite_set_password_template_id = fields.Many2one(
"mail.template",
"Mail Template New Password",
required=True,
default=lambda self: self.env.ref(
"fastapi_auth_partner.email_invite_set_password",
raise_if_not_found=False,
),
)
invite_validate_email_template_id = fields.Many2one(
"mail.template",
"Mail Template Validate Email",
required=True,
default=lambda self: self.env.ref(
"fastapi_auth_partner.email_invite_validate_email",
raise_if_not_found=False,
),
)
cookie_secret_key = fields.Char(
required=True,
Expand Down

0 comments on commit 8e4abe3

Please sign in to comment.