Skip to main content
Temu

What the Refresh PDF URL button does in Temu Connector for Odoo

The Refresh PDF URL button on the Tax Invoices form asks Temu for the download address of an invoice's PDF and saves it on the invoice. If the invoice has no number, it first tries to retrieve it; if it is still empty, it records an error in Last Error and asks for nothing more.

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

Key facts

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

Where it is and when you see it

The Tax Invoices forms open from the menu Temu › Payouts & Tax › Tax Reports. The Refresh PDF URL button is on that form. In Odoo 17, 18 and 19 the button is on the Tax Invoices screen and no view condition governs it: it is always visible. What follows describes the published code for Odoo 19.

Code-built diagram of the Temu › Payouts & Tax › Tax Reports menu and the button that refreshes the PDF URL, with the English labels from the code
Code-built diagram (not an Odoo screen): the menu and the button that refreshes the PDF URL, with their English labels, present in Odoo 17.0, 18.0 and 19.0.
Code-built diagram of the button text as the user sees it, depending on the language of Odoo
Code-built diagram based on the published translations (not an Odoo screen): the label of the button changes with the language of Odoo, and the diagram shows its Spanish translation.
Temu orders in Odoo every 15 minutes. Stock out every 5
Video: Temu orders in Odoo every 15 minutes. Stock out every 5

What it does, in order

The code goes through the invoices it is run on, one by one, and for each one it does the following:

  1. It looks at the Invoice Number field. If it is empty, before anything else it asks Temu for the invoice data of that order, using the value of Parent Order Sn and the Instance on the form. If the reply contains no invoice, it saves the reply as it came and the date of that query; if it contains any, it goes through the invoices in the reply one by one.
  2. It reads the number again. If it is still empty, it records an error in Last Error and moves on to the next invoice without asking for the PDF.
  3. If there is a number, the instance asks Temu for the PDF download using the value of Parent Order Sn and the value of Invoice Number.
  4. When the reply contains a signed URL, it saves it. It also saves the full reply together with the Temu method that was used, records the date and time of the query, and empties Last Error.

Misconceptions about the button

‘It only appears once the invoice has a number’

It does not. In Odoo 17, 18 and 19 the button is always visible on the Tax Invoices screen. The invoice number does not decide whether you see it; it decides what happens when you press it, because it is the first thing the code checks.

‘If the invoice number is missing, the button simply fails’

That is not the first thing that happens. With Invoice Number empty, the button starts by asking Temu for the invoice data of the order and looks at the field again. Only if it is still empty does it leave the error in Last Error and skip the PDF query. If this happens to you, open the form and check that Parent Order Sn and Instance have a value: they are the data used for that first query.

‘The button downloads the PDF’

The label says URL, and a URL is what the code deals with. It asks Temu about the PDF download and saves the result on the invoice: the signed URL if the reply contains one, the whole reply with the method used, and the date and time of the query. If the reply has no signed URL, that address is saved empty; the reply is still saved and Last Error is emptied, so an empty error field does not guarantee there is an address.

‘An earlier error stays until you clear it by hand’

It does not. When the PDF query completes, the button empties Last Error on that invoice. The field shows on the Tax Invoices form, so you can press the button and look at it again on the same form.

‘One invoice without a number blocks the others’

Nor that. The code goes through the invoices it is run on and, when one is left without a number, it records the error in Last Error and moves on to the next. An invoice missing its number does not stop the next one from being processed.

‘Buying the module is enough’

The module is a one-off payment per Odoo version and also needs the FlexigoTech Cloud subscription (Connector plan). That plan costs €49/month or €490/year excluding VAT, with up to 3 accounts on the platform (the Pro plan, €98/month or €980/year, up to 10). The connection to Temu goes through FlexigoTech Cloud, which stores the credentials encrypted, monitors the synchronisation and emails you if it fails. Without a subscription, or with the service suspended, whatever the subscription provides stops; your data stays in your Odoo. The module is published on Odoo Apps for 17.0, 18.0, 19.0 and 20.0. If you buy it on flexigotech.com, the module for newer Odoo versions is included with the subscription; on the Odoo App Store, each version is bought there. You can see the Odoo Apps listing or the module page.

Further reading

If you are implementing Odoo and want Temu tax invoices to fit the way you work, FlexigoTech implements Odoo 17, 18, 19 and 20 and builds custom connectors and integrations.

Keep reading

What the Execute button in Temu Connector for Odoo does, step by stepWhat the Execute button on the Fulfillment form of Temu Connector for Odoo checks, which states it writes and which messages can stop it.
Checked in the connector's source code (version 19.0) and the linked sources

Sources