-
Notifications
You must be signed in to change notification settings - Fork 82
19.0 condominium industry update mega #1346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
19.0 condominium industry update mega #1346
Conversation
- dumy commit .
- split account.analytoic.line wizard
- change a sequence
- demo
- cleans fields.xml
- changes in ir_ui_view.
- adjust companies data.
- Add projects, tasks documents.
- chnage a company for builinds. - change in calender
6404157 to
0d2b4a7
Compare
419996b to
024ab79
Compare
3761e53 to
17d7462
Compare
17d7462 to
33eb5ef
Compare
pgu-odoo
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| owner_id = owner.id |
use owner.id whenever needed.
condominium/data/ir_model_fields.xml
Outdated
| <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)]) |
There was a problem hiding this comment.
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.
condominium/data/ir_model_fields.xml
Outdated
| <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)]) |
There was a problem hiding this comment.
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.
condominium/data/ir_model_fields.xml
Outdated
| 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> |
There was a problem hiding this comment.
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.
condominium/data/ir_model_fields.xml
Outdated
| <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> |
There was a problem hiding this comment.
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
condominium/data/ir_ui_view.xml
Outdated
| <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="{"no_create":true}" readonly="True" widget="many2one_tax_tags" column_invisible="True"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <field optional="show" name="x_account" options="{"no_create":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"/> |
condominium/data/ir_ui_view.xml
Outdated
| <field name="x_owner_ids"> | ||
| <list editable="top"> | ||
| <field name="x_sequence" widget="handle"/> | ||
| <field optional="show" name="x_start_date" required="True"/> |
There was a problem hiding this comment.
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"
condominium/data/ir_ui_view.xml
Outdated
| <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"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <record id="default_search_view__357f8b9e-0127-48a6-97ac-45ad1fce0030" model="ir.ui.view"> | |
| <record id="default_search_view" model="ir.ui.view"> |
condominium/data/ir_ui_view.xml
Outdated
| <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 != "Shares""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <button string="Populate" name="%(action_populate_distribution_key)d" type="action" class="btn-primary" invisible="x_based_on != "Shares""/> | |
| <button string="Populate" name="%(action_populate_distribution_key)d" type="action" class="btn-primary" invisible="x_based_on != 'Shares'"/> |
condominium/data/qweb_view.xml
Outdated
| <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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it needed?
|
@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 |
64ace55 to
d0eacec
Compare
d0eacec to
f63ac54
Compare
The changes have been made according to your suggestions, Thank you :) |

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