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.

228 lines
7.7 KiB

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