mirror of
https://bitbucket.org/presik/trytonpsk-hotel.git
synced 2023-12-14 07:52:52 +01:00
Fix
This commit is contained in:
parent
6ff34a0f30
commit
376b392edd
8
folio.py
8
folio.py
|
@ -148,7 +148,9 @@ class Folio(ModelSQL, ModelView):
|
|||
],
|
||||
cls._buttons.update({
|
||||
'check_in': {
|
||||
'invisible': Eval('registration_state') != 'pending',
|
||||
'invisible': Eval('registration_state').in_(
|
||||
['check_in', 'check_out']
|
||||
),
|
||||
},
|
||||
'check_out': {
|
||||
'invisible': Eval('registration_state') != 'check_in',
|
||||
|
@ -222,6 +224,10 @@ class Folio(ModelSQL, ModelView):
|
|||
def default_to_invoice():
|
||||
return True
|
||||
|
||||
@staticmethod
|
||||
def default_registration_state():
|
||||
return 'pending'
|
||||
|
||||
def get_invoice_state(self, name=None):
|
||||
if self.invoice_line:
|
||||
return self.invoice_line.invoice.state
|
||||
|
|
Loading…
Reference in a new issue