Skip to main content

Create requalification accounting entry from 43600000 to 69400000

Project description

Bad Debt Requalification

Overview

This module allows accountants to create a requalification accounting entry that moves doubtful client balances from account 43600000 (Clients de cobrament dubtós) to account 69400000 (Pèrdues per deteriorament de crèdits).

It is designed for Odoo 16 and follows standard OCA/Spanish accounting practices for bad debt provisions.

Features

  • Wizard launched from the Account Move list view.
  • Automatic generation of a balancing journal entry:
    • Debit/Credit to 43600000 to cancel the original doubtful line.
    • Debit/Credit to 69400000 to record the loss.
  • Automatic reconciliation between the original account move line and the newly created compensating line.
  • Validation warnings for:
    • Missing moves selection.
    • Moves from different companies.
    • Missing accounts 43600000 or 69400000.
    • Already reconciled lines.
  • User-friendly notification showing moves created, lines reconciled, and total amounts in €.

Configuration

No additional configuration is required. The module depends on account and searches for accounts with codes 43600000 and 69400000 in the active company.

Usage

  1. Go to Invoicing / Accounting / Journal Entries.
  2. Select one or more posted moves that contain lines in account 43600000.
  3. From the action menu, choose "Bad debt requalification entry to 694".
  4. In the wizard, select a Journal (General type) and the Date.
  5. Click "Create move".
  6. The new move will be posted and, where possible, the 436 lines will be reconciled.

Architecture / Controllers

  • Model: requalify.bad.debt.wizard (TransientModel)
  • Main Method: action_requalify()
    • Creates an account.move of type entry.
    • Builds line dictionary (line_vals) dynamically based on the sign of each 436 line balance.
    • Posts the move.
    • Reconciles matching original vs. new lines by partner, name, and amounts.
    • Returns a display_notification action.
  • Views:
    • views/requalify_bad_debt_wizard_views.xml - Wizard form.
    • views/account_move_views.xml - Server action bound to account.move.

Security

  • Access to the wizard is restricted to the group account.group_account_invoice.
  • Defined in security/ir.model.access.csv.

Testing

  • Full coverage suite in tests/test_requalify_bad_debt.py.
  • Test cases include:
    • Happy path with positive and negative balances.
    • Multiple moves aggregated into a single entry.
    • Warning validation (different companies, missing accounts, already reconciled lines).
    • Empty line selection.

License

AGPL-3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

File details

Details for the file odoo_addon_account_move_requalify_bad_debt-16.0.1.0.1.tar.gz.

File metadata

File hashes

Hashes for odoo_addon_account_move_requalify_bad_debt-16.0.1.0.1.tar.gz
Algorithm Hash digest
SHA256 116b3721de0b438520a22d876125b09aeb5c6bd8bf13ce678ee727a7f5e319ca
MD5 4be9670a9e32ef652b6be1ad5062f544
BLAKE2b-256 5ece3abbcd0daac59decd62d9fea95dc77ef52132d72640fa882e07943554500

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page