8000 [18.0][MIG] account_cutoff_start_end_dates: migrate to v18 by alexis-via · Pull Request #330 · OCA/account-closing · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[18.0][MIG] account_cutoff_start_end_dates: migrate to v18 #330

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

Merged
merged 30 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cb3a780
[MIG] account_cutoff_start_end_dates to v14
alexis-via Feb 12, 2021
3b6f070
[MIG] account_cutoff_start_end_dates: added pre_init_hook to handle m…
fredzamoabg May 25, 2021
8748713
[UPD] README.rst
OCA-git-bot Oct 20, 2021
7851805
Translated using Weblate (Italian)
primes2h Dec 30, 2021
71f2984
Translated using Weblate (Italian)
primes2h Dec 31, 2021
c83b127
[MIG] account_cutoff_start_end_dates from 14 to 15
alexis-via Jan 28, 2022
8fc5e40
[UPD] README.rst
OCA-git-bot Apr 13, 2022
e0055ad
[MIG] account_cutoff_start_end_dates: Migration to 16.0
dzungtran89 Dec 7, 2022
ab72e59
account_cutoff_start_end_dates: small code improvements
alexis-via Feb 15, 2023
8da9bcf
account_cutoff_start_end_dates: forecast is now a specific state
alexis-via Feb 15, 2023
61de289
[UPD] README.rst
OCA-git-bot Feb 16, 2023
c71443a
Update translation files
weblate Feb 16, 2023
5569153
cutoff modules: improve strings
alexis-via Jun 20, 2023
4a90dbf
Translated using Weblate (French)
Jun 20, 2023
0da50f3
account_cutoff_start_end_dates 16.0.1.1.0
OCA-git-bot Jun 20, 2023
362ad11
Translated using Weblate (Spanish)
Ivorra78 Jun 28, 2023
504d8da
[UPD] README.rst
OCA-git-bot Sep 3, 2023
68e5295
[TRN] remove fr_FR.po
sbidoul Nov 21, 2023
52a9485
[IMP] account_cutoff_start_end_dates: pre-commit auto fixes
thaolt99 Nov 28, 2023
d8836ad
[MIG] account_cutoff_start_end_dates: Migration to 17.0
thaolt99 Nov 28, 2023
ba231be
[UPD] Update account_cutoff_start_end_dates.pot
Dec 9, 2023
2f8b736
[BOT] post-merge updates
OCA-git-bot Dec 9, 2023
57b3c2c
[FIX] account_cutoff_start_end_dates: fix view migration to v17
alexis-via Jan 29, 2024
b2753cc
Translated using Weblate (Italian)
mymage Feb 4, 2024
9c2458d
[BOT] post-merge updates
OCA-git-bot Feb 9, 2024
f2c2a23
Translated using Weblate (Italian)
mymage Mar 18, 2024
3129fcf
Translated using Weblate (Italian)
mymage Oct 21, 2024
97b7462
[MIG] account_cutoff_start_end_dates: mig to v18
alexis-via Feb 27, 2025
ae3ba1e
[IMP] account_cutoff_start_end_dates: code improvement
alexis-via Feb 27, 2025
a0f3292
[IMP] account_cutoff_start_end_dates: improve tests
alexis-via Feb 27, 2025
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
146 changes: 146 additions & 0 deletions account_cutoff_start_end_dates/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
===============================
Account Cut-off Start End Dates
===============================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--closing-lightgray.png?logo=github
:target: https://github.com/OCA/account-closing/tree/18.0/account_cutoff_start_end_dates
:alt: OCA/account-closing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-closing-18-0/account-closing-18-0-account_cutoff_start_end_dates
: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-closing&target_branch=18.0
:alt: Try me on Runboat

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

This module allows you to easily compute the prepaid revenue/expenses
and also the revenue/expense accruals by using the **Start Date** and
**End Date** fields of invoice lines/journal items.

For example, if you have an insurance contrat invoiced in April 2020
that run from April 1st 2020 to March 31st 2021, you will enter these
dates as start and end dates on the supplier invoice line. If your
fiscal year ends on December 31st 2020, 3 months of expenses are part of
the 2021 fiscal year and should not be part of the 2020 fiscal year. So,
thanks to this module, you will create a *Prepaid Expense* on December
31st 2020 and Odoo will identify this expense with the 3 months that are
after the cut-off date and propose to generate the appropriate cut-off
journal entry.

Another example: you have a UPS invoice dated January 5th 2021 that
covers the shipments of December 2020. When you encode this vendor bill,
set the start date as December 1st 2020 and the end date as December
31st 2020. Then, thanks to this module, you will create an *Expense
Accrual* dated December 31st 2020 that will generate a cut-off journal
entry that will "move" the UPS expense from 2021 to 2020.

**Table of contents**

.. contents::
:local:

Configuration
=============

Please refer to the **CONFIGURATION** section of the README of the
module *account_cutoff_base*.

Usage
=====

To compute the prepaid revenue, go to the menu *Accounting > Cut-offs >
Prepaid Revenue* and click on the *Create* button. Enter the cut-off
date, check that the source journals contains all your sale journals and
click on the button *Re-Generate lines*: Odoo will scan all the journal
entries of the source journals and will get all the lines that have an
end date after the cut-off date and, for each line, it will compute the
prepaid revenue. If you agree with the result, click on the button
*Create Journal Entry*: Odoo will generate an account move at the
cut-off date to cut these prepaid revenue. Hint: you can then use the
reversal feature to generate the reverse journal entry on the next day.

If you need to answer a question such as *How much revenue did I already
invoice for my next fiscal year ?*, you will be interested by the
*forecast* feature. For that, on the Prepaid Revenue form, click on the
*Forecast* option and you will see 2 new fields: *Start Date* and *End
Date*. Enter the start date and the end date of your next fiscal year
and click on the button *Re-Generate lines*: you will see all the
revenue that you already have in your source journals for that period.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-closing/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-closing/issues/new?body=module:%20account_cutoff_start_end_dates%0Aversion:%2018.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
-------

* Akretion

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

- Alexis de Lattre <alexis.delattre@akretion.com>

- Stéphane Bidoul <stephane.bidoul@acsone.eu>

- Jim Hoefnagels <jim.hoefnagels@dynapps.be>

- `Trobz <https://trobz.com>`__:

- Dzung Tran <dungtd@trobz.com>
- Thao Le thaolt@trobz.com

Other credits
-------------

The migration of this module from 16.0 to 17.0 was financially supported
by Camptocamp

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-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via

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

|maintainer-alexis-via|

This module is part of the `OCA/account-closing <https://github.com/OCA/account-closing/tree/18.0/account_cutoff_start_end_dates>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions account_cutoff_start_end_dates/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
26 changes: 26 additions & 0 deletions account_cutoff_start_end_dates/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2016-2022 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2018-2022 CampToCamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Account Cut-off Start End Dates",
"version": "18.0.1.0.0",
"category": "Accounting & Finance",
"license": "AGPL-3",
"summary": "Cutoffs based on start/end dates",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/account-closing",
"depends": ["account_cutoff_base", "account_invoice_start_end_dates"],
"data": [
"views/account_cutoff.xml",
"views/account_cutoff_line.xml",
],
"images": [
"images/prepaid_revenue_draft.jpg",
"images/prepaid_revenue_journal_entry.jpg",
"images/prepaid_revenue_done.jpg",
],
"installable": True,
}
123 changes: 123 additions & 0 deletions account_cutoff_start_end_dates/i18n/account_cutoff_start_end_dates.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_cutoff_start_end_dates
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.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_cutoff_start_end_dates
#: model:ir.model,name:account_cutoff_start_end_dates.model_account_cutoff
msgid "Account Cut-off"
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model,name:account_cutoff_start_end_dates.model_account_cutoff_line
msgid "Account Cut-off Line"
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model.fields,field_description:account_cutoff_start_end_dates.field_account_cutoff_line__cutoff_days
msgid "Cutoff Days"
msgstr ""

#. module: account_cutoff_start_end_dates
#: model_terms:ir.ui.view,arch_db:account_cutoff_start_end_dates.account_cutoff_form
msgid "Enable Forecast Mode"
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model.fields,field_description:account_cutoff_start_end_dates.field_account_cutoff__end_date
#: model:ir.model.fields,field_description:account_cutoff_start_end_dates.field_account_cutoff_line__end_date
msgid "End Date"
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model.fields.selection,name:account_cutoff_start_end_dates.selection__account_cutoff__state__forecast
#: model_terms:ir.ui.view,arch_db:account_cutoff_start_end_dates.account_cutoff_filter
msgid "Forecast"
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model.fields,help:account_cutoff_start_end_dates.field_account_cutoff_line__cutoff_days
msgid ""
"In regular mode, this is the number of days after the cut-off date. In "
"forecast mode, this is the number of days between the start date and the end"
" date."
msgstr ""

#. module: account_cutoff_start_end_dates
#: model_terms:ir.ui.view,arch_db:account_cutoff_start_end_dates.account_cutoff_form
msgid "Leave Forecast Mode"
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model.fields,field_description:account_cutoff_start_end_dates.field_account_cutoff__source_journal_ids
msgid "Source Journals"
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model.fields,field_description:account_cutoff_start_end_dates.field_account_cutoff__start_date
#: model:ir.model.fields,field_description:account_cutoff_start_end_dates.field_account_cutoff_line__start_date
msgid "Start Date"
msgstr ""

#. module: account_cutoff_start_end_dates
#. odoo-python
#: code:addons/account_cutoff_start_end_dates/models/account_cutoff.py:0
#, python-format
msgid "Start date and end date are required for forecast mode."
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model.fields,field_description:account_cutoff_start_end_dates.field_account_cutoff__state
msgid "State"
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model.fields,help:account_cutoff_start_end_dates.field_account_cutoff__state
msgid ""
"State of the cutoff. When the Journal Entry is created, the state is set to "
"'Done' and the fields become read-only."
msgstr ""

#. module: account_cutoff_start_end_dates
#. odoo-python
#: code:addons/account_cutoff_start_end_dates/models/account_cutoff.py:0
#, python-format
msgid "The start date is after the end date!"
msgstr ""

#. module: account_cutoff_start_end_dates
#. odoo-python
#: code:addons/account_cutoff_start_end_dates/models/account_cutoff.py:0
#, python-format
msgid ""
"This cutoff is linked to a journal entry. You must delete it before entering"
" forecast mode."
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model.fields,help:account_cutoff_start_end_dates.field_account_cutoff__end_date
#: model:ir.model.fields,help:account_cutoff_start_end_dates.field_account_cutoff__start_date
msgid "This field is only for the forecast mode"
msgstr ""

#. module: account_cutoff_start_end_dates
#: model:ir.model.fields,field_description:account_cutoff_start_end_dates.field_account_cutoff_line__total_days
msgid "Total Days"
msgstr ""

#. module: account_cutoff_start_end_dates
#. odoo-python
#: code:addons/account_cutoff_start_end_dates/models/account_cutoff.py:0
#, python-format
msgid "You should set at least one Source Journal."
msgstr ""
Loading
Loading
0