Account Cut-off Picking

account_cutoff_picking
REPOSITORY
REPOSITORYOCA/account-closing
GIT
GIThttps://github.com/OCA/account-closing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-closing/tree/18.0/account_cutoff_picking
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSAlexis de Lattre, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/account-closing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:17
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-closing:
    - account_cutoff_base
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - purchase_stock
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - purchase
    - sale_stock
    - sale
    - sales_team
    - account_payment
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
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.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
account_cutoff_form accrual.picking.account_cutoff_form account.cutoff field Inherits account_cutoff_base.account_cutoff_form
res_config_settings_view_form accrual.picking.account.config.form res.config.settings setting Inherits account_cutoff_base.res_config_settings_view_form
Models touched (3)

New fields (1)
  • picking_interval_days Integer
    compute='_compute_picking_interval_days' help='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.' precompute=True readonly=False store=True string='Analysis Interval' tracking=True
Public methods (8)
  • get_lines(self)
  • invoice_line_update_oline_dict(self, inv_line, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict(self, order_line, order_type, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict_from_invoice_lines(self, order_line, order_type, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict_from_stock_moves(self, order_line, order_type, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict_price_fallback(self, order_line, order_type, oline_dict)
  • picking_prepare_cutoff_line(self, vdict, account_mapping)
  • stock_move_update_oline_dict(self, move_line, oline_dict, cutoff_datetime)

New fields (1)
  • default_cutoff_picking_interval_days Integer
    default=30 help='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.' string='Analysis Interval'
Public methods (0)

No public methods.

New fields (1)
  • dft_cutoff_picking_interval_days Integer
    readonly=False related='company_id.default_cutoff_picking_interval_days'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-closing
GIT
GIThttps://github.com/OCA/account-closing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-closing/tree/17.0/account_cutoff_picking
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSAlexis de Lattre, AaronHForgeFlow, Weblate, OCA-git-bot, oca-ci, thaolt
WEBSITE
WEBSITEhttps://github.com/OCA/account-closing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:09
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-closing:
    - account_cutoff_base
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - purchase_stock
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - purchase
    - sale_stock
    - sale
    - sales_team
    - account_payment
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
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.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
account_cutoff_form accrual.picking.account_cutoff_form account.cutoff field Inherits account_cutoff_base.account_cutoff_form
res_config_settings_view_form accrual.picking.account.config.form res.config.settings setting Inherits account_cutoff_base.res_config_settings_view_form
Models touched (3)

New fields (1)
  • picking_interval_days Integer
    default=<expr> help='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.' string='Analysis Interval' tracking=True
Public methods (8)
  • get_lines(self)
  • invoice_line_update_oline_dict(self, inv_line, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict(self, order_line, order_type, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict_from_invoice_lines(self, order_line, order_type, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict_from_stock_moves(self, order_line, order_type, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict_price_fallback(self, order_line, order_type, oline_dict)
  • picking_prepare_cutoff_line(self, vdict, account_mapping)
  • stock_move_update_oline_dict(self, move_line, oline_dict, cutoff_datetime)

New fields (1)
  • default_cutoff_picking_interval_days Integer
    default=30 help='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.' string='Analysis Interval'
Public methods (0)

No public methods.

New fields (1)
  • dft_cutoff_picking_interval_days Integer
    readonly=False related='company_id.default_cutoff_picking_interval_days'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-closing
GIT
GIThttps://github.com/OCA/account-closing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-closing/tree/16.0/account_cutoff_picking
VERSION
VERSION 1.3.1
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSStéphane Bidoul, Alexis de Lattre, AaronHForgeFlow, Florian da Costa, Weblate, OCA-git-bot, oca-ci, Maksym Yankin
WEBSITE
WEBSITEhttps://github.com/OCA/account-closing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:56
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-closing:
    - account_cutoff_base
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - purchase_stock
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - purchase
    - sale_stock
    - sale
    - sales_team
    - account_payment
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES openupgradelib
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
account_cutoff_form accrual.picking.account_cutoff_form account.cutoff field Inherits account_cutoff_base.account_cutoff_form
res_config_settings_view_form accrual.picking.account.config.form res.config.settings div Inherits account_cutoff_base.res_config_settings_view_form
Models touched (3)

New fields (1)
  • picking_interval_days Integer
    default=<expr> help='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.' states={'done': [('readonly', True)]} string='Analysis Interval' tracking=True
Public methods (8)
  • get_lines(self)
  • invoice_line_update_oline_dict(self, inv_line, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict(self, order_line, order_type, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict_from_invoice_lines(self, order_line, order_type, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict_from_stock_moves(self, order_line, order_type, oline_dict, cutoff_datetime)
  • order_line_update_oline_dict_price_fallback(self, order_line, order_type, oline_dict)
  • picking_prepare_cutoff_line(self, vdict, account_mapping)
  • stock_move_update_oline_dict(self, move_line, oline_dict, cutoff_datetime)

New fields (1)
  • default_cutoff_picking_interval_days Integer
    default=30 help='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.' string='Analysis Interval'
Public methods (0)

No public methods.

New fields (1)
  • dft_cutoff_picking_interval_days Integer
    readonly=False related='company_id.default_cutoff_picking_interval_days'
Public methods (0)

No public methods.