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.

65 lines
2.4 KiB

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