This commit is contained in:
sinergia 2022-10-28 16:24:20 -05:00
commit b31e9f39f7
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of # This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms. # this repository contains the full copyright notices and license terms.
import datetime
from collections import defaultdict from collections import defaultdict
from trytond.pool import Pool from trytond.pool import Pool
from trytond.model import ( from trytond.model import (

View File

@ -44,6 +44,10 @@ class Sale(metaclass=PoolMeta):
'invisible': (Eval('sale_type') != 'maintenance'), 'invisible': (Eval('sale_type') != 'maintenance'),
'readonly': True}) 'readonly': True})
@classmethod
def __setup__(cls):
super(Sale, cls).__setup__()
cls.contact.states['required']=True
@fields.depends('lines', 'sale_type', 'agended') @fields.depends('lines', 'sale_type', 'agended')
def on_chage_sale_type(self): def on_chage_sale_type(self):