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

[16.0][ADD] account_analytic_document_date: New module account_analyt… #694

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

BernatObrador
Copy link
Contributor

@BernatObrador BernatObrador commented Sep 30, 2024

This module adds an other date to the account.move for analytics proposits

Usage:

  1. Set Document Date on Invoice:

    • Navigate to the invoice and set the document date.
    • If the document date is not set, it will automatically be assigned the invoice date upon confirmation.
  2. Analytic Line Generation:

    • If any line has analytic information, the generated analytic entry will inherit the document date.
  3. Setting Document Date in Reconcile View:

    • You can also set the document date from the reconciliation view, but this option is available only during manual reconciliation.

cc https://github.com/APSL 160768
@miquelalzanillas @lbarry-apsl @javierobcn @peluko00 @ppyczko please review

@BernatObrador BernatObrador force-pushed the 16.0-add-account_analytic_document_date branch 2 times, most recently from 2e75749 to 6066e28 Compare September 30, 2024 06:16
Copy link
Contributor

@peluko00 peluko00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, code review and tested in runboat

@BernatObrador BernatObrador force-pushed the 16.0-add-account_analytic_document_date branch from 6066e28 to a8f05bb Compare September 30, 2024 12:09
Copy link

@ppyczko ppyczko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested in runboat

@BernatObrador BernatObrador force-pushed the 16.0-add-account_analytic_document_date branch 5 times, most recently from 73bc5d2 to edd9720 Compare October 3, 2024 12:50
@BernatObrador
Copy link
Contributor Author

@pedrobaeza Could you review please?

@pedrobaeza pedrobaeza added this to the 16.0 milestone Nov 6, 2024
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the goal of having another date. I would understand that you want a different date for the analytic line, but not having dual dates.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be ca.po

@BernatObrador BernatObrador force-pushed the 16.0-add-account_analytic_document_date branch 2 times, most recently from e66c942 to d2bc8be Compare December 10, 2024 10:40
@BernatObrador BernatObrador force-pushed the 16.0-add-account_analytic_document_date branch from d2bc8be to f7a8703 Compare December 20, 2024 11:41
@BernatObrador
Copy link
Contributor Author

@pedrobaeza
The module introduces a new field in the accounting records to specify the "Accrual Date" for income and expenses. This field is crucial for accurately tracking when the revenue or expense is earned or incurred, regardless of the invoice creation date.

For instance, if an invoice is created in December but refers to sales made in November, the Accrual Date allows us to reflect this correctly in our accounting records. This ensures compliance with accrual-based accounting principles and provides better insights into the financial period to which transactions belong.

This feature is particularly valuable for businesses that need to differentiate between the accounting period of transaction occurrence and the timing of document issuance.

account_analytic_document_date/__manifest__.py Outdated Show resolved Hide resolved
account_analytic_document_date/__manifest__.py Outdated Show resolved Hide resolved
account_analytic_document_date/static/description/icon.svg Outdated Show resolved Hide resolved
class AccountMove(models.Model):
_inherit = "account.move"

document_date = fields.Date()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's a date only for analytic, it shouldn't be called document_date, but analytic_document_date or analytic_date.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, it is used for analytic purposes, but it is also visible in the account module, so it serves both purposes. For this reason, I believe the name 'document_date' remains appropriate.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it creates confusion on users thinking that date is going to be used for example for financial reports. It should be renamed to analytic_document_date IMO.

@BernatObrador BernatObrador force-pushed the 16.0-add-account_analytic_document_date branch from f7a8703 to d16a0c3 Compare December 23, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants