bemade-addons/bemade_sethy_configuration/views/res_partner_views.xml
Benoît Vézina 43940f428e wizard
2024-01-01 14:52:23 -05:00

140 lines
No EOL
6.5 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="action_add_property" model="ir.actions.act_window">
<field name="name">Add Property</field>
<field name="res_model">create.property.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="partner_default_contacts_view_form" model="ir.ui.view">
<field name="name">bemade_sethy_configuration.res_partner.defaults.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="company_type" position="after">
<field name="is_property" invisible="False"/>
</field>
<xpath expr="//field[@name='name' and @id='company']" position="replace">
<field id="company" class="text-break" name="name" default_focus="1"
placeholder="e.g. Lumber Inc"
required="type == 'contact'"
invisible="not is_company or is_property"/>
<field id="lot_number" class="text-break" name="lot_number" placeholder="123456789"
invisible="not is_property"/>
</xpath>
<button name="schedule_meeting" position="attributes">
<attribute name="invisible">is_property == True</attribute>
</button>
<button name="action_view_opportunity" position="attributes">
<attribute name="invisible">is_property == True</attribute>
</button>
<button name="action_view_partner_invoices" position="attributes">
<attribute name="invisible">is_property == True</attribute>
</button>
<button name="%(payment.action_payment_token)d" position="attributes">
<attribute name="invisible">payment_token_count == 0 or is_property</attribute>
</button>
<xpath expr="//page[@name='contact_addresses']" position="attributes">
<attribute name="invisible">is_property</attribute>
</xpath>
<xpath expr="//page[@name='sales_purchases']" position="attributes">
<attribute name="invisible">is_property == True</attribute>
</xpath>
<xpath expr="//page[@name='membership']" position="attributes">
<attribute name="invisible">is_property == True</attribute>
</xpath>
<xpath expr="//page[@name='accounting']" position="attributes">
<attribute name="invisible">is_property == True</attribute>
</xpath>
<xpath expr="//field[@name='function']/ancestor::group[1]" position="attributes">
<attribute name="invisible">is_property == True</attribute>
</xpath>
<xpath expr="//field[@name='function']/ancestor::group[1]" position="after">
<group invisible="is_property == False">
<field name="surface"/>
<field name="category_id" widget="many2many_tags"
options="{'color_field': 'color', 'no_create_edit': True}"/>
</group>
</xpath>
<xpath expr="//page[@name='contact_addresses']" position="after">
<page string="Property" name="bemade_sethy_configuration.res_partner.defaults.form">
<field name="relation_property_ids" string="All Owners" invisible="is_property == False">
<tree editable="top">
<field name="other_partner_id"
required="True"
options="{'no_create': True}"
string="Owner"/>
<field name="date_start"/>
<field name="date_end"/>
</tree>
</field>
<field name="relation_owner_ids" string="All Properties" invisible="is_property == True">
<tree editable="top">
<field name="other_partner_id"
required="True"
options="{'no_create': True}"
string="Property"/>
<field name="date_start"/>
<field name="date_end"/>
</tree>
</field>
<button name="%(action_add_property)d"
type="action"
class="oe_highlight"
string="Add Property"
invisible="is_property == True"
/>
</page>
</xpath>
<xpath expr="//page[@name='contact_addresses']" position="after">
<page string="Sethy" name="bemade_sethy_configuration.res_partner.page.sethy">
<group>
<field name="ref_project"/>
<field name="intent_signing" invisible="is_property"/>
<field name="cyberimpact" invisible="is_property"/>
<field name="specification_date"/>
<field name="crm_stage_activity"/>
</group>
</page>
</xpath>
</field>
</record>
<!-- <record id="view_res_partner_filter_inherit" model="ir.ui.view">-->
<!-- <field name="name">res.partner.select.inherit</field>-->
<!-- <field name="model">res.partner</field>-->
<!-- <field name="inherit_id" ref="base.view_res_partner_filter"/>-->
<!-- <field name="arch" type="xml">-->
<!-- <xpath expr="//search" position="inside">-->
<!-- <filter string="Owner" domain="[('category_id.name', '=', 'Owner')]" />-->
<!-- <filter string="Property" domain="[('category_id.name', '=', 'Property')]" />-->
<!-- </xpath>-->
<!-- </field>-->
<!-- </record>-->
<record id="contacts.action_contacts" model="ir.actions.act_window">
<field name="name">Contacts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_mode">tree,form</field>
<!-- Add your domain here -->
<field name="domain">[('is_property','=',False)]</field>
</record>
</odoo>