Minor fixes
This commit is contained in:
parent
baad2dc140
commit
4b9c71422f
|
@ -15,6 +15,7 @@ from . import product
|
|||
from . import sale
|
||||
from . import service
|
||||
from . import policy
|
||||
from . import dash
|
||||
|
||||
|
||||
def register():
|
||||
|
@ -59,6 +60,8 @@ def register():
|
|||
housekeeping.HotelTask,
|
||||
housekeeping.HousekeepingServiceStart,
|
||||
room.CleanningDays,
|
||||
dash.DashApp,
|
||||
dash.AppHotelPlanner,
|
||||
# folio.TransferfolioStart,
|
||||
# folio.TransferChargeStart,
|
||||
# folio.CheckOutfolioFailed,
|
||||
|
|
|
@ -15,7 +15,7 @@ from trytond.transaction import Transaction
|
|||
from trytond.pool import Pool
|
||||
from trytond.exceptions import UserError
|
||||
from trytond.i18n import gettext
|
||||
from constants import (
|
||||
from .constants import (
|
||||
STATE_BOOKING, REGISTRATION_STATE, REASON, GUARANTEE, SATISFACTION,
|
||||
MEDIA, PLAN, INVOICE_METHOD, COMPLEMENTARY,
|
||||
)
|
||||
|
@ -550,6 +550,8 @@ class Booking(Workflow, ModelSQL, ModelView):
|
|||
})
|
||||
invoice.save()
|
||||
invoice.update_taxes([invoice])
|
||||
for payment in self.payments:
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
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]
|
||||
version=6.0.7
|
||||
version=6.0.8
|
||||
depends:
|
||||
party
|
||||
company
|
||||
|
@ -10,9 +10,9 @@ depends:
|
|||
sale_price_list
|
||||
account_voucher
|
||||
party_personal
|
||||
company_timezone
|
||||
email
|
||||
commission
|
||||
dash
|
||||
xml:
|
||||
hotel.xml
|
||||
configuration.xml
|
||||
|
|
Loading…
Reference in New Issue