odoo_management.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <!-- odoo_management configuration assets -->
  5. <template id="odoo_management.assets" inherit_id="web.assets_backend">
  6. <xpath expr="." position="inside">
  7. <link rel="stylesheet" href="/odoo_management/static/src/css/main.css" />
  8. <script type="text/javascript" src="/odoo_management/static/src/js/main.js" />
  9. </xpath>
  10. </template>
  11. <!-- ==================================================================================== -->
  12. <!-- | TREES | -->
  13. <!-- ==================================================================================== -->
  14. <!-- odoo.instance tree view -->
  15. <record id="odoo_instance_tree_view" model="ir.ui.view">
  16. <field name="name">odoo.instance.tree</field>
  17. <field name="model">odoo.instance</field>
  18. <field name="arch" type="xml">
  19. <tree colors="green:running == True and state == 'activated';red:running == False and state == 'activated';blue:state == 'draft';yellow:state == 'disapproved';orange:state == 'suspended';gray:state == 'destroyed'" delete="false" copy="false">
  20. <field name="name" />
  21. <field name="domain" class="oe_link" />
  22. <field name="demo" />
  23. <field name="running" />
  24. <field name="state" invisible="1" />
  25. <button
  26. type="object"
  27. name="action_start"
  28. icon="gtk-media-play"
  29. string="Arrancar"
  30. attrs="{'invisible': ['|', ('running', '=', True), ('state', '!=', 'activated')]}" />
  31. <button
  32. type="object"
  33. name="action_restart"
  34. icon="gtk-refresh"
  35. string="Parar y arrancar"
  36. attrs="{'invisible': ['|', ('running', '=', False), ('state', '!=', 'activated')]}" />
  37. </tree>
  38. </field>
  39. </record>
  40. <!-- payment.plan tree view -->
  41. <record id="payment_plan_tree_view" model="ir.ui.view">
  42. <field name="name">payment.plan.tree</field>
  43. <field name="model">payment.plan</field>
  44. <field name="arch" type="xml">
  45. <tree>
  46. <field name="name" />
  47. <field name="amount" />
  48. </tree>
  49. </field>
  50. </record>
  51. <!-- odoo.module.package tree view -->
  52. <record id="odoo_module_package_tree_view" model="ir.ui.view">
  53. <field name="name">odoo.module.package.tree</field>
  54. <field name="model">odoo.module.package</field>
  55. <field name="arch" type="xml">
  56. <tree>
  57. <field name="name" />
  58. <field name="module_ids" />
  59. </tree>
  60. </field>
  61. </record>
  62. <!-- odoo.module.package tree view -->
  63. <record id="odoo_module_tree_view" model="ir.ui.view">
  64. <field name="name">odoo.module.tree</field>
  65. <field name="model">odoo.module</field>
  66. <field name="arch" type="xml">
  67. <tree editable="false" create="false" delete="false">
  68. <field name="name" />
  69. <field name="technical_name" />
  70. <field name="author" />
  71. </tree>
  72. </field>
  73. </record>
  74. <!-- ==================================================================================== -->
  75. <!-- | FORMS | -->
  76. <!-- ==================================================================================== -->
  77. <!-- odoo.instance form view -->
  78. <record id="odoo_instance_form_view" model="ir.ui.view">
  79. <field name="name">odoo.instance.form</field>
  80. <field name="model">odoo.instance</field>
  81. <field name="arch" type="xml">
  82. <form string="Sistema Odoo" delete="false" duplicate="false" copy="false">
  83. <header>
  84. <button
  85. name="action_activate"
  86. states="draft,suspended"
  87. string="Activar"
  88. type="object"
  89. class="oe_highlight"
  90. modifiers="{'invisible': ['|', ('id', '=', False), ('state', 'not in', ['draft', 'suspended'])]}" />
  91. <button
  92. name="action_disapprove"
  93. states="draft"
  94. string="No aprobar"
  95. type="object"
  96. class="oe_danger"
  97. modifiers="{'invisible': ['|', ('id', '=', False), ('state', '!=', 'draft')]}" />
  98. <button
  99. name="action_suspend"
  100. states="activated"
  101. string="Suspender"
  102. type="object"
  103. class="oe_highlight"
  104. modifiers="{'invisible': [('state', '!=', 'activated')]}" />
  105. <button
  106. name="action_destroy"
  107. states="activated,suspended"
  108. string="Eliminar"
  109. type="object"
  110. class="oe_highlight"
  111. modifiers="{'invisible': [('state', 'not in', ['activated', 'suspended'])]}" />
  112. <field
  113. name="state"
  114. widget="statusbar"
  115. statusbar="draft,activated,disapproved,suspended,destroyed"
  116. statusbar_colors="{'activated':'blue','destroyed':'red'}" />
  117. </header>
  118. <sheet>
  119. <div class="oe_button_box oe_right">
  120. <button
  121. type="object"
  122. name="action_start"
  123. icon="fa-play"
  124. string="Arrancar"
  125. class="oe_inline oe_stat_button"
  126. attrs="{'invisible': ['|', ('running', '=', True), ('state', '!=', 'activated')]}" />
  127. <button
  128. type="object"
  129. name="action_restart"
  130. icon="fa-refresh"
  131. string="Parar y arrancar"
  132. class="oe_inline oe_stat_button"
  133. attrs="{'invisible': ['|', ('running', '=', False), ('state', '!=', 'activated')]}" />
  134. </div>
  135. <div class="oe_left" style="width: 500px;">
  136. <field name="logo" widget="image" class="oe_avatar oe_left" modifiers="{}" />
  137. <div class="oe_title" style="width: 390px;">
  138. <label class="oe_edit_only" for="name" string="Name" />
  139. <h1>
  140. <field name="name" class="oe_inline" modifiers="{'required': true}" />
  141. </h1>
  142. <field name="normalized_name" />
  143. </div>
  144. </div>
  145. <group>
  146. <group string="Información del Servicio">
  147. <field name="payment_plan_id" widget="selection" />
  148. <field name="domain" />
  149. <field name="demo" />
  150. <field name="running" />
  151. </group>
  152. <group string="Información del Contenedor">
  153. <field name="internal_ip" />
  154. <field name="internal_port" />
  155. <field name="external_ip" />
  156. <field name="external_port" />
  157. <field name="expose_ip" />
  158. </group>
  159. </group>
  160. </sheet>
  161. </form>
  162. </field>
  163. </record>
  164. <!-- payment.plan form view -->
  165. <record id="payment_plan_form_view" model="ir.ui.view">
  166. <field name="name">payment.plan.form</field>
  167. <field name="model">payment.plan</field>
  168. <field name="arch" type="xml">
  169. <form>
  170. <sheet>
  171. <div class="oe_title oe_left">
  172. <label class="oe_edit_only" for="name" string="Name" />
  173. <h1>
  174. <field name="name" class="oe_inline" />
  175. </h1>
  176. </div>
  177. <group>
  178. <group string="Información de pago">
  179. <field name="amount" />
  180. </group>
  181. <group string="Información del servicio">
  182. <field name="storage_limit" />
  183. <field name="ttl" />
  184. </group>
  185. </group>
  186. </sheet>
  187. </form>
  188. </field>
  189. </record>
  190. <!-- odoo.module.package form view -->
  191. <record id="odoo_module_package_form_view" model="ir.ui.view">
  192. <field name="name">odoo.module.package.form</field>
  193. <field name="model">odoo.module.package</field>
  194. <field name="arch" type="xml">
  195. <form>
  196. <sheet>
  197. <div class="oe_title oe_left">
  198. <label class="oe_edit_only" for="name" string="Name" />
  199. <h1>
  200. <field name="name" class="oe_inline" />
  201. </h1>
  202. </div>
  203. <field name="module_ids">
  204. <tree editable="bottom" create="false" delete="false">
  205. <field name="name" />
  206. <field name="technical_name" />
  207. <field name="author" />
  208. </tree>
  209. </field>
  210. </sheet>
  211. </form>
  212. </field>
  213. </record>
  214. <!-- ==================================================================================== -->
  215. <!-- | ACTIONS | -->
  216. <!-- ==================================================================================== -->
  217. <!-- odoo.instance action -->
  218. <record id="odoo_container_action" model="ir.actions.act_window">
  219. <field name="name">Sistemas Odoo</field>
  220. <field name="type">ir.actions.act_window</field>
  221. <field name="res_model">odoo.instance</field>
  222. <field name="view_mode">tree,form</field>
  223. <field name="view_type">form</field>
  224. <field name="help" type="html">
  225. <p class="oe_view_nocontent_create">
  226. Cree una nueva instancia de Odoo
  227. </p>
  228. </field>
  229. </record>
  230. <!-- odoo.module.package action -->
  231. <record id="odoo_module_package_action" model="ir.actions.act_window">
  232. <field name="name">Paquete de Módulos</field>
  233. <field name="type">ir.actions.act_window</field>
  234. <field name="res_model">odoo.module.package</field>
  235. <field name="view_mode">tree,form</field>
  236. <field name="view_type">form</field>
  237. <field name="help" type="html">
  238. <p class="oe_view_nocontent_create">
  239. Cree una nuevo paquete de módulos
  240. </p>
  241. </field>
  242. </record>
  243. <!-- payment.plan action -->
  244. <record id="payment_plan_action" model="ir.actions.act_window">
  245. <field name="name">Planes de Pago</field>
  246. <field name="type">ir.actions.act_window</field>
  247. <field name="res_model">payment.plan</field>
  248. <field name="view_mode">tree,form</field>
  249. <field name="view_type">form</field>
  250. <field name="help" type="html">
  251. <p class="oe_view_nocontent_create">
  252. Cree un nuevo plan de pago para su contenedor
  253. </p>
  254. </field>
  255. </record>
  256. <!-- odoo.management.config action -->
  257. <record id="odoo_management_config_action" model="ir.actions.client">
  258. <field name="name">Configuración</field>
  259. <field name="tag">odoo_management.configuration</field>
  260. </record>
  261. <!-- ==================================================================================== -->
  262. <!-- | MENUS | -->
  263. <!-- ==================================================================================== -->
  264. <!-- root menu -->
  265. <menuitem id="sysadmin_menu_root" name="Administración de Sistemas" />
  266. <!-- containers menu -->
  267. <menuitem id="containers_menu_categ" name="Contenedores" parent="sysadmin_menu_root" />
  268. <menuitem id="systems_menu_act" name="Sistemas" parent="containers_menu_categ" action="odoo_container_action" />
  269. <menuitem id="tasks_menu_act" name="Tareas automatizadas" parent="containers_menu_categ" action="odoo_container_action" />
  270. <!-- configuration menu -->
  271. <menuitem id="configuration_menu_categ" name="Configuración" parent="sysadmin_menu_root" />
  272. <menuitem id="payment_plan_menu_act" sequence="1" name="Planes de pago" parent="configuration_menu_categ" action="payment_plan_action" />
  273. <menuitem id="module_packages_menu_act" sequence="2" name="Paquetes de modulos" parent="configuration_menu_categ" action="odoo_module_package_action" />
  274. <menuitem id="configuration_menu_act" sequence="3" name="Configuración" parent="configuration_menu_categ" action="odoo_management_config_action" />
  275. </data>
  276. </openerp>