Minor fixes
This commit is contained in:
parent
baad2dc140
commit
4b9c71422f
|
@ -15,6 +15,7 @@ from . import product
|
||||||
from . import sale
|
from . import sale
|
||||||
from . import service
|
from . import service
|
||||||
from . import policy
|
from . import policy
|
||||||
|
from . import dash
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
@ -59,6 +60,8 @@ def register():
|
||||||
housekeeping.HotelTask,
|
housekeeping.HotelTask,
|
||||||
housekeeping.HousekeepingServiceStart,
|
housekeeping.HousekeepingServiceStart,
|
||||||
room.CleanningDays,
|
room.CleanningDays,
|
||||||
|
dash.DashApp,
|
||||||
|
dash.AppHotelPlanner,
|
||||||
# folio.TransferfolioStart,
|
# folio.TransferfolioStart,
|
||||||
# folio.TransferChargeStart,
|
# folio.TransferChargeStart,
|
||||||
# folio.CheckOutfolioFailed,
|
# folio.CheckOutfolioFailed,
|
||||||
|
|
|
@ -15,7 +15,7 @@ from trytond.transaction import Transaction
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
from trytond.exceptions import UserError
|
from trytond.exceptions import UserError
|
||||||
from trytond.i18n import gettext
|
from trytond.i18n import gettext
|
||||||
from constants import (
|
from .constants import (
|
||||||
STATE_BOOKING, REGISTRATION_STATE, REASON, GUARANTEE, SATISFACTION,
|
STATE_BOOKING, REGISTRATION_STATE, REASON, GUARANTEE, SATISFACTION,
|
||||||
MEDIA, PLAN, INVOICE_METHOD, COMPLEMENTARY,
|
MEDIA, PLAN, INVOICE_METHOD, COMPLEMENTARY,
|
||||||
)
|
)
|
||||||
|
@ -550,6 +550,8 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
})
|
})
|
||||||
invoice.save()
|
invoice.save()
|
||||||
invoice.update_taxes([invoice])
|
invoice.update_taxes([invoice])
|
||||||
|
for payment in self.payments:
|
||||||
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _get_new_invoice(cls, data):
|
def _get_new_invoice(cls, data):
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
# 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.pool import PoolMeta
|
||||||
|
from trytond.model import fields, ModelView, ModelSQL
|
||||||
|
|
||||||
|
|
||||||
|
class DashApp(metaclass=PoolMeta):
|
||||||
|
__name__ = 'dash.app'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _get_origin(cls):
|
||||||
|
origins = super(DashApp, cls)._get_origin()
|
||||||
|
origins.extend(['dash.app.hotel_planner'])
|
||||||
|
return origins
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_selection(cls):
|
||||||
|
options = super(DashApp, cls).get_selection()
|
||||||
|
options.extend([
|
||||||
|
('planner', 'Planner'),
|
||||||
|
])
|
||||||
|
return options
|
||||||
|
|
||||||
|
|
||||||
|
class AppHotelPlanner(ModelSQL, ModelView):
|
||||||
|
'App Hotel Planner'
|
||||||
|
__name__ = 'dash.app.hotel_planner'
|
||||||
|
company = fields.Many2One('company.company', 'Company', required=True)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __setup__(cls):
|
||||||
|
super(AppHotelPlanner, cls).__setup__()
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def default_company():
|
||||||
|
return Transaction().context.get('company') or None
|
|
@ -1,5 +1,5 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=6.0.7
|
version=6.0.8
|
||||||
depends:
|
depends:
|
||||||
party
|
party
|
||||||
company
|
company
|
||||||
|
@ -10,9 +10,9 @@ depends:
|
||||||
sale_price_list
|
sale_price_list
|
||||||
account_voucher
|
account_voucher
|
||||||
party_personal
|
party_personal
|
||||||
company_timezone
|
|
||||||
email
|
email
|
||||||
commission
|
commission
|
||||||
|
dash
|
||||||
xml:
|
xml:
|
||||||
hotel.xml
|
hotel.xml
|
||||||
configuration.xml
|
configuration.xml
|
||||||
|
|
Loading…
Reference in New Issue