| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?xml version="1.0" encoding="utf-8"?>
- <odoo>
- <!-- CRM Lead Form View -->
- <record id="crm_lead_view_form_inherit_google_workspace" model="ir.ui.view">
- <field name="name">crm.lead.form.inherit.google.workspace</field>
- <field name="model">crm.lead</field>
- <field name="inherit_id" ref="crm.crm_lead_view_form"/>
- <field name="arch" type="xml">
- <xpath expr="//notebook" position="inside">
- <page string="Google Drive" name="google_drive" invisible="not company_id.google_drive_crm_enabled">
- <group>
- <group string="Google Drive Integration">
- <field name="google_drive_folder_id" readonly="1"/>
- <field name="google_drive_folder_name" readonly="1"/>
- <field name="google_drive_url" readonly="1" widget="url"/>
- <field name="google_drive_documents_count"/>
- </group>
- </group>
- <group>
- <button name="action_create_google_drive_folder"
- string="Create Google Drive Folder Structure"
- type="object"
- class="btn btn-primary"
- invisible="google_drive_folder_id"/>
- <button name="action_open_google_drive_folder"
- string="Open Google Drive Folder"
- type="object"
- class="btn btn-secondary"
- invisible="not google_drive_folder_id"/>
- <button name="action_recreate_google_drive_structure"
- string="Rename Folder Structure"
- type="object"
- class="btn btn-warning"
- invisible="not google_drive_folder_id"/>
- <button name="action_analyze_folder_structure"
- string="Analyze Structure"
- type="object"
- class="btn btn-secondary"
- invisible="not google_drive_folder_id"/>
- </group>
- <div class="alert alert-info" role="alert">
- <strong>Google Drive Integration:</strong>
- <ul class="mb-0 mt-2">
- <li>Estructura automática: Empresa/Contacto → Año → Oportunidad → [Meets/Archivos cliente]</li>
- <li>Las carpetas se crean automáticamente al cambiar a la etapa configurada</li>
- <li><strong>Requisito:</strong> La oportunidad debe tener un contacto asignado</li>
- <li><strong>Prioridad:</strong> Nombre de empresa (si existe) → Nombre de contacto</li>
- <li><strong>Actualización automática:</strong> Al modificar la oportunidad, se revisa toda la estructura</li>
- <li><strong>Renombrado automático:</strong> Si cambia el nombre de empresa, contacto o año, se renombran las carpetas existentes</li>
- <li>Los folders se renombran automáticamente si cambia el nombre de la oportunidad</li>
- <li>Los folders se renombran automáticamente si cambia el contacto o su empresa</li>
- <li>Los folders se mueven automáticamente si cambia la empresa</li>
- <li><strong>Botón "Rename Folder Structure":</strong> Para renombrar manualmente la estructura</li>
- <li><strong>Seguridad:</strong> Las carpetas nunca se eliminan automáticamente</li>
- </ul>
- </div>
- </page>
- </xpath>
- </field>
- </record>
- <!-- CRM Lead Tree View for Opportunities -->
- <record id="crm_lead_view_tree_opportunity_inherit_google_workspace" model="ir.ui.view">
- <field name="name">crm.lead.tree.opportunity.inherit.google.workspace</field>
- <field name="model">crm.lead</field>
- <field name="inherit_id" ref="crm.crm_case_tree_view_oppor"/>
- <field name="arch" type="xml">
- <xpath expr="//field[@name='expected_revenue']" position="after">
- <field name="google_drive_documents_count"
- widget="integer"
- invisible="not company_id.google_drive_crm_enabled"/>
- </xpath>
- </field>
- </record>
- <!-- CRM Lead Tree View for Leads -->
- <record id="crm_lead_view_tree_lead_inherit_google_workspace" model="ir.ui.view">
- <field name="name">crm.lead.tree.lead.inherit.google.workspace</field>
- <field name="model">crm.lead</field>
- <field name="inherit_id" ref="crm.crm_case_tree_view_leads"/>
- <field name="arch" type="xml">
- <xpath expr="//field[@name='email_from']" position="after">
- <field name="google_drive_documents_count"
- widget="integer"
- invisible="not company_id.google_drive_crm_enabled"/>
- </xpath>
- </field>
- </record>
- </odoo>
|