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.

121 lines
5.0KB

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!--
  3. Copyright (C) 2016-Today: Odoo Community Association (OCA)
  4. @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
  5. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  6. -->
  7. <odoo>
  8. <record id="view_res_partner_search" model="ir.ui.view">
  9. <field name="model">res.partner</field>
  10. <field name="inherit_id" ref="base.view_res_partner_filter" />
  11. <field name="arch" type="xml">
  12. <filter name="type_company" position="after">
  13. <filter
  14. string="Has Github Account"
  15. name="has_github_account"
  16. domain="[('github_login', '!=', False)]"
  17. />
  18. </filter>
  19. <field name="name" position="after">
  20. <field
  21. name="github_login"
  22. string="Github Login"
  23. filter_domain="[('github_login','ilike', self)]"
  24. />
  25. <field name="organization_ids" />
  26. <field name="github_team_ids" />
  27. </field>
  28. </field>
  29. </record>
  30. <record id="view_res_partner_kanban" model="ir.ui.view">
  31. <field name="model">res.partner</field>
  32. <field name="inherit_id" ref="base.res_partner_kanban_view" />
  33. <field name="arch" type="xml">
  34. <!-- load data -->
  35. <field name="mobile" position="after">
  36. <field name="github_login" />
  37. </field>
  38. <!-- Display Data -->
  39. <xpath expr="//li[@t-if='record.email.raw_value']" position="after">
  40. <li t-if="record.github_login.raw_value">
  41. <field name="github_login" />
  42. </li>
  43. </xpath>
  44. </field>
  45. </record>
  46. <record id="view_res_partner_tree" model="ir.ui.view">
  47. <field name="model">res.partner</field>
  48. <field name="inherit_id" ref="base.view_partner_tree" />
  49. <field name="arch" type="xml">
  50. <field name="display_name" position="after">
  51. <field name="github_login" />
  52. <field name="github_team_qty" />
  53. </field>
  54. </field>
  55. </record>
  56. <record id="view_res_partner_form" model="ir.ui.view">
  57. <field name="model">res.partner</field>
  58. <field name="inherit_id" ref="base.view_partner_form" />
  59. <field name="arch" type="xml">
  60. <div name="button_box" position="inside">
  61. <button
  62. type="object"
  63. name="action_github_organization"
  64. class="oe_stat_button"
  65. icon="fa-institution"
  66. attrs="{'invisible': ['|', ('github_login', '=', False), ('is_company', '=', True)]}"
  67. >
  68. <field
  69. name="organization_qty"
  70. string="Organizations"
  71. widget="statinfo"
  72. />
  73. </button>
  74. <button
  75. type="object"
  76. name="action_github_team_partner_from_partner"
  77. class="oe_stat_button"
  78. icon="fa-users"
  79. attrs="{'invisible': ['|', ('github_login', '=', False), ('is_company', '=', True)]}"
  80. >
  81. <field name="github_team_qty" string="Teams" widget="statinfo" />
  82. </button>
  83. </div>
  84. <page name="internal_notes" position="before">
  85. <page
  86. name="github"
  87. string="Github"
  88. attrs="{'invisible': [('github_login', '=', False)]}"
  89. >
  90. <group col="4">
  91. <field name="is_bot_account" />
  92. <newline />
  93. <field name="github_url" widget="url" colspan="4" />
  94. <field name="github_id_external" />
  95. <field name="github_login" />
  96. <field name="github_create_date" />
  97. <field name="github_write_date" />
  98. <field name="github_last_sync_date" />
  99. <button
  100. name="button_update_from_github_light"
  101. type="object"
  102. string="Light Sync"
  103. class="btn btn-default"
  104. icon="fa-angle-right"
  105. groups="github_connector.group_github_connector_manager"
  106. />
  107. <button
  108. name="button_update_from_github_full"
  109. type="object"
  110. string="Full Sync"
  111. class="btn btn-default"
  112. icon="fa-angle-double-right"
  113. groups="github_connector.group_github_connector_manager"
  114. />
  115. </group>
  116. </page>
  117. </page>
  118. </field>
  119. </record>
  120. </odoo>
上海开阖软件有限公司 沪ICP备12045867号-1