res_config_settings_views.xml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="res_config_settings_view_form" model="ir.ui.view">
  4. <field name="name">res.config.settings.view.form.inherit.google.api</field>
  5. <field name="model">res.config.settings</field>
  6. <field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
  7. <field name="arch" type="xml">
  8. <xpath expr="//block[@name='integration']" position="inside">
  9. <setting string="Google API Integration"
  10. help="Integrate with Google Drive and Google Calendar"
  11. id="google_api_integration_setting">
  12. <field name="google_api_enabled"/>
  13. <div class="content-group" invisible="not google_api_enabled" id="google_api_config">
  14. <div class="mt16 row">
  15. <label for="google_api_client_id" string="Google API Client ID" class="col-3 col-lg-3 o_light_label"/>
  16. <field name="google_api_client_id" nolabel="1"/>
  17. </div>
  18. <div class="mt16 row">
  19. <label for="google_api_client_secret" string="Google API Client Secret" class="col-3 col-lg-3 o_light_label"/>
  20. <field name="google_api_client_secret" password="True" nolabel="1"/>
  21. </div>
  22. <!-- Action Buttons - Simplified for Admin Configuration -->
  23. <div class="mt16 d-flex">
  24. <button name="action_validate_credentials"
  25. string="Validate Credentials"
  26. type="object"
  27. class="btn btn-secondary me-2"/>
  28. <button name="action_test_google_api_connection"
  29. string="Test API Connection"
  30. type="object"
  31. class="btn btn-primary me-2"/>
  32. <button name="action_show_oauth_redirect_uris"
  33. string="Show Redirect URI"
  34. type="object"
  35. class="btn btn-warning"/>
  36. </div>
  37. <!-- Help Info - Updated -->
  38. <div class="mt16">
  39. <div class="alert alert-info" role="alert">
  40. <strong>Configuration Steps:</strong>
  41. <ol class="mb-0 mt-2">
  42. <li><strong>Validate Credentials:</strong> Check if credentials are properly formatted</li>
  43. <li><strong>Test API Connection:</strong> Verify connectivity to Google APIs</li>
  44. <li><strong>Show Redirect URI:</strong> Get the URL to configure in Google Cloud Console</li>
  45. </ol>
  46. <div class="my-2" style="border-top: 1px solid #dee2e6;"></div>
  47. <strong>User Connection:</strong>
  48. <p class="mb-0 mt-2">Users connect their Google accounts from their personal preferences, not from here.</p>
  49. </div>
  50. </div>
  51. </div>
  52. </setting>
  53. </xpath>
  54. </field>
  55. </record>
  56. </odoo>