-
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.
[ADD] models: add realtions between models
-add the Real Estate Property Type table. -add the buyer and the salesperson. -introduce property tag and offers
- Loading branch information
Showing
8 changed files
with
61 additions
and
19 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,2 @@ | ||
from . import estate_property | ||
from . import estate_property_type |
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,8 @@ | ||
from odoo import models,fields | ||
|
||
class EstatePropertyType(models.Model): | ||
_name = "estate.property.type" | ||
_description = "Property Type" | ||
|
||
name = fields.Char(string="Name",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,3 @@ | ||
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_type,estate.property.type,model_estate_property_type,base.group_user,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,13 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
|
||
<!-- Menu Items --> | ||
<menuitem id="menu_estate_property" name="Real Estate"/> | ||
<!-- Dashbord menu's --> | ||
<menuitem id="advertisement" name="Advertisement" parent="menu_estate_property"/> | ||
<menuitem id="property_action_menu" name="Properties" parent="advertisement" action="action_estate_property"/> | ||
|
||
<menuitem id="buy" name="Buy" parent="menu_estate_property"/> | ||
<menuitem id="buy_sub" name="Buy Sub" parent="buy" action="action_estate_property"/> | ||
|
||
<menuitem id="rent" name="Rent" parent="menu_estate_property"/> | ||
<menuitem id="rent_sub" name="Rent Sub" parent="rent" action="action_estate_property"/> | ||
|
||
<menuitem id="setting" name="Setting" parent="menu_estate_property"/> | ||
<menuitem id="setting_sub" name="Property Types" parent="setting" action="action_estate_property_type"/> | ||
</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,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
<!-- Action Definition --> | ||
<record id="action_estate_property_type" model="ir.actions.act_window"> | ||
<field name="name">Estate Property Type</field> | ||
<field name="res_model">estate.property.type</field> | ||
<field name="view_mode">list,form,kanban</field> | ||
</record> | ||
<!-- List view --> | ||
<record id="estate_property_type_view_list" model="ir.ui.view"> | ||
<field name="name">estate.property.type.list</field> | ||
<field name="model">estate.property.type</field> | ||
<field name="arch" type="xml"> | ||
<list> | ||
<field name="name"/> | ||
</list> | ||
</field> | ||
</record> | ||
<!-- Form view --> | ||
<record id="estate_property_type_view_form" model="ir.ui.view"> | ||
<field name="name">estate.property.type.form</field> | ||
<field name="model">estate.property.type</field> | ||
<field name="arch" type="xml"> | ||
<form> | ||
<sheet> | ||
<group> | ||
<field name="name"/> | ||
</group> | ||
</sheet> | ||
</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