[IMP]:change mail_information and privacy_policy fields from Text to Html type and added default property email templates

This commit is contained in:
braisab
2021-09-01 22:22:16 +02:00
parent eaeb86eb8f
commit 38ce8debb6
2 changed files with 43 additions and 6 deletions

View File

@@ -115,12 +115,41 @@ class PmsProperty(models.Model):
compute="_compute_availability",
)
mail_information = fields.Char(
mail_information = fields.Html(
string="Mail Information",
help="Additional information of the mail"
)
privacy_policy = fields.Char(
string="Privacy Policy"
privacy_policy = fields.Html(
string="Privacy Policy",
help="Mail privacy policy "
)
property_confirmed_template = fields.Many2one(
string="Confirmation Template",
help="Confirmation email template",
comodel_name="mail.template",
default=lambda self: self.env["mail.template"]
.search([("name", "=", "Confirmed Reservation")])
.id,
)
property_modified_template = fields.Many2one(
string="Modification Template",
help="Modification email template",
comodel_name="mail.template",
default=lambda self: self.env["mail.template"]
.search([("name", "=", "Modified Reservation")])
.id,
)
property_canceled_template = fields.Many2one(
string="Cancellation Template",
help="Cancellation email template",
comodel_name="mail.template",
default=lambda self: self.env["mail.template"]
.search([("name", "=", "Cancelled Reservation")])
.id,
)
@api.depends_context(

View File

@@ -86,9 +86,17 @@
</group>
</page>
<page string="Email Configuration">
<group>
<field name="mail_information"/>
<field name = "privacy_policy"/>
<group string="Templates">
<field name="property_confirmed_template" />
<field name="property_modified_template" />
<field name="property_canceled_template" />
</group>
<group string="Mail Information" colspan="4">
<field
name="mail_information"
string="Aditional Mail Information"
/>
<field name="privacy_policy" />
</group>
</page>
</notebook>