You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.4 KiB

  1. <odoo>
  2. <data>
  3. <record model="ir.actions.server" id="client_action_secret">
  4. <field name="name">Show Client Secret</field>
  5. <field name="model_id" ref="model_galicea_openid_connect_client"/>
  6. <field name="code">
  7. action = {
  8. "type": "ir.actions.act_window",
  9. "view_mode": "form",
  10. "view_id": obj.env.ref('galicea_openid_connect.client_view_form_secret').id,
  11. "res_model": "galicea_openid_connect.client",
  12. "res_id": obj.id
  13. }
  14. </field>
  15. </record>
  16. <record id="client_view_form" model="ir.ui.view">
  17. <field name="model">galicea_openid_connect.client</field>
  18. <field name="priority">10</field>
  19. <field name="arch" type="xml">
  20. <form>
  21. <group>
  22. <field name="name" />
  23. <field name="create_date" invisible="1" />
  24. <field name="client_id"
  25. attrs="{'invisible':[('create_date', '==', False)]}" />
  26. <label for="secret" class="oe_read_only" string="Client Secret" />
  27. <button class="oe_read_only" string="Show" type="action" name="%(client_action_secret)d" />
  28. <field name="auth_redirect_uri" />
  29. <field name="allow_password_grant" />
  30. </group>
  31. </form>
  32. </field>
  33. </record>
  34. <record id="client_view_form_secret" model="ir.ui.view">
  35. <field name="inherit_id" ref="galicea_openid_connect.client_view_form" />
  36. <field name="priority">99</field>
  37. <field name="model">galicea_openid_connect.client</field>
  38. <field name="mode">primary</field>
  39. <field name="arch" type="xml">
  40. <button name="%(client_action_secret)d" position="replace">
  41. <field class="oe_read_only" name="secret" nolabel="1" />
  42. </button>
  43. </field>
  44. </record>
  45. <record id="client_view_tree" model="ir.ui.view">
  46. <field name="model">galicea_openid_connect.client</field>
  47. <field name="arch" type="xml">
  48. <tree>
  49. <field name="name" />
  50. <field name="client_id" />
  51. <field name="auth_redirect_uri" />
  52. </tree>
  53. </field>
  54. </record>
  55. <act_window id="client_action"
  56. name="OpenID Clients"
  57. res_model="galicea_openid_connect.client" />
  58. <menuitem name="OpenID Connect Provider" id="root_menu" sequence="19" />
  59. <menuitem name="Clients" id="client_menu" parent="galicea_openid_connect.root_menu" action="client_action" />
  60. </data>
  61. </odoo>