summaryrefslogtreecommitdiff
path: root/addons/account_edi_extended/models/account_edi_document.py
blob: 0894b13e872cc098c8010bcd04ce24eae5aff5b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, _
import logging

_logger = logging.getLogger(__name__)
DEFAULT_BLOCKING_LEVEL = 'warning'  # Keep previous behavior. TODO : when account_edi_extended is merged with account_edi, should be 'error' (document will not be processed again until forced retry or reset to draft)


class AccountEdiDocument(models.Model):
    _inherit = 'account.edi.document'

    blocking_level = fields.Selection(selection=[('info', 'Info'), ('warning', 'Warning'), ('error', 'Error')],
                                     help="Blocks the document current operation depending on the error severity :\n"
                                          "  * Info: the document is not blocked and everything is working as it should.\n"
                                          "  * Warning : there is an error that doesn't prevent the current Electronic Invoicing operation to succeed.\n"
                                          "  * Error : there is an error that blocks the current Electronic Invoicing operation.")