add configuration
This commit is contained in:
parent
313c811ac3
commit
8a48fb7236
5 changed files with 70 additions and 0 deletions
42
configuration.py
Normal file
42
configuration.py
Normal file
|
@ -0,0 +1,42 @@
|
|||
|
||||
# -*- 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
|
Loading…
Add table
Add a link
Reference in a new issue