mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]:change mail_information and privacy_policy fields from Text to Html type and added default property email templates
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user