Skip to content

[18.0][MIG] account_move_accrual_entry: Migration to 18.0#697

Open
deeniiz wants to merge 8 commits into18.0from
18.0-mig-account_move_accrual_entry
Open

[18.0][MIG] account_move_accrual_entry: Migration to 18.0#697
deeniiz wants to merge 8 commits into18.0from
18.0-mig-account_move_accrual_entry

Conversation

@deeniiz
Copy link
Copy Markdown
Collaborator

@deeniiz deeniiz commented Sep 17, 2025

No description provided.

Copilot AI review requested due to automatic review settings September 17, 2025 11:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the account_move_accrual_entry module from an earlier version to Odoo 18.0. The module creates journal entries at accrual dates and adds smart buttons to invoices for accessing them.

Key changes:

  • Complete module migration to 18.0 with updated manifest version
  • Implementation of accrual date functionality for invoices with automatic journal entry creation
  • Configuration settings for accrual parameters in invoice settings

Reviewed Changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
__manifest__.py Updated version to 18.0.1.0.0 and module metadata
models/account_move.py Core accrual logic with date validation and journal entry creation
models/account_move_line.py Line-level accrual account handling and onchange methods
models/res_company.py Company-level accrual configuration fields
models/res_config_settings.py Settings interface for accrual parameters
views/account_move_views.xml Invoice form view extensions for accrual functionality
views/res_config_settings_views.xml Configuration settings view for accrual parameters
Various documentation files README, translations, and description files

if rec.move_type in ("out_invoice", "out_refund") and rec.accrual_date:
asset_lines = rec.invoice_line_ids.filtered(
lambda x: x.accrual_account_id.account_type
== self.company_accrual_account_asset_type_id
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

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

The comparison uses self.company_accrual_account_asset_type_id which is an account record, but it's being compared to account_type which is a string field. This should be self.company_accrual_account_asset_type_id.account_type.

Suggested change
== self.company_accrual_account_asset_type_id
== self.company_accrual_account_asset_type_id.account_type

Copilot uses AI. Check for mistakes.
@deeniiz deeniiz force-pushed the 18.0-mig-account_move_accrual_entry branch from 7fc9249 to a78b8a4 Compare March 12, 2026 10:12
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 42.24138% with 67 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (18.0@4b294fd). Learn more about missing BASE report.

Files with missing lines Patch % Lines
account_move_accrual_entry/models/account_move.py 29.41% 60 Missing ⚠️
...unt_move_accrual_entry/models/account_move_line.py 50.00% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             18.0     #697   +/-   ##
=======================================
  Coverage        ?   42.24%           
=======================================
  Files           ?        6           
  Lines           ?      116           
  Branches        ?       25           
=======================================
  Hits            ?       49           
  Misses          ?       67           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants