Skip to main content
Octopia (Cdiscount)

What the Create Vendor Bill button in Octopia Connector does

The Create Vendor Bill button turns an Octopia commission invoice already downloaded into Odoo into a vendor bill, or into a vendor refund if the net total of its lines is negative. It shows while the record has no vendor bill linked, and the daily scheduled task can do the same without you pressing anything.

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
5 min

Where the button is and when you see it

The records open from the menu Octopia › Finance › Commission Invoices. The Octopia segment of the menu requires the Octopia User permission; without it you do not see that segment. The form shows Account, Invoice ID, Lines and Vendor Bill.

The button is on the Commission Invoices screen in the published branches of the module (Odoo 17, 18, 19 and 20). It is hidden once Vendor Bill has a value; with default values that field is empty and the button shows. Vendor Bill is read-only: you do not write it yourself, the button fills it (or the daily task and the Pull Finance button).

Diagram of the menu Octopia › Finance › Commission Invoices and the Create Vendor Bill button, with the English labels from the code
Diagram generated from the module's published code (not an Odoo screenshot): the menu path and the button, available in Odoo 17, 18, 19 and 20.

With Odoo in English the button reads Create Vendor Bill; the second diagram shows how it is labelled in other languages.

Diagram with the text of the Create Vendor Bill button in several languages
Diagram built from the module's published translations (not an Odoo screenshot): the button text in Spanish, German «Eingangsrechnung erstellen», French «Créer une facture fournisseur», Italian «Crea fattura fornitore» and Portuguese «Criar fatura de fornecedor».
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

A worked case from start to finish

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

Picture an invented shop, Hogar Norte, with a connected Octopia account and a commission invoice that already appears under Commission Invoices. This is what happens when they press the button (following the Odoo 20 code):

  1. They open the record. They see the Account, the Invoice ID, and an empty Vendor Bill, so the Create Vendor Bill button is on view.
  2. They press it. If the record already had a vendor bill, the method would leave it as it is and move on to the next one.
  3. If Lines is empty, the method first downloads the lines from Octopia: it deletes any existing ones, requests them page by page while Octopia points to a further page, and notes when they were downloaded. If Lines already held lines, it uses them as they are and does not request them again.
  4. It looks for the account's commission vendor. If the account has none yet, it creates a company contact named Octopia Marketplace (account name), flagged as a vendor and not tied to any company, and stores it on the account. Later invoices from the same account use that same contact.
  5. It adds up the net amounts of all the lines. If the sum is zero or positive, it will create a vendor bill; if it is negative, a vendor refund.
  6. It creates the bill with one line for each Octopia line (details in the table below).
  7. It links the new bill in Vendor Bill. With that field filled, the button disappears from the record.

What the bill it creates contains

Bill dataWhere it comes from
VendorThe account's commission vendor (created if missing)
TypeVendor bill if the net total is zero or positive; vendor refund if it is negative
CompanyThe company of the commission invoice
ReferenceOctopia commission invoice …, with the Invoice ID in place of the dots
Description of each lineThe line type, the operation type and the order reference, one after another (anything missing is left blank)
QuantityThat of the Octopia line; if it is empty or zero, one
Unit priceThe line's net amount divided by its quantity

Signs are preserved. Restitution or credit lines arrive negative and reduce the bill. When the total is negative and a refund is created, the module flips the sign of each line's unit price.

The normal route: the daily task

The button is not the main route. The scheduled task Octopia: pull finance (operations, payouts, invoices, DAC7) runs once a day and is active on installation. It goes through the connected accounts and, for each one, reads operations and payments. It then creates a commission invoice record for every new invoice ID it sees in the operations and, for each new record, downloads the lines and the PDF. If the account is set up to create the vendor bill automatically, it calls the same action as the button. Finally, it reads the DAC7 reports.

That tells you when you need the button: the task only goes through the records it has itself created in that run. A record that already existed and has no vendor bill, for instance because automatic creation was not set up when it was downloaded, is not part of that pass. That is the record the button is for.

Where it can stop

Some points where the process can halt:

  • With the daily task and FlexigoTech Cloud. If the account connects through FlexigoTech Cloud and the credentials are not saved there, or there is no service, the task skips that account. If the FlexigoTech Cloud relay stops it midway, only the code is reported to FlexigoTech Cloud, nothing is marked and the next run carries on.
  • With any other failure in the task. The error is written to the server log and the task moves on to the next account. For the affected account, the steps left in that pass (the other invoices and the DAC7 reports) are not run.
  • With the button. Creating the bill comes after downloading the lines, so a record without lines depends first on that download. With the lines already loaded, the button works with what is in Lines.

To check the result, open the record and look at Vendor Bill: if it has a value, the bill is linked.

What to take from the case

  • Before pressing, check whether Vendor Bill already has a value: if it does, there is no button.
  • The button and the daily task share the same action, so they produce the same bill.
  • The sign of the net total decides whether the result is a vendor bill or a vendor refund.
  • Review Lines before pressing: if lines already exist, they are not downloaded again.

How FlexigoTech can help

If you are implementing Odoo and want to decide how these commission invoices fit into your accounting, FlexigoTech implements Odoo 17, 18, 19 and 20 and builds connectors and custom integrations. The module is published for those four versions and needs the FlexigoTech Cloud subscription (Connector plan, €49 a month or €490 a year excluding VAT, for up to 3 marketplace accounts). The connection goes through FlexigoTech Cloud, which stores the credentials encrypted and emails you if synchronisation fails.

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.Octopia offer fields in Odoo: an Octopia Connector glossaryGlossary of the Octopia Connector offer fields in Odoo: what each help text says, which fields are read-only and what to enter before publishing.
Checked in the connector's source code (version 20.0) and the linked sources

Sources