I need to set the default invoice sequence number to a custom format any time there is a fresh install. This needs to be done automatically in code.
This is easy to do for something like a sale order. Here's how I can do it with a sale order:
<data noupdate="1">
<record id="sequence_sale_order_number_wwi" model="ir.sequence">
<field name="name">Sale Order Numbersfield>
<field name="code">sale.orderfield>
<field name="prefix">WO-field>
<field name="padding">4field>
<field name="number_increment">1field>
<field name="company_id">1field>
record>
data>
How do I accomplish the same thing for invoice sequence numbers (Odoo 14 or 15)?
check out this module in the store, https://apps.odoo.com/apps/modules/15.0/od_journal_sequence/
Unfortunately, that module doesn't answer the question. This invoice sequence needs to be set automatically with no manual intervention on a fresh install. So it needs to be done in code.