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.

73 lines
2.7 KiB

6 years ago
6 years ago
6 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright (C) 2017 MuK IT GmbH
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU Affero General Public License as
  6. published by the Free Software Foundation, either version 3 of the
  7. License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. -->
  15. <odoo>
  16. <record id="view_converter_convert_form" model="ir.ui.view">
  17. <field name="name">muk_converter_convert.form</field>
  18. <field name="model">muk_converter.convert</field>
  19. <field name="arch" type="xml">
  20. <form string="Convert File">
  21. <group states="export">
  22. <field invisible="1" name="state" />
  23. <group>
  24. <field name="type" />
  25. <field name="input_url" widget="url"
  26. attrs="{'required':[('type','=','url')], 'invisible':[('type','=','binary')]}" />
  27. <field name="input_name" invisible="1" />
  28. <field name="input_binary" filename="input_name"
  29. attrs="{'required':[('type','=','binary')], 'invisible':[('type','=','url')]}" />
  30. </group>
  31. <group>
  32. <field name="format" />
  33. </group>
  34. </group>
  35. <div states="download">
  36. <field name="output_name" invisible="1" />
  37. <h3>Conversion Complete</h3>
  38. <p>The file has been successfully converted and can now be used.
  39. You can download the file by clicking on the link below.
  40. </p>
  41. <p>
  42. Here is the converted file:
  43. <field name="output_binary" filename="output_name" options="{'no_export': True}"/>
  44. </p>
  45. </div>
  46. <footer states="export">
  47. <button name="convert" string="Convert" type="object" class="btn-primary" />
  48. <button special="cancel" string="Cancel" type="object"
  49. class="btn-default" />
  50. </footer>
  51. <footer states="download">
  52. <button special="cancel" string="Close" type="object" class="btn-primary" />
  53. </footer>
  54. </form>
  55. </field>
  56. </record>
  57. <record id="action_converter_convert" model="ir.actions.act_window">
  58. <field name="name">Convert File</field>
  59. <field name="type">ir.actions.act_window</field>
  60. <field name="res_model">muk_converter.convert</field>
  61. <field name="view_type">form</field>
  62. <field name="view_mode">form</field>
  63. <field name="target">new</field>
  64. </record>
  65. </odoo>