Skip to content

Conversation

@mega-odoo
Copy link
Contributor

Purpose: Rework of the industry based on feedback, as well as to generate more traction on the combo of industries real estate, estate management, and condominium

This commit adds new features to the condominium module, including managing co-ownership properties, Split analytic items in case of owner change, general meeting animation with votes, delegation, and report, and improving the report for the general meetings agenda and report. Added Building tab and fields to the contact form, captures the history of owners and tenants

Rework on Contacts, Condominium app, Accounts, Calendar events, Invoices, Distribution key, and Automations

TASK-4743607

@robodoo
Copy link
Collaborator

robodoo commented Nov 13, 2025

Pull request status dashboard

@mega-odoo mega-odoo force-pushed the 19.0-condominium-industry-v3-update-mega branch from 6404157 to 0d2b4a7 Compare November 21, 2025 13:22
@mega-odoo mega-odoo force-pushed the 19.0-condominium-industry-v3-update-mega branch 5 times, most recently from 419996b to 024ab79 Compare November 25, 2025 10:15
@mega-odoo mega-odoo force-pushed the 19.0-condominium-industry-v3-update-mega branch 9 times, most recently from 3761e53 to 17d7462 Compare November 26, 2025 07:28
@mega-odoo mega-odoo force-pushed the 19.0-condominium-industry-v3-update-mega branch from 17d7462 to 33eb5ef Compare November 26, 2025 09:53
Copy link
Contributor

@pgu-odoo pgu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mega-odoo A few suggestions are here. Thanks.

analytic_account = env['account.analytic.account']
for line in property_id.x_owner_ids:
owner = line.x_owner
owner_id = owner.id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
owner_id = owner.id

use owner.id whenever needed.

<field name="name">x_condominium_account_analytic_account_count</field>
<field name="compute"><![CDATA[
for record in self:
record['x_condominium_account_analytic_account_count'] = self.env['account.analytic.account'].search_count([('partner_id', '=', record.id)])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of search_count in for loop. You can user read_group method.

<field name="field_description">Source Sales Order count</field>
<field name="compute"><![CDATA[
for record in self:
record['x_source_sales_order_sale_order_count'] = self.env['sale.order'].search_count([('x_source_sales_order', 'in', record.ids)])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above. Using read_group is better.

Comment on lines 861 to 862
accounts = self.env['account.analytic.account'].search([('partner_id','=',record.x_owner),('x_property','=',record.x_property),('x_end_date','=',False)])
record['x_account'] = accounts.id]]></field>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if search returns multiple analytic accounts? accounts.id will break.
if you want only one analytic account, use the limit=1 in search and change the name account from accounts.
if expecting multiple, then handle the assignation proper.

Comment on lines 1445 to 1451
<field name="compute"><![CDATA[for record in self:
is_distributed = False
for invoice_line in record.invoice_line_ids:
if invoice_line.analytic_distribution != False:
is_distributed = True
break
record['x_is_distributed'] = is_distributed]]></field>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for record in self:
    record.x_is_distributed = any(
        bool(line.analytic_distribution)
        for line in record.invoice_line_ids
    )

would be better

<field optional="show" name="x_end_date"/>
<field optional="show" name="x_owner" required="True" widget="many2one_avatar_user"/>
<field optional="show" name="x_co_owners" widget="many2many_tags_avatar"/>
<field optional="show" name="x_account" options="{&quot;no_create&quot;:true}" readonly="True" widget="many2one_tax_tags" column_invisible="True"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field optional="show" name="x_account" options="{&quot;no_create&quot;:true}" readonly="True" widget="many2one_tax_tags" column_invisible="True"/>
<field optional="show" name="x_account" options="{'no_create':true}" readonly="True" widget="many2one_tax_tags" column_invisible="True"/>

<field name="x_owner_ids">
<list editable="top">
<field name="x_sequence" widget="handle"/>
<field optional="show" name="x_start_date" required="True"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it is required, we should not put it in optional="show"

<field name="name">x_period.form.condominium</field>
<field name="type">form</field>
</record>
<record id="default_search_view__357f8b9e-0127-48a6-97ac-45ad1fce0030" model="ir.ui.view">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<record id="default_search_view__357f8b9e-0127-48a6-97ac-45ad1fce0030" model="ir.ui.view">
<record id="default_search_view" model="ir.ui.view">

<field name="arch" type="xml">
<form>
<header>
<button string="Populate" name="%(action_populate_distribution_key)d" type="action" class="btn-primary" invisible="x_based_on != &quot;Shares&quot;"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<button string="Populate" name="%(action_populate_distribution_key)d" type="action" class="btn-primary" invisible="x_based_on != &quot;Shares&quot;"/>
<button string="Populate" name="%(action_populate_distribution_key)d" type="action" class="btn-primary" invisible="x_based_on != 'Shares'"/>

<field name="key">condominium.report_calendar_event_general_meeting_document</field>
<field name="active" eval="True" />
<field name="name">condominium.report_calendar_event_general_meeting_document</field>
<field name="priority">9999999</field>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it needed?

@pgu-odoo
Copy link
Contributor

pgu-odoo commented Dec 1, 2025

@vava-odoo I have given a few suggestions and @mega-odoo is working with those but I think meanwhile you can also start the code review for this PR.

Thanks

@mega-odoo mega-odoo force-pushed the 19.0-condominium-industry-v3-update-mega branch 5 times, most recently from 64ace55 to d0eacec Compare December 2, 2025 06:53
@mega-odoo mega-odoo force-pushed the 19.0-condominium-industry-v3-update-mega branch from d0eacec to f63ac54 Compare December 2, 2025 07:21
@mega-odoo
Copy link
Contributor Author

@vava-odoo I have given a few suggestions and @mega-odoo is working with those but I think meanwhile you can also start the code review for this PR.

Thanks

The changes have been made according to your suggestions,

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants