2016-10-21 18:39:40 +02:00
|
|
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
|
|
|
|
# this repository contains the full copyright notices and license terms.
|
2017-04-01 00:37:51 +02:00
|
|
|
from trytond.model import ModelSQL, fields
|
|
|
|
|
from trytond.modules.company.model import (
|
|
|
|
|
CompanyMultiValueMixin, CompanyValueMixin)
|
2021-12-11 17:58:44 +01:00
|
|
|
from trytond.pool import PoolMeta
|
|
|
|
|
from trytond.pyson import Eval
|
2016-10-21 18:39:40 +02:00
|
|
|
|
|
|
|
|
|
2018-06-26 19:11:53 +02:00
|
|
|
class Configuration(CompanyMultiValueMixin, metaclass=PoolMeta):
|
2016-10-21 18:39:40 +02:00
|
|
|
__name__ = 'sale.configuration'
|
2017-04-01 00:37:51 +02:00
|
|
|
sale_price_list = fields.MultiValue(fields.Many2One(
|
|
|
|
|
'product.price_list', "Sale Price List",
|
2017-09-20 09:57:02 +02:00
|
|
|
help="The default price list for new parties.",
|
2017-04-01 00:37:51 +02:00
|
|
|
domain=[
|
|
|
|
|
('company', '=', Eval('context', {}).get('company', -1)),
|
|
|
|
|
],
|
|
|
|
|
states={
|
|
|
|
|
'invisible': ~Eval('context', {}).get('company'),
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigurationSalePriceList(ModelSQL, CompanyValueMixin):
|
|
|
|
|
"Sale Configuration Sale PriceList"
|
|
|
|
|
__name__ = 'sale.configuration.sale_price_list'
|
|
|
|
|
sale_price_list = fields.Many2One(
|
|
|
|
|
'product.price_list', "Sale Price List",
|
2016-10-21 18:39:40 +02:00
|
|
|
domain=[
|
2017-04-01 00:37:51 +02:00
|
|
|
('company', '=', Eval('company', -1)),
|
2022-04-08 19:07:14 +02:00
|
|
|
])
|