42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
|
|
# -*- coding: utf-8 -*-
|
|
# This file is part of the document-incoming-invoice-xml-module
|
|
# from m-ds for Tryton. The COPYRIGHT file at the top level of
|
|
# this repository contains the full copyright notices and license terms.
|
|
|
|
|
|
from trytond.pool import PoolMeta
|
|
from trytond.model import fields
|
|
|
|
|
|
class Configuration(metaclass=PoolMeta):
|
|
__name__ = 'document.incoming.configuration'
|
|
|
|
create_supplier = fields.Boolean(
|
|
string='Create Supplier Party',
|
|
help='Creates the vendor party if it does not exist. ' +
|
|
'Generates an import error when turned off and the party is missing.')
|
|
accept_other_company = fields.Boolean(
|
|
string='Accept other company',
|
|
help='Accepts invoices created for a company other ' +
|
|
'than the current one.')
|
|
|
|
@classmethod
|
|
def default_create_supplier(cls):
|
|
""" auto create supplier party
|
|
|
|
Returns:
|
|
boolean: True
|
|
"""
|
|
return True
|
|
|
|
@classmethod
|
|
def default_accept_other_company(cls):
|
|
""" deny import of invoices for other companies
|
|
|
|
Returns:
|
|
boolean: False
|
|
"""
|
|
return False
|
|
|
|
# end Configuration
|