Account Cut-off Picking
account_cutoff_picking · OCA/account-closing
-
Security25/25No findings
-
Activity12/25Last human commit 18 months ago
-
Required by5/250 modules depend on it
-
Maturity18/25In 3 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
AccountCutoff— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · sourceResCompany— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
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:
- 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.
- Once this analysis is completed, Odoo has a list of purchase order lines to analyse for potential expense accrual.
- 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.
- 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:
- 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.
- Once this analysis is completed, Odoo has a list of purchase order lines to analyse for potential prepaid expense.
- 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.
- 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.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 2
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
account_cutoff_form |
accrual.picking.account_cutoff_form | account.cutoff | form | Inherits account_cutoff_base.account_cutoff_form |
res_config_settings_view_form |
accrual.picking.account.config.form | res.config.settings | form | Inherits account_cutoff_base.res_config_settings_view_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
-
picking_interval_daysIntegercompute='_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=Truereadonly=Falsestore=Truestring='Analysis Interval'tracking=True
-
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)
-
default_cutoff_picking_interval_daysIntegerdefault=30help='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'
No public methods.
-
dft_cutoff_picking_interval_daysIntegerreadonly=Falserelated='company_id.default_cutoff_picking_interval_days'
No public methods.
Loading…
Loading…
Loading…