This commit is contained in:
oscar alvarez 2022-03-22 14:25:49 -05:00
parent 8f34a4e5c2
commit 122afbce65
3 changed files with 5 additions and 8 deletions

View File

@ -154,7 +154,6 @@ class Booking(Workflow, ModelSQL, ModelView):
@classmethod
def __setup__(cls):
super(Booking, cls).__setup__()
# ALTER TABLE hotel_booking RENAME COLUMN party_seller TO channel
cls._order.insert(0, ('create_date', 'DESC'))
cls._transitions |= set((
('offer', 'confirmed'),
@ -815,7 +814,7 @@ class Booking(Workflow, ModelSQL, ModelView):
def get_untaxed_amount(self, name):
res = _ZERO
for line in self.lines:
res += line.total_balance
res += line.total_amount
return res
# def get_occupancies(self, name):

View File

@ -55,12 +55,6 @@ class SaleChannel(ModelSQL, ModelView):
('after_sale', 'After-Sale'),
], 'Collection Mode', required=False, help="Commission collection mode")
@classmethod
def __setup__(cls):
# alter table hotel_channel drop column commission;
# alter table hotel_channel drop column payment_method;
super(SaleChannel, cls).__setup__()
@staticmethod
def default_company():
return Transaction().context.get('company')

4
patch.sql Normal file
View File

@ -0,0 +1,4 @@
ALTER TABLE hotel_channel DROP COLUMN commission;
ALTER TABLE hotel_channel DROP COLUMN payment_method;
ALTER TABLE hotel_booking RENAME COLUMN party_seller TO channel;