Files
Odoo-18.0-20251222/purchase_unreconciled/models/company.py
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

28 lines
973 B
Python
Executable File

# Copyright 2019-21 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
purchase_reconcile_account_id = fields.Many2one(
"account.account",
domain=lambda self: [("deprecated", "=", False)],
string="Write-Off Account On Purchases",
ondelete="restrict",
copy=False,
help="Write-off account to reconcile Unreconciled Purchase Orders",
)
purchase_reconcile_journal_id = fields.Many2one(
"account.journal", string="WriteOff Journal for Purchases"
)
purchase_lock_auto_reconcile = fields.Boolean()
purchase_reconcile_tolerance = fields.Float(
string="Purchase Reconcile Tolerance (%)",
default=0.0,
help="Percentage of tolerance of residual amount vs total amount of the "
"Purchase Order. Leave zero to accept all discrepancies",
)