Last active
December 1, 2022 22:41
-
-
Save ofelix03/d68cb766cfbf37bb1fcb01fe125f519a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from odoo import fields, models | |
class Property(models.Model): | |
_name = "realtor.property" | |
_description = "Real Estate Property" | |
name = fields.Char(required=True) | |
manager_id = fields.Many2one( | |
comodel_name="realtor.property.manager", string="Manager", required=True | |
) | |
amenity_ids = fields.One2many( | |
comodel_name="realtor.property.amenity", | |
inverse_name="property_id", | |
required=True, | |
) | |
location = fields.Char(required=True) | |
cover_image = fields.Binary(attachment=True) | |
def action_interested(self): | |
template = self.env.ref("realtor.interested_property_template") | |
template.send_mail(self.id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment