Advertisement
rht_odoo

[4417086] Pop-up : contact form child_ids

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