Skip to content

Commit

Permalink
[ADD] condominium: shorten xpath
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrs-odoo committed Apr 30, 2024
1 parent ad5779c commit b148b5b
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 36 deletions.
3 changes: 2 additions & 1 deletion condominium/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
'data/ir_model_access.xml',
'data/project_task_type.xml',
'data/documents_folder.xml',
'data/account_analytic_account.xml',
'data/project_project.xml',
'data/product_pricelist.xml',
'data/product_product.xml',
Expand All @@ -49,6 +48,8 @@
'data/mail_message.xml',
],
'demo': [
'demo/account_analytic_account.xml',
'demo/project_project.xml',
'demo/website.xml',
'demo/website_view.xml',
'demo/res_partner.xml',
Expand Down
1 change: 0 additions & 1 deletion condominium/data/ir_actions_server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
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>
Expand Down
50 changes: 23 additions & 27 deletions condominium/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
<field name="x_name" required="1" placeholder="Name..."/>
</h1>
</div>
<group name="studio_group_dae2bf">
<group name="studio_group_dae2bf_left"/>
<group name="studio_group_dae2bf_right"/>
</group>
</sheet>
</form>
</field>
Expand All @@ -37,13 +33,13 @@
<field name="x_name" required="1" placeholder="Name..."/>
</h1>
</div>
<group name="studio_group_d10900">
<group name="studio_group_d10900_left">
<group name="group">
<group name="group_left">
<field name="x_partner_id"/>
<field name="x_partner_phone" widget="phone" options="{'enable_sms': True}"/>
<field name="x_partner_email" widget="email"/>
</group>
<group name="studio_group_d10900_right">
<group name="group_right">
<field name="x_tag_ids" widget="many2many_tags" options="{'color_field': 'x_color'}"/>
</group>
</group>
Expand Down Expand Up @@ -256,7 +252,7 @@
<attribute name="invisible">not x_condominium_units_ids</attribute>
</xpath>
<xpath expr="//form[1]/sheet[1]/notebook[1]" position="inside">
<page string="Properties" name="studio_page_partner_condominium_units" invisible="not x_condominium_units_ids">
<page string="Properties" name="page_partner_condominium_units" invisible="not x_condominium_units_ids">
<field name="x_condominium_units_ids" string="Condominium Units">
<tree default_order="x_area desc" create="false" edit="false" delete="false">
<field name="x_name" optional="show"/>
Expand All @@ -268,7 +264,7 @@
</tree>
</field>
</page>
<page string="Properties" name="studio_page_partner_units_owner" invisible="not x_units_owner_ids">
<page string="Properties" name="page_partner_units_owner" invisible="not x_units_owner_ids">
<field name="x_units_owner_ids" string="Units Owner">
<tree create="false" edit="false" delete="false" default_order="x_area desc">
<field name="x_sequence" widget="handle"/>
Expand All @@ -294,7 +290,7 @@
<field name="type">kanban</field>
<field name="arch" type="xml">
<data>
<xpath expr="//kanban[1]/templates[1]/t[1]/div[1]/div[2]/div[1]/ul[1]/li[4]/t[2]/field[@name='country_id']" position="after">
<xpath expr="//kanban//templates//t/field[@name='country_id']" position="after">
<field name="x_condominiums_ids" display="full"/>
</xpath>
</data>
Expand Down Expand Up @@ -353,38 +349,38 @@
</button>
</xpath>
<xpath expr="//div[@name='plan_block']" position="after">
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='other_information']/group[1]/group[@name='subscription_info']/field[@name='start_date'][2]" position="move"/>
<xpath expr="//form//page[@name='other_information']//group[@name='subscription_info']/field[@name='start_date']" position="move"/>
</xpath>
<xpath expr="//field[@name='tag_ids']" position="after">
<field name="x_source_sales_order"/>
<field name="x_condominium_units_ids" invisible="True"/>
</xpath>
<xpath expr="//group[@name='subscription_info']" position="inside">
<xpath expr="//field[@name='first_contract_date']" position="move"/>
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='other_information']/group[1]/group[@name='subscription_info']/field[@name='origin_order_id']" position="move"/>
<xpath expr="//form//page[@name='other_information']//group[@name='subscription_info']/field[@name='origin_order_id']" position="move"/>
<xpath expr="//field[@name='subscription_id']" position="move"/>
<xpath expr="//field[@name='payment_token_id']" position="move"/>
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='other_information']/group[1]/group[@name='subscription_info']/field[@name='payment_exception']" position="move"/>
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='other_information']/group[1]/group[@name='subscription_info']/field[@name='pending_transaction']" position="move"/>
<xpath expr="//form//page[@name='other_information']//group[@name='subscription_info']/field[@name='payment_exception']" position="move"/>
<xpath expr="//form//page[@name='other_information']//group[@name='subscription_info']/field[@name='pending_transaction']" position="move"/>
</xpath>
<xpath expr="//group[@name='subscription_info']" position="after">
<xpath expr="//field[@name='commercial_partner_id']" position="move"/>
</xpath>
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='other_information']/group[1]/group[@name='sale_info']/label[1]" position="before">
<xpath expr="//form//page[@name='other_information']//group[@name='sale_info']/label" position="before">
<xpath expr="//field[@name='show_update_fpos']" position="move"/>
</xpath>
<xpath expr="//button[@name='action_update_taxes']" position="before">
<xpath expr="//field[@name='fiscal_position_id']" position="move"/>
</xpath>
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='other_information']/group[1]/group[@name='sale_info']/div[1]" position="after">
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='other_information']/group[1]/group[@name='sale_info']/field[@name='partner_invoice_id']" position="move"/>
<xpath expr="//form//page[@name='other_information']//group[@name='sale_info']/div" position="after">
<xpath expr="//form//page[@name='other_information']//group[@name='sale_info']/field[@name='partner_invoice_id']" position="move"/>
<xpath expr="//field[@name='analytic_account_id']" position="move"/>
<xpath expr="//field[@name='visible_project']" position="move"/>
<xpath expr="//field[@name='project_id']" position="move"/>
<xpath expr="//field[@name='journal_id']" position="move"/>
</xpath>
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='other_information']/group[1]/group[@name='sale_info']/div[1]" position="after">
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='other_information']/group[1]/group[@name='sale_info']/field[@name='invoice_status'][2]" position="move"/>
<xpath expr="//form//page[@name='other_information']//group[@name='sale_info']/div" position="after">
<xpath expr="//form//page[@name='other_information']//group[@name='sale_info']/field[@name='invoice_status']" position="move"/>
</xpath>
<xpath expr="//span[@name='expected_date_span']" position="before">
<xpath expr="//field[@name='commitment_date']" position="move"/>
Expand All @@ -398,35 +394,35 @@
<xpath expr="//field[@name='medium_id']" position="move"/>
<xpath expr="//field[@name='source_id']" position="move"/>
</xpath>
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='customer_signature']/group[1]" position="inside">
<xpath expr="//form//page[@name='customer_signature']/group" position="inside">
<xpath expr="//field[@name='signed_by']" position="move"/>
<xpath expr="//field[@name='signed_on']" position="move"/>
<xpath expr="//field[@name='signature']" position="move"/>
</xpath>
<xpath expr="//page[@name='notes']" position="inside">
<xpath expr="//field[@name='internal_note_display']" position="move"/>
</xpath>
<xpath expr="//form[1]/div[3]" position="inside">
<xpath expr="//form/div" position="inside">
<xpath expr="//field[@name='message_follower_ids']" position="move"/>
<xpath expr="//field[@name='activity_ids']" position="move"/>
<xpath expr="//field[@name='message_ids']" position="move"/>
</xpath>
<xpath expr="//form[1]/sheet[1]/group[@name='sale_header']/group[@name='order_details']/field[@name='start_date']" position="attributes">
<xpath expr="//form//group[@name='sale_header']/group[@name='order_details']/field[@name='start_date']" position="attributes">
<attribute name="invisible">not plan_id</attribute>
</xpath>
<xpath expr="/form[1]/sheet[1]/group[1]/group[1]/field[1]" position="after">
<xpath expr="/form//group/field" position="after">
<field name="x_property_id"/>
</xpath>
<xpath expr="/form[1]/sheet[1]/group[1]/group[1]/field[1]" position="after">
<xpath expr="/form//group/field" position="after">
<field name="x_condominiums_ids"/>
</xpath>
<xpath expr="/form[1]/sheet[1]/group[1]/group[1]/field[2]" position="attributes">
<xpath expr="/form//group/field[@name='x_condominiums_ids']" position="attributes">
<attribute name="widget">many2many_tags</attribute>
</xpath>
<xpath expr="/form[1]/sheet[1]/group[1]/group[1]/field[3]" position="attributes">
<xpath expr="/form//group/field[3]" position="attributes">
<attribute name="invisible">not x_condominiums_ids</attribute>
</xpath>
<xpath expr="/form[1]/sheet[1]/group[1]/group[1]/field[2]" position="attributes">
<xpath expr="/form//group/field[2]" position="attributes">
<attribute name="invisible">not x_condominiums_ids</attribute>
</xpath>
</data>
Expand Down
3 changes: 1 addition & 2 deletions condominium/data/knowledge_article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +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 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.
</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
5 changes: 0 additions & 5 deletions condominium/data/project_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<odoo noupdate="1">
<record id="project_project_4" model="project.project">
<field name="name">Kick-Off Template</field>
<field name="analytic_account_id" ref="account_analytic_account_4"/>
<field name="allow_billable" eval="True"/>
<field name="timesheet_product_id" ref="sale_timesheet.time_product"/>
<field name="stage_id" ref="project.project_project_stage_0"/>
Expand All @@ -11,7 +10,6 @@
</record>
<record id="project_project_5" model="project.project">
<field name="name">Green Island Property</field>
<field name="analytic_account_id" ref="account_analytic_account_5"/>
<field name="allow_billable" eval="True"/>
<field name="timesheet_product_id" ref="sale_timesheet.time_product"/>
<field name="stage_id" ref="project.project_project_stage_0"/>
Expand All @@ -20,7 +18,6 @@
</record>
<record id="project_project_6" model="project.project">
<field name="name">Dominican Condominium</field>
<field name="analytic_account_id" ref="account_analytic_account_6"/>
<field name="allow_billable" eval="True"/>
<field name="timesheet_product_id" ref="sale_timesheet.time_product"/>
<field name="stage_id" ref="project.project_project_stage_0"/>
Expand All @@ -29,7 +26,6 @@
</record>
<record id="project_project_7" model="project.project">
<field name="name">S00102 - Kick-Off Template</field>
<field name="analytic_account_id" ref="account_analytic_account_7"/>
<field name="allow_billable" eval="True"/>
<field name="timesheet_product_id" ref="sale_timesheet.time_product"/>
<field name="allocated_hours">1.0</field>
Expand All @@ -39,7 +35,6 @@
</record>
<record id="project_project_8" model="project.project">
<field name="name">S00103 - Kick-Off Template</field>
<field name="analytic_account_id" ref="account_analytic_account_8"/>
<field name="allow_billable" eval="True"/>
<field name="timesheet_product_id" ref="sale_timesheet.time_product"/>
<field name="allocated_hours">1.0</field>
Expand Down
18 changes: 18 additions & 0 deletions condominium/demo/project_project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="project_project_4" model="project.project">
<field name="analytic_account_id" ref="account_analytic_account_4"/>
</record>
<record id="project_project_5" model="project.project">
<field name="analytic_account_id" ref="account_analytic_account_5"/>
</record>
<record id="project_project_6" model="project.project">
<field name="analytic_account_id" ref="account_analytic_account_6"/>
</record>
<record id="project_project_7" model="project.project">
<field name="analytic_account_id" ref="account_analytic_account_7"/>
</record>
<record id="project_project_8" model="project.project">
<field name="analytic_account_id" ref="account_analytic_account_8"/>
</record>
</odoo>

0 comments on commit b148b5b

Please sign in to comment.