MailDesk docs
Odoo integrations

Use MailDesk with Accounting

5 min read Odoo 18.0

Turn an email into a customer invoice or vendor bill, link it to an accounting document that already exists, and see the document and its payment state next to the message.

Who this is for: accounting and office staff (daily use) and MailDesk administrators (one-time setup per mailbox).

You need:

  • The MailDesk Accounting Integration module (maildesk_mail_client_account). It is a separate module.
  • MailDesk Basic and MailDesk Pro.
  • The Odoo Accounting app (account).
  • A connected mailbox that syncs.

Which MailDesk plan includes this module is described in Plans and included features.

Before you begin

  • Install the module on your Odoo database and check that Accounting is installed. Install steps are in Install MailDesk.
  • Administrators: turn the integration on for each mailbox that needs it (Step 1). It is off by default.
  • Users: you need normal Odoo Accounting access. The panel works as you, so your accounting access rules still apply. You also need access to the mailbox. See Security and access rights.

Step 1: Turn on Accounting for a mailbox (administrator)

  1. Open MailDesk ▸ Configuration ▸ Mailboxes ▸ Mailbox Accounts and open the mailbox.
  2. Open the Settings tab and find the card Accounting Document Linking.
  3. Switch Enable on. The card shows its options.
  4. Set the options you need, then save the mailbox.

The Accounting Document Linking card on the Settings tab of a mailbox account, with the Enable toggle switched on

What you should see: the card expands and shows Defaults, Permissions and Automation.

Group Options
Defaults Default Accounting Document Type (customer invoice, customer credit note, vendor bill or vendor refund), Default Customer/Vendor, Default Journal
Permissions Allow Create Accounting Document, Allow Link Accounting Document, Allow Unlink Accounting Document
Automation Auto-link by Reply Headers (Accounting), Auto-link by Subject Token (Accounting), Log Agent Replies (Accounting), Log Customer Replies (Accounting)

Set the defaults once

Turn it on for the mailbox that receives invoices and bills, for example billing@. Leave it off on mailboxes that have nothing to do with accounting. A default journal means new documents start in the right journal.

Step 2: Open the Accounting panel on an email

  1. Open an email in MailDesk.
  2. Click the Accounting panel button (calculator icon) on the email toolbar.

The Accounting button, a calculator icon, on the toolbar of an open email

What you should see: the Accounting panel opens beside the message. If the email is not linked yet, the panel says No accounting document linked yet and shows the buttons Customer Invoice, Vendor Bill, Create with AI and Link Document.

The Accounting panel for an email that has no accounting document linked yet

Step 3: Create an invoice or a vendor bill from the email

  1. In the panel, click Customer Invoice or Vendor Bill.
  2. Odoo opens a form for that document type. MailDesk fills in the partner (the mailbox default, else the one contact that matches the sender), the journal, the email subject as reference and origin, today's date, and the email text as a note.
  3. Add the invoice lines, complete the other fields and save.

The customer invoice form opened from the panel and filled in from the email

The vendor bill form opened from the panel and filled in from the email

What you should see: after you save, the document appears in the panel as a card with its type, partner, amount, state and payment state. The first linked document carries the Primary badge.

Create with AI

Create with AI opens the MailDesk AI panel and starts a vendor bill draft. The AI reads the email text and proposes the vendor, reference, date and total. You can change the draft by writing to the AI, and nothing is created until you confirm. The bill has no invoice lines; you add them in Odoo. AI features belong to MailDesk Pro and need an AI provider. See AI permissions and data access for what is sent to the provider.

  1. In the panel, click Link Document.
  2. In Link Existing Accounting Document, choose the Accounting Document.
  3. Tick Make Primary if this document should be the main one for the email. (This option appears when the email already has linked documents.)
  4. Click Link Document.

The Link Existing Accounting Document window with the document field

What you should see: the document appears in the panel. Click a card to open the full document, or use the icons on the card to open it in a new tab or to unlink it.

Unlinking is safe

Unlinking removes only the link between the email and the document. The invoice or bill is not changed or deleted.

Step 5: Check the email in Accounting

Open the invoice or bill in Odoo. The linked email appears in its chatter with an Open in MailDesk link.

A linked email shown in the chatter of a vendor bill, with the Open in MailDesk link

What you should see: in MailDesk, the toolbar button shows a badge with the number of linked documents.

Log options

The options Log Agent Replies (Accounting) and Log Customer Replies (Accounting) are on the card, but the module does not post a separate message into the document's chatter. The linked email itself is the record. Followers of the document are not notified again.

How automatic linking works

When Auto-link by Reply Headers (Accounting) or Auto-link by Subject Token (Accounting) is on, MailDesk links a follow-up email on its own, but only when the match is exact. Both options are on by default for a new mailbox. A scheduled action does the work in the background, so the link can appear a few minutes after the email arrives.

  • Reply headers: the reply belongs to an email that is already linked.
  • Subject token: the subject contains a token such as [INV-123], [BILL-123], [CN-123] or [REFUND-123] that names one document.

MailDesk does not guess from a similar subject or the same customer.

If it does not work

Symptom Check Safe next step
There is no Accounting Document Linking card. Is the module installed? Is the Settings tab open? Install the module, then reload the mailbox form.
There is no Accounting button on emails. Is Enable on for this mailbox? Do you have Accounting access and access to this mailbox? Ask an administrator to turn it on or give you access.
Customer Invoice, Vendor Bill or Link Document is missing. The permission options on the card. Ask an administrator to switch on Allow Create Accounting Document or Allow Link Accounting Document.
Create with AI does nothing or shows an error. Is an AI provider set up, and is AI allowed for this mailbox? See AI permissions and data access. Create the bill with Vendor Bill instead.
Odoo shows an access error when you open or save a document. Your Accounting access rights. Ask your Odoo administrator for Accounting access.
A follow-up email was not linked. Are the auto-link options on? Does the token match a document? Link it by hand with Link Document.

For other problems, see Troubleshooting.

Next step

Use MailDesk with Purchase to create requests for quotation from supplier emails.