-
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: added widgets, stat button, inherited methods and kanba…
…n view Day 5: Added inline list view inside property type model's form view to view properties linked with each type. Added statusbar widget for displaying Four states such as New, Offer Received, Offer Accepted and Sold. Added Model ordering and Manual ordering(using sequence) in list view's of estate.property,estate.property.type,estate.property.tag and property.offer along with widget options for adding colors and conditional display of buttons by using 'invisible' attribute in the field.Also added stat button Added business logic to CRUD methods using python inheritance. added ResUsers class inheriting res.users model setting one2many relationship b/w a user and properties linked with that user. added properties to base.view_users_form Created estate_account module for invoicing of the properties sold Added kanban view to the properties section grouped by property type.
- Loading branch information
Showing
16 changed files
with
330 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
{ | ||
'name': 'Real Estate', | ||
'author': 'nmak', | ||
'category': 'Tutorials/estate', | ||
'depends': ['base'], | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'views/estate_property_views.xml', | ||
'views/estate_property_type_views.xml', | ||
'views/estate_property_tag_views.xml', | ||
'views/estate_menus.xml', | ||
"name": "Real Estate", | ||
"author": "nmak", | ||
"category": "Tutorials/estate", | ||
"depends": ["base"], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"views/estate_property_views.xml", | ||
"views/estate_property_offer_views.xml", | ||
"views/estate_property_type_views.xml", | ||
"views/estate_property_tag_views.xml", | ||
"views/res_users_view.xml", | ||
"views/estate_menus.xml", | ||
], | ||
'installable': True, | ||
'application': True, | ||
'auto_install': True, | ||
'license': 'LGPL-3', | ||
"installable": True, | ||
"application": True, | ||
"auto_install": True, | ||
"license": "LGPL-3", | ||
} |
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
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
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,14 @@ | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ResUsers(models.Model): | ||
_inherit = "res.users" | ||
|
||
property_ids = fields.One2many( | ||
"estate.property", | ||
"salesperson_id", | ||
string="Properties", | ||
domain=[("state", "in", ["new", "offer_recieved"])], | ||
) |
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,44 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<!-- List View for Offers --> | ||
<record id="view_estate_property_offer_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="Offers"> | ||
<field name="price" /> | ||
<field name="partner_id" /> | ||
<field name="status" /> | ||
<field name="property_id" /> | ||
<field name="property_type_id" /> | ||
</list> | ||
</field> | ||
</record> | ||
|
||
<!-- Form View for Offers --> | ||
<record id="view_estate_property_offer_form" model="ir.ui.view"> | ||
<field name="name">estate.property.offer.form</field> | ||
<field name="model">estate.property.offer</field> | ||
<field name="arch" type="xml"> | ||
<form string="Offer"> | ||
<sheet> | ||
<group> | ||
<field name="property_id" /> | ||
<field name="partner_id" /> | ||
<field name="price" /> | ||
<field name="validity" /> | ||
<field name="deadline" readonly="1" /> | ||
<field name="status" /> | ||
</group> | ||
</sheet> | ||
</form> | ||
</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,form</field> | ||
<field name="domain">[("property_type_id", "=", active_id)]</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
Oops, something went wrong.