crm_lead_views.xml 5.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- CRM Lead Form View -->
  4. <record id="crm_lead_view_form_inherit_google_workspace" model="ir.ui.view">
  5. <field name="name">crm.lead.form.inherit.google.workspace</field>
  6. <field name="model">crm.lead</field>
  7. <field name="inherit_id" ref="crm.crm_lead_view_form"/>
  8. <field name="arch" type="xml">
  9. <xpath expr="//notebook" position="inside">
  10. <page string="Google Drive" name="google_drive" invisible="not company_id.google_drive_crm_enabled">
  11. <group>
  12. <group string="Google Drive Integration">
  13. <field name="google_drive_folder_id" readonly="1"/>
  14. <field name="google_drive_folder_name" readonly="1"/>
  15. <field name="google_drive_url" readonly="1" widget="url"/>
  16. <field name="google_drive_documents_count"/>
  17. </group>
  18. </group>
  19. <group>
  20. <button name="action_create_google_drive_folder"
  21. string="Create Google Drive Folder Structure"
  22. type="object"
  23. class="btn btn-primary"
  24. invisible="google_drive_folder_id"/>
  25. <button name="action_open_google_drive_folder"
  26. string="Open Google Drive Folder"
  27. type="object"
  28. class="btn btn-secondary"
  29. invisible="not google_drive_folder_id"/>
  30. <button name="action_recreate_google_drive_structure"
  31. string="Rename Folder Structure"
  32. type="object"
  33. class="btn btn-warning"
  34. invisible="not google_drive_folder_id"/>
  35. <button name="action_analyze_folder_structure"
  36. string="Analyze Structure"
  37. type="object"
  38. class="btn btn-secondary"
  39. invisible="not google_drive_folder_id"/>
  40. </group>
  41. <div class="alert alert-info" role="alert">
  42. <strong>Google Drive Integration:</strong>
  43. <ul class="mb-0 mt-2">
  44. <li>Estructura automática: Empresa/Contacto → Año → Oportunidad → [Meets/Archivos cliente]</li>
  45. <li>Las carpetas se crean automáticamente al cambiar a la etapa configurada</li>
  46. <li><strong>Requisito:</strong> La oportunidad debe tener un contacto asignado</li>
  47. <li><strong>Prioridad:</strong> Nombre de empresa (si existe) → Nombre de contacto</li>
  48. <li><strong>Actualización automática:</strong> Al modificar la oportunidad, se revisa toda la estructura</li>
  49. <li><strong>Renombrado automático:</strong> Si cambia el nombre de empresa, contacto o año, se renombran las carpetas existentes</li>
  50. <li>Los folders se renombran automáticamente si cambia el nombre de la oportunidad</li>
  51. <li>Los folders se renombran automáticamente si cambia el contacto o su empresa</li>
  52. <li>Los folders se mueven automáticamente si cambia la empresa</li>
  53. <li><strong>Botón "Rename Folder Structure":</strong> Para renombrar manualmente la estructura</li>
  54. <li><strong>Seguridad:</strong> Las carpetas nunca se eliminan automáticamente</li>
  55. </ul>
  56. </div>
  57. </page>
  58. </xpath>
  59. </field>
  60. </record>
  61. <!-- CRM Lead Tree View for Opportunities -->
  62. <record id="crm_lead_view_tree_opportunity_inherit_google_workspace" model="ir.ui.view">
  63. <field name="name">crm.lead.tree.opportunity.inherit.google.workspace</field>
  64. <field name="model">crm.lead</field>
  65. <field name="inherit_id" ref="crm.crm_case_tree_view_oppor"/>
  66. <field name="arch" type="xml">
  67. <xpath expr="//field[@name='expected_revenue']" position="after">
  68. <field name="google_drive_documents_count"
  69. widget="integer"
  70. invisible="not company_id.google_drive_crm_enabled"/>
  71. </xpath>
  72. </field>
  73. </record>
  74. <!-- CRM Lead Tree View for Leads -->
  75. <record id="crm_lead_view_tree_lead_inherit_google_workspace" model="ir.ui.view">
  76. <field name="name">crm.lead.tree.lead.inherit.google.workspace</field>
  77. <field name="model">crm.lead</field>
  78. <field name="inherit_id" ref="crm.crm_case_tree_view_leads"/>
  79. <field name="arch" type="xml">
  80. <xpath expr="//field[@name='email_from']" position="after">
  81. <field name="google_drive_documents_count"
  82. widget="integer"
  83. invisible="not company_id.google_drive_crm_enabled"/>
  84. </xpath>
  85. </field>
  86. </record>
  87. </odoo>