Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] account_sequence_option: Migration to 17.0 #1921

Open
wants to merge 21 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions account_sequence_option/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
=======================
Account Sequence Option
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:28733b1121285c3f10186d8b333d79bd9e5806cc6e3215364cc042cbc095a8f8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github
:target: https://github.com/OCA/account-financial-tools/tree/17.0/account_sequence_option
:alt: OCA/account-financial-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_sequence_option
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends module base_sequence_option and allow you to provide
optional sequences for account.move documents, i.e., invoice, bill,
journal entry.

To use this module, enable developer mode, and check "Use sequence
options" under Settings -> Technical -> Manage Sequence Options.

If you want to define your sequences in XML, feel free to use
demo/account_demo_options.xml as a base for your own sequence
definitions.

The demo sequences use a continuous numbering scheme, without the
current year in the generated name. To use a scheme that does include
the year, set ``use_date_range`` to ``true``, and use ``%(range_year)s``
the represent the year. For example, to generate an invoice scheme that
will generate "2022F00001" in 2022, try:

::

<record id="seq_customer_invoice_1" model="ir.sequence">
<field name="name">Customer Invoice</field>
<field name="padding" eval="5" />
<field name="prefix">%(range_year)sF</field>
<field name="use_date_range">true</field>
</record>

Odoo will generate the date ranges automagically when the first invoice
(or vendor bill, etc) of a year is posted.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_sequence_option%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Ecosoft

Contributors
------------

- Kitti U. <[email protected]>
- `Sygel <https://www.sygel.es>`__:

- Ángel García de la Chica Herrera

- `APSL-Nagarro <https://apsl.tech>`__:

- Antoni Marroig <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-kittiu| image:: https://github.com/kittiu.png?size=40px
:target: https://github.com/kittiu
:alt: kittiu

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-kittiu|

This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/17.0/account_sequence_option>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions account_sequence_option/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from . import models
22 changes: 22 additions & 0 deletions account_sequence_option/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

{
"name": "Account Sequence Option",
"summary": "Manage sequence options for account.move, i.e., invoice, bill, entry",
"version": "17.0.1.0.0",
"author": "Ecosoft, Odoo Community Association (OCA)",
"development_status": "Alpha",
"website": "https://github.com/OCA/account-financial-tools",
"category": "Accounting",
"depends": ["account", "base_sequence_option"],
"data": [
"data/account_sequence_option.xml",
"views/account_move_views.xml",
],
"demo": ["demo/account_demo_options.xml"],
"maintainers": ["kittiu"],
"license": "LGPL-3",
"installable": True,
"auto_install": False,
}
9 changes: 9 additions & 0 deletions account_sequence_option/data/account_sequence_option.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<odoo noupdate="1">

<record id="account_sequence" model="ir.sequence.option">
<field name="name">Invoice / Bill / Refund / Payment</field>
<field name="model">account.move</field>
<field name="use_sequence_option" eval="False" />
</record>

</odoo>
95 changes: 95 additions & 0 deletions account_sequence_option/demo/account_demo_options.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<odoo>

<!-- Demo Sequences -->

<record id="seq_customer_invoice_1" model="ir.sequence">
<field name="name">Customer Invoice</field>
<field name="padding" eval="5" />
<field name="prefix">CINV/</field>
<field name="use_date_range">false</field>
</record>

<record id="seq_customer_refund_1" model="ir.sequence">
<field name="name">Customer Refund</field>
<field name="padding" eval="5" />
<field name="prefix">CREF/</field>
<field name="use_date_range">false</field>
</record>

<record id="seq_vendor_bill_1" model="ir.sequence">
<field name="name">Vendor Bill</field>
<field name="padding" eval="5" />
<field name="prefix">VBIL/</field>
<field name="use_date_range">false</field>
</record>

<record id="seq_vendor_refund_1" model="ir.sequence">
<field name="name">Vendor Refund</field>
<field name="padding" eval="5" />
<field name="prefix">VREF/</field>
<field name="use_date_range">false</field>
</record>

<record id="seq_customer_payment_1" model="ir.sequence">
<field name="name">Customer Payment</field>
<field name="padding" eval="5" />
<field name="prefix">CPAY/</field>
<field name="use_date_range">false</field>
</record>

<record id="seq_vendor_payment_1" model="ir.sequence">
<field name="name">Vendor Payment</field>
<field name="padding" eval="5" />
<field name="prefix">VPAY/</field>
<field name="use_date_range">false</field>
</record>

<!-- Demo Options-->

<record id="account_customer_invoice_1" model="ir.sequence.option.line">
<field name="base_id" ref="account_sequence_option.account_sequence" />
<field name="name">Customer Invoice</field>
<field name="filter_domain">[("move_type", "=", "out_invoice")]</field>
<field name="sequence_id" ref="seq_customer_invoice_1" />
</record>

<record id="account_customer_refund_1" model="ir.sequence.option.line">
<field name="base_id" ref="account_sequence_option.account_sequence" />
<field name="name">Customer Refund</field>
<field name="filter_domain">[("move_type", "=", "out_refund")]</field>
<field name="sequence_id" ref="seq_customer_refund_1" />
</record>

<record id="account_vendor_bill_1" model="ir.sequence.option.line">
<field name="base_id" ref="account_sequence_option.account_sequence" />
<field name="name">Vendor Bill</field>
<field name="filter_domain">[("move_type", "=", "in_invoice")]</field>
<field name="sequence_id" ref="seq_vendor_bill_1" />
</record>

<record id="account_vendor_refund_1" model="ir.sequence.option.line">
<field name="base_id" ref="account_sequence_option.account_sequence" />
<field name="name">Vendor Refund</field>
<field name="filter_domain">[("move_type", "=", "in_refund")]</field>
<field name="sequence_id" ref="seq_vendor_refund_1" />
</record>

<record id="account_customer_payment_1" model="ir.sequence.option.line">
<field name="base_id" ref="account_sequence_option.account_sequence" />
<field name="name">Customer Payment</field>
<field
name="filter_domain"
>[("move_type", "=", "entry"), ("payment_id.payment_type", "=", "inbound")]</field>
<field name="sequence_id" ref="seq_customer_payment_1" />
</record>

<record id="account_vendor_payment_1" model="ir.sequence.option.line">
<field name="base_id" ref="account_sequence_option.account_sequence" />
<field name="name">Vendor Payment</field>
<field
name="filter_domain"
>[("move_type", "=", "entry"), ("payment_id.payment_type", "=", "outbound")]</field>
<field name="sequence_id" ref="seq_vendor_payment_1" />
</record>

</odoo>
41 changes: 41 additions & 0 deletions account_sequence_option/i18n/account_sequence_option.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_sequence_option
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_sequence_option
#: model:ir.model.fields,field_description:account_sequence_option.field_ir_sequence_option__model
msgid "Apply On Model"
msgstr ""

#. module: account_sequence_option
#: model:ir.model,name:account_sequence_option.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: account_sequence_option
#: model:ir.model.fields,field_description:account_sequence_option.field_account_bank_statement_line__sequence_option
#: model:ir.model.fields,field_description:account_sequence_option.field_account_move__sequence_option
#: model:ir.model.fields,field_description:account_sequence_option.field_account_payment__sequence_option
msgid "Sequence Option"
msgstr ""

#. module: account_sequence_option
#: model:ir.model,name:account_sequence_option.model_ir_sequence_option
msgid "Sequence Option Base Model"
msgstr ""

#. module: account_sequence_option
#: model:ir.model.fields.selection,name:account_sequence_option.selection__ir_sequence_option__model__account_move
msgid "account.move"
msgstr ""
53 changes: 53 additions & 0 deletions account_sequence_option/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_sequence_option
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-09 03:11+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: account_sequence_option
#: model:ir.model.fields,field_description:account_sequence_option.field_ir_sequence_option__model
msgid "Apply On Model"
msgstr "Applica sul modello"

#. module: account_sequence_option
#: model:ir.model,name:account_sequence_option.model_account_move
msgid "Journal Entry"
msgstr "Registrazione contabile"

#. module: account_sequence_option
#: model:ir.model.fields,field_description:account_sequence_option.field_account_bank_statement_line__sequence_option
#: model:ir.model.fields,field_description:account_sequence_option.field_account_move__sequence_option
#: model:ir.model.fields,field_description:account_sequence_option.field_account_payment__sequence_option
msgid "Sequence Option"
msgstr "Opzione sequenza"

#. module: account_sequence_option
#: model:ir.model,name:account_sequence_option.model_ir_sequence_option
msgid "Sequence Option Base Model"
msgstr "Sequenza modello base opzione"

#. module: account_sequence_option
#: model:ir.model.fields.selection,name:account_sequence_option.selection__ir_sequence_option__model__account_move
msgid "account.move"
msgstr "Registrazione contabile (account.move)"

#~ msgid "Display Name"
#~ msgstr "Nome visualizzato"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Ultima modifica il"
5 changes: 5 additions & 0 deletions account_sequence_option/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from . import account_move
from . import sequence_option
Loading
Loading