-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] estate: add property type ,tags and offers
- Added estate_property_tag, estate_property_type, estate_property_offer models. - Added Many2one, Many2many, One2many relations between different models in the estate app.
- Loading branch information
Showing
12 changed files
with
151 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
from . import estate_property | ||
from . import estate_property_type | ||
from . import estate_property_tag | ||
from . import estate_property_offer |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from odoo import fields, models | ||
|
||
class EstatePropertyOffer(models.Model): | ||
_name = "estate.property.offer" | ||
_description = "Estate Property Offer" | ||
|
||
price = fields.Float() | ||
status = fields.Selection( | ||
string="Status", | ||
copy = False, | ||
selection=[ | ||
("offer_accepted", "Accepted"), | ||
("refused","Refused") | ||
]) | ||
partner_id = fields.Many2one('res.partner', string='Partner', index=True, required = True) | ||
property_id = fields.Many2one("estate.property", required = True) | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from odoo import fields, models | ||
|
||
class EstatePropertyTag(models.Model): | ||
_name = "estate.property.tag" | ||
_description = "Estate Property Type" | ||
|
||
name = fields.Char(required = True) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from odoo import fields, models | ||
|
||
class EstatePropertyType(models.Model): | ||
_name = "estate.property.type" | ||
_description = "Estate Property Type" | ||
|
||
name = fields.Char(required = True) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink | ||
access_estate_property,estate.property,model_estate_property,base.group_user,1,1,1,1 | ||
access_estate_property,estate.property,model_estate_property,base.group_user,1,1,1,1 | ||
access_estate_property_type,access.estate.property.type,model_estate_property_type,,1,1,1,1 | ||
access_estate_property_tag,access.estate.property.tag,model_estate_property_tag,,1,1,1,1 | ||
access_estate_property_offer,access.estate.property.offer,model_estate_property_offer,,1,1,1,1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<odoo> | ||
<menuitem id="test_menu_root" name="Estate"> | ||
<menuitem id="test_first_level_menu" name="Advertisement"> | ||
<menuitem id="test_model_menu_action" action="estate_property_actions"/> | ||
<menuitem id="estate_menu_root" name="Real Estate"> | ||
<menuitem id="estate_property_advertisement" name="Advertisements"> | ||
<menuitem id="estate_property_menu_action" action="estate_property_actions"/> | ||
</menuitem> | ||
<menuitem id="estate_property_settings" name="Settings"> | ||
<menuitem id="estate_property_type_menu_action" action="estate_property_type_actions"/> | ||
<menuitem id="estate_property_tag_menu_action" action="estate_property_tag_actions"/> | ||
</menuitem> | ||
</menuitem> | ||
</menuitem> | ||
</odoo> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
<record id="estate_property_offer_listview" model="ir.ui.view"> | ||
<field name="name">esate.property.listview</field> | ||
<field name="model">estate.property.offer</field> | ||
<field name="arch" type="xml"> | ||
<list string="List"> | ||
<field name="price" /> | ||
<field name="partner_id" /> | ||
<field name="status" /> | ||
</list> | ||
</field> | ||
</record> | ||
|
||
<record id="estate_property_offer_formview" model="ir.ui.view"> | ||
<field name="name">estate.property.fromview</field> | ||
<field name="model">estate.property.offer</field> | ||
<field name="arch" type="xml"> | ||
<form string="Form"> | ||
<group> | ||
<field name="price" /> | ||
<field name="partner_id" /> | ||
<field name="status" /> | ||
</group> | ||
</form> | ||
</field> | ||
</record> | ||
</odoo> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
<record id="estate_property_tag_actions" model="ir.actions.act_window"> | ||
<field name="name">Property Tags</field> | ||
<field name="res_model">estate.property.tag</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
</odoo> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
<record id="estate_property_type_actions" model="ir.actions.act_window"> | ||
<field name="name">Property Type</field> | ||
<field name="res_model">estate.property.type</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
</odoo> |
This file contains 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