-
Notifications
You must be signed in to change notification settings - Fork 2.6k
JEDEL Onboarding #998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
JEDEL Onboarding #998
Changes from all commits
f8e1bc0
c558c6b
cd52496
8cb8dc5
a0182ea
a449045
ded2b66
286c828
fa3f1ea
f9ed8a6
2ff906f
67147af
a0a6f39
abc4cdf
1c19652
c5e045e
3ef6943
6a76b10
dd2110b
a4d520a
25c5923
383a8d6
f19a562
1313f2b
47aa27d
92f8ce1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "files.insertFinalNewline": true | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import models |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| 'name': "Real Estate", | ||
| 'depends': ['base'], | ||
| 'application': True, | ||
| 'author': "Jeanne Delneste", | ||
| 'license': "LGPL-3", | ||
| 'data': [ | ||
| 'views/estate_property_views.xml', | ||
| 'views/estate_property_user_views.xml', | ||
| 'views/estate_property_offer_views.xml', | ||
| 'views/estate_property_type_views.xml', | ||
| 'views/estate_property_tag_views.xml', | ||
| 'views/estate_menus.xml', | ||
| 'security/ir.model.access.csv' | ||
| ], | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from . import estate_property | ||
| from . import estate_property_type | ||
| from . import estate_property_tag | ||
| from . import estate_property_offer | ||
| from . import estate_property_user |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,103 @@ | ||||||||||||||||||||||
| from odoo import api, models, fields | ||||||||||||||||||||||
| from odoo.exceptions import UserError | ||||||||||||||||||||||
| import datetime | ||||||||||||||||||||||
| from dateutil.relativedelta import relativedelta | ||||||||||||||||||||||
| from odoo.tools.float_utils import float_compare, float_is_zero | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| class EstateProperty(models.Model): | ||||||||||||||||||||||
| _name = "estate.property" | ||||||||||||||||||||||
| _description = "Estate Property" | ||||||||||||||||||||||
| _order = "id desc" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| name = fields.Char(required=True) | ||||||||||||||||||||||
| description = fields.Text() | ||||||||||||||||||||||
| postcode = fields.Char() | ||||||||||||||||||||||
| notes = fields.Html() | ||||||||||||||||||||||
| date_availability = fields.Date(copy=False, default=lambda self: datetime.date.today() + relativedelta(months=3)) | ||||||||||||||||||||||
| expected_price = fields.Float(required=True) | ||||||||||||||||||||||
| selling_price = fields.Float(readonly=True, copy=False) | ||||||||||||||||||||||
| bedrooms = fields.Integer(default=2) | ||||||||||||||||||||||
| living_area = fields.Integer() | ||||||||||||||||||||||
| facades = fields.Integer() | ||||||||||||||||||||||
| garage = fields.Boolean() | ||||||||||||||||||||||
| garden = fields.Boolean() | ||||||||||||||||||||||
| garden_area = fields.Integer() | ||||||||||||||||||||||
| garden_orientation = fields.Selection(selection=[("north", "North"), ("south", "South"), ("east", "East"), ("west", "West")]) | ||||||||||||||||||||||
| active = fields.Boolean(default=True) | ||||||||||||||||||||||
| state = fields.Selection(selection=[ | ||||||||||||||||||||||
| ("new", "New"), | ||||||||||||||||||||||
| ("offer_received", "Offer Received"), | ||||||||||||||||||||||
| ("offer_accepted", "Offer Accepted"), | ||||||||||||||||||||||
| ("sold", "Sold"), | ||||||||||||||||||||||
| ("cancelled", "Cancelled")], | ||||||||||||||||||||||
| copy=False, required=True, default="new") | ||||||||||||||||||||||
| property_type_id = fields.Many2one("estate.property.type", string="Type") | ||||||||||||||||||||||
| buyer_id = fields.Many2one("res.partner", string="Buyer", copy=False) | ||||||||||||||||||||||
| salesperson_id = fields.Many2one("res.users", string="Salesman", default=lambda self: self.env.user) | ||||||||||||||||||||||
| tag_ids = fields.Many2many("estate.property.tag", string="Tags") | ||||||||||||||||||||||
| offer_ids = fields.One2many("estate.property.offer", "property_id", string="Offers") | ||||||||||||||||||||||
| total_area = fields.Integer(compute="_compute_total_area", string="Total Area (sqm)") | ||||||||||||||||||||||
| best_price = fields.Float(compute="_compute_best_price", string="Best Offer") | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| _positive_expected_price = models.Constraint( | ||||||||||||||||||||||
| 'CHECK(expected_price > 0)', | ||||||||||||||||||||||
| 'The expected price of a property must be strictly positive' | ||||||||||||||||||||||
| ) | ||||||||||||||||||||||
| _positive_selling_price = models.Constraint( | ||||||||||||||||||||||
| 'CHECK(selling_price >= 0)', | ||||||||||||||||||||||
| 'The selling price of a property must be positive' | ||||||||||||||||||||||
| ) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @api.depends("living_area", "garden_area") | ||||||||||||||||||||||
| def _compute_total_area(self): | ||||||||||||||||||||||
| for record in self: | ||||||||||||||||||||||
| record.total_area = record.living_area + record.garden_area | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @api.depends("offer_ids.price") | ||||||||||||||||||||||
| def _compute_best_price(self): | ||||||||||||||||||||||
| for record in self: | ||||||||||||||||||||||
| prices = record.offer_ids.mapped("price") | ||||||||||||||||||||||
| if len(prices) > 0: | ||||||||||||||||||||||
| record.best_price = max(prices) | ||||||||||||||||||||||
| else: | ||||||||||||||||||||||
| record.best_price = 0 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @api.onchange("garden") | ||||||||||||||||||||||
| def _onchange_garden(self): | ||||||||||||||||||||||
| if self.garden: | ||||||||||||||||||||||
| self.garden_area = 10 | ||||||||||||||||||||||
| self.garden_orientation = "north" | ||||||||||||||||||||||
| else: | ||||||||||||||||||||||
| self.garden_area = 0 | ||||||||||||||||||||||
| self.garden_orientation = None | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| def sell_property(self): | ||||||||||||||||||||||
| self.ensure_one() | ||||||||||||||||||||||
| if self.state == "cancelled": | ||||||||||||||||||||||
| raise UserError("Error - You cannot sell a cancelled property !") | ||||||||||||||||||||||
| offers = self.offer_ids.search([('property_id', '=', self.id)]) | ||||||||||||||||||||||
| if len(offers.filtered(lambda offer: offer.status == 'accepted')) == 0: | ||||||||||||||||||||||
| raise UserError("Error - No offer created for this property !") | ||||||||||||||||||||||
| self.state = "sold" | ||||||||||||||||||||||
| return True | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| def cancel_property(self): | ||||||||||||||||||||||
| self.ensure_one() | ||||||||||||||||||||||
| if self.state == "sold": | ||||||||||||||||||||||
| raise UserError("Error - You cannot cancel a sold property !") | ||||||||||||||||||||||
| self.state = "cancelled" | ||||||||||||||||||||||
| return True | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @api.constrains('expected_price', 'selling_price') | ||||||||||||||||||||||
| def _check_selling_price(self): | ||||||||||||||||||||||
| for record in self: | ||||||||||||||||||||||
| if not float_is_zero(record.selling_price, precision_digits=3): | ||||||||||||||||||||||
| if float_compare(record.selling_price, record.expected_price * 0.9, precision_digits=3) < 0: | ||||||||||||||||||||||
| raise UserError(r"The selling price must be at least 90% of the expected price !") | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @api.ondelete(at_uninstall=False) | ||||||||||||||||||||||
| def _unlike_if_stats_new_or_cancelled(self): | ||||||||||||||||||||||
| for record in self: | ||||||||||||||||||||||
| if record.state in ('new', 'cancelled'): | ||||||||||||||||||||||
| raise UserError("You cannot delete a new or cancelled property !") | ||||||||||||||||||||||
|
Comment on lines
+99
to
+103
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Spelling. |
||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,58 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
| from odoo import api, models, fields | ||||||||||||||||||||||||||||||||||||||||||||||
| from odoo.exceptions import UserError | ||||||||||||||||||||||||||||||||||||||||||||||
| import datetime | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| class EstatePropertyOffer(models.Model): | ||||||||||||||||||||||||||||||||||||||||||||||
| _name = "estate.property.offer" | ||||||||||||||||||||||||||||||||||||||||||||||
| _description = "Estate Property Offer" | ||||||||||||||||||||||||||||||||||||||||||||||
| _order = "price desc" | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| price = fields.Float() | ||||||||||||||||||||||||||||||||||||||||||||||
| status = fields.Selection(copy=False, selection=[("accepted", "Accepted"), ("refused", "Refused")]) | ||||||||||||||||||||||||||||||||||||||||||||||
| partner_id = fields.Many2one("res.partner", required=True, string="Partner") | ||||||||||||||||||||||||||||||||||||||||||||||
| property_id = fields.Many2one("estate.property", required=True) | ||||||||||||||||||||||||||||||||||||||||||||||
| validity = fields.Integer(default=7, string="Validity (days)") | ||||||||||||||||||||||||||||||||||||||||||||||
| date_deadline = fields.Date(compute="_compute_deadline", inverse="_inverse_deadline", string="Deadline") | ||||||||||||||||||||||||||||||||||||||||||||||
| property_type_id = fields.Many2one(related="property_id.property_type_id") | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| _positive_price = models.Constraint( | ||||||||||||||||||||||||||||||||||||||||||||||
| 'CHECK(price > 0)', | ||||||||||||||||||||||||||||||||||||||||||||||
| 'The price of an offer must be strictly positive' | ||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| @api.depends("create_date", "validity") | ||||||||||||||||||||||||||||||||||||||||||||||
| def _compute_deadline(self): | ||||||||||||||||||||||||||||||||||||||||||||||
| for offer in self: | ||||||||||||||||||||||||||||||||||||||||||||||
| offer.date_deadline = fields.Date.add((offer.create_date or datetime.date.today()), days=offer.validity) | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| def _inverse_deadline(self): | ||||||||||||||||||||||||||||||||||||||||||||||
| for offer in self: | ||||||||||||||||||||||||||||||||||||||||||||||
| delta = offer.date_deadline - (fields.Date.to_date(offer.create_date) or fields.Date.to_date(datetime.date.today())) | ||||||||||||||||||||||||||||||||||||||||||||||
| offer.validity = delta.days | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| def accept_offer(self): | ||||||||||||||||||||||||||||||||||||||||||||||
| for offer in self: | ||||||||||||||||||||||||||||||||||||||||||||||
| for other_offer in offer.property_id.offer_ids: | ||||||||||||||||||||||||||||||||||||||||||||||
| if other_offer.status == "accepted" and offer.id != other_offer.id: | ||||||||||||||||||||||||||||||||||||||||||||||
| raise UserError("An offer is already accepted...") | ||||||||||||||||||||||||||||||||||||||||||||||
| offer.status = "accepted" | ||||||||||||||||||||||||||||||||||||||||||||||
| offer.property_id.buyer_id = offer.partner_id | ||||||||||||||||||||||||||||||||||||||||||||||
| offer.property_id.selling_price = offer.price | ||||||||||||||||||||||||||||||||||||||||||||||
| offer.property_id.state = 'offer_accepted' | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| def refuse_offer(self): | ||||||||||||||||||||||||||||||||||||||||||||||
| for offer in self: | ||||||||||||||||||||||||||||||||||||||||||||||
| offer.status = "refused" | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+45
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Assigning attributes on recordsets works ! |
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| @api.model_create_multi | ||||||||||||||||||||||||||||||||||||||||||||||
| def create(self, vals_list): | ||||||||||||||||||||||||||||||||||||||||||||||
| for val in vals_list: | ||||||||||||||||||||||||||||||||||||||||||||||
| if self.env['estate.property'].browse(val['property_id']).state == 'sold': | ||||||||||||||||||||||||||||||||||||||||||||||
| raise UserError("You cannot create an offer for a sold property !") | ||||||||||||||||||||||||||||||||||||||||||||||
| offers = self.env['estate.property.offer'].search([('property_id', '=', val['property_id'])]) | ||||||||||||||||||||||||||||||||||||||||||||||
| if offers and val['price'] < max(offers.mapped('price')): | ||||||||||||||||||||||||||||||||||||||||||||||
| raise UserError("You cannot create an offer with a lower amount than an existing offer !") | ||||||||||||||||||||||||||||||||||||||||||||||
| offers = super().create(vals_list) | ||||||||||||||||||||||||||||||||||||||||||||||
| offers.property_id.state = 'offer_received' | ||||||||||||||||||||||||||||||||||||||||||||||
| return offers | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+48
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Doing browse in a loop is a BIG nono. It means you will do 1 SQL request per element of the recordset, which is extremely bad for performance. Prefer doing checks like this ouside of the loop, with things like this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also you should use float compare here. |
||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| from odoo import models, fields | ||
|
|
||
|
|
||
| class EstatePropertyTag(models.Model): | ||
| _name = "estate.property.tag" | ||
| _description = "Estate Property Tag" | ||
| _order = "name asc" | ||
|
|
||
| name = fields.Char(required=True) | ||
| color = fields.Integer() | ||
|
|
||
| _unique_tag = models.Constraint( | ||
| 'unique(name)', | ||
| 'The tag name must be unique', | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| from odoo import api, models, fields | ||
|
|
||
|
|
||
| class EstatePropertyType(models.Model): | ||
| _name = "estate.property.type" | ||
| _description = "Estate Property Type" | ||
| _order = "name asc" | ||
|
|
||
| name = fields.Char(required=True) | ||
| property_ids = fields.One2many("estate.property", "property_type_id") | ||
| sequence = fields.Integer('Sequence', default=1) | ||
| offer_ids = fields.One2many("estate.property.offer", "property_type_id") | ||
| offer_count = fields.Integer(compute="_compute_count_offer") | ||
|
|
||
| _unique_type = models.Constraint( | ||
| 'unique(name)', | ||
| 'The type name must be unique', | ||
| ) | ||
|
|
||
| @api.depends("offer_ids") | ||
| def _compute_count_offer(self): | ||
| for record in self: | ||
| record.offer_count = len(record.offer_ids) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| from odoo import fields, models | ||
|
|
||
|
|
||
| class PropertyUser(models.Model): | ||
| _inherit = "res.users" | ||
| _description = "Property User" | ||
|
|
||
| property_ids = fields.One2many("estate.property", "salesperson_id", domain=[('state', 'in', ('new', 'offer_received'))]) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
| estate.access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 | ||
| estate.access_estate_property_type,access_estate_property_type,model_estate_property_type,base.group_user,1,1,1,1 | ||
| estate.access_estate_property_tag,access_estate_property_tag,model_estate_property_tag,base.group_user,1,1,1,1 | ||
| estate.access_estate_property_offer,access_estate_property_offer,model_estate_property_offer,base.group_user,1,1,1,1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import test_property |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| from odoo.tests.common import TransactionCase | ||
| from odoo.exceptions import UserError | ||
| from odoo.tests import tagged, Form | ||
|
|
||
|
|
||
| @tagged('post_install', '-at_install') | ||
| class EstatePropertySoldTestCase(TransactionCase): | ||
|
|
||
| @classmethod | ||
| def setUpClass(cls): | ||
|
|
||
| super().setUpClass() | ||
|
|
||
| cls.property = cls.env['estate.property'].create( | ||
| [{ | ||
| 'name': 'Beautiful House', | ||
| 'expected_price': 100000, | ||
| }] | ||
| ) | ||
|
|
||
| def test_sell_offer(self): | ||
|
|
||
| # (1) Try to sell a property with no offer. | ||
| with self.assertRaises(UserError): | ||
| self.property.sell_property() | ||
|
|
||
| partner = self.env['res.partner'].create( | ||
| [{ | ||
| 'name': 'My Favorite Partner' | ||
| }] | ||
| ) | ||
|
Comment on lines
+27
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Create this guy in the setUp. means the tests will run faster if you need a partner somewhere else in the tests |
||
| offer = self.env['estate.property.offer'].create( | ||
| [{ | ||
| 'price': 95000, | ||
| 'partner_id': partner.id, | ||
| 'property_id': self.property.id | ||
| }] | ||
| ) | ||
|
|
||
| # (2) After creating an offer, try to sell the property with no accepted offer. | ||
| with self.assertRaises(UserError): | ||
| self.property.sell_property() | ||
|
|
||
| offer.status = 'accepted' | ||
| self.property.sell_property() | ||
|
|
||
| # (3) After selling it, verify the state of the property. | ||
| self.assertEqual(self.property.state, 'sold') | ||
|
|
||
| # (4) Lastly, verify that we cannot create an offer for a sold property. | ||
| with self.assertRaises(UserError): | ||
| self.env['estate.property.offer'].create({ | ||
| 'partner_id': partner.id, | ||
| 'property_id': self.property.id, | ||
| }) | ||
|
|
||
| def test_garden_checkbox(self): | ||
|
|
||
| property_form = Form(self.property) | ||
| property_form.garden = True | ||
|
|
||
| # (1) Verify the default values of the garden area and orientation. | ||
| self.assertEqual(property_form.garden_area, 10) | ||
| self.assertEqual(property_form.garden_orientation, "north") | ||
|
|
||
| property_form.garden_area = 120 | ||
| property_form.garden_orientation = "south" | ||
|
|
||
| # (2) Reset the garden to False and check the default values. | ||
| property_form.garden = False | ||
| self.assertEqual(property_form.garden_area, 0) | ||
| self.assertIsNot(property_form.garden_orientation, True) | ||
|
|
||
| # (3) Reset the garden to True and verify the default values of the garden area and orientation. | ||
| property_form.garden = True | ||
| self.assertEqual(property_form.garden_area, 10) | ||
| self.assertEqual(property_form.garden_orientation, "north") | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <odoo> | ||
| <menuitem id="estate_menu_root" name="Real Estate"> | ||
| <menuitem id="estate_menu_advertissements" name="Advertissements"> | ||
| <menuitem id="estate_property_menu" action="estate_property_action"/> | ||
| </menuitem> | ||
| <menuitem id="estate_menu_settings" name="Settings"> | ||
| <menuitem id="estate_property_types_menu" action="estate_property_type_action"/> | ||
| <menuitem id="estate_property_tags_menu" action="estate_property_tag_action"/> | ||
| </menuitem> | ||
| </menuitem> | ||
| </odoo> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <?xml version="1.0"?> | ||
| <odoo> | ||
| <record id="estate_property_offer_view_list" model="ir.ui.view"> | ||
| <field name="name">estate.property.offer.list</field> | ||
| <field name="model">estate.property.offer</field> | ||
| <field name="arch" type="xml"> | ||
| <list string="List View" editable="bottom" decoration-success="status=='accepted'" decoration-danger="status=='refused'"> | ||
| <field name="price" width="200px"/> | ||
| <field name="partner_id" width="300px"/> | ||
| <field name="validity" width="100px"/> | ||
| <field name="date_deadline" width="100px"/> | ||
| <button name="accept_offer" type="object" string="Accept" icon="fa-check" width="50px" invisible="status in ('accepted', 'refused')"/> | ||
| <button name="refuse_offer" type="object" string="Refuse" icon="fa-times" width="50px" invisible="status in ('accepted', 'refused')"/> | ||
| <field name="property_type_id" optional="hide"/> | ||
| <field name="status" width="100px" optional="hide"/> | ||
| </list> | ||
| </field> | ||
| </record> | ||
|
|
||
| <record id="estate_property_offer_action" model="ir.actions.act_window"> | ||
| <field name="name">Offers</field> | ||
| <field name="res_model">estate.property.offer</field> | ||
| <field name="view_mode">list</field> | ||
| <field name="domain">[('property_type_id', '=', active_id)]</field> | ||
| </record> | ||
| </odoo> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0"?> | ||
| <odoo> | ||
| <record id="estate_property_tag_view_list" model="ir.ui.view"> | ||
| <field name="name">estate.property.tag.list</field> | ||
| <field name="model">estate.property.tag</field> | ||
| <field name="arch" type="xml"> | ||
| <list string="List View" editable="bottom"> | ||
| <field name="name"/> | ||
| </list> | ||
| </field> | ||
| </record> | ||
| <record id="estate_property_tag_action" model="ir.actions.act_window"> | ||
| <field name="name">Property Tags</field> | ||
| <field name="res_model">estate.property.tag</field> | ||
| <field name="view_mode">list</field> | ||
| </record> | ||
| </odoo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ironically, this is missing the newline :x