Skip to main content
Octopia (Cdiscount)

Octopia Connector's Download PDF button: what it does step by step

The Download PDF button on the DAC7 Reports screen asks for the report document through the account and, if valid content comes back, creates a PDF attachment linked to the report and puts it in the Pdf Attachment field. It is always visible.

FlexigoTech · Editor in charge: Víctor Gómez · Updated 5 November 2026

Key facts

Versions
Odoo 17, 18, 19 and 20
Checked
in the connector's source code, version 20.0 · against the sources linked at the end
Reading time
4 min

A case to follow the button from start to finish

Example Illustrative case: the company and its figures are made up to explain the flow.

Hogar Atlántico is an invented shop that sells on Cdiscount and Octopia and has its account connected in Odoo. Marta, in administration, needs the PDF of a DAC7 report and wants to keep it stored in Odoo itself. She opens the report, looks at the Pdf Attachment field first, presses Download PDF and looks at the field again. What follows is what happens between that click and that field, according to the published Odoo 20 code.

48 business hours to accept each Cdiscount order. Do it in Odoo
Video: 48 business hours to accept each Cdiscount order. Do it in Odoo

Where the button is and when it shows

The DAC7 report records open from the menu Octopia › Finance › DAC7 Reports. The first step, Octopia, requires the Octopia User permission: without it, you do not see that part of the menu.

The Download PDF button is on the DAC7 Reports screen and exists in the published branches of the module (Odoo 17, 18, 19 and 20). In all of them it is always visible, with no view condition hiding it.

Code-generated diagram: the menu Octopia › Finance › DAC7 Reports and, below it, the Download PDF button
A diagram, not an Odoo screen: the menu and the button with the English labels from the module code (Odoo 17, 18, 19 and 20).

The label changes with the language of your Odoo, but it is the same button:

Diagram built from the module's translations: the button text in five languages
A diagram, not an Odoo screen: the button is called Descargar PDF in Spanish, PDF herunterladen in German, Télécharger le PDF in French, Scarica PDF in Italian and Descarregar PDF in Portuguese.

What the button does, in order

The Odoo 20 code goes through the reports the action is run on and, for each one, does this:

  1. It takes the account from the report's Account field and creates the connection client for that account.
  2. It asks that client for the report document, using the value of the Report ID field.
  3. It checks what came back: if it is not binary content or it is empty, it moves on to the next report without doing anything more with this one. In that case it creates no attachment and writes nothing in Pdf Attachment.
  4. If the content is valid, it creates a PDF attachment named octopia-dac7-….pdf, with the Report ID where the code puts the value, and links it to that report.
  5. It writes that attachment into the report's Pdf Attachment field.

When it has dealt with every report, the action simply ends.

What changes on the record and how to check it

When valid content arrives, the button creates a new attachment, holding the content received, and writes it into the Pdf Attachment field. That field is visible on the DAC7 Reports form and in its list, is read-only and is not written by the user: the Download PDF button fills it in.

The two other values the button uses, Account and Report ID, are also visible on the form and in the list, so you can review them on the same screen.

One caution when checking the result: a file in Pdf Attachment does not by itself prove that the latest press brought in content, because the field may already be filled from an earlier press. That is why Marta looks at it before pressing. If it was empty and afterwards holds a file, that file comes from the press, since this button is what fills the field.

If the attachment does not appear

The button's code has one case in which nothing is created: what comes back is not binary content, or it is empty. Then no attachment is created and Pdf Attachment is not written: the field stays as it was, empty or holding the attachment from an earlier download.

What you can do from the record itself:

  • Check that Account points to the account you expect and that Report ID holds the value of the report you want.
  • Press Download PDF again: the button is always visible and, each time valid content arrives, it creates a new attachment and writes it into Pdf Attachment.

What to take from the case

  • The button only creates the attachment and fills in Pdf Attachment when it receives valid content.
  • If no valid content arrives, the field keeps what it had: empty, or the earlier attachment. Compare the field before and after pressing.
  • The file ends up as an attachment linked to the report itself, with a name that carries the Report ID.
  • The button starts from two fields on the record, Account and Report ID.
  • Each press with valid content creates a new attachment and leaves that one in Pdf Attachment.

What the module needs and how FlexigoTech helps

Octopia Connector (Cdiscount & Octopia Marketplaces) is a one-off purchase per Odoo version, published on Odoo Apps for 17, 18, 19 and 20 (listing). It also needs the FlexigoTech Cloud subscription, Connector plan: €49/month or €490/year excluding VAT, with up to 3 accounts on the platform. The connection goes through FlexigoTech Cloud, which stores the credentials encrypted, monitors synchronisation and emails you if it fails. Without a subscription, or with the service suspended, what the subscription provides stops; your data stays in your Odoo.

If you are implementing Odoo and want this flow tested with your own accounts, FlexigoTech implements Odoo 17, 18, 19 and 20 and builds custom connectors and integrations.

Keep reading

What the Submit to Octopia button of Octopia Connector does, step by stepWhat the Submit to Octopia button does in Bulk Invoice Imports: when it shows, what it checks, what it changes and the one error it can raise.What the Import button of Octopia Connector does, step by stepWhat the Import button of Octopia Connector does in Odoo: when it shows, what it imports, what changes, the notice it gives and the log entry it leaves.What the Create Vendor Bill button in Octopia Connector doesWhat the Create Vendor Bill button in Octopia Connector does in Odoo: when it shows, what it checks, what it creates and where it can stop.
Checked in the connector's source code (version 20.0) and the linked sources

Sources