first commit
This commit is contained in:
29
modules/sale_price_list/configuration.py
Normal file
29
modules/sale_price_list/configuration.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import ModelSQL, fields
|
||||
from trytond.modules.company.model import (
|
||||
CompanyMultiValueMixin, CompanyValueMixin)
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.pyson import Eval
|
||||
|
||||
|
||||
class Configuration(CompanyMultiValueMixin, metaclass=PoolMeta):
|
||||
__name__ = 'sale.configuration'
|
||||
sale_price_list = fields.MultiValue(fields.Many2One(
|
||||
'product.price_list', "Sale Price List",
|
||||
help="The default price list for new parties.",
|
||||
domain=[
|
||||
('company', '=', Eval('context', {}).get('company', -1)),
|
||||
],
|
||||
states={
|
||||
'invisible': ~Eval('context', {}).get('company'),
|
||||
}))
|
||||
|
||||
|
||||
class ConfigurationSalePriceList(ModelSQL, CompanyValueMixin):
|
||||
__name__ = 'sale.configuration.sale_price_list'
|
||||
sale_price_list = fields.Many2One(
|
||||
'product.price_list', "Sale Price List",
|
||||
domain=[
|
||||
('company', '=', Eval('company', -1)),
|
||||
])
|
||||
Reference in New Issue
Block a user