Browse Source

apply review suggestion

pull/756/head
Kévin Roche 3 years ago
parent
commit
1db8c2076d
  1. 15
      account_export_csv/wizard/account_export_csv.py

15
account_export_csv/wizard/account_export_csv.py

@ -242,14 +242,13 @@ class AccountCSVExport(models.TransientModel):
file_data.seek(0) file_data.seek(0)
base64.encode(file_data, base64_data) base64.encode(file_data, base64_data)
base64_data.seek(0) base64_data.seek(0)
self.write({"data": base64_data.read()})
# self.env.cr.execute(
# """
# UPDATE account_csv_export
# SET data = %s
# WHERE id = %s""",
# (base64_data.read(), self.id),
# )
self.env.cr.execute(
"""
UPDATE account_csv_export
SET data = %s
WHERE id = %s""",
(base64_data.read(), self.id),
)
return { return {
"type": "ir.actions.act_window", "type": "ir.actions.act_window",
"res_model": "account.csv.export", "res_model": "account.csv.export",

Loading…
Cancel
Save