Skip to main content

Sequence custom data

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runbot

This is a technical module. The goal is to allow others module to define new variables/codes to use during the sequence generation.

So this module is not useful alone. You have to create your own module to add some values into your sequences.

Table of contents

Usage

To use this module, you need to:

  • depend on this module

  • Inherit the ir.sequence to fill your custom values

Example:

class IrSequence(models.Model):
    _inherit = "ir.sequence"

    def _get_special_values(self, date=None, date_range=None):
        values = super()._get_special_values(date=date, date_range=date_range)
        company_code = self.env.company.special_code
        values.update({"company_code": company_code or ""})
        return values`

You can also update the documentation (on the bottom of ir.sequence form view) to describe variables that your add and the purpose of them.

Example:

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record model="ir.ui.view" id="ir_sequence_form_view">
        <field name="name">ir.sequence.form (in custom_module)</field>
        <field name="model">ir.sequence</field>
        <field name="inherit_id" ref="base.sequence_view"/>
        <field name="priority" eval="90"/>
        <field name="arch" type="xml">
            <xpath expr="//page[1]" position="inside">
                <group col="3" name="custom_legend">
                    <group string="Company" name="custom_legend_company">
                        <span colspan="2">Specific company code: {company_code}</span>
                    </group>
                </group>
            </xpath>
        </field>
    </record>
</odoo>

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • ACSONE SA/NV

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/server-tools project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Metadata

Release files for odoo13-addon-sequence-custom-data 13.0.1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo13-addon-sequence-custom-data 13.0.1.0.1
File Interpreter ABI Platform Actions
odoo13_addon_sequence_custom_data-13.0.1.0.1-py3-none-any.whl Python 3 none any Details for odoo13_addon_sequence_custom_data-13.0.1.0.1-py3-none-any.whl

Release files / odoo13_addon_sequence_custom_data-13.0.1.0.1-py3-none-any.whl

Download URL odoo13_addon_sequence_custom_data-13.0.1.0.1-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a647ac6697ba031884351b2d453977672661beabb9be437cdacce9541ab1966f
BLAKE2b-256 checksum
How to use checksums
ca1b8c87f35a3bc57103eb1efbcb877cd9f8c6677860a2e036d5c6026f569acd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.5

Security for odoo13-addon-sequence-custom-data 13.0.1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page