Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,46 @@
# Account Cut-off Accrual Purchase
Odoo addon: account_cutoff_accrual_purchase
## Installation
```bash
pip install odoo-bringout-oca-account-closing-account_cutoff_accrual_purchase
```
## Dependencies
This addon depends on:
- account_cutoff_accrual_order_base
- purchase
- purchase_force_invoiced
## Manifest Information
- **Name**: Account Cut-off Accrual Purchase
- **Version**: 16.0.1.0.0
- **Category**: Accounting & Finance
- **License**: AGPL-3
- **Installable**: True
## Source
Based on [OCA/account-closing](https://github.com/OCA/account-closing) branch 16.0, addon `account_cutoff_accrual_purchase`.
## License
This package maintains the original AGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md

View file

@ -0,0 +1,153 @@
================================
Account Cut-off Accrual Purchase
================================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a0536b91a6e1c6035a5c0a21557f7bf3d7c392b59c460a6ab9ed1e40d9f6180c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/16.0/account_cutoff_accrual_purchase
: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-16-0/account-closing-16-0-account_cutoff_accrual_purchase
: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=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module extends the functionality of account_cutoff_accrual_order_base
to allow the computation of expense cutoffs on purchase orders.
The accrual is computed by comparing on the order, the quantity
delivered/received and the quantity invoiced. In case, some deliveries or
invoices have occurred after the cutoff date, those quantities can be affected
and are recomputed. This allows to quickly generate a cutoff snapshot by
processing few lines.
For PO, you can make the difference between:
* invoice to receive (received qty > invoiced qty)
* goods to receive (prepayment) (received qty < invoiced qty)
If you expect a refund, you can make it in draft. In standard, this update
the PO and the quantity will not be accrued as goods to receive. You can accrue
the draft credit note as "credit notes to receive".
Orders forced in status invoiced won't have cutoff entries.
For instance, if you know you will never receive the missing invoiced goods,
you can force it as invoiced.
Once the cutoff lines have been generated but the accounting entries are not yet
created, you are still able to create or modify invoices before the accounting
butoff date. The cutoff lines will be adapted automatically to reflect the new
situation.
Once the cutoff accounting entries are generated you cannot create or modify
invoices before the accounting cutoff date.
Nevertheless, you can still reset to draft a supplier invoice but you won't be
able to modify any amount. You are then supposed to re-validate the invoice.
**Table of contents**
.. contents::
:local:
Configuration
=============
To configure this module, you need to:
#. Go to the accounting settings to select the journals and accounts used for
the cutoff.
#. Analytic accounting needs to be enable in Accounting - Settings.
#. If you want to also accrue the taxes, you need in Accounting - Taxes, for
each type of taxes an accrued tax account.
Usage
=====
To use this module, you need to:
#. Go to Accounting - Cut-offs to configure and generate the cutoffs
Examples
========
* Purchase Order with quantity received: 0, quantity invoiced: 0
This will not make an cutoff entry
* Purchase Order with quantity received: 10, quantity invoiced: 0
This will make an cutoff entry with invoice to receive: 10
* Purchase Order with quantity received: 0, quantity invoiced: 10
This will make an cutoff entry with goods to receive: 10
* Purchase Order with quantity received: 10, quantity invoiced: 0
This will make an cutoff entry with invoice to receive: 10
Invoice is encoded after the cut-off date but dated before the cut-off date
The cutoff entry is updated in the existing cut-off
* Purchase Order with quantity received: 0, quantity invoiced: 0
This will not make an cutoff entry
Invoice is encoded after the cut-off date but dated before the cut-off date
An cutoff entry is added in the existing cut-off
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_accrual_purchase%0Aversion:%2016.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
~~~~~~~
* BCIM
Contributors
~~~~~~~~~~~~
* Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
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-jbaudoux| image:: https://github.com/jbaudoux.png?size=40px
:target: https://github.com/jbaudoux
:alt: jbaudoux
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-jbaudoux|
This module is part of the `OCA/account-closing <https://github.com/OCA/account-closing/tree/16.0/account_cutoff_accrual_purchase>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View file

@ -0,0 +1,5 @@
# Copyright 2018 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models
from .hooks import post_init_hook

View file

@ -0,0 +1,26 @@
# Copyright 2018 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Account Cut-off Accrual Purchase",
"version": "16.0.1.0.0",
"category": "Accounting & Finance",
"license": "AGPL-3",
"summary": "Accrued Expense on Purchase Order",
"author": "BCIM, Odoo Community Association (OCA)",
"maintainers": ["jbaudoux"],
"website": "https://github.com/OCA/account-closing",
"depends": [
"account_cutoff_accrual_order_base",
"purchase",
"purchase_force_invoiced",
],
"data": [
"views/account_cutoff.xml",
"views/account_cutoff_line.xml",
"data/ir_cron.xml",
],
"post_init_hook": "post_init_hook",
"installable": True,
"application": True,
}

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo noupdate="1">
<record forcecreate="True" id="ir_cron_cutoff" model="ir.cron">
<field name="name">Make cutoff at end of period - purchase order lines</field>
<field eval="True" name="active" />
<field name="model_id" ref="account_cutoff_base.model_account_cutoff" />
<field name="state">code</field>
<field
name="code"
>model._cron_cutoff("accrued_expense", "purchase.order.line")</field>
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">months</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall" />
<field name="nextcall" eval="(DateTime.now()).strftime('%Y-%m-01 00:00:00')" />
</record>
</odoo>

View file

@ -0,0 +1,13 @@
# Copyright 2023 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
def post_init_hook(cr, registry):
cr.execute(
"""
UPDATE purchase_order_line
SET is_cutoff_accrual_excluded = TRUE
WHERE order_id IN
( SELECT id FROM purchase_order WHERE force_invoiced )
"""
)

View file

@ -0,0 +1,90 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_cutoff_accrual_purchase
#
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_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_cutoff
msgid "Account Cut-off"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_cutoff_line
msgid "Account Cut-off Line"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_purchase_order_line__account_cutoff_line_ids
msgid "Account Cutoff Lines"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.actions.act_window,name:account_cutoff_accrual_purchase.account_accrual_action
#: model:ir.ui.menu,name:account_cutoff_accrual_purchase.account_accrual_menu
msgid "Accrued Expense on Purchase Orders"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model_terms:ir.actions.act_window,help:account_cutoff_accrual_purchase.account_accrual_action
msgid "Click to start preparing a new expense accrual."
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_purchase_order_line__is_cutoff_accrual_excluded
msgid "Do not generate cut-off entries"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_move
msgid "Journal Entry"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.actions.server,name:account_cutoff_accrual_purchase.ir_cron_cutoff_ir_actions_server
#: model:ir.cron,cron_name:account_cutoff_accrual_purchase.ir_cron_cutoff
msgid "Make cutoff at end of period - purchase order lines"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff__order_line_model
msgid "Order Line Model"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff_line__purchase_order_id
msgid "Order Reference"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_purchase_order
msgid "Purchase Order"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_purchase_order_line
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff_line__purchase_line_id
msgid "Purchase Order Line"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields.selection,name:account_cutoff_accrual_purchase.selection__account_cutoff__order_line_model__purchase_order_line
msgid "Purchase Orders"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model_terms:ir.actions.act_window,help:account_cutoff_accrual_purchase.account_accrual_action
msgid ""
"This view can be used by accountants in order to collect information about "
"accrued expenses. It then allows to generate the corresponding cut-off "
"journal entry in one click."
msgstr ""

View file

@ -0,0 +1,90 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_cutoff_accrual_purchase
#
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_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_cutoff
msgid "Account Cut-off"
msgstr "Računovodstveno presjecanje"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_cutoff_line
msgid "Account Cut-off Line"
msgstr "Linija računovodstvenog presjecanja"
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_purchase_order_line__account_cutoff_line_ids
msgid "Account Cutoff Lines"
msgstr "Linije računovodstvenog presjecanja"
#. module: account_cutoff_accrual_purchase
#: model:ir.actions.act_window,name:account_cutoff_accrual_purchase.account_accrual_action
#: model:ir.ui.menu,name:account_cutoff_accrual_purchase.account_accrual_menu
msgid "Accrued Expense on Purchase Orders"
msgstr "Akruelni trošak na narudžbama nabavke"
#. module: account_cutoff_accrual_purchase
#: model_terms:ir.actions.act_window,help:account_cutoff_accrual_purchase.account_accrual_action
msgid "Click to start preparing a new expense accrual."
msgstr "Kliknite da počnete pripremu novog akruala troška."
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_purchase_order_line__is_cutoff_accrual_excluded
msgid "Do not generate cut-off entries"
msgstr "Ne generiši zapise presjecanja"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_move
msgid "Journal Entry"
msgstr "Žurnal"
#. module: account_cutoff_accrual_purchase
#: model:ir.actions.server,name:account_cutoff_accrual_purchase.ir_cron_cutoff_ir_actions_server
#: model:ir.cron,cron_name:account_cutoff_accrual_purchase.ir_cron_cutoff
msgid "Make cutoff at end of period - purchase order lines"
msgstr "Napravi presjecanje na kraju perioda - linije narudžbi nabavke"
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff__order_line_model
msgid "Order Line Model"
msgstr "Model linije narudžbe"
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff_line__purchase_order_id
msgid "Order Reference"
msgstr "Referenca narudžbe"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_purchase_order
msgid "Purchase Order"
msgstr "Nalog za nabavu"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_purchase_order_line
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff_line__purchase_line_id
msgid "Purchase Order Line"
msgstr "Stavka naloga za nabavu"
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields.selection,name:account_cutoff_accrual_purchase.selection__account_cutoff__order_line_model__purchase_order_line
msgid "Purchase Orders"
msgstr "Nalozi u nabavi"
#. module: account_cutoff_accrual_purchase
#: model_terms:ir.actions.act_window,help:account_cutoff_accrual_purchase.account_accrual_action
msgid ""
"This view can be used by accountants in order to collect information about "
"accrued expenses. It then allows to generate the corresponding cut-off "
"journal entry in one click."
msgstr ""

View file

@ -0,0 +1,94 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_cutoff_accrual_purchase
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-26 11:44+0000\n"
"PO-Revision-Date: 2023-10-26 11:44+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_cutoff
msgid "Account Cut-off"
msgstr "Provision"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_cutoff_line
msgid "Account Cut-off Line"
msgstr "Ligne de provision"
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_purchase_order_line__account_cutoff_line_ids
msgid "Account Cutoff Lines"
msgstr "Lignes de provision"
#. module: account_cutoff_accrual_purchase
#: model:ir.actions.act_window,name:account_cutoff_accrual_purchase.account_accrual_action
#: model:ir.ui.menu,name:account_cutoff_accrual_purchase.account_accrual_menu
msgid "Accrued Expense on Purchase Orders"
msgstr "Provisions sur Achats"
#. module: account_cutoff_accrual_purchase
#: model_terms:ir.actions.act_window,help:account_cutoff_accrual_purchase.account_accrual_action
msgid "Click to start preparing a new expense accrual."
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_purchase_order_line__is_cutoff_accrual_excluded
msgid "Do not generate cut-off entries"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_move
msgid "Journal Entry"
msgstr "Pièce comptable"
#. module: account_cutoff_accrual_purchase
#: model:ir.actions.server,name:account_cutoff_accrual_purchase.ir_cron_cutoff_ir_actions_server
#: model:ir.cron,cron_name:account_cutoff_accrual_purchase.ir_cron_cutoff
msgid "Make cutoff at end of period - purchase order lines"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff__order_line_model
msgid "Order Line Model"
msgstr ""
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff_line__purchase_order_id
msgid "Order Reference"
msgstr "Commande"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_purchase_order
#, fuzzy
msgid "Purchase Order"
msgstr "Achats"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_purchase_order_line
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff_line__purchase_line_id
msgid "Purchase Order Line"
msgstr "Ligne de commande d'achat"
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields.selection,name:account_cutoff_accrual_purchase.selection__account_cutoff__order_line_model__purchase_order_line
msgid "Purchase Orders"
msgstr "Achats"
#. module: account_cutoff_accrual_purchase
#: model_terms:ir.actions.act_window,help:account_cutoff_accrual_purchase.account_accrual_action
msgid ""
"This view can be used by accountants in order to collect information about "
"accrued expenses. It then allows to generate the corresponding cut-off "
"journal entry in one click."
msgstr ""

View file

@ -0,0 +1,96 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_cutoff_accrual_purchase
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-10-21 12:06+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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 5.6.2\n"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_cutoff
msgid "Account Cut-off"
msgstr "Scritture di fine periodo"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_cutoff_line
msgid "Account Cut-off Line"
msgstr "Riga scritture fine periodo"
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_purchase_order_line__account_cutoff_line_ids
msgid "Account Cutoff Lines"
msgstr "Righe scritture fine periodo"
#. module: account_cutoff_accrual_purchase
#: model:ir.actions.act_window,name:account_cutoff_accrual_purchase.account_accrual_action
#: model:ir.ui.menu,name:account_cutoff_accrual_purchase.account_accrual_menu
msgid "Accrued Expense on Purchase Orders"
msgstr "Rateo passivo degli ordini di acquisto"
#. module: account_cutoff_accrual_purchase
#: model_terms:ir.actions.act_window,help:account_cutoff_accrual_purchase.account_accrual_action
msgid "Click to start preparing a new expense accrual."
msgstr "Fare clic per iniziare a preparare un nuovo rateo passivo."
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_purchase_order_line__is_cutoff_accrual_excluded
msgid "Do not generate cut-off entries"
msgstr "Non generare registrazioni di fine periodo"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_account_move
msgid "Journal Entry"
msgstr "Registrazione contabile"
#. module: account_cutoff_accrual_purchase
#: model:ir.actions.server,name:account_cutoff_accrual_purchase.ir_cron_cutoff_ir_actions_server
#: model:ir.cron,cron_name:account_cutoff_accrual_purchase.ir_cron_cutoff
msgid "Make cutoff at end of period - purchase order lines"
msgstr "Crea registrazioni alla fine del periodo - righe ordine di acquisto"
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff__order_line_model
msgid "Order Line Model"
msgstr "Modello riga ordine"
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff_line__purchase_order_id
msgid "Order Reference"
msgstr "Riferimento ordine"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_purchase_order
msgid "Purchase Order"
msgstr "Ordine di acquisto"
#. module: account_cutoff_accrual_purchase
#: model:ir.model,name:account_cutoff_accrual_purchase.model_purchase_order_line
#: model:ir.model.fields,field_description:account_cutoff_accrual_purchase.field_account_cutoff_line__purchase_line_id
msgid "Purchase Order Line"
msgstr "Riga ordine di acquisto"
#. module: account_cutoff_accrual_purchase
#: model:ir.model.fields.selection,name:account_cutoff_accrual_purchase.selection__account_cutoff__order_line_model__purchase_order_line
msgid "Purchase Orders"
msgstr "Ordini di acquisto"
#. module: account_cutoff_accrual_purchase
#: model_terms:ir.actions.act_window,help:account_cutoff_accrual_purchase.account_accrual_action
msgid ""
"This view can be used by accountants in order to collect information about "
"accrued expenses. It then allows to generate the corresponding cut-off "
"journal entry in one click."
msgstr ""
"Questa vista può essere usata dai contabili per raccogliere informazioni sui "
"ratei passivi. Permette di generare la relativa registrazione di "
"ripartizione con un clic."

View file

@ -0,0 +1,8 @@
# Copyright 2018 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import account_cutoff
from . import account_cutoff_line
from . import purchase_order
from . import purchase_order_line
from . import account_move

View file

@ -0,0 +1,12 @@
# Copyright 2018 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import fields, models
class AccountCutoff(models.Model):
_inherit = "account.cutoff"
order_line_model = fields.Selection(
selection_add=[("purchase.order.line", "Purchase Orders")]
)

View file

@ -0,0 +1,26 @@
# Copyright 2018 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import api, fields, models
class AccountCutoffLine(models.Model):
_inherit = "account.cutoff.line"
purchase_line_id = fields.Many2one(
comodel_name="purchase.order.line", string="Purchase Order Line", readonly=True
)
purchase_order_id = fields.Many2one(related="purchase_line_id.order_id")
def _get_order_line(self):
if self.purchase_line_id:
return self.purchase_line_id
return super()._get_order_line()
@api.depends("purchase_line_id")
def _compute_invoice_lines(self):
for rec in self:
if rec.purchase_line_id:
rec.invoice_line_ids = rec.purchase_line_id.invoice_lines
super()._compute_invoice_lines()
return

View file

@ -0,0 +1,15 @@
# Copyright 2018 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountMove(models.Model):
_inherit = "account.move"
def _get_cutoff_accrual_order_lines(self):
"""Return a list of order lines to process"""
res = super()._get_cutoff_accrual_order_lines()
if self.move_type in ("in_invoice", "in_refund"):
res.append(self.invoice_line_ids.purchase_line_id)
return res

View file

@ -0,0 +1,14 @@
# Copyright 2023 Jacques-Etienne Baudoux (BCIM sprl) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
def write(self, vals):
res = super().write(vals)
if "force_invoiced" in vals:
self.order_line.is_cutoff_accrual_excluded = vals["force_invoiced"]
return res

View file

@ -0,0 +1,102 @@
# Copyright 2018 Jacques-Etienne Baudoux (BCIM sprl) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class PurchaseOrderLine(models.Model):
_name = "purchase.order.line"
_inherit = ["purchase.order.line", "order.line.cutoff.accrual.mixin"]
account_cutoff_line_ids = fields.One2many(
"account.cutoff.line",
"purchase_line_id",
string="Account Cutoff Lines",
readonly=True,
)
is_cutoff_accrual_excluded = fields.Boolean(
compute="_compute_is_cutoff_accrual_excluded",
store=True,
)
@api.depends("order_id.force_invoiced")
def _compute_is_cutoff_accrual_excluded(self):
for rec in self:
rec.is_cutoff_accrual_excluded = rec.order_id.force_invoiced
def _get_cutoff_accrual_lines_domain(self, cutoff):
domain = super()._get_cutoff_accrual_lines_domain(cutoff)
domain.append(("order_id.state", "in", ("purchase", "done")))
domain.append(("order_id.invoice_status", "!=", "invoiced"))
return domain
@api.model
def _get_cutoff_accrual_lines_query(self, cutoff):
query = super()._get_cutoff_accrual_lines_query(cutoff)
self.flush_model(["display_type", "qty_received", "qty_invoiced"])
query.add_where(
f'"{self._table}".display_type IS NULL AND '
f'"{self._table}".qty_received != "{self._table}".qty_invoiced'
)
return query
def _prepare_cutoff_accrual_line(self, cutoff):
res = super()._prepare_cutoff_accrual_line(cutoff)
if not res:
return
res["purchase_line_id"] = self.id
return res
def _get_cutoff_accrual_lines_invoiced_after(self, cutoff):
cutoff_nextday = cutoff._nextday_start_dt()
# Take all invoices impacting the cutoff
# FIXME: what about ("move_id.payment_state", "=", "invoicing_legacy")
domain = [
("purchase_line_id.is_cutoff_accrual_excluded", "!=", True),
("move_id.move_type", "in", ("in_invoice", "in_refund")),
("purchase_line_id", "!=", False),
"|",
("move_id.state", "=", "draft"),
"&",
("move_id.state", "=", "posted"),
("move_id.date", ">=", cutoff_nextday),
]
invoice_line_after = self.env["account.move.line"].search(domain, order="id")
_logger.debug(
"Purchase Invoice Lines done after cutoff: %s" % len(invoice_line_after)
)
if not invoice_line_after:
return self.env["purchase.order.line"]
# In SQL to reduce memory usage as we could process large dataset
self.env.cr.execute(
"""
SELECT order_id
FROM purchase_order_line
WHERE id in (
SELECT purchase_line_id
FROM account_move_line
WHERE id in %s
)
""",
(tuple(invoice_line_after.ids),),
)
purchase_ids = [x[0] for x in self.env.cr.fetchall()]
lines = self.env["purchase.order.line"].search(
[("order_id", "in", purchase_ids)], order="id"
)
return lines
def _get_cutoff_accrual_delivered_service_quantity(self, cutoff):
# By default, no cutoff on purchase. Set received as invoiced.
self.ensure_one()
return self._get_cutoff_accrual_invoiced_quantity(cutoff)
def _get_cutoff_accrual_delivered_stock_quantity(self, cutoff):
# By default, no cutoff on purchase. Set received as invoiced.
self.ensure_one()
return self._get_cutoff_accrual_invoiced_quantity(cutoff)

View file

@ -0,0 +1,7 @@
To configure this module, you need to:
#. Go to the accounting settings to select the journals and accounts used for
the cutoff.
#. Analytic accounting needs to be enable in Accounting - Settings.
#. If you want to also accrue the taxes, you need in Accounting - Taxes, for
each type of taxes an accrued tax account.

View file

@ -0,0 +1 @@
* Jacques-Etienne Baudoux (BCIM) <je@bcim.be>

View file

@ -0,0 +1,30 @@
This module extends the functionality of account_cutoff_accrual_order_base
to allow the computation of expense cutoffs on purchase orders.
The accrual is computed by comparing on the order, the quantity
delivered/received and the quantity invoiced. In case, some deliveries or
invoices have occurred after the cutoff date, those quantities can be affected
and are recomputed. This allows to quickly generate a cutoff snapshot by
processing few lines.
For PO, you can make the difference between:
* invoice to receive (received qty > invoiced qty)
* goods to receive (prepayment) (received qty < invoiced qty)
If you expect a refund, you can make it in draft. In standard, this update
the PO and the quantity will not be accrued as goods to receive. You can accrue
the draft credit note as "credit notes to receive".
Orders forced in status invoiced won't have cutoff entries.
For instance, if you know you will never receive the missing invoiced goods,
you can force it as invoiced.
Once the cutoff lines have been generated but the accounting entries are not yet
created, you are still able to create or modify invoices before the accounting
butoff date. The cutoff lines will be adapted automatically to reflect the new
situation.
Once the cutoff accounting entries are generated you cannot create or modify
invoices before the accounting cutoff date.
Nevertheless, you can still reset to draft a supplier invoice but you won't be
able to modify any amount. You are then supposed to re-validate the invoice.

View file

@ -0,0 +1,25 @@
To use this module, you need to:
#. Go to Accounting - Cut-offs to configure and generate the cutoffs
Examples
========
* Purchase Order with quantity received: 0, quantity invoiced: 0
This will not make an cutoff entry
* Purchase Order with quantity received: 10, quantity invoiced: 0
This will make an cutoff entry with invoice to receive: 10
* Purchase Order with quantity received: 0, quantity invoiced: 10
This will make an cutoff entry with goods to receive: 10
* Purchase Order with quantity received: 10, quantity invoiced: 0
This will make an cutoff entry with invoice to receive: 10
Invoice is encoded after the cut-off date but dated before the cut-off date
The cutoff entry is updated in the existing cut-off
* Purchase Order with quantity received: 0, quantity invoiced: 0
This will not make an cutoff entry
Invoice is encoded after the cut-off date but dated before the cut-off date
An cutoff entry is added in the existing cut-off

View file

@ -0,0 +1,486 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Account Cut-off Accrual Purchase</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="account-cut-off-accrual-purchase">
<h1 class="title">Account Cut-off Accrual Purchase</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a0536b91a6e1c6035a5c0a21557f7bf3d7c392b59c460a6ab9ed1e40d9f6180c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-closing/tree/16.0/account_cutoff_accrual_purchase"><img alt="OCA/account-closing" src="https://img.shields.io/badge/github-OCA%2Faccount--closing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_cutoff_accrual_purchase"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-closing&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module extends the functionality of account_cutoff_accrual_order_base
to allow the computation of expense cutoffs on purchase orders.</p>
<p>The accrual is computed by comparing on the order, the quantity
delivered/received and the quantity invoiced. In case, some deliveries or
invoices have occurred after the cutoff date, those quantities can be affected
and are recomputed. This allows to quickly generate a cutoff snapshot by
processing few lines.</p>
<p>For PO, you can make the difference between:
* invoice to receive (received qty &gt; invoiced qty)
* goods to receive (prepayment) (received qty &lt; invoiced qty)</p>
<p>If you expect a refund, you can make it in draft. In standard, this update
the PO and the quantity will not be accrued as goods to receive. You can accrue
the draft credit note as “credit notes to receive”.</p>
<p>Orders forced in status invoiced wont have cutoff entries.
For instance, if you know you will never receive the missing invoiced goods,
you can force it as invoiced.</p>
<p>Once the cutoff lines have been generated but the accounting entries are not yet
created, you are still able to create or modify invoices before the accounting
butoff date. The cutoff lines will be adapted automatically to reflect the new
situation.</p>
<p>Once the cutoff accounting entries are generated you cannot create or modify
invoices before the accounting cutoff date.
Nevertheless, you can still reset to draft a supplier invoice but you wont be
able to modify any amount. You are then supposed to re-validate the invoice.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#examples" id="toc-entry-3">Examples</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<p>To configure this module, you need to:</p>
<ol class="arabic simple">
<li>Go to the accounting settings to select the journals and accounts used for
the cutoff.</li>
<li>Analytic accounting needs to be enable in Accounting - Settings.</li>
<li>If you want to also accrue the taxes, you need in Accounting - Taxes, for
each type of taxes an accrued tax account.</li>
</ol>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p>To use this module, you need to:</p>
<ol class="arabic simple">
<li>Go to Accounting - Cut-offs to configure and generate the cutoffs</li>
</ol>
</div>
<div class="section" id="examples">
<h1><a class="toc-backref" href="#toc-entry-3">Examples</a></h1>
<ul class="simple">
<li>Purchase Order with quantity received: 0, quantity invoiced: 0
This will not make an cutoff entry</li>
<li>Purchase Order with quantity received: 10, quantity invoiced: 0
This will make an cutoff entry with invoice to receive: 10</li>
<li>Purchase Order with quantity received: 0, quantity invoiced: 10
This will make an cutoff entry with goods to receive: 10</li>
<li>Purchase Order with quantity received: 10, quantity invoiced: 0
This will make an cutoff entry with invoice to receive: 10
Invoice is encoded after the cut-off date but dated before the cut-off date
The cutoff entry is updated in the existing cut-off</li>
<li>Purchase Order with quantity received: 0, quantity invoiced: 0
This will not make an cutoff entry
Invoice is encoded after the cut-off date but dated before the cut-off date
An cutoff entry is added in the existing cut-off</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-closing/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/account-closing/issues/new?body=module:%20account_cutoff_accrual_purchase%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
<ul class="simple">
<li>BCIM</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<ul class="simple">
<li>Jacques-Etienne Baudoux (BCIM) &lt;<a class="reference external" href="mailto:je&#64;bcim.be">je&#64;bcim.be</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/jbaudoux"><img alt="jbaudoux" src="https://github.com/jbaudoux.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-closing/tree/16.0/account_cutoff_accrual_purchase">OCA/account-closing</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2018 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="account_accrual_action" model="ir.actions.act_window">
<field name="name">Accrued Expense on Purchase Orders</field>
<field name="res_model">account.cutoff</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('order_line_model', '=', 'purchase.order.line')]</field>
<field
name="context"
>{'default_order_line_model': 'purchase.order.line', 'default_cutoff_type': 'accrued_expense'}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to start preparing a new expense accrual.
</p><p>
This view can be used by accountants in order to collect information about accrued expenses. It then allows to generate the corresponding cut-off journal entry in one click.
</p>
</field>
</record>
<menuitem
id="account_accrual_menu"
parent="account_cutoff_base.cutoff_menu"
action="account_accrual_action"
sequence="5"
/>
</odoo>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2018 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="account_cutoff_line_form" model="ir.ui.view">
<field name="model">account.cutoff.line</field>
<field name="inherit_id" ref="account_cutoff_base.account_cutoff_line_form" />
<field name="arch" type="xml">
<field name="parent_id" position="after">
<field name="purchase_line_id" invisible="1" />
<field
name="purchase_order_id"
attrs="{'invisible': [('purchase_line_id', '=', False)]}"
/>
</field>
</field>
</record>
</odoo>

View file

@ -0,0 +1,32 @@
# Architecture
```mermaid
flowchart TD
U[Users] -->|HTTP| V[Views and QWeb Templates]
V --> C[Controllers]
V --> W[Wizards Transient Models]
C --> M[Models and ORM]
W --> M
M --> R[Reports]
DX[Data XML] --> M
S[Security ACLs and Groups] -. enforces .-> M
subgraph Account_cutoff_accrual_purchase Module - account_cutoff_accrual_purchase
direction LR
M:::layer
W:::layer
C:::layer
V:::layer
R:::layer
S:::layer
DX:::layer
end
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
```
Notes
- Views include tree/form/kanban templates and report templates.
- Controllers provide website/portal routes when present.
- Wizards are UI flows implemented with `models.TransientModel`.
- Data XML loads data/demo records; Security defines groups and access.

View file

@ -0,0 +1,3 @@
# Configuration
Refer to Odoo settings for account_cutoff_accrual_purchase. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,3 @@
# Controllers
This module does not define custom HTTP controllers.

View file

@ -0,0 +1,7 @@
# Dependencies
This addon depends on:
- [account_cutoff_accrual_order_base](../../odoo-bringout-oca-account-closing-account_cutoff_accrual_order_base)
- [purchase](../../odoo-bringout-oca-ocb-purchase)
- [purchase_force_invoiced](../../odoo-bringout-oca-purchase-workflow-purchase_force_invoiced)

View file

@ -0,0 +1,4 @@
# FAQ
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
- Q: How to enable? A: Start server with --addon account_cutoff_accrual_purchase or install in UI.

View file

@ -0,0 +1,7 @@
# Install
```bash
pip install odoo-bringout-oca-account-closing-account_cutoff_accrual_purchase"
# or
uv pip install odoo-bringout-oca-account-closing-account_cutoff_accrual_purchase"
```

View file

@ -0,0 +1,16 @@
# Models
Detected core models and extensions in account_cutoff_accrual_purchase.
```mermaid
classDiagram
class purchase_order_line
class account_cutoff
class account_cutoff_line
class account_move
class purchase_order
```
Notes
- Classes show model technical names; fields omitted for brevity.
- Items listed under _inherit are extensions of existing models.

View file

@ -0,0 +1,6 @@
# Overview
Packaged Odoo addon: account_cutoff_accrual_purchase. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon account_cutoff_accrual_purchase
- License: LGPL-3

View file

@ -0,0 +1,3 @@
# Reports
This module does not define custom reports.

View file

@ -0,0 +1,8 @@
# Security
This module does not define custom security rules or access controls beyond Odoo defaults.
Default Odoo security applies:
- Base user access through standard groups
- Model access inherited from dependencies
- No custom row-level security rules

View file

@ -0,0 +1,5 @@
# Troubleshooting
- Ensure Python and Odoo environment matches repo guidance.
- Check database connectivity and logs if startup fails.
- Validate that dependent addons listed in DEPENDENCIES.md are installed.

View file

@ -0,0 +1,7 @@
# Usage
Start Odoo including this addon (from repo root):
```bash
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon account_cutoff_accrual_purchase
```

View file

@ -0,0 +1,3 @@
# Wizards
This module does not include UI wizards.

View file

@ -0,0 +1,44 @@
[project]
name = "odoo-bringout-oca-account-closing-account_cutoff_accrual_purchase"
version = "16.0.0"
description = "Account Cut-off Accrual Purchase - Accrued Expense on Purchase Order"
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-account-closing-account_cutoff_accrual_order_base>=16.0.0",
"odoo-bringout-oca-ocb-purchase>=16.0.0",
"odoo-bringout-oca-account-closing-purchase_force_invoiced>=16.0.0",
"requests>=2.25.1"
]
readme = "README.md"
requires-python = ">= 3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]
[project.urls]
homepage = "https://github.com/bringout/0"
repository = "https://github.com/bringout/0"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["account_cutoff_accrual_purchase"]
[tool.rye]
managed = true
dev-dependencies = [
"pytest>=8.4.1",
]