Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions lighting_export_xlsx/report/export_product_xlsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,16 @@ def generate_xlsx_report_ctx(self, workbook, data, objects): # noqa: C901
col += 1
row += 1
if (i % th) == 0:
_logger.info(
" - Progress xlsx writing %i%%" % round(i / n * 100)
)
_logger.info(" - Progress xlsx writing %i%%" % round(i / n * 100))
_logger.info("Xlsx writing completed...")

# make exported attachments public (single write at the end to avoid
# concurrent access issues during batch processing)
if non_public_ids:
_logger.info(
"Setting %i attachments to public..." % len(non_public_ids)
_logger.info("Setting %i attachments to public..." % len(non_public_ids))
self.env["lighting.attachment"].sudo().browse(non_public_ids).write(
{"public": True}
)
self.env["lighting.attachment"].sudo().browse(
non_public_ids
).write({"public": True})
_logger.info("Attachments updated...")

def _check_duplicate_labels(self, header, template_id):
Expand Down
Loading