Browse Source

publish muk_fields_lobject - 13.0

pull/31/head
MuK IT GmbH 5 years ago
parent
commit
7db28f3b3f
  1. 2
      muk_fields_lobject/__manifest__.py
  2. 4
      muk_fields_lobject/fields/lobject.py

2
muk_fields_lobject/__manifest__.py

@ -23,7 +23,7 @@
{
"name": "MuK Large Objects Field",
"summary": """PGSQL Large Objects Support for Fields""",
"version": "13.0.1.0.0",
"version": "13.0.1.0.1",
"category": "Extra Tools",
"license": "LGPL-3",
"website": "https://www.mukit.at",

4
muk_fields_lobject/fields/lobject.py

@ -37,7 +37,7 @@ class LargeObject(fields.Field):
column_type = ("oid", "oid")
_slots = {
"prefetch": False,
"depends_context": ("bin_size", "human_size", "path", "bytes", "stream"),
"depends_context": ("bin_size", "human_size", "oid", "bytes", "stream", "checksum", "base64"),
}
def convert_to_column(self, value, record, values=None, validate=True):
@ -59,7 +59,7 @@ class LargeObject(fields.Field):
lobject.write(chunk)
return lobject.oid
def convert_to_cache(self, value, record, validate=True):
def convert_to_record(self, value, record):
if value and isinstance(value, int):
lobject = record.env.cr._cnx.lobject(value, "rb")
if record._context.get("human_size"):

Loading…
Cancel
Save