Fix reports
This commit is contained in:
parent
ccb3a3d492
commit
d4c17f89e0
|
@ -5,8 +5,6 @@ from trytond.pyson import Eval, If
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
|
|
||||||
__all__ = ['SaleChannel', 'ChannelTax']
|
|
||||||
|
|
||||||
|
|
||||||
class SaleChannel(ModelSQL, ModelView):
|
class SaleChannel(ModelSQL, ModelView):
|
||||||
'Sale Channel'
|
'Sale Channel'
|
||||||
|
|
3
city.py
3
city.py
|
@ -2,9 +2,6 @@
|
||||||
# this repository contains the full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
from trytond.model import ModelView, ModelSQL, fields
|
from trytond.model import ModelView, ModelSQL, fields
|
||||||
|
|
||||||
__all__ = ['MigrationCity']
|
|
||||||
|
|
||||||
|
|
||||||
class MigrationCity(ModelSQL, ModelView):
|
class MigrationCity(ModelSQL, ModelView):
|
||||||
"Migration City"
|
"Migration City"
|
||||||
__name__ = "hotel.migration_city"
|
__name__ = "hotel.migration_city"
|
||||||
|
|
|
@ -12,7 +12,3 @@ class Company(metaclass=PoolMeta):
|
||||||
rnt_code = fields.Char('Registro Nacional de Turismo')
|
rnt_code = fields.Char('Registro Nacional de Turismo')
|
||||||
matricula_mercantil = fields.Char('Matricula Mercantil')
|
matricula_mercantil = fields.Char('Matricula Mercantil')
|
||||||
national_tourism_registry = fields.Char('National Tourism Registry')
|
national_tourism_registry = fields.Char('National Tourism Registry')
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def __setup__(cls):
|
|
||||||
super(Company, cls).__setup__()
|
|
||||||
|
|
|
@ -64,10 +64,6 @@ class Configuration(ModelSQL, ModelView):
|
||||||
booking_email_template = fields.Many2One('email.template',
|
booking_email_template = fields.Many2One('email.template',
|
||||||
'Booking Template Email')
|
'Booking Template Email')
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def __setup__(cls):
|
|
||||||
super(Configuration, cls).__setup__()
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def default_company():
|
def default_company():
|
||||||
return Transaction().context.get('company') or False
|
return Transaction().context.get('company') or False
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# 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.
|
||||||
|
|
||||||
from trytond.exceptions import UserError, UserWarning
|
from trytond.exceptions import UserError
|
||||||
# from trytond.model.exceptions import ValidationError
|
|
||||||
|
|
||||||
|
|
||||||
class BadOperationError(UserError):
|
class BadOperationError(UserError):
|
||||||
|
|
|
@ -126,7 +126,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="name">Housekeeping Service Report</field>
|
<field name="name">Housekeeping Service Report</field>
|
||||||
<field name="model"></field>
|
<field name="model"></field>
|
||||||
<field name="report_name">hotel.print_housekeeping_service.report</field>
|
<field name="report_name">hotel.print_housekeeping_service.report</field>
|
||||||
<field name="report">hotel/housekeeping.ods</field>
|
<field name="report">hotel/housekeeping.fods</field>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.ui.view" id="print_housekeeping_service_start_view_form">
|
<record model="ir.ui.view" id="print_housekeeping_service_start_view_form">
|
||||||
<field name="model">hotel.print_housekeeping_service.start</field>
|
<field name="model">hotel.print_housekeeping_service.start</field>
|
||||||
|
|
|
@ -10,10 +10,6 @@ class HotelLocation(ModelSQL, ModelView):
|
||||||
parent = fields.Many2One('hotel.location', 'Parent', select=True)
|
parent = fields.Many2One('hotel.location', 'Parent', select=True)
|
||||||
childs = fields.One2Many('hotel.location', 'parent', string='Children')
|
childs = fields.One2Many('hotel.location', 'parent', string='Children')
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def __setup__(cls):
|
|
||||||
super(HotelLocation, cls).__setup__()
|
|
||||||
|
|
||||||
def get_rec_name(self, name):
|
def get_rec_name(self, name):
|
||||||
if self.parent:
|
if self.parent:
|
||||||
return self.parent.get_rec_name(name) + ' / ' + self.name
|
return self.parent.get_rec_name(name) + ' / ' + self.name
|
||||||
|
|
|
@ -371,10 +371,6 @@ class Operation(Workflow, ModelSQL, ModelView):
|
||||||
raise AccessError(gettext('hotel.msg_missing_configuration_housekeeping_rooms'))
|
raise AccessError(gettext('hotel.msg_missing_configuration_housekeeping_rooms'))
|
||||||
Housekeeping.write(housekeepings, values)
|
Housekeeping.write(housekeepings, values)
|
||||||
|
|
||||||
# def get_sale(self, name=None):
|
|
||||||
# if self.sale_line:
|
|
||||||
# return self.sale_line.sale.id
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _get_origin(cls):
|
def _get_origin(cls):
|
||||||
return ['hotel.operation.maintenance', 'hotel.booking.line']
|
return ['hotel.operation.maintenance', 'hotel.booking.line']
|
||||||
|
|
|
@ -331,7 +331,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="name">Statistics by Month Report</field>
|
<field name="name">Statistics by Month Report</field>
|
||||||
<field name="model"></field>
|
<field name="model"></field>
|
||||||
<field name="report_name">hotel.statistics_by_month.report</field>
|
<field name="report_name">hotel.statistics_by_month.report</field>
|
||||||
<field name="report">hotel/statistics_by_month.ods</field>
|
<field name="report">hotel/statistics_by_month.fods</field>
|
||||||
<field name="template_extension">ods</field>
|
<field name="template_extension">ods</field>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.ui.view" id="print_hotel_statistics_by_month_start_view_form">
|
<record model="ir.ui.view" id="print_hotel_statistics_by_month_start_view_form">
|
||||||
|
|
|
@ -13,8 +13,7 @@ KIND = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class Template:
|
class Template(metaclass=PoolMeta):
|
||||||
__metaclass__ = PoolMeta
|
|
||||||
__name__ = 'product.template'
|
__name__ = 'product.template'
|
||||||
kind = fields.Selection(KIND, 'Kind')
|
kind = fields.Selection(KIND, 'Kind')
|
||||||
channel_code = fields.Char('Channel Code')
|
channel_code = fields.Char('Channel Code')
|
||||||
|
|
2
sale.xml
2
sale.xml
|
@ -8,7 +8,7 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
||||||
<field name="name">Report Invoice Income Daily</field>
|
<field name="name">Report Invoice Income Daily</field>
|
||||||
<field name="model"></field>
|
<field name="model"></field>
|
||||||
<field name="report_name">hotel.invoice_income_daily_report</field>
|
<field name="report_name">hotel.invoice_income_daily_report</field>
|
||||||
<field name="report">hotel/invoice_income_daily.ods</field>
|
<field name="report">hotel/invoice_income_daily.fods</field>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.ui.view" id="invoice_income_daily_start_view_form">
|
<record model="ir.ui.view" id="invoice_income_daily_start_view_form">
|
||||||
<field name="model">hotel.invoice_income_daily.start</field>
|
<field name="model">hotel.invoice_income_daily.start</field>
|
||||||
|
|
|
@ -8,7 +8,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="name">Service</field>
|
<field name="name">Service</field>
|
||||||
<field name="model">hotel.service</field>
|
<field name="model">hotel.service</field>
|
||||||
<field name="report_name">hotel.service</field>
|
<field name="report_name">hotel.service</field>
|
||||||
<field name="report">hotel/service.ods</field>
|
<field name="report">hotel/service.fods</field>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.action.keyword" id="report_service_keyword">
|
<record model="ir.action.keyword" id="report_service_keyword">
|
||||||
<field name="keyword">form_print</field>
|
<field name="keyword">form_print</field>
|
||||||
|
|
25
setup.py
25
setup.py
|
@ -27,10 +27,10 @@ def get_require_version(name):
|
||||||
require = '%s >= %s.%s.dev0, < %s.%s'
|
require = '%s >= %s.%s.dev0, < %s.%s'
|
||||||
else:
|
else:
|
||||||
require = '%s >= %s.%s, < %s.%s'
|
require = '%s >= %s.%s, < %s.%s'
|
||||||
require %= (name, major_version, minor_version,
|
require %= (name, major_version, minor_version, major_version, minor_version + 1)
|
||||||
major_version, minor_version + 1)
|
|
||||||
return require
|
return require
|
||||||
|
|
||||||
|
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
config.readfp(open('tryton.cfg'))
|
config.readfp(open('tryton.cfg'))
|
||||||
info = dict(config.items('tryton'))
|
info = dict(config.items('tryton'))
|
||||||
|
@ -80,7 +80,7 @@ setup(name=name,
|
||||||
package_data={
|
package_data={
|
||||||
'trytond.modules.%s' % MODULE: (info.get('xml', [])
|
'trytond.modules.%s' % MODULE: (info.get('xml', [])
|
||||||
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt', '*.fodt',
|
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt', '*.fodt',
|
||||||
'*.ods', 'icons/*.svg']),
|
'*.ods', '*.fods', 'icons/*.svg']),
|
||||||
},
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
|
@ -90,25 +90,12 @@ setup(name=name,
|
||||||
'Intended Audience :: Financial and Insurance Industry',
|
'Intended Audience :: Financial and Insurance Industry',
|
||||||
'Intended Audience :: Legal Industry',
|
'Intended Audience :: Legal Industry',
|
||||||
'License :: OSI Approved :: GNU General Public License (GPL)',
|
'License :: OSI Approved :: GNU General Public License (GPL)',
|
||||||
'Natural Language :: Bulgarian',
|
|
||||||
'Natural Language :: Catalan',
|
|
||||||
'Natural Language :: Chinese (Simplified)',
|
|
||||||
'Natural Language :: Czech',
|
|
||||||
'Natural Language :: Dutch',
|
|
||||||
'Natural Language :: English',
|
'Natural Language :: English',
|
||||||
'Natural Language :: French',
|
|
||||||
'Natural Language :: German',
|
|
||||||
'Natural Language :: Hungarian',
|
|
||||||
'Natural Language :: Italian',
|
|
||||||
'Natural Language :: Portuguese (Brazilian)',
|
|
||||||
'Natural Language :: Russian',
|
|
||||||
'Natural Language :: Slovenian',
|
|
||||||
'Natural Language :: Spanish',
|
'Natural Language :: Spanish',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python :: 2.7',
|
'Programming Language :: Python :: 3.7',
|
||||||
'Programming Language :: Python :: 3.3',
|
'Programming Language :: Python :: 3.8',
|
||||||
'Programming Language :: Python :: 3.4',
|
'Programming Language :: Python :: 3.9',
|
||||||
'Programming Language :: Python :: 3.5',
|
|
||||||
'Programming Language :: Python :: Implementation :: CPython',
|
'Programming Language :: Python :: Implementation :: CPython',
|
||||||
'Programming Language :: Python :: Implementation :: PyPy',
|
'Programming Language :: Python :: Implementation :: PyPy',
|
||||||
'Topic :: Office/Business',
|
'Topic :: Office/Business',
|
||||||
|
|
Loading…
Reference in New Issue