res_config_settings_views.xml 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 -->
  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 Connection"
  30. type="object"
  31. class="btn btn-primary me-2"/>
  32. <button name="action_connect_google_account"
  33. string="Connect Google Account"
  34. type="object"
  35. class="btn btn-success me-2"/>
  36. <button name="action_test_google_oauth_connection"
  37. string="Test OAuth Connection"
  38. type="object"
  39. class="btn btn-info me-2"/>
  40. <button name="action_show_oauth_redirect_uris"
  41. string="Show Redirect URI"
  42. type="object"
  43. class="btn btn-warning"/>
  44. </div>
  45. <!-- Help Info -->
  46. <div class="mt16">
  47. <div class="alert alert-info" role="alert">
  48. <strong>Configuration Steps:</strong>
  49. <ol class="mb-0 mt-2">
  50. <li><strong>Validate Credentials:</strong> Check if credentials are properly formatted</li>
  51. <li><strong>Test Connection:</strong> Verify connectivity to Google APIs</li>
  52. <li><strong>Show Redirect URI:</strong> Get the URL to configure in Google Cloud Console</li>
  53. <li><strong>Connect Google Account:</strong> Authorize access to Google Drive</li>
  54. <li><strong>Test OAuth Connection:</strong> Verify the OAuth connection is working</li>
  55. </ol>
  56. </div>
  57. </div>
  58. </div>
  59. </setting>
  60. </xpath>
  61. </field>
  62. </record>
  63. </odoo>