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.

178 lines
6.5 KiB

  1. <section class="oe_container">
  2. <div class="oe_row oe_spaced">
  3. <h2 class="oe_slogan">MuK PGSQL Large Objects Fields</h2>
  4. <h3 class="oe_slogan">PGSQL Large Objects Support for Fields</h3>
  5. <h4 class="oe_slogan" style="font-size: 23px;">MuK IT GmbH -
  6. www.mukit.at</h4>
  7. </div>
  8. </section>
  9. <section class="oe_container">
  10. <div class="oe_row oe_spaced">
  11. <div class="text-justify" style="max-width: 84%; margin: 16px 8%;">
  12. <h3 class="oe_slogan">Overview</h3>
  13. <div class="oe_mt32"
  14. style="padding-bottom: 10px; text-align: justify;">
  15. <p>Provides a field to store bytes as PostgreSQL large objects.
  16. PostgreSQL offers support for large objects, which provide
  17. stream-style access to user data that is stored in a special
  18. large-object structure. They are useful with data values too large
  19. to be manipulated conveniently as a whole.</p>
  20. <h5 style="padding-top: 10px;">Psycopg2 for Python</h5>
  21. <p>
  22. Psycopg allows access to the large object using the
  23. <code>lobject</code>
  24. class. Objects are generated using the
  25. <code>connection.lobject()</code>
  26. factory method. Data can be retrieved either as bytes or as Unicode
  27. strings.
  28. </p>
  29. <p>
  30. Psycopg large object support efficient import/export with file
  31. system files using the
  32. <code>lo_import()</code>
  33. and
  34. <code>lo_export()</code>
  35. libpq functions.
  36. </p>
  37. <p>Changed in version 2.6: added support for large objects
  38. greated than 2GB. Note that the support is enabled only if all the
  39. following conditions are verified:</p>
  40. <ul>
  41. <li>the Python build is 64 bits;</li>
  42. <li>the extension was built against at least libpq 9.3;</li>
  43. <li>the server version is at least PostgreSQL 9.3
  44. (server_version must be >= 90300).</li>
  45. </ul>
  46. <p>
  47. If Psycopg was built with 64 bits large objects support (i.e. the
  48. first two contidions above are verified), the
  49. <code>psycopg2.__version__</code>
  50. constant will contain the lo64 flag. If any of the contition is not
  51. met several lobject methods will fail if the arguments exceed 2GB.
  52. </p>
  53. </div>
  54. <pre>
  55. <code>
  56. from odoo.addons.muk_fields_lobject.fields.lobject import LargeObject
  57. class LargeObjectModel(models.Model):
  58. data_content = LargeObject(string="Data")
  59. @api.multi
  60. def data(self):
  61. for record in self:
  62. bytes = record.data_content
  63. oid = record.with_context({'oid': True}).data_content
  64. size = record.with_context({'bin_size': True}).data_content
  65. stream = record.with_context({'stream': True}).data_content
  66. </code>
  67. </pre>
  68. </div>
  69. </div>
  70. </section>
  71. <section class="oe_container oe_dark">
  72. <div class="oe_row oe_spaced">
  73. <h3 class="oe_slogan">Our Services</h3>
  74. <div
  75. style="display: flex; padding-top: 20px; justify-content: space-between;">
  76. <div style="flex-basis: 18%;">
  77. <a href="https://mukit.at/r/MQ5" target="_blank">
  78. <div
  79. style="width: 75px; height: 75px; border-radius: 100%; margin: auto;">
  80. <img src="service_implementation.png"
  81. style="width: 100%; border-radius: 100%;">
  82. </div>
  83. <h3 class="oe_slogan"
  84. style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 14px; color: #000 !important; margin-top: 5px; opacity: 1 !important; line-height: 17px;">
  85. Odoo <br>Implementation
  86. </h3>
  87. </a>
  88. </div>
  89. <div style="flex-basis: 18%;">
  90. <a href="https://mukit.at/r/u7c" target="_blank">
  91. <div
  92. style="width: 75px; height: 75px; border-radius: 100%; margin: auto;">
  93. <img src="service_integration.png"
  94. style="width: 100%; border-radius: 100%;">
  95. </div>
  96. <h3 class="oe_slogan"
  97. style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 14px; color: #000 !important; margin-top: 5px; opacity: 1 !important; line-height: 17px;">
  98. Odoo <br>Integration
  99. </h3>
  100. </a>
  101. </div>
  102. <div style="flex-basis: 18%;">
  103. <a href="https://mukit.at/r/xDJ" target="_blank">
  104. <div
  105. style="width: 75px; height: 75px; border-radius: 100%; margin: auto;">
  106. <img src="service_customization.png"
  107. style="width: 100%; border-radius: 100%;">
  108. </div>
  109. <h3 class="oe_slogan"
  110. style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 14px; color: #000 !important; margin-top: 5px; opacity: 1 !important; line-height: 17px;">
  111. Odoo <br>Customization
  112. </h3>
  113. </a>
  114. </div>
  115. <div style="flex-basis: 18%;">
  116. <a href=" https://mukit.at/r/J3A" target="_blank">
  117. <div
  118. style="width: 75px; height: 75px; border-radius: 100%; margin: auto;">
  119. <img src="service_development.png"
  120. style="width: 100%; border-radius: 100%;">
  121. </div>
  122. <h3 class="oe_slogan"
  123. style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 14px; color: #000 !important; margin-top: 5px; opacity: 1 !important; line-height: 17px;">
  124. Odoo <br>Development
  125. </h3>
  126. </a>
  127. </div>
  128. <div style="flex-basis: 18%;">
  129. <a href=" https://mukit.at/r/R1v" target="_blank">
  130. <div
  131. style="width: 75px; height: 75px; border-radius: 100%; margin: auto;">
  132. <img src="service_support.png"
  133. style="width: 100%; border-radius: 100%;">
  134. </div>
  135. <h3 class="oe_slogan"
  136. style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 14px; color: #000 !important; margin-top: 5px; opacity: 1 !important; line-height: 17px;">
  137. Odoo <br>Support
  138. </h3>
  139. </a>
  140. </div>
  141. </div>
  142. </div>
  143. </section>
  144. <section class="oe_container" style="padding: 32px 0;">
  145. <div class="oe_row oe_spaced" style="margin: auto;">
  146. <div class="oe_demo oe_picture oe_screenshot">
  147. <a href="https://mukit.at/r/SgN" target="_blank"> <img src="preview.png">
  148. </a>
  149. </div>
  150. </div>
  151. </section>
  152. <section class="oe_container oe_dark">
  153. <h3 class="oe_slogan">Help and Support</h3>
  154. <h5 class="oe_slogan" style="font-size: 20px;">Feel free to
  155. contact us, if you need any help with your Odoo integration or
  156. addiontal features.</h5>
  157. <div class="oe_slogan">
  158. <a class="btn btn-primary btn-lg mt8" href="https://mukit.at" target="_blank">
  159. <i class="fa fa-globe"></i> Website
  160. </a>
  161. <a class="btn btn-primary btn-lg mt8" href="mailto:sale@mukit.at">
  162. <i class="fa fa-envelope"></i> Contact Us
  163. </a>
  164. <a class="btn btn-primary btn-lg mt8" href="https://github.com/muk-it" target="_blank">
  165. <i class="fa fa-github"></i> Issues
  166. </a>
  167. </div>
  168. <img src="logo.png"
  169. style="width: 200px; margin-bottom: 20px; display: block;"
  170. class="mx-auto center-block">
  171. </section>