Advertisement
rht_odoo

[4417086][QW]modify_quick_create

Jan 7th, 2025 (edited)
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.98 KB | None | 0 0
  1. <data>
  2.     <!-- [4417086]     https://pastebin.com/sddQqfnr-->  
  3.     <xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='contact_addresses']/field[@name='child_ids']/form[1]/sheet[1]" position="replace">
  4.         <sheet>
  5.             <field name="type" required="1" widget="radio" options="{'horizontal': true}"/>
  6.             <div class="text-muted oe_edit_only">
  7.                 <p class="mb-0" invisible="type != 'contact'">
  8.                     <span>Use this to organize the contact details of employees of a given company (e.g. CEO, CFO, ...).</span>
  9.                 </p>
  10.                 <p class="mb-0" invisible="type != 'invoice'">
  11.                     <span>Preferred address for all invoices. Selected by default when you invoice an order that belongs to this company.</span>
  12.                 </p>
  13.                 <p class="mb-0" invisible="type != 'delivery'">
  14.                     <span>Preferred address for all deliveries. Selected by default when you deliver an order that belongs to this company.</span>
  15.                 </p>
  16.                 <p class="mb-0" invisible="type != 'other'">
  17.                     <span>Other address for the company (e.g. subsidiary, ...)</span>
  18.                 </p>
  19.             </div>
  20.             <hr/>
  21.             <group>
  22.                 <group>
  23.                     <field name="x_studio_personne_de_contact" invisible="type != 'contact'"/>
  24.                     <field name="x_studio_nom" invisible="type != 'contact'"/>
  25.                     <field name="name" string="Nom du bâtiment" required="type == 'contact'" placeholder="e.g. New Address" invisible="type != 'delivery'"/>
  26.                     <field name="name" string="Nom du contact" required="type == 'contact'" placeholder="e.g. New Address" invisible="type != 'contact'"/>
  27.                     <field name="website" string="Site Web" invisible="type != 'delivery'"/>
  28.                     <label for="street" string="Adresse" invisible="type == 'contact'"/>
  29.                     <div invisible="type == 'contact'">
  30.                         <div class="o_address_format" name="div_address">
  31.                             <field name="street" placeholder="Street..." class="o_address_street"/>
  32.                             <field name="street2" placeholder="Street 2..." class="o_address_street"/>
  33.                             <field name="city" placeholder="City" class="o_address_city"/>
  34.                             <field name="state_id" class="o_address_state" placeholder="State" options="{'no_open': True, 'no_quick_create': True}" context="{'country_id': country_id, 'default_country_id': country_id, 'zip': zip}"/>
  35.                             <field name="zip" placeholder="ZIP" class="o_address_zip"/>
  36.                             <field name="country_id" placeholder="Country" class="o_address_country" options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}"/>
  37.                         </div>
  38.                     </div>
  39.                 </group>
  40.                 <group>
  41.                     <field name="lang" invisible="active_lang_count &lt;= 1"/>
  42.                     <field name="ref" string="ID Bruxeo" invisible="type != 'delivery'"/>
  43.                     <field name="title" invisible="type != 'contact'"/>
  44.                     <field name="function" string="Fonction" invisible="type != 'contact'"/>
  45.                     <field name="email" widget="email" invisible="type != 'contact'"/>
  46.                     <field name="phone" string="Téléphone 1" widget="phone" invisible="type != 'contact'"/>
  47.                     <field name="mobile" string="Téléphone 2" widget="phone" invisible="type != 'contact'"/>
  48.                     <field name="x_studio_secteur_dactivit_du_batiment_1" invisible="type != 'delivery'"/>
  49.                     <field name="x_studio_nace" invisible="type != 'delivery'"/>
  50.                     <field name="x_studio_bail" invisible="type != 'delivery'"/>
  51.                 </group>
  52.             </group>
  53.             <notebook name="studio_notebook_5vk_1i8k131d4" invisible="type != 'delivery'">
  54.                 <page string="Infos ASBL" name="studio_page_5vk">
  55.                     <group name="studio_group_5vk">
  56.                         <group name="studio_group_5vk_left">
  57.                             <field name="x_studio_asbl"/>
  58.                             <field name="x_studio_activit_clri" widget="many2many_tags"/>
  59.                             <field name="x_studio_etp"/>
  60.                         </group>
  61.                         <group name="studio_group_5vk_right">
  62.                             <field name="x_studio_fede"/>
  63.                         </group>
  64.                     </group>
  65.                 </page>
  66.             </notebook>
  67.             <group>
  68.                 <field name="comment" placeholder="Internal notes..." nolabel="1" colspan="2"/>
  69.             </group>
  70.             <field name="lang" invisible="True"/>  <!-- Need to add lang to save default value from parented record -->
  71.         </sheet>
  72.                                    
  73.         <!-- -->
  74.   </xpath>
  75. </data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement