Skip to content

Commit

Permalink
[ADD] condominium: PR review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrs-odoo committed May 8, 2024
1 parent 2a42fdc commit 42cd4a3
Show file tree
Hide file tree
Showing 24 changed files with 136 additions and 202 deletions.
5 changes: 4 additions & 1 deletion condominium/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'version': '1.0',
'category': 'Services',
'description': """
This industry is tailor-made for condominium businesses that aim to manage co-ownership properties. Such a business is complex because it implies managing all the aspects of the properties while fairly splitting the charges.
This industry is tailor-made for condominium businesses that aim at managing co-ownership properties. Such a business is complex because it implies managing all the aspects of the properties while fairly splitting the charges.
Moreover, the business is legally regulated in lots of countries under different names: condo in the US, co-ownership in Canada, joint domination in the UK, property syndicate in France, syndic in Belgium, etc
""",
'depends': [
Expand All @@ -27,6 +27,7 @@
'data/res_config_settings.xml',
'data/ir_attachment_pre.xml',
'data/ir_model.xml',
'data/base_automation.xml',
'data/ir_actions_server.xml',
'data/ir_model_fields.xml',
'data/ir_filters.xml',
Expand All @@ -38,6 +39,7 @@
'data/project_task_type.xml',
'data/documents_folder.xml',
'data/project_project.xml',
'data/project_task.xml',
'data/product_pricelist.xml',
'data/product_product.xml',
'data/sale_order_template.xml',
Expand All @@ -49,6 +51,7 @@
],
'demo': [
'demo/account_analytic_account.xml',
'demo/documents_folder.xml',
'demo/project_project.xml',
'demo/website.xml',
'demo/website_view.xml',
Expand Down
8 changes: 8 additions & 0 deletions condominium/data/base_automation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="base_automation_1" model="base.automation">
<field name="name">Set Condominiums on Partner</field>
<field name="model_id" ref="units_property_model"/>
<field name="trigger">on_create_or_write</field>
</record>
</odoo>
16 changes: 0 additions & 16 deletions condominium/data/documents_folder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,4 @@
<field name="name">Property</field>
<field name="parent_folder_id" ref="documents_project.documents_project_folder"/>
</record>
<record id="documents_folder_13" model="documents.folder">
<field name="name">Green Island Property</field>
<field name="parent_folder_id" ref="documents_project.documents_project_folder"/>
</record>
<record id="documents_folder_14" model="documents.folder">
<field name="name">Dominican Condominium</field>
<field name="parent_folder_id" ref="documents_project.documents_project_folder"/>
</record>
<record id="documents_folder_15" model="documents.folder">
<field name="name">S00102 - Kick-Off Template</field>
<field name="parent_folder_id" ref="documents_project.documents_project_folder"/>
</record>
<record id="documents_folder_16" model="documents.folder">
<field name="name">S00103 - Kick-Off Template</field>
<field name="parent_folder_id" ref="documents_project.documents_project_folder"/>
</record>
</odoo>
36 changes: 21 additions & 15 deletions condominium/data/ir_actions_server.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="ir_act_server_691" model="ir.actions.server">
<record id="ir_act_server_split_per_property" model="ir.actions.server">
<field name="name">Split per Property</field>
<field name="state">code</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="code"><![CDATA[for property in record.partner_id.x_condominium_units_ids:
record['state'] = 'cancel'
new_so = record.copy()
new_so['x_source_sales_order'] = record.id
new_so['partner_id'] = property.x_partner_id.id
new_so['x_property_id'] = property
for sol in new_so.order_line:
sol['price_unit'] = sol.price_unit * property.x_area_percent]]>
</field>
<field name="code"><![CDATA[
for property in record.partner_id.x_condominium_units_ids:
record['state'] = 'cancel'
new_so = record.copy()
new_so['x_source_sales_order'] = record.id
new_so['partner_id'] = property.x_partner_id.id
new_so['x_property_id'] = property
for sol in new_so.order_line:
sol['price_unit'] = sol.price_unit * property.x_area_percent
]]></field>
</record>
<record id="ir_act_server_749" model="ir.actions.server">
<field name="name">Confirm</field>
<field name="state">code</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="binding_model_id" ref="sale.model_sale_order"/>
<field name="code"><![CDATA[for so in records:
so.action_confirm()]]></field>
<field name="code"><![CDATA[
for so in records:
so.action_confirm()
]]></field>
</record>
<record id="ir_act_server_757" model="ir.actions.server">
<field name="name">Execute Code</field>
<field name="state">code</field>
<field name="base_automation_id" ref="base_automation_1"/>
<field name="model_id" ref="units_property_model"/>
<field name="code"><![CDATA[for unit in records:
condominiums_ids = unit.x_partner_id.x_units_owner_ids.x_condominium_id
unit.x_partner_id['x_condominiums_ids'] = [(6, 0, condominiums_ids.ids)]]]></field>
<field name="code"><![CDATA[
for unit in records:
condominiums_ids = unit.x_partner_id.x_units_owner_ids.x_condominium_id
unit.x_partner_id['x_condominiums_ids'] = [(6, 0, condominiums_ids.ids)]
]]></field>
</record>
</odoo>
1 change: 1 addition & 0 deletions condominium/data/ir_model_access.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<field name="model_id" ref="units_property_model"/>
<field name="perm_create" eval="True"/>
<field name="perm_read" eval="True"/>
<field name="perm_unlink" eval="False"/>
<field name="perm_write" eval="True"/>
</record>
<record id="units_tags_group" model="ir.model.access">
Expand Down
31 changes: 12 additions & 19 deletions condominium/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@
<field name="name">x_area_percent</field>
<field name="model_id" ref="units_property_model"/>
<field name="field_description">Area %</field>
<field name="compute"><![CDATA[for record in self:
total_area = sum([unit.x_area for unit in record.x_condominium_id.x_condominium_units_ids])
if total_area != 0:
for unit in record.x_condominium_id.x_condominium_units_ids:
unit['x_area_percent'] = unit.x_area / total_area]]></field>
<field name="compute"><![CDATA[
for record in self:
total_area = sum(record.x_condominium_id.x_condominium_units_ids.mapped('x_area'))
for unit in record.x_condominium_id.x_condominium_units_ids:
unit['x_area_percent'] = unit.x_area / total_area if total_area > 0 else 0
]]></field>
<field name="ttype">float</field>
<field name="depends">x_area, x_partner_id</field>
<field name="readonly" eval="True"/>
Expand All @@ -85,8 +86,10 @@
<field name="name">x_condominiums_ids</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="field_description">Condominiums</field>
<field name="compute"><![CDATA[for record in self:
record['x_condominiums_ids'] = [(6, 0, record.x_units_owner_ids.x_condominium_id.ids)]]]></field>
<field name="compute"><![CDATA[
for record in self:
record['x_condominiums_ids'] = [(6, 0, record.x_units_owner_ids.x_condominium_id.ids)]
]]></field>
<field name="ttype">many2many</field>
<field name="depends">x_units_owner_ids,x_units_owner_ids.x_condominium_id,x_units_owner_ids.x_partner_id</field>
<field name="readonly" eval="True"/>
Expand Down Expand Up @@ -130,17 +133,6 @@
<field name="relation">x_units</field>
<field name="relation_field">x_condominium_id</field>
</record>
<record id="customer_related_company_ids_field" model="ir.model.fields">
<field name="name">x_customer_related_companies_ids</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="field_description">Related Companies</field>
<field name="related">partner_id.x_related_companies_ids</field>
<field name="ttype">one2many</field>
<field name="readonly" eval="True"/>
<field name="relation">res.company</field>
<field name="relation_field">partner_id</field>
<field name="store" eval="False"/>
</record>
<record id="related_condominium_units" model="ir.model.fields">
<field name="name">x_condominium_units_ids</field>
<field name="model_id" ref="sale.model_sale_order"/>
Expand Down Expand Up @@ -187,7 +179,8 @@
<field name="model_id" ref="sale.model_sale_order"/>
<field name="field_description">Source Sales Order count</field>
<field name="compute"><![CDATA[
for record in self: record['x_x_source_sales_order_sale_order_count'] = self.env['sale.order'].search_count([('x_source_sales_order', '=', record.id)])
for record in self:
record['x_x_source_sales_order_sale_order_count'] = self.env['sale.order'].search_count([('x_source_sales_order', '=', record.id)])
]]></field>
<field name="ttype">integer</field>
<field name="selectable" eval="False"/>
Expand Down
5 changes: 0 additions & 5 deletions condominium/data/ir_ui_menu.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="contacts_custom_config_menu" model="ir.ui.menu">
<field name="name">Custom Configuration</field>
<field name="active" eval="False"/>
<field name="parent_id" ref="contacts.menu_contacts"/>
</record>
<record id="contacts_property_tags_config_menu" model="ir.ui.menu">
<field name="name">Properties Tags</field>
<field name="action" ref="properties_tags_menu_action"/>
Expand Down
4 changes: 2 additions & 2 deletions condominium/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='vat']" position="after">
<field name="x_condominiums_ids" invisible="False" widget="many2many_tags" options="{&quot;no_create&quot;:true}" force_save="1" readonly="True"/>
<field name="x_condominiums_ids" widget="many2many_tags" options="{'no_create': True}" force_save="1"/>
</xpath>
<xpath expr="//page[@name='contact_addresses']" position="attributes">
<attribute name="invisible">not x_condominium_units_ids</attribute>
Expand Down Expand Up @@ -341,7 +341,7 @@
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='has_recurring_line']" position="after">
<button name="%(ir_act_server_691)d" string="Split per Property" type="action" invisible="not x_condominium_units_ids"/>
<button name="%(ir_act_server_split_per_property)d" string="Split per Property" type="action" invisible="not x_condominium_units_ids"/>
</xpath>
<xpath expr="//button[@name='action_sale_order_log']" position="after">
<button name="%(sale_order_button_action)d" class="oe_stat_button" icon="fa-dollar" type="action" invisible="x_x_source_sales_order_sale_order_count == 0">
Expand Down
14 changes: 7 additions & 7 deletions condominium/data/knowledge_article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<field name="body"><![CDATA[
<h1>Condominium</h1>
<p>
This industry is tailor-made for condominium businesses that aim to manage co-ownership properties. Such a business is complex because it implies managing all the aspects of the properties while fairly splitting the charges. Moreover, the business is legally regulated in lots of countries under different names: condo in the US, co-ownership in Canada, joint domination in the UK, property syndicate in France, syndic in Belgium, etc.
This industry is tailor-made for condominium businesses that aim at managing co-ownership properties. Such a business is complex because it implies managing all the aspects of the properties while fairly splitting the charges. Moreover, the business is legally regulated in lots of countries under different names: condo in the US, co-ownership in Canada, joint domination in the UK, property syndicate in France, syndic in Belgium, etc.
</p>
<p>Odoo empowers you to effortlessly and efficiently manage every aspect of the condominiums under your responsibility, ensuring homeowners satisfaction thanks to its suite of integrated applications.<br/></p>
<div tabindex="-1" class="o_knowledge_behavior_anchor o_knowledge_behavior_type_toc" data-oe-protected="true">
Expand Down Expand Up @@ -43,7 +43,7 @@
<h1>Business Flows</h1>
<h2>Easily convert the homeowner associations πŸ–‹οΈ</h2>
<p>
As soon as the homeowner association reaches you to get a quote, quickly send them an overview of your services and fees by creating
As soon as the homeowner association reaches out to you to get a quote, quickly send them an overview of your services and fees by creating
<span tabindex="-1" data-oe-protected="true" class="o_knowledge_view_link text-o-color-1 o_knowledge_behavior_anchor o_knowledge_behavior_type_view_link">Quotations</span> in the Sales application where you can directly use the
"Kick-Off Quote" quotation template. This will automatically fill the quote by adding the kick-off fees and also the price of all the extra services such as the recurring contribution, the hourly rate, etc. Don't forget to attach
the terms &amp; conditions as well. Of course, the price of each service and the content of the
Expand Down Expand Up @@ -75,8 +75,8 @@
<h2 class="null">Quickly set up a condominium πŸš€</h2>
<p>Once the quotation is confirmed, the condominium should be created in Odoo. Basically, a<strong> </strong>condominium is like a company that is funded by the owners and that has to pay for operating costs.</p>
<p>
From the Settings, create a new company in <span class="o_knowledge_view_link text-o-color-1 o_knowledge_behavior_anchor o_knowledge_behavior_type_view_link" data-oe-protected="true" tabindex="-1">Companies</span> to manage
the Once done, it will appear on the top right of all screens with the aim to quickly switch between your company and the different condominiums:
From the Settings, create a new company in <span class="o_knowledge_view_link text-o-color-1 o_knowledge_behavior_anchor o_knowledge_behavior_type_view_link" data-oe-protected="true" tabindex="-1">Companies</span> to manage.
Once done, it will appear on the top right of all screens with the aim to quickly switch between your company and the different condominiums:
</p>
<p>
<span style="width: 40px;" class="oe-tabs"> </span>​<img style="width: 50%;" src="condominium/static/src/binary/ir_attachment/image.jpg"/><br/>
Expand All @@ -94,7 +94,7 @@
<li>The email address.</li>
</ul>
<p>
Once done, create all the <span tabindex="-1" data-oe-protected="true" class="o_knowledge_view_link text-o-color-1 o_knowledge_behavior_anchor o_knowledge_behavior_type_view_link">Properties</span> belonging to the Each
Once done, create all the <span tabindex="-1" data-oe-protected="true" class="o_knowledge_view_link text-o-color-1 o_knowledge_behavior_anchor o_knowledge_behavior_type_view_link">Properties</span> belonging to the condominium. Each
property corresponds to an apartment, a studio, a flat, a house, etc. that is characterized by:
</p>
<ul>
Expand Down Expand Up @@ -137,7 +137,7 @@
</li>
<li>Add the corresponding product(s): "Working Fund", "Reserve Fund", "Service Fees", etc.</li>
<li>Set the right (recurring) price.</li>
<li>Click on "Split per Property" button: this will cancel the current quotation and will recreate as many quotations as properties in the condominium for which the costs are shared. </li>
<li>Click on "Split per Property" button: this will cancel the current quotation and will create as many quotations as there are properties in the condominium for which the costs are shared. </li>
<li>Click on the "Sales Orders" buttons to access all the generated quotations.</li>
<li>Check if everything is correct. If yes, select all the quotations and, under the "Actions" button, click on "Confirm".</li>
<li>In case of recurring fees, the invoices will be automatically generated by Odoo at the right date. If not, you can manually post them in mass. Then just send them using your preferred way!</li>
Expand All @@ -154,7 +154,7 @@
<li>Reserve Fund: to collect all the money that will be used in case of exceptional expense.</li>
</ul>
<p>These will be used to pay the Vendor Bills that can be uploaded and automatically booked thanks to <a href="https://www.odoo.com/app/invoice-automation">Artificial Intelligence</a>.</p>
<p>By the end of the period, easily generate the legal reporting such as Balance Sheet and Profit &amp; Loss for each</p>
<p>By the end of the period, easily generate the legal reporting such as Balance Sheet and Profit &amp; Loss for each condominium.</p>
<p><a href="https://www.odoo.com/documentation/master/applications/finance/accounting.html" class="btn btn-outline-primary btn-sm">πŸŽ“ Accounting</a><br/></p>
<h2 class="null">Schedule the meetings πŸ“…</h2>
<p>
Expand Down

0 comments on commit 42cd4a3

Please sign in to comment.