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

[18.0] [MIG] account_cutoff_picking: Migration to 18.0 #317

Open
wants to merge 22 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
00eb8c0
[16.0][MIG] account_cutoff_picking (ex account_cutoff_accrual_picking)
alexis-via Feb 15, 2023
ac099c0
Added translation using Weblate (French)
Jun 20, 2023
a0c3341
cutoff modules: improve strings
alexis-via Jun 20, 2023
487f2b0
Translated using Weblate (French)
Jun 20, 2023
0ea0bb2
Added translation using Weblate (Spanish)
Ivorra78 Jun 28, 2023
d47efcd
Translated using Weblate (Spanish)
Ivorra78 Jun 28, 2023
319fdc9
account_cutoff_picking: defaut interval analysis is now 30 days (was …
alexis-via Jun 30, 2023
7718d3a
[TRN] remove fr_FR.po
sbidoul Nov 21, 2023
bbb7ce5
[IMP] account_cutoff_picking: pre-commit auto fixes
thaolt99 Nov 28, 2023
7230ff4
[MIG] account_cutoff_picking: Migration to 17.0
thaolt99 Nov 28, 2023
4c8bf4f
[FIX] account_cutoff_picking: fix maintainers in manifest
alexis-via Jan 29, 2024
5071534
[IMP] account_cutoff_picking: update config page to new syntax
alexis-via Jan 29, 2024
7442486
Translated using Weblate (Italian)
mymage Feb 6, 2024
1916843
Translated using Weblate (Spanish)
Ivorra78 Feb 11, 2024
547d5b8
Translated using Weblate (Italian)
mymage Feb 12, 2024
fb65c56
Translated using Weblate (Italian)
mymage Mar 18, 2024
7fd2b15
[FIX] account_cutoff_picking: is not an app
andreampiovesana May 23, 2023
ed69202
Added translation using Weblate (Swedish)
jakobkrabbe Jun 4, 2024
2410380
Translated using Weblate (Swedish)
jakobkrabbe Jun 4, 2024
def3643
[IMP] account_cutoff_picking: pre-commit auto fixes
Borruso Jan 24, 2025
93898f0
[MIG] account_cutoff_picking: Migration to 18.0
Borruso Jan 24, 2025
aa2ba30
[DON'T MERGE] test-requirements.txt
Borruso Jan 24, 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
149 changes: 149 additions & 0 deletions account_cutoff_picking/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
=======================
Account Cut-off Picking
=======================

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

.. |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_picking
: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_picking
: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 generates expense/revenue accruals and prepaid
expense/revenue based on the status of orders, pickings and invoices.
The module is named *account_cutoff_accrual_picking* because it
initially only supported accruals ; support for prepaid expense/revenue
was added later (it should be renamed in later versions).

To understand the behavior of this module, let's take the example of an
expense accrual. When you click on the button *Re-Generate Lines* of an
*Expense Accrual*:

1. Odoo will look for all incoming picking in Done state with a
*Transfer Date* <= *Cut-off Date*. For performance reasons, by
default, the incoming picking dated before *Cut-off Date* minus 30
days will not be taken into account (this limit is configurable via
the field *Picking Analysis*). It will go to the stock moves of those
pickings and see if they are linked to a purchase order line.
2. Once this analysis is completed, Odoo has a list of purchase order
lines to analyse for potential expense accrual.
3. For each of these purchase order lines, Odoo will:

- scan the related stock moves in *done* state and check their
transfer date,
- scan the related invoices lines and check their invoice date.

4. If, for a particular purchase order line, the quantity of products
received before the cutoff-date (or on the same day) minus the
quantity of products invoiced before the cut-off date (or on the same
day) is positive, Odoo will generate a cut-off line.

Now, let's take the example of a prepaid expense. When you click on the
button *Re-Generate Lines* of a *Prepaid Expense*:

1. Odoo will look for all vendor bills dated before (or equal to)
*Cut-off Date*. For performance reasons, by default, the vendor bills
dated before *Cut-off Date* minus 30 days will not be taken into
account (this limit is configurable via the field *Picking
Analysis*). It will go to the invoice lines of those vendor bills and
see if they are linked to a purchase order line.
2. Once this analysis is completed, Odoo has a list of purchase order
lines to analyse for potential prepaid expense.
3. For each of these purchase order lines, Odoo will:

- scan the related stock moves in *done* state and check their
transfer date,
- scan the related invoices lines and check their invoice date.

4. If, for a particular purchase order line, the quantity of products
invoiced before the cutoff-date (or on the same day) minus the
quantity of products received before the cut-off date (or on the same
day) is positive, Odoo will generate a cut-off line.

This module should work well with multiple units of measure (including
products purchased and invoiced in different units of measure) and in
multi-currency.

**Table of contents**

.. contents::
:local:

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

For configuration instructions, refer to the README of the module
*account_cutoff_base*.

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_picking%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>

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_picking>`_ project on GitHub.

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

{
"name": "Account Cut-off Picking",
"version": "18.0.1.0.0",
"category": "Accounting",
"license": "AGPL-3",
"summary": "Accrued and prepaid expense/revenue from pickings",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/account-closing",
"depends": ["account_cutoff_base", "purchase_stock", "sale_stock"],
"data": ["views/res_config_settings.xml", "views/account_cutoff.xml"],
"images": [
"images/accrued_expense_draft.jpg",
"images/accrued_expense_journal_entry.jpg",
"images/accrued_expense_done.jpg",
],
"installable": True,
"application": False,
}
160 changes: 160 additions & 0 deletions account_cutoff_picking/i18n/account_cutoff_picking.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_cutoff_picking
#
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_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid ""
" • %(qty)s %(uom)s (picking %(picking)s transfered on %(date)s from "
"%(src_location)s to %(dest_location)s)"
msgstr ""

#. module: account_cutoff_picking
#: model:ir.model,name:account_cutoff_picking.model_account_cutoff
msgid "Account Cut-off"
msgstr ""

#. module: account_cutoff_picking
#: model:ir.model.fields,field_description:account_cutoff_picking.field_account_cutoff__picking_interval_days
#: model:ir.model.fields,field_description:account_cutoff_picking.field_res_company__default_cutoff_picking_interval_days
#: model:ir.model.fields,field_description:account_cutoff_picking.field_res_config_settings__dft_cutoff_picking_interval_days
msgid "Analysis Interval"
msgstr ""

#. module: account_cutoff_picking
#: model:ir.model,name:account_cutoff_picking.model_res_company
msgid "Companies"
msgstr ""

#. module: account_cutoff_picking
#: model:ir.model,name:account_cutoff_picking.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: account_cutoff_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid ""
"Missing expense account on product '%(product)s' or on its related product "
"category '%(categ)s'."
msgstr ""

#. module: account_cutoff_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid ""
"Missing income account on product '%(product)s' or on its related product "
"category '%(categ)s'."
msgstr ""

#. module: account_cutoff_picking
#: model_terms:ir.ui.view,arch_db:account_cutoff_picking.res_config_settings_view_form
msgid "Picking Analysis Interval"
msgstr ""

#. module: account_cutoff_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid "Pre-cutoff delivered quantity details:"
msgstr ""

#. module: account_cutoff_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid "Pre-cutoff delivered quantity minus invoiced quantity:"
msgstr ""

#. module: account_cutoff_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid "Pre-cutoff delivered quantity:"
msgstr ""

#. module: account_cutoff_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid "Pre-cutoff invoiced quantity details:"
msgstr ""

#. module: account_cutoff_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid "Pre-cutoff invoiced quantity minus delivered quantity:"
msgstr ""

#. module: account_cutoff_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid "Pre-cutoff invoiced quantity:"
msgstr ""

#. module: account_cutoff_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid ""
"Purchase order %(order)s confirmed on %(confirm_date)s\n"
"Purchase Order Line: %(order_line)s (ordered qty: %(qty)s %(uom)s)"
msgstr ""

#. module: account_cutoff_picking
#. odoo-python
#: code:addons/account_cutoff_picking/models/account_cutoff.py:0
#, python-format
msgid ""
"Sale order %(order)s confirmed on %(confirm_date)s\n"
"Sale Order Line: %(order_line)s (ordered qty: %(qty)s %(uom)s)"
msgstr ""

#. module: account_cutoff_picking
#: model:ir.model.constraint,message:account_cutoff_picking.constraint_account_cutoff_picking_interval_days_positive
#: model:ir.model.constraint,message:account_cutoff_picking.constraint_res_company_cutoff_picking_interval_days_positive
msgid "The value of the field 'Analysis Interval' must be strictly positive."
msgstr ""

#. module: account_cutoff_picking
#: model:ir.model.fields,help:account_cutoff_picking.field_res_company__default_cutoff_picking_interval_days
#: model:ir.model.fields,help:account_cutoff_picking.field_res_config_settings__dft_cutoff_picking_interval_days
msgid ""
"To generate the accrual/prepaid revenue/expenses based on picking dates vs "
"invoice dates, Odoo will analyse all the pickings/invoices from N days "
"before the cutoff date up to the cutoff date. N is the Analysis Interval. If"
" you increase the analysis interval, Odoo will take more time to generate "
"the cutoff lines."
msgstr ""

#. module: account_cutoff_picking
#: model:ir.model.fields,help:account_cutoff_picking.field_account_cutoff__picking_interval_days
msgid ""
"To generate the cutoffs based on picking dates vs invoice dates, Odoo will "
"analyse all the pickings/invoices from N days before the cutoff date up to "
"the cutoff date. N is the Analysis Interval. If you increase the analysis "
"interval, Odoo will take more time to generate the cutoff lines."
msgstr ""

#. module: account_cutoff_picking
#: model_terms:ir.ui.view,arch_db:account_cutoff_picking.account_cutoff_form
#: model_terms:ir.ui.view,arch_db:account_cutoff_picking.res_config_settings_view_form
msgid "days"
msgstr ""
Loading
Loading