migrate to git

This commit is contained in:
Camilo Sarmiento 2020-04-16 07:45:13 -05:00
commit 20f569e9d4
142 changed files with 16976 additions and 0 deletions

0
CHANGELOG Normal file
View File

16
COPYRIGHT Normal file
View File

@ -0,0 +1,16 @@
Copyright (C) 2013-2015 Oscar Andrés Álvarez Montero
Copyright (C) 2013 Humberto José Yances Cárdenas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

36
INSTALL Normal file
View File

@ -0,0 +1,36 @@
Installing trytond_hotel
========================
Prerequisites
-------------
* Python 2.7 or later (http://www.python.org/)
* trytond (http://www.tryton.org/)
* trytond_company (http://www.tryton.org/)
* trytond_party (http://www.tryton.org/)
* trytond_product (http://www.tryton.org/)
* trytond_account (http://www.tryton.org/)
* trytond_account_invoice (http://www.tryton.org/)
* trytond_sale (http://www.tryton.org/)
* trytonpsk_voucher (http://www.tryton.org/)
Installation
------------
Once you've downloaded and unpacked the trytond_product source release, enter the
directory where the archive was unpacked, and run:
python setup.py install
Note that you may need administrator/root privileges for this step, as
this command will by default attempt to install module to the Python
site-packages directory on your system.
For advanced options, please refer to the easy_install and/or the distutils
documentation:
http://peak.telecommunity.com/DevCenter/EasyInstall
http://docs.python.org/inst/inst.html
To use without installation, extract the archive into ``trytond/modules`` with
the directory name product.

674
LICENSE Normal file
View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

9
MANIFEST.in Normal file
View File

@ -0,0 +1,9 @@
include INSTALL
include README
include TODO
include COPYRIGHT
include CHANGELOG
include LICENSE
include *.xml
include *.odt
include doc/*

23
PKG-INFO Normal file
View File

@ -0,0 +1,23 @@
Metadata-Version: 1.0
Name: trytonpsk_hotel
Version: 5.0.0
Summary: Management Hotel
Home-page: http://www.presik.com/
Author: Oscar Alvarez
Author-email: oscar.alvarez.montero@gmail.com
License: GPL-3
Download-URL: https://bitbucket.org/presik/trytonpsk_hotel_presik
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: English
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Office/Business

51
README Normal file
View File

@ -0,0 +1,51 @@
Presik Hotel
============
Más allá de ser un software hotel potente, abierto, flexible y modular, está diseñado
para una fácil y completa integración de todas las áreas de la gestion hotelera.
Aplicación para control de las actividades de un hotel:
- Configuración de habitaciones, salones.
- Tarificación según calendario, Listas de Precios por Clientes corporativos ó Agencias.
- Gestión de reservas y clientes
- Registro de gastos y facturación.
- Historial de visitas
- Bloqueos de habitaciones por Mantenimiento
- Comunicación con central, informes y facturación.
- Módulo Ama de Llaves, con gestión de estado de limpieza y mantenimiento de habitaciones.
- Gestión de SPA y servicios, con manejo de turnos, control de acceso de personal.
- Módulo Restaurante (costos de produción, recetas, control de stock) e informes de rentabilidad.
- Alquiler de salones
Installing
----------
See INSTALL
Support
-------
If you encounter any problems with Tryton, please don't hesitate to ask
questions on the Tryton bug tracker, mailing list, wiki or IRC channel:
http://bugs.tryton.org/
http://groups.tryton.org/
http://wiki.tryton.org/
irc://irc.freenode.net/tryton
https://bitbucket.org/presik/trytonpsk_hotel
License
-------
See LICENSE
Copyright
---------
See COPYRIGHT
For more information please visit the Tryton web site:
http://www.tryton.org/
http://www.presik.com/

1
TODO Normal file
View File

@ -0,0 +1 @@

104
__init__.py Normal file
View File

@ -0,0 +1,104 @@
# 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 Pool
import location
import configuration
import room
import booking
import operation
import housekeeping
import company
import city
import party
import channel
import product
import sale
import service
import policy
def register():
Pool.register(
room.RoomClassification,
location.HotelLocation,
channel.SaleChannel,
room.Room,
policy.HotelPolicyCancellation,
configuration.Configuration,
room.Amenities,
room.RoomAmenities,
product.Template,
city.MigrationCity,
operation.Operation,
operation.OperationLine,
booking.Booking,
booking.BookingLine,
booking.BookingDailyStart,
configuration.ConfigurationProduct,
housekeeping.Housekeeping,
housekeeping.HousekeepingCleaningType,
company.Company,
operation.OperationMaintenance,
operation.OperationGuest,
operation.TransferOperationStart,
operation.TransferChargeStart,
party.Party,
channel.ChannelTax,
booking.Guest,
booking.SelectRoomsAsk,
booking.BookingVoucher,
booking.RoomsOccupancyStart,
booking.BookingForecastStart,
# voucher.AdvanceVoucherStart,
operation.OpenMigrationStart,
operation.CheckOutOperationFailed,
operation.ChangeRoomStart,
operation.OperationVoucher,
operation.StatisticsByMonthStart,
sale.InvoiceIncomeDailyStart,
service.Service,
service.ServiceLine,
service.ServiceKind,
service.CreateDailyServicesStart,
room.RoomTemplate,
booking.BookingSale,
housekeeping.HotelHousekeepingTask,
housekeeping.HotelTask,
housekeeping.HousekeepingServiceStart,
room.CleanningDays,
booking.GuestsListStart,
module='hotel', type_='model')
Pool.register(
booking.BookingReport,
booking.BookingForecastReport,
booking.RoomsOccupancyReport,
booking.BookingDailyReport,
operation.Migration,
operation.OperationReport,
operation.OperationByConsumerReport,
operation.StatisticsByMonthReport,
sale.InvoiceIncomeDailyReport,
sale.InvoiceSimplifiedReport,
service.ServiceReport,
booking.RegistrationCardReport,
housekeeping.HousekeepingServiceReport,
booking.GuestsListReport,
module='hotel', type_='report')
Pool.register(
booking.SelectRooms,
booking.BookingForecast,
booking.RoomsOccupancy,
booking.BookingDaily,
operation.OpenMigration,
operation.CheckOutOperation,
operation.OperationBill,
operation.ChangeRoom,
operation.TransferOperation,
operation.TransferCharge,
operation.StatisticsByMonth,
service.CreateDailyServices,
housekeeping.HousekeepingService,
booking.GuestsList,
sale.InvoiceIncomeDaily,
# voucher.AdvanceVoucher,
module='hotel', type_='wizard')

BIN
booking.fodt Normal file

Binary file not shown.

1468
booking.py Normal file

File diff suppressed because it is too large Load Diff

346
booking.xml Normal file
View File

@ -0,0 +1,346 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.action.wizard" id="wizard_select_rooms">
<field name="name">Select Rooms</field>
<field name="wiz_name">hotel.booking.select_rooms</field>
<field name="model">hotel.booking</field>
</record>
<record model="ir.ui.view" id="view_select_rooms_form">
<field name="model">hotel.booking.select_rooms.ask</field>
<field name="type">form</field>
<field name="name">view_select_rooms</field>
</record>
<record model="ir.ui.view" id="booking_guest_view_tree">
<field name="model">hotel.booking.guest</field>
<field name="type">tree</field>
<field name="name">guest_tree</field>
</record>
<record model="ir.ui.view" id="booking_guest_view_form">
<field name="model">hotel.booking.guest</field>
<field name="type">form</field>
<field name="name">guest_form</field>
</record>
<record model="ir.action.report" id="report_booking">
<field name="name">Booking</field>
<field name="model">hotel.booking</field>
<field name="report_name">hotel.booking</field>
<field name="report">hotel/booking.fodt</field>
</record>
<record model="ir.action.keyword" id="report_booking_keyword">
<field name="keyword">form_print</field>
<field name="model">hotel.booking,-1</field>
<field name="action" ref="report_booking"/>
</record>
<record model="ir.ui.view" id="booking_view_form">
<field name="model">hotel.booking</field>
<field name="type">form</field>
<field name="name">booking_form</field>
</record>
<record model="ir.ui.view" id="booking_view_tree">
<field name="model">hotel.booking</field>
<field name="type">tree</field>
<field name="name">booking_tree</field>
</record>
<record model="ir.action.act_window" id="act_booking_form">
<field name="name">Booking</field>
<field name="res_model">hotel.booking</field>
</record>
<record model="ir.action.act_window.view" id="act_booking_form_view1">
<field name="sequence" eval="1"/>
<field name="view" ref="booking_view_tree"/>
<field name="act_window" ref="act_booking_form"/>
</record>
<record model="ir.action.act_window.view" id="act_booking_form_view2">
<field name="sequence" eval="2"/>
<field name="view" ref="booking_view_form"/>
<field name="act_window" ref="act_booking_form"/>
</record>
<record model="ir.action.act_window.domain" id="act_booking_form_domain_draft">
<field name="name">Draft</field>
<field name="sequence" eval="10"/>
<field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_booking_form"/>
</record>
<record model="ir.action.act_window.domain" id="act_booking_form_domain_confirmed">
<field name="name">Confirmed</field>
<field name="sequence" eval="20"/>
<field name="domain" eval="[('state', '=', 'confirmed')]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_booking_form"/>
</record>
<record model="ir.action.act_window.domain" id="act_booking_form_domain_check_in">
<field name="name">Check In</field>
<field name="sequence" eval="30"/>
<field name="domain" eval="[('state', '=', 'check_in')]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_booking_form"/>
</record>
<record model="ir.action.act_window.domain" id="act_booking_form_domain_no_show">
<field name="name">No Show</field>
<field name="sequence" eval="50"/>
<field name="domain" eval="[('state', '=', 'no_show')]" pyson="1"/>
<field name="act_window" ref="act_booking_form"/>
</record>
<record model="ir.action.act_window.domain" id="act_booking_form_domain_all">
<field name="name">All</field>
<field name="sequence" eval="90"/>
<field name="domain" eval="[]" pyson="1"/>
<field name="act_window" ref="act_booking_form"/>
</record>
<menuitem parent="menu_hotel" sequence="40"
action="act_booking_form" id="menu_booking_form"/>
<record model="ir.ui.view" id="booking_line_view_tree">
<field name="model">hotel.booking.line</field>
<field name="type">tree</field>
<field name="name">booking_line_tree</field>
</record>
<record model="ir.ui.view" id="booking_line_view_form">
<field name="model">hotel.booking.line</field>
<field name="type">form</field>
<field name="name">booking_line_form</field>
</record>
<record model="ir.ui.view" id="booking_forecast_view_tree">
<field name="model">hotel.booking_forecast</field>
<field name="type">tree</field>
<field name="name">booking_forecast_tree</field>
</record>
<record model="ir.ui.view" id="booking_forecast_view_form">
<field name="model">hotel.booking_forecast</field>
<field name="type">form</field>
<field name="name">booking_forecast_form</field>
</record>
<record model="ir.model.button" id="booking_cancel_button">
<field name="name">cancel</field>
<field name="model" search="[('model', '=', 'hotel.booking')]"/>
</record>
<record model="ir.model.button-res.group" id="booking_cancel_button_group_hotel">
<field name="button" ref="booking_cancel_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="booking_draft_button">
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'hotel.booking')]"/>
</record>
<record model="ir.model.button-res.group" id="booking_draft_button_group_hotel">
<field name="button" ref="booking_draft_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="booking_confirm_button">
<field name="name">confirm</field>
<field name="model" search="[('model', '=', 'hotel.booking')]"/>
</record>
<record model="ir.model.button-res.group" id="booking_confirm_button_group_hotel">
<field name="button" ref="booking_confirm_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="booking_no_show_button">
<field name="name">no_show</field>
<field name="model" search="[('model', '=', 'hotel.booking')]"/>
</record>
<record model="ir.model.button-res.group" id="booking_no_show_button_group_hotel">
<field name="button" ref="booking_no_show_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<!-- Model Access -->
<record model="ir.model.access" id="access_booking">
<field name="model" search="[('model', '=', 'hotel.booking')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_booking_group_hotel">
<field name="model" search="[('model', '=', 'hotel.booking')]"/>
<field name="group" ref="group_hotel"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.model.access" id="access_booking_group_hotel_admin">
<field name="model" search="[('model', '=', 'hotel.booking')]"/>
<field name="group" ref="group_hotel_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.action.act_window" id="act_booking_board_form">
<field name="name">Board Guest Moves</field>
<field name="res_model">hotel.booking.line</field>
</record>
<record model="ir.action.act_window.view" id="act_booking_board_form_view1">
<field name="sequence" eval="1"/>
<field name="view" ref="booking_line_view_tree"/>
<field name="act_window" ref="act_booking_board_form"/>
</record>
<menuitem parent="menu_booking_form" sequence="30"
action="act_booking_board_form" id="menu_guest_moves_form"/>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_arriving_today">
<field name="name">Arriving Today</field>
<field name="sequence" eval="50"/>
<field name="domain" eval="[
('arrival_date', '=', Date()),
('booking.state', 'in', ['confirmed', 'check_in']),
]" pyson="1"/>
<field name="act_window" ref="act_booking_board_form"/>
</record>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_leaving_today">
<field name="name">Leaving Today</field>
<field name="sequence" eval="70"/>
<field name="domain" eval="[
('departure_date', '=', Date()),
('booking.state', 'in', ['check_in', 'finished']),
]" pyson="1"/>
<field name="act_window" ref="act_booking_board_form"/>
</record>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_no_show_today">
<field name="name">No Show Yesterday</field>
<field name="sequence" eval="90"/>
<field name="domain" eval="[
('arrival_date', '=', Date()),
('booking.state', 'in', ['no_show', 'confirmed']),
]" pyson="1"/>
<field name="act_window" ref="act_booking_board_form"/>
</record>
<record model="ir.action.act_window" id="act_open_booking_sales_form">
<field name="name">Sales</field>
<field name="res_model">sale.sale</field>
<field name="domain"
eval="[('origin.id', '=', Eval('active_id'), 'hotel.booking')]" pyson="1"/>
</record>
<record model="ir.action.keyword" id="act_open_booking_sales_keyword1">
<field name="keyword">form_relate</field>
<field name="model">hotel.booking,-1</field>
<field name="action" ref="act_open_booking_sales_form"/>
</record>
<record model="ir.action.act_window" id="act_open_booking_operations_form">
<field name="name">Operations</field>
<field name="res_model">hotel.operation</field>
<field name="domain"
eval="[
('origin.booking.id', '=', Eval('active_id'), 'hotel.booking'),
]"
pyson="1"/>
</record>
<record model="ir.action.keyword" id="act_open_booking_operations_keyword1">
<field name="keyword">form_relate</field>
<field name="model">hotel.booking,-1</field>
<field name="action" ref="act_open_booking_operations_form"/>
</record>
<record model="ir.action.report" id="report_rooms_occupancy">
<field name="name">Rooms Occupancy Report</field>
<field name="model"></field>
<field name="report_name">hotel.rooms_occupancy.report</field>
<field name="report">hotel/rooms_occupancy.ods</field>
<field name="template_extension">ods</field>
</record>
<record model="ir.ui.view" id="print_rooms_occupancy_start_view_form">
<field name="model">hotel.print_rooms_occupancy.start</field>
<field name="type">form</field>
<field name="name">rooms_occupancy_start_form</field>
</record>
<record model="ir.action.wizard" id="wizard_print_rooms_occupancy">
<field name="name">Rooms Occupancy</field>
<field name="wiz_name">hotel.print_rooms_occupancy</field>
</record>
<menuitem parent="hotel.menu_reporting" id="menu_rooms_occupancy"
action="wizard_print_rooms_occupancy"/>
<record model="ir.action.report" id="report_booking_forecast">
<field name="name">Booking Forecast Report</field>
<field name="model"></field>
<field name="report_name">hotel.booking_forecast.report</field>
<field name="report">hotel/booking_forecast.ods</field>
<field name="template_extension">ods</field>
</record>
<record model="ir.ui.view" id="print_booking_forecast_start_view_form">
<field name="model">hotel.print_booking_forecast.start</field>
<field name="type">form</field>
<field name="name">booking_forecast_start_form</field>
</record>
<record model="ir.action.wizard" id="wizard_print_booking_forecast">
<field name="name">Booking Forecast</field>
<field name="wiz_name">hotel.print_booking_forecast</field>
</record>
<menuitem parent="hotel.menu_reporting" id="menu_booking_forecast"
action="wizard_print_booking_forecast"/>
<record model="ir.action.report" id="report_registration_card">
<field name="name">Registration Card</field>
<field name="model">hotel.booking</field>
<field name="report_name">hotel.occupancy.registration_card</field>
<field name="report">hotel/registration_card.fodt</field>
<field name="template_extension">odt</field>
</record>
<record model="ir.action.keyword" id="report_registration_card_keyword">
<field name="keyword">form_print</field>
<field name="model">hotel.booking,-1</field>
<field name="action" ref="report_registration_card"/>
</record>
<record model="ir.action.report" id="report_guests_list">
<field name="name">Guests List Report</field>
<field name="model"></field>
<field name="report_name">hotel.guests_list.report</field>
<field name="report">hotel/guests_list.ods</field>
<field name="template_extension">ods</field>
</record>
<record model="ir.ui.view" id="print_guests_list_start_view_form">
<field name="model">hotel.print_guests_list.start</field>
<field name="type">form</field>
<field name="name">guests_list_start_form</field>
</record>
<record model="ir.action.wizard" id="wizard_print_guests_list">
<field name="name">Guests List</field>
<field name="wiz_name">hotel.print_guests_list</field>
</record>
<menuitem parent="hotel.menu_reporting" id="menu_guests_list"
action="wizard_print_guests_list"/>
<record model="ir.action.wizard" id="wizard_booking_advance_voucher">
<field name="name">Voucher Advance</field>
<field name="wiz_name">account_voucher.advance_voucher</field>
<field name="model">hotel.booking</field>
</record>
<record model="ir.action.report" id="booking_daily_report">
<field name="name">Booking Daily Report</field>
<field name="model"></field>
<field name="report_name">hotel.booking_daily.report</field>
<field name="report">hotel/booking_daily.ods</field>
<field name="template_extension">ods</field>
</record>
<record model="ir.ui.view" id="print_booking_daily_start_view_form">
<field name="model">hotel.print_booking_daily.start</field>
<field name="type">form</field>
<field name="name">booking_daily_start_form</field>
</record>
<record model="ir.action.wizard" id="wizard_print_booking_daily">
<field name="name">Booking Daily Report</field>
<field name="wiz_name">hotel.booking_daily</field>
</record>
<menuitem parent="hotel.menu_reporting" id="menu_hotel_booking_daily"
action="wizard_print_booking_daily"/>
</data>
</tryton>

BIN
booking_daily.ods Normal file

Binary file not shown.

BIN
booking_forecast.ods Normal file

Binary file not shown.

79
channel.py Normal file
View File

@ -0,0 +1,79 @@
#This file is part of Presik. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import ModelView, ModelSQL, fields
from trytond.pyson import Eval, If
from trytond.transaction import Transaction
from trytond.pool import Pool
__all__ = ['SaleChannel', 'ChannelTax']
class SaleChannel(ModelSQL, ModelView):
'Sale Channel'
__name__ = 'hotel.channel'
name = fields.Char('Name', required=True)
party = fields.Many2One('party.party', 'Party', required=True)
type_commission = fields.Selection([
('percentage', 'Percentage'),
('fixed', 'Fixed'),
], 'Type Commission', required=True)
company = fields.Many2One('company.company', 'Company', required=True,
domain=[
('id', If(Eval('context', {}).contains('company'), '=', '!='),
Eval('context', {}).get('company', 0)),
], select=True)
commission = fields.Numeric('Commission', required=True, digits=(16, 2))
debit_account = fields.Many2One('account.account', 'Debit Account',
domain=[
('company', '=', Eval('company')),
('kind', 'not in', ['view']),
],
depends=['company', 'type_commission'])
credit_account = fields.Many2One('account.account', 'Credit Account',
domain=[
('company', '=', Eval('company')),
('kind', 'not in', ['view']),
],
depends=['company', 'type_commission'])
taxes = fields.Many2Many('hotel.channel-account.tax',
'channel', 'tax', 'Channel Taxes',
domain=[('parent', '=', None), ['OR',
('group', '=', None),
('group.kind', 'in', ['purchase', 'both'])],
])
currency = fields.Many2One('currency.currency', 'Currency',
required=True)
payment_method = fields.Selection([
('', ''),
('on_booking', 'On Booking'),
('on_check_out', 'On Check Out'),
], 'Payment Method', required=True)
@classmethod
def __setup__(cls):
super(SaleChannel, cls).__setup__()
@staticmethod
def default_company():
return Transaction().context.get('company')
@staticmethod
def default_payment_method():
return 'on_check_out'
@staticmethod
def default_currency():
Company = Pool().get('company.company')
company = Transaction().context.get('company')
if company:
return Company(company).currency.id
class ChannelTax(ModelSQL):
'Channel - Tax'
__name__ = 'hotel.channel-account.tax'
_table = 'hotel_channel_taxes_rel'
channel = fields.Many2One('hotel.channel', 'Sale Channel',
ondelete='CASCADE', select=True, required=True)
tax = fields.Many2One('account.tax', 'Tax', ondelete='RESTRICT',
required=True)

60
channel.xml Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="hotel_channel_view_tree">
<field name="model">hotel.channel</field>
<field name="type">tree</field>
<field name="name">channel_tree</field>
</record>
<record model="ir.ui.view" id="hotel_channel_view_form">
<field name="model">hotel.channel</field>
<field name="type">form</field>
<field name="name">channel_form</field>
</record>
<record model="ir.action.act_window" id="act_channel_form">
<field name="name">Channel</field>
<field name="res_model">hotel.channel</field>
</record>
<record model="ir.action.act_window.view" id="act_channel_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="hotel_channel_view_tree"/>
<field name="act_window" ref="act_channel_form"/>
</record>
<record model="ir.action.act_window.view" id="act_channel_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="hotel_channel_view_form"/>
<field name="act_window" ref="act_channel_form"/>
</record>
<menuitem name="Channel" parent="hotel.menu_configuration" sequence="70"
action="act_channel_form" id="menu_hotel_channel"/>
<!-- Model Access -->
<record model="ir.model.access" id="access_channel">
<field name="model" search="[('model', '=', 'hotel.channel')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_channel_group_hotel">
<field name="model" search="[('model', '=', 'hotel.channel')]"/>
<field name="group" ref="group_hotel"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_channel_group_hotel_admin">
<field name="model" search="[('model', '=', 'hotel.channel')]"/>
<field name="group" ref="group_hotel_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
</data>
</tryton>

16
city.py Normal file
View File

@ -0,0 +1,16 @@
# 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.model import ModelView, ModelSQL, fields
__all__ = ['MigrationCity']
class MigrationCity(ModelSQL, ModelView):
"Migration City"
__name__ = "hotel.migration_city"
_rec_name = 'name'
name = fields.Char('Name', required=True)
code = fields.Char('Code')
@classmethod
def __setup__(cls):
super(MigrationCity, cls).__setup__()

60
city.xml Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="hotel_migration_city_view_tree">
<field name="model">hotel.migration_city</field>
<field name="type">tree</field>
<field name="name">migration_city_tree</field>
</record>
<record model="ir.ui.view" id="hotel_migration_city_view_form">
<field name="model">hotel.migration_city</field>
<field name="type">form</field>
<field name="name">migration_city_form</field>
</record>
<record model="ir.action.act_window" id="act_migration_city_form">
<field name="name">Migration City</field>
<field name="res_model">hotel.migration_city</field>
</record>
<record model="ir.action.act_window.view" id="act_migration_city_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="hotel_migration_city_view_tree"/>
<field name="act_window" ref="act_migration_city_form"/>
</record>
<record model="ir.action.act_window.view" id="act_migration_city_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="hotel_migration_city_view_form"/>
<field name="act_window" ref="act_migration_city_form"/>
</record>
<menuitem name="Migration City" parent="hotel.menu_configuration" sequence="60"
action="act_migration_city_form" id="menu_hotel_migration_city"/>
<!-- Model Access -->
<record model="ir.model.access" id="access_migration_city">
<field name="model" search="[('model', '=', 'hotel.migration_city')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_migration_city_group_hotel">
<field name="model" search="[('model', '=', 'hotel.migration_city')]"/>
<field name="group" ref="group_hotel"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_migration_city_group_hotel_admin">
<field name="model" search="[('model', '=', 'hotel.migration_city')]"/>
<field name="group" ref="group_hotel_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="False"/>
</record>
</data>
</tryton>

20
company.py Normal file
View File

@ -0,0 +1,20 @@
# 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.model import fields
from trytond.pool import PoolMeta
__all__ = ['Company']
class Company(metaclass=PoolMeta):
__name__ = 'company.company'
mig_code = fields.Char('Migration Code')
city_code = fields.Char('City Code')
property_code = fields.Char('Property Code', help='Code on channel manager')
rnt_code = fields.Char('Registro Nacional de Turismo')
matricula_mercantil = fields.Char('Matricula Mercantil')
national_tourism_registry = fields.Char('National Tourism Registry')
@classmethod
def __setup__(cls):
super(Company, cls).__setup__()

12
company.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="company_view_form">
<field name="model">company.company</field>
<field name="inherit" ref="company.company_view_form"/>
<field name="name">company_form</field>
</record>
</data>
</tryton>

87
configuration.py Normal file
View File

@ -0,0 +1,87 @@
# 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.model import ModelView, ModelSQL, fields
from trytond.pyson import Eval, If
from trytond.transaction import Transaction
__all__ = ['Configuration', 'ConfigurationProduct']
class Configuration(ModelSQL, ModelView):
'Hotel Configuration'
__name__ = 'hotel.configuration'
booking_sequence = fields.Many2One('ir.sequence',
'Hotel Booking Sequence', domain=[
('company', 'in',
[Eval('context', {}).get('company', 0), None]),
('code', '=', 'hotel'),
], required=True)
hotel_service_sequence = fields.Many2One('ir.sequence',
'Hotel Service Sequence', domain=[
('company', 'in',
[Eval('context', {}).get('company', 0), None]),
('code', '=', 'hotel'),
], required=True)
registration_card_sequence = fields.Many2One('ir.sequence',
'Registration Card Sequence', domain=[
('company', 'in',
[Eval('context', {}).get('company', 0), None]),
('code', '=', 'hotel'),
], required=True)
default_charges = fields.Many2Many('hotel.configuration-product.product',
'configuration', 'product', 'Default Charges')
check_in_time = fields.Time('Check In Time', required=True)
check_out_time = fields.Time('Check Out Time', required=True)
default_accommodation = fields.Many2One('product.product',
'Default Accommodation')
taxes_exception_rule = fields.Many2One('account.tax.rule', 'Taxes Exception Rule')
default_channel_seller = fields.Many2One('hotel.channel', 'Default Channel')
company = fields.Many2One('company.company', 'Company', required=True,
domain=[
('id', If(Eval('context', {}).contains('company'), '=', '!='),
Eval('context', {}).get('company', 0)),
])
full_clean_time = fields.Selection([
('', ''),
('by_time', 'By Time'),
('on_check_out', 'On Check Out'),
], 'Full Clean Time')
full_clean_lapse = fields.Integer('Full Clean Lapse', help='In Days')
cleaning_check_out = fields.Many2One('hotel.housekeeping.cleaning_type',
'Cleaning Check Out')
cleaning_check_in = fields.Many2One('hotel.housekeeping.cleaning_type',
'Cleaning Check In')
cleaning_occupied = fields.Many2One('hotel.housekeeping.cleaning_type',
'Cleaning Occupied')
@classmethod
def __setup__(cls):
super(Configuration, cls).__setup__()
cls._error_messages.update({
'missing_default_configuration': ('Missing default configuration sequence!'),
})
@staticmethod
def default_company():
return Transaction().context.get('company') or False
@classmethod
def get_configuration(cls):
company_id = Transaction().context.get('company')
if company_id:
config, = cls.search([
('company', '=', company_id)
])
if not config or not config.booking_sequence:
cls.raise_user_error('missing_default_configuration')
return config
class ConfigurationProduct(ModelSQL):
'Configuration - Product'
__name__ = 'hotel.configuration-product.product'
_table = 'hotel_configuration_product_rel'
configuration = fields.Many2One('hotel.configuration', 'Configuration',
ondelete='CASCADE', select=True, required=True)
product = fields.Many2One('product.product', 'Product',
ondelete='RESTRICT', select=True, required=True)

39
configuration.xml Normal file
View File

@ -0,0 +1,39 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="hotel_configuration_view_form">
<field name="model">hotel.configuration</field>
<field name="type">form</field>
<field name="name">configuration_form</field>
</record>
<record model="ir.ui.view" id="hotel_configuration_view_tree">
<field name="model">hotel.configuration</field>
<field name="type">tree</field>
<field name="name">configuration_tree</field>
</record>
<record model="ir.action.act_window" id="act_hotel_configuration_form">
<field name="name">Hotel Configuration</field>
<field name="res_model">hotel.configuration</field>
</record>
<record model="ir.action.act_window.view"
id="act_hotel_configuration_view_tree">
<field name="sequence" eval="10"/>
<field name="view" ref="hotel_configuration_view_tree"/>
<field name="act_window" ref="act_hotel_configuration_form"/>
</record>
<record model="ir.action.act_window.view"
id="act_hotel_configuration_view_form">
<field name="sequence" eval="20"/>
<field name="view" ref="hotel_configuration_view_form"/>
<field name="act_window" ref="act_hotel_configuration_form"/>
</record>
<menuitem name="Configuration" parent="menu_configuration"
action="act_hotel_configuration_form" sequence="20"
id="menu_hotel_configuration" icon="tryton-list"/>
</data>
</tryton>

1184
data/data_cities.csv Normal file

File diff suppressed because it is too large Load Diff

BIN
data/data_cities.ods Normal file

Binary file not shown.

282
data/data_nacionality.csv Normal file
View File

@ -0,0 +1,282 @@
code,name,demonym,visa_out,visa_in,symbol
1,ALBORAN Y PEREJIL ISLAS,ALBORAN,n,y,
13,AFGANISTAN,AFGANA,n,y,AFG
17,ALBANIA,ALBANESA,n,y,ALB
23,ALEMANIA,ALEMANA,n,n,DEU
37,ANDORRA,ANDORRANA,n,n,AND
40,ANGOLA,ANGOLESA,n,y,AGO
43,ANTIGUA Y BARBUDA,ANTIGUANA,n,n,ATG
44,ANTILLAS NEERLANDESAS,HOLANDESA,n,n,ANT
53,ARABIA,ARABE,n,y,SAU
55,ARABIA SAUDITA,SAUDITA,n,y,SAU
59,ARGELIA,ARGELINA,n,y,DZA
63,ARGENTINA,ARGENTINA,n,n,ARG
65,ARMENIA,ARMENIA,n,y,ARM
67,ARUBA,HOLANDESA,n,n,ABW
69,AUSTRALIA,AUSTRALIANA,n,n,AUS
72,AUSTRIA,AUSTRIACA,n,n,AUT
75,AZERBAIYAN,AZERBAIYANA,n,y,AZE
77,BAHAMAS,BAHAMEÑA,n,n,BHS
80,BAHREIN,BAHRENITA,n,y,BHR
81,BANGLADESH,BENGALESA,n,y,BGD
83,BARBADOS,BARBADIANA,n,n,BRB
85,BELARUS,BIELORRUSA,n,y,BLR
87,BELGICA,BELGA,n,n,BEL
88,BELICE,BELICEÑA,n,n,BLZ
89,BENIN,BENINESA,n,y,BEN
90,BERMUDAS,BRITANICA,n,n,BMU
97,BOLIVIA,BOLIVIANA,n,n,BOL
99,BOSNIA,BOSNIA,n,y,BIH
101,BOTSWANA,BETCHUANA,n,y,BWA
105,BRASIL,BRASILEÑA,n,n,BRA
108,BRUNEI DARUSSALAM,BRUENANA,n,n,BRN
111,BULGARIA,BULGARA,n,y,BGR
113,BURKINA FASO,BURKINESA,n,y,BFA
115,BURUNDI,BURUNDINESA,n,y,BDI
117,BHUTAN,BHUTANESA,n,y,BTN
127,CABO VERDE,CABOVERDIANA,n,y,CPV
137,CAIMAN ISLAS,BRITANICA,n,n,CYM
141,CAMBOYA,CAMBOYANA,n,y,KHM
145,CAMERUN,CAMERUNENSE,n,y,CMR
149,CANADA,CANADIENSE,n,n,CAN
151,CHAD,CHADIANA,n,y,TCD
155,CEUTA Y MELILLA,ESPAÑOLA,n,n,ESP
169,COLOMBIA,COLOMBIANA,n,n,COL
171,COMORAS,COMORANA,n,y,COM
177,REP. DEMOC. DEL CONGO,CONGOLESA,n,y,COD
190,COREA DEL SUR,COREANA,n,n,KOR
193,COTE D`IVOIRE,MARFILENSE,n,y,CIV
196,COSTA RICA,COSTARRICENSE,n,n,CRI
198,CROACIA,CROATA,n,n,HRV
199,CUBA,CUBANA,n,y,CUB
201,CURAZAO,HOLANDESA,n,n,ANT
207,REPUBLICA CHECA,CHECA,n,n,CZE
211,CHILE,CHILENA,n,n,CHL
215,CHINA,CHINA,n,n,CHN
218,TAIWAN,TAIWANESA,n,n,TWN
221,CHIPRE,CHIPRIOTA,n,n,CYP
232,DINAMARCA,DANESA,n,n,DNK
233,DJIBOUTI,DJIBOUTIENSE,n,n,DJI
235,DOMINICA,DOMINICA,n,n,DMA
239,ECUADOR,ECUATORIANA,n,n,ECU
240,EGIPTO,EGIPCIA,n,y,EGY
242,EL SALVADOR,SALVADOREÑA,n,n,SLV
244,EMIRATOS ARABES,ARABE,n,y,ARE
245,ESPAÑA,ESPAÑOLA,n,n,ESP
246,ERITREA,ERITREA,n,y,ERI
247,ESLOVAQUIA,ESLOVACA,n,n,SVK
248,ESLOVENIA,ESLOVENIA,n,n,SVN
249,ESTADOS UNIDOS DE AMERICA,ESTADOUNIDENSE,n,n,USA
251,ESTONIA,ESTONIA,n,n,EST
253,ETIOPIA,ETIOPE,n,n,ETH
255,FIJI,FIJIANA,n,y,FJI
267,FILIPINAS,FILIPINA,n,n,PHL
271,FINLANDIA,FINLANDESA,n,n,FIN
275,FRANCIA,FRANCESA,n,n,FRA
281,GABON,GABONESA,n,y,GAB
285,GAMBIA,GAMBIANA,n,y,GMB
287,GEORGIA,GEORGIANA,n,y,GEO
289,GHANA,GHANESA,n,y,GHA
293,GIBRALTAR,BRITANICA,n,n,GIB
297,GRANADA,GRANADINA,n,n,GRD
301,GRECIA,GRIEGA,n,n,GRC
315,GROENLANDIA,DANESA,n,n,GRL
317,GUATEMALA,GUATEMALTECA,n,n,GTM
325,GUYANA,GUYANESA,n,n,GUY
329,GUINEA,GUINEA,n,y,GIN
331,GUINEA ECUATORIAL,ECUATOGUINEANA,n,y,GNQ
334,GUINEA BISSAU,GUINEANA,n,y,GNB
338,GUADALUPE,FRANCESA,n,y,GLP
339,GUAM,ESTADOUNIDENSE,n,n,GUM
340,GUAYANA FRANCESA,FRANCESA,n,n,GUF
341,HAITI,HAITIANA,n,y,HTI
345,HONDURAS,HONDUREÑA,n,n,HND
347,HONG KONG,CHINA,n,y,HKG
355,HUNGRIA,HUNGARA,n,n,HUN
361,INDIA,INDIA,n,y,IND
365,INDONESIA,INDONESIA,n,n,IDN
369,IRAQ,IRAQUI,n,y,IRQ
372,IRAN,IRANI,n,y,IRN
375,IRLANDA DEL SUR,IRLANDESA,n,n,IRL
379,ISLANDIA,ISLANDESA,n,n,ISL
380,ISLA DE MAN,BRITANICA,n,n,GBR
381,ISLA DE PITCAIRN,BRITANICA,n,n,PCN
382,ISLA JOHNSTON,ESTADOUNIDENSE,n,n,USA
383,ISRAEL,ISRAELI,n,n,ISR
384,ISLAS ALAND,FINLANDESA,n,n,FIN
385,ISLA WAKE,ESTODOUNIDENSE,n,n,USA
386,ITALIA,ITALIANA,n,n,ITA
387,ISLAS CHRISTMAS,AUSTRALIANA,n,n,CXR
388,ISLAS COOK,NEOZELANDESA,n,n,COK
389,ISLAS DEL CANAL,BRITANICA,n,n,GBR
390,ISLAS FEROE,DANESA,n,n,FRO
391,JAMAICA,JAMAIQUINA,n,n,JAM
392,ISLAS MARIANAS DEL NORTE,ESTODOUNIDENSE,n,n,USA
393,ISLAS MIDWAY,ESTADOUNIDENSE,n,n,USA
394,ISLAS WALLIS Y FUTUNA,FRANCESA,n,n,WLF
395,ISLAS SALOMON,SALOMONICA,n,y,SLB
397,IRIAN JAYA,INDONESIA,n,n,
399,JAPON,JAPONESA,n,n,JPN
403,JORDANIA,JORDANA,n,y,JOR
406,KAZAJSTAN,KAZAQUI,n,y,KAZ
410,KENYA,KENYANA,n,y,KEN
411,KIRIBATI,KIRIBATI,n,y,KIR
412,KIRGUISTAN,KIRGUENSE,n,y,KGZ
413,KUWAIT,KUWAITI,n,y,KWT
414,KOSOVO,PRISTINA,n,y,
415,KYRGYZSTAN,KYRGYZSTANY,n,n,
420,REP. DEMOC. POPULAR LAO,LAOSEANA,n,y,LAO
426,LESOTHO,LESOTHA,n,y,LSO
428,LETONIA,LETONA,n,y,LVA
429,LITUANIA,LITUANA,n,n,LTU
431,LIBANO,LIBANESA,n,y,LBN
434,LIBERIA,LIBERIANA,n,y,LBR
438,LIBIA,LIBIO,n,y,LBY
441,LIECHTENSTEIN,LIECHTENSTEIN,n,n,LIE
442,LUXEMBURGO,LUXEMBURGUES,n,n,LUX
447,MACAO,CHINA,n,y,MAC
448,MACEDONIA,MACEDONIA,n,y,MKD
450,MADAGASCAR,MALGACHE,n,y,MDG
455,MALASIA,MALAYA,n,n,MYS
458,MALAWI,MALAWI,n,y,MWI
461,MALDIVAS,MALDIVIA,n,y,MDV
464,MALI,MALINESA,n,y,MLI
467,MALTA,MALTESA,n,n,MLT
474,MARRUECOS,MARROQUI,n,y,MAR
475,ISLAS MARSHALL,MARSHALLINA,n,y,MHL
485,MAURICIO,MAURICIANA,n,y,MUS
488,MAURITANIA,MAURITANA,n,y,MRT
490,MARTINICA,FRANCESA,n,n,MTQ
493,MEXICO,MEXICANA,n,n,MEX
494,MAYOTTE,FRANCESA,n,n,MYT
495,REPUBLICA DE MOLDOVA,MOLDAVA,n,y,MDA
496,MONACO,MONEGASCA,n,n,MCO
497,MONGOLIA,MONGOL,n,y,MNG
499,MONTENEGRO,MONTENEGRO,n,y,MNE
501,MONTSERRAT,BRITANICA,n,n,MSR
503,MICRONESIA,MICRONESIA,n,y,FSM
505,MOZAMBIQUE,MOZAMBIQUEÑA,n,y,MOZ
507,MYANMAR,BIRMANA,n,y,MMR
508,NAURU,NAURUANA,n,y,NRU
512,NAMIBIA,NAMIBIA,n,y,NAM
517,NEPAL,NEPALESA,n,y,NPL
521,NICARAGUA,NICARAGUENSE,n,y,NIC
525,NIGERIA,NIGERIANA,n,y,NGA
528,NIGER,NIGERINA,n,y,NER
531,NIUE,NEOZELANDESA,n,n,NIU
538,NORUEGA,NORUEGA,n,n,NOR
539,NUEVA CALEDONIA,FRANCESA,n,n,NCL
540,NUEVA ZELANDIA,NEOZELANDESA,n,n,NZL
542,OMAN,OMANI,n,y,OMN
545,PAPUA NVA GUINEA,PAPUA,n,y,PNG
548,NUEVA ZELANDIA,NEOZELANDESA,n,n,NZL
556,OMAN,OMAN,n,y,OMN
573,PAISES BAJOS,HOLANDESA,n,n,NLD
576,PAKISTAN,PAKISTANI,n,y,PAK
578,PALAU,PALAUENSE,n,y,PLW
580,PANAMA,PANAMEÑA,n,n,PAN
582,PAPUA NUEVA GUINEA,PAPUES,n,y,PNG
586,PARAGUAY,PARAGUAYA,n,n,PRY
589,PERU,PERUANA,n,n,PER
600,PALESTINA,PALESTINA,n,y,PSE
603,POLONIA,POLACA,n,y,POL
607,PORTUGAL,PORTUGUESA,n,n,PRT
609,POLINESIA FRANCESA,FRANCESA,n,n,PYF
611,PUERTO RICO,ESTADOUNIDENSE,n,n,PRI
618,QATAR,QATARIANA,n,y,QAT
628,REINO UNIDO,BRITANICA,n,n,GBR
640,R. CENTROAFRICANA,CENTROAFRICANA,n,y,CAF
643,REPUBLICA DE BELARRUS,REPUBLICA DE BELARRUS,n,y,BLR
645,REPUBLICA DE CHECHENIA,CHECHENO,n,y,
647,REPUBLICA DOMINICANA,DOMINICANA,n,n,DOM
649,REPUBLICA CHECA,CHECA,n,n,CZE
650,REUNION,FRANCESA,n,n,REU
651,COREA DEL NORTE,NORCOREANA,n,y,PRK
670,RUMANIA,RUMANA,n,n,ROU
673,RUSIA,RUSA,n,y,RUS
675,RWANDA,RWANDESA,n,y,RWA
676,TRASJORDANIA,TRANSJORDANA,n,y,
680,SAHARA OCCIDENTAL,MARROQUI,n,y,ESH
682,SAINT-PIERRE Y MIQUELON,FRANCESA,n,n,SPM
695,SAN CRISTOBAL Y NEVIS,SANCRISTOBALENSE,n,n,KNA
698,SAMOA ESTADOUNIDENSE,ESTADOUNIDENSE,n,n,ASM
699,SAMOA OCCIDENTAL,SAMOANA,n,y,WSM
701,SAN MARINO,SANMARINENSE,n,n,SMR
705,SAN VICENTE Y LAS GRANADINAS,SANVICENTINA,n,n,VCT
708,SANTA HELENA,BRITANICA,n,n,SHN
715,SANTA LUCIA,SANTALUCENSE,n,n,LCA
717,SANTA SEDE,SANTA SEDE,n,n,VAT
720,SANTO TOME Y PRINCIPE,SANTOTOMENSE,n,y,STP
728,SENEGAL,SENEGALESA,n,y,SEN
729,SERBIA,SERBIA,n,y,
730,SVALBARD,NORUEGA,n,n,SJM
731,SEYCHELLES,SEYCHELLESA,n,y,SYC
735,SIERRA LEONA,LEONESA,n,y,SLE
741,SINGAPUR,SINGAPURIANA,n,n,SGP
744,REP. ARABE SIRIA,SIRIA,n,y,SYR
748,SOMALIA,SOMALI,n,y,SOM
750,SRI LANKA,ESRILANQUES,n,y,LKA
756,SUDAFRICA,SUDAFRICANA,n,y,ZAF
759,SUDAN,SUDANESA,n,y,SDN
764,SUECIA,SUECA,n,n,SWE
767,SUIZA,SUIZA,n,n,CHE
770,SURINAME,SURINAMESA,n,n,SUR
773,SWAZILANDIA,SWAZI,n,y,SWZ
774,TAIWAN,TAIWANESA,n,n,TWN
775,TAYIKISTAN,TAYIKISTANI,n,y,TJK
776,TAILANDIA,TAILANDESA,n,y,THA
777,TIBET,CHINA,n,y,CHN
778,TERRIT. BRITANICO EN ANTARTIDA,BRITANICA,n,n,GBN
779,TERRIT. BRIT. EN EL OCEANO INDICO,BRITANICA,n,n,IOT
780,REP. UNIDA DE TANZANIA,TANZANIA,n,y,TZA
781,TIERRAS AUSTALES Y ANTARTICAS,FRANCESA,n,n,ATF
782,TAJIKISTAN,DUSHANBE,n,n,TJK
783,TIMOR ORIENTAL,INDONESIA,n,y,TMP
800,TOGO,TOGOLESA,n,y,TGO
810,TONGA,TONGANESA,n,y,TON
812,TOQUELAU,NEOZELANDESA,n,n,TKL
815,TRINIDAD Y TOBAGO,TRINITARIA,n,n,TTO
820,TUNEZ,TUNECINA,n,y,TUN
824,TURKMENISTAN,ASHGABAT,n,n,
827,TURQUIA,TURCA,n,n,TUR
828,TUVALU,TUVALUANA,n,y,TUV
829,TURKMENISTAN,TURCOMANA,n,y,TKM
830,UCRANIA,UCRANIANA,n,y,UKR
833,UGANDA,UGANDESA,n,y,UGA
840,FEDERACION DE RUSIA,RUSA,n,y,RUS
842,UNION MYANMAR,UNION MYANMAR,n,y,
845,URUGUAY,URUGUAYA,n,n,URY
847,UZBEKISTAN,UZBEQUI,n,y,UZB
849,VANUATU,VANUATUENSE,n,y,VUT
850,VENEZUELA,VENEZOLANA,n,n,VEN
855,VIET NAM,VIETNAMITA,n,y,VNM
866,ISLAS VIRGENES BRITANICAS,BRITANICA,n,n,VGB
867,ISLAS VIRGENES ESTADOUNIDENSES,ESTADOUNIDENSE,n,n,VIR
880,YEMEN,YEMENITA,n,y,YEM
885,YUGOSLAVIA,YUGOSLAVA,n,y,YUG
888,ZAIRE,ZAIRE,n,y,
890,ZAMBIA,ZAMBIANA,n,y,ZMB
892,ZIMBABWE,ZIMBABWUANA,n,y,ZWE
895,ANGUILA,BRITANICO,n,n,AIA
900,ISLAS TURKS Y CAICOS,BRITANICA,n,n,TCA
902,POINTE A PITRE,SIN,n,y,
905,T,SIN,,y,
910,VILNA,SIN,n,y,
915,YAMENA,SIN,n,y,
920,YIBUTI,SIN,n,n,DJI
921,ANTILLAS HOLANDESAS,HOLANDESA,n,n,ANT
922,GRAN BRETAÑA,BRITANICA,n,n,GBR
923,HOLANDA,HOLANDESA,n,n,NLD
924,PALESTINA,PALESTINA,n,y,PSE
925,AFRICA,AFRICANA,n,y,
926,SLOVENIJE,,n,y,SVN
927,LITHUANIA,LITHUANIA,n,n,LTU
928,ERITREA,ERITREA,n,y,ERI
929,ESCOCIA,ESCOSESA,n,y,GBR
930,GALES,GALESA,n,y,GBR
931,INGLATERRA,INGLESA,n,y,GBR
932,IRLANDA DEL NORTE,IRLANDESA,n,n,IRL
933,LATVIJAS REPUBLICA,LATVIJAS,n,y,LVA
934,ROYAUME DU MAROC,ROYAUME DU MAROC,n,y,MAR
998,CENTROAFRICA,CENTROAFRICANO,n,y,XXX
999,DESCONOCIDO ,DESCONOCIDA,n,n,XXA
1 code name demonym visa_out visa_in symbol
2 1 ALBORAN Y PEREJIL ISLAS ALBORAN n y
3 13 AFGANISTAN AFGANA n y AFG
4 17 ALBANIA ALBANESA n y ALB
5 23 ALEMANIA ALEMANA n n DEU
6 37 ANDORRA ANDORRANA n n AND
7 40 ANGOLA ANGOLESA n y AGO
8 43 ANTIGUA Y BARBUDA ANTIGUANA n n ATG
9 44 ANTILLAS NEERLANDESAS HOLANDESA n n ANT
10 53 ARABIA ARABE n y SAU
11 55 ARABIA SAUDITA SAUDITA n y SAU
12 59 ARGELIA ARGELINA n y DZA
13 63 ARGENTINA ARGENTINA n n ARG
14 65 ARMENIA ARMENIA n y ARM
15 67 ARUBA HOLANDESA n n ABW
16 69 AUSTRALIA AUSTRALIANA n n AUS
17 72 AUSTRIA AUSTRIACA n n AUT
18 75 AZERBAIYAN AZERBAIYANA n y AZE
19 77 BAHAMAS BAHAMEÑA n n BHS
20 80 BAHREIN BAHRENITA n y BHR
21 81 BANGLADESH BENGALESA n y BGD
22 83 BARBADOS BARBADIANA n n BRB
23 85 BELARUS BIELORRUSA n y BLR
24 87 BELGICA BELGA n n BEL
25 88 BELICE BELICEÑA n n BLZ
26 89 BENIN BENINESA n y BEN
27 90 BERMUDAS BRITANICA n n BMU
28 97 BOLIVIA BOLIVIANA n n BOL
29 99 BOSNIA BOSNIA n y BIH
30 101 BOTSWANA BETCHUANA n y BWA
31 105 BRASIL BRASILEÑA n n BRA
32 108 BRUNEI DARUSSALAM BRUENANA n n BRN
33 111 BULGARIA BULGARA n y BGR
34 113 BURKINA FASO BURKINESA n y BFA
35 115 BURUNDI BURUNDINESA n y BDI
36 117 BHUTAN BHUTANESA n y BTN
37 127 CABO VERDE CABOVERDIANA n y CPV
38 137 CAIMAN ISLAS BRITANICA n n CYM
39 141 CAMBOYA CAMBOYANA n y KHM
40 145 CAMERUN CAMERUNENSE n y CMR
41 149 CANADA CANADIENSE n n CAN
42 151 CHAD CHADIANA n y TCD
43 155 CEUTA Y MELILLA ESPAÑOLA n n ESP
44 169 COLOMBIA COLOMBIANA n n COL
45 171 COMORAS COMORANA n y COM
46 177 REP. DEMOC. DEL CONGO CONGOLESA n y COD
47 190 COREA DEL SUR COREANA n n KOR
48 193 COTE D`IVOIRE MARFILENSE n y CIV
49 196 COSTA RICA COSTARRICENSE n n CRI
50 198 CROACIA CROATA n n HRV
51 199 CUBA CUBANA n y CUB
52 201 CURAZAO HOLANDESA n n ANT
53 207 REPUBLICA CHECA CHECA n n CZE
54 211 CHILE CHILENA n n CHL
55 215 CHINA CHINA n n CHN
56 218 TAIWAN TAIWANESA n n TWN
57 221 CHIPRE CHIPRIOTA n n CYP
58 232 DINAMARCA DANESA n n DNK
59 233 DJIBOUTI DJIBOUTIENSE n n DJI
60 235 DOMINICA DOMINICA n n DMA
61 239 ECUADOR ECUATORIANA n n ECU
62 240 EGIPTO EGIPCIA n y EGY
63 242 EL SALVADOR SALVADOREÑA n n SLV
64 244 EMIRATOS ARABES ARABE n y ARE
65 245 ESPAÑA ESPAÑOLA n n ESP
66 246 ERITREA ERITREA n y ERI
67 247 ESLOVAQUIA ESLOVACA n n SVK
68 248 ESLOVENIA ESLOVENIA n n SVN
69 249 ESTADOS UNIDOS DE AMERICA ESTADOUNIDENSE n n USA
70 251 ESTONIA ESTONIA n n EST
71 253 ETIOPIA ETIOPE n n ETH
72 255 FIJI FIJIANA n y FJI
73 267 FILIPINAS FILIPINA n n PHL
74 271 FINLANDIA FINLANDESA n n FIN
75 275 FRANCIA FRANCESA n n FRA
76 281 GABON GABONESA n y GAB
77 285 GAMBIA GAMBIANA n y GMB
78 287 GEORGIA GEORGIANA n y GEO
79 289 GHANA GHANESA n y GHA
80 293 GIBRALTAR BRITANICA n n GIB
81 297 GRANADA GRANADINA n n GRD
82 301 GRECIA GRIEGA n n GRC
83 315 GROENLANDIA DANESA n n GRL
84 317 GUATEMALA GUATEMALTECA n n GTM
85 325 GUYANA GUYANESA n n GUY
86 329 GUINEA GUINEA n y GIN
87 331 GUINEA ECUATORIAL ECUATOGUINEANA n y GNQ
88 334 GUINEA BISSAU GUINEANA n y GNB
89 338 GUADALUPE FRANCESA n y GLP
90 339 GUAM ESTADOUNIDENSE n n GUM
91 340 GUAYANA FRANCESA FRANCESA n n GUF
92 341 HAITI HAITIANA n y HTI
93 345 HONDURAS HONDUREÑA n n HND
94 347 HONG KONG CHINA n y HKG
95 355 HUNGRIA HUNGARA n n HUN
96 361 INDIA INDIA n y IND
97 365 INDONESIA INDONESIA n n IDN
98 369 IRAQ IRAQUI n y IRQ
99 372 IRAN IRANI n y IRN
100 375 IRLANDA DEL SUR IRLANDESA n n IRL
101 379 ISLANDIA ISLANDESA n n ISL
102 380 ISLA DE MAN BRITANICA n n GBR
103 381 ISLA DE PITCAIRN BRITANICA n n PCN
104 382 ISLA JOHNSTON ESTADOUNIDENSE n n USA
105 383 ISRAEL ISRAELI n n ISR
106 384 ISLAS ALAND FINLANDESA n n FIN
107 385 ISLA WAKE ESTODOUNIDENSE n n USA
108 386 ITALIA ITALIANA n n ITA
109 387 ISLAS CHRISTMAS AUSTRALIANA n n CXR
110 388 ISLAS COOK NEOZELANDESA n n COK
111 389 ISLAS DEL CANAL BRITANICA n n GBR
112 390 ISLAS FEROE DANESA n n FRO
113 391 JAMAICA JAMAIQUINA n n JAM
114 392 ISLAS MARIANAS DEL NORTE ESTODOUNIDENSE n n USA
115 393 ISLAS MIDWAY ESTADOUNIDENSE n n USA
116 394 ISLAS WALLIS Y FUTUNA FRANCESA n n WLF
117 395 ISLAS SALOMON SALOMONICA n y SLB
118 397 IRIAN JAYA INDONESIA n n
119 399 JAPON JAPONESA n n JPN
120 403 JORDANIA JORDANA n y JOR
121 406 KAZAJSTAN KAZAQUI n y KAZ
122 410 KENYA KENYANA n y KEN
123 411 KIRIBATI KIRIBATI n y KIR
124 412 KIRGUISTAN KIRGUENSE n y KGZ
125 413 KUWAIT KUWAITI n y KWT
126 414 KOSOVO PRISTINA n y
127 415 KYRGYZSTAN KYRGYZSTANY n n
128 420 REP. DEMOC. POPULAR LAO LAOSEANA n y LAO
129 426 LESOTHO LESOTHA n y LSO
130 428 LETONIA LETONA n y LVA
131 429 LITUANIA LITUANA n n LTU
132 431 LIBANO LIBANESA n y LBN
133 434 LIBERIA LIBERIANA n y LBR
134 438 LIBIA LIBIO n y LBY
135 441 LIECHTENSTEIN LIECHTENSTEIN n n LIE
136 442 LUXEMBURGO LUXEMBURGUES n n LUX
137 447 MACAO CHINA n y MAC
138 448 MACEDONIA MACEDONIA n y MKD
139 450 MADAGASCAR MALGACHE n y MDG
140 455 MALASIA MALAYA n n MYS
141 458 MALAWI MALAWI n y MWI
142 461 MALDIVAS MALDIVIA n y MDV
143 464 MALI MALINESA n y MLI
144 467 MALTA MALTESA n n MLT
145 474 MARRUECOS MARROQUI n y MAR
146 475 ISLAS MARSHALL MARSHALLINA n y MHL
147 485 MAURICIO MAURICIANA n y MUS
148 488 MAURITANIA MAURITANA n y MRT
149 490 MARTINICA FRANCESA n n MTQ
150 493 MEXICO MEXICANA n n MEX
151 494 MAYOTTE FRANCESA n n MYT
152 495 REPUBLICA DE MOLDOVA MOLDAVA n y MDA
153 496 MONACO MONEGASCA n n MCO
154 497 MONGOLIA MONGOL n y MNG
155 499 MONTENEGRO MONTENEGRO n y MNE
156 501 MONTSERRAT BRITANICA n n MSR
157 503 MICRONESIA MICRONESIA n y FSM
158 505 MOZAMBIQUE MOZAMBIQUEÑA n y MOZ
159 507 MYANMAR BIRMANA n y MMR
160 508 NAURU NAURUANA n y NRU
161 512 NAMIBIA NAMIBIA n y NAM
162 517 NEPAL NEPALESA n y NPL
163 521 NICARAGUA NICARAGUENSE n y NIC
164 525 NIGERIA NIGERIANA n y NGA
165 528 NIGER NIGERINA n y NER
166 531 NIUE NEOZELANDESA n n NIU
167 538 NORUEGA NORUEGA n n NOR
168 539 NUEVA CALEDONIA FRANCESA n n NCL
169 540 NUEVA ZELANDIA NEOZELANDESA n n NZL
170 542 OMAN OMANI n y OMN
171 545 PAPUA NVA GUINEA PAPUA n y PNG
172 548 NUEVA ZELANDIA NEOZELANDESA n n NZL
173 556 OMAN OMAN n y OMN
174 573 PAISES BAJOS HOLANDESA n n NLD
175 576 PAKISTAN PAKISTANI n y PAK
176 578 PALAU PALAUENSE n y PLW
177 580 PANAMA PANAMEÑA n n PAN
178 582 PAPUA NUEVA GUINEA PAPUES n y PNG
179 586 PARAGUAY PARAGUAYA n n PRY
180 589 PERU PERUANA n n PER
181 600 PALESTINA PALESTINA n y PSE
182 603 POLONIA POLACA n y POL
183 607 PORTUGAL PORTUGUESA n n PRT
184 609 POLINESIA FRANCESA FRANCESA n n PYF
185 611 PUERTO RICO ESTADOUNIDENSE n n PRI
186 618 QATAR QATARIANA n y QAT
187 628 REINO UNIDO BRITANICA n n GBR
188 640 R. CENTROAFRICANA CENTROAFRICANA n y CAF
189 643 REPUBLICA DE BELARRUS REPUBLICA DE BELARRUS n y BLR
190 645 REPUBLICA DE CHECHENIA CHECHENO n y
191 647 REPUBLICA DOMINICANA DOMINICANA n n DOM
192 649 REPUBLICA CHECA CHECA n n CZE
193 650 REUNION FRANCESA n n REU
194 651 COREA DEL NORTE NORCOREANA n y PRK
195 670 RUMANIA RUMANA n n ROU
196 673 RUSIA RUSA n y RUS
197 675 RWANDA RWANDESA n y RWA
198 676 TRASJORDANIA TRANSJORDANA n y
199 680 SAHARA OCCIDENTAL MARROQUI n y ESH
200 682 SAINT-PIERRE Y MIQUELON FRANCESA n n SPM
201 695 SAN CRISTOBAL Y NEVIS SANCRISTOBALENSE n n KNA
202 698 SAMOA ESTADOUNIDENSE ESTADOUNIDENSE n n ASM
203 699 SAMOA OCCIDENTAL SAMOANA n y WSM
204 701 SAN MARINO SANMARINENSE n n SMR
205 705 SAN VICENTE Y LAS GRANADINAS SANVICENTINA n n VCT
206 708 SANTA HELENA BRITANICA n n SHN
207 715 SANTA LUCIA SANTALUCENSE n n LCA
208 717 SANTA SEDE SANTA SEDE n n VAT
209 720 SANTO TOME Y PRINCIPE SANTOTOMENSE n y STP
210 728 SENEGAL SENEGALESA n y SEN
211 729 SERBIA SERBIA n y
212 730 SVALBARD NORUEGA n n SJM
213 731 SEYCHELLES SEYCHELLESA n y SYC
214 735 SIERRA LEONA LEONESA n y SLE
215 741 SINGAPUR SINGAPURIANA n n SGP
216 744 REP. ARABE SIRIA SIRIA n y SYR
217 748 SOMALIA SOMALI n y SOM
218 750 SRI LANKA ESRILANQUES n y LKA
219 756 SUDAFRICA SUDAFRICANA n y ZAF
220 759 SUDAN SUDANESA n y SDN
221 764 SUECIA SUECA n n SWE
222 767 SUIZA SUIZA n n CHE
223 770 SURINAME SURINAMESA n n SUR
224 773 SWAZILANDIA SWAZI n y SWZ
225 774 TAIWAN TAIWANESA n n TWN
226 775 TAYIKISTAN TAYIKISTANI n y TJK
227 776 TAILANDIA TAILANDESA n y THA
228 777 TIBET CHINA n y CHN
229 778 TERRIT. BRITANICO EN ANTARTIDA BRITANICA n n GBN
230 779 TERRIT. BRIT. EN EL OCEANO INDICO BRITANICA n n IOT
231 780 REP. UNIDA DE TANZANIA TANZANIA n y TZA
232 781 TIERRAS AUSTALES Y ANTARTICAS FRANCESA n n ATF
233 782 TAJIKISTAN DUSHANBE n n TJK
234 783 TIMOR ORIENTAL INDONESIA n y TMP
235 800 TOGO TOGOLESA n y TGO
236 810 TONGA TONGANESA n y TON
237 812 TOQUELAU NEOZELANDESA n n TKL
238 815 TRINIDAD Y TOBAGO TRINITARIA n n TTO
239 820 TUNEZ TUNECINA n y TUN
240 824 TURKMENISTAN ASHGABAT n n
241 827 TURQUIA TURCA n n TUR
242 828 TUVALU TUVALUANA n y TUV
243 829 TURKMENISTAN TURCOMANA n y TKM
244 830 UCRANIA UCRANIANA n y UKR
245 833 UGANDA UGANDESA n y UGA
246 840 FEDERACION DE RUSIA RUSA n y RUS
247 842 UNION MYANMAR UNION MYANMAR n y
248 845 URUGUAY URUGUAYA n n URY
249 847 UZBEKISTAN UZBEQUI n y UZB
250 849 VANUATU VANUATUENSE n y VUT
251 850 VENEZUELA VENEZOLANA n n VEN
252 855 VIET NAM VIETNAMITA n y VNM
253 866 ISLAS VIRGENES BRITANICAS BRITANICA n n VGB
254 867 ISLAS VIRGENES ESTADOUNIDENSES ESTADOUNIDENSE n n VIR
255 880 YEMEN YEMENITA n y YEM
256 885 YUGOSLAVIA YUGOSLAVA n y YUG
257 888 ZAIRE ZAIRE n y
258 890 ZAMBIA ZAMBIANA n y ZMB
259 892 ZIMBABWE ZIMBABWUANA n y ZWE
260 895 ANGUILA BRITANICO n n AIA
261 900 ISLAS TURKS Y CAICOS BRITANICA n n TCA
262 902 POINTE A PITRE SIN n y
263 905 T SIN y
264 910 VILNA SIN n y
265 915 YAMENA SIN n y
266 920 YIBUTI SIN n n DJI
267 921 ANTILLAS HOLANDESAS HOLANDESA n n ANT
268 922 GRAN BRETAÑA BRITANICA n n GBR
269 923 HOLANDA HOLANDESA n n NLD
270 924 PALESTINA PALESTINA n y PSE
271 925 AFRICA AFRICANA n y
272 926 SLOVENIJE n y SVN
273 927 LITHUANIA LITHUANIA n n LTU
274 928 ERITREA ERITREA n y ERI
275 929 ESCOCIA ESCOSESA n y GBR
276 930 GALES GALESA n y GBR
277 931 INGLATERRA INGLESA n y GBR
278 932 IRLANDA DEL NORTE IRLANDESA n n IRL
279 933 LATVIJAS REPUBLICA LATVIJAS n y LVA
280 934 ROYAUME DU MAROC ROYAUME DU MAROC n y MAR
281 998 CENTROAFRICA CENTROAFRICANO n y XXX
282 999 DESCONOCIDO DESCONOCIDA n n XXA

BIN
data/data_nacionality.ods Normal file

Binary file not shown.

29
data/query.sql Normal file
View File

@ -0,0 +1,29 @@
SELECT row_number() OVER (ORDER BY linex.line_id) AS id, current_timestamp AS create_date, room,
main_guest, arrival_date, departure_date, hotel_booking.reference, hotel_booking.state
FROM
(SELECT book_line.line_id as line_id, book_line.booking, room.name AS room, book_line.main_guest, book_line.arrival_date,
book_line.departure_date FROM
(SELECT line.idx AS line_id, line.room, booking, party.name AS main_guest, line.arrival_date,
line.departure_date
FROM
(SELECT id as idx, booking, room, main_guest, arrival_date, departure_date FROM hotel_booking_lines
WHERE arrival_date>='2013-07-01' AND departure_date<='2013-12-31'
ORDER BY room) AS line
INNER JOIN
(SELECT id, name FROM party_party) AS party
ON (party.id=line.main_guest)) AS book_line
JOIN
(SELECT room.id AS id, pid, pro.name FROM
(SELECT tid, pid, t.name
FROM
(SELECT p.id AS pid, p.template FROM product_product AS p) AS p
INNER JOIN
(SELECT t.id AS tid, t.name AS name FROM product_template AS t) AS t
ON (tid=p.template)) AS pro
INNER JOIN
(SELECT room.id, room.product FROM hotel_room AS room) AS room
ON (room.product=pro.pid) ORDER BY pro.name) AS room
ON (room.id=book_line.room)) AS linex
JOIN
(SELECT id AS bid, reference, state FROM hotel_booking) AS hotel_booking
ON (linex.booking=hotel_booking.bid) ORDER BY booking

14
data_category.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<!-- This file is part of the sale_printing module for Tryton.
The COPYRIGHT file at the top level of this repository contains
the full copyright notices and license terms. -->
<tryton>
<data>
<!-- <record model="product.category" id="cat_rooms">
<field name="name">ROOMS</field>
</record>
<record model="product.category" id="cat_restaurant">
<field name="name">RESTAURANT</field>
</record> -->
</data>
</tryton>

36
doc/index.rst Normal file
View File

@ -0,0 +1,36 @@
Hotel Module
###############
The Hotel Management Module.
----- Tryton Solución Hotel -----
Más allá de ser un software hotel potente, abierto, flexible y modular, está diseñado
para una fácil y completa integración de todas las áreas de la gestion hotelera.
Aplicación para control de las actividades de un hotel:
- Configuración de habitaciones, salones.
- Tarificación según calendario, Listas de Precios por Clientes corporativos ó Agencias.
- Gestión de reservas y clientes
- Registro de gastos y facturación.
- Historial de Visitas
- Comunicación con central, informes y facturación.
- Módulo Ama de Llaves, con gestión de estado de limpieza y mantenimiento de habitaciones.
- Gestión de SPA y servicios, con manejo de turnos, control de acceso de personal.
- Módulo Restaurante (costos de produción, recetas, control de stock) e informes de rentabilidad.
- Alquiler de salones
Otros beneficios es la integración automática de toda la información que se genera
desde cada uno de los centros de planeación:
- Compras, Inventarios, Producción, Administración del Recurso Humano,
CRM, Gestión del Mantenimiento, Módulo ISO 9000.
Booking Workflow
Draft (Borrador) ---> Confirmed (Confirmado) ---> No Submit (No llegó)
---> Submit (Llegó)
---> Canceled (Canceló)
---> Canceled

BIN
doc/sale commission.ods Normal file

Binary file not shown.

BIN
guests_list.ods Normal file

Binary file not shown.

83
hotel.xml Normal file
View File

@ -0,0 +1,83 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="res.group" id="group_hotel">
<field name="name">Hotel</field>
</record>
<record model="res.group" id="group_hotel_admin">
<field name="name">Hotel Administration</field>
</record>
<record model="res.user-res.group" id="user_admin_group_hotel">
<field name="user" ref="res.user_admin"/>
<field name="group" ref="group_hotel"/>
</record>
<record model="res.user-res.group" id="user_admin_group_hotel_admin">
<field name="user" ref="res.user_admin"/>
<field name="group" ref="group_hotel_admin"/>
</record>
<record model="res.user-res.group" id="user_trigger_group_hotel">
<field name="user" ref="res.user_trigger"/>
<field name="group" ref="group_hotel"/>
</record>
<record model="res.user-res.group" id="user_trigger_group_hotel_admin">
<field name="user" ref="res.user_trigger"/>
<field name="group" ref="group_hotel_admin"/>
</record>
<record model="ir.ui.icon" id="hotel_icon">
<field name="name">tryton-hotel</field>
<field name="path">icons/tryton-hotel.svg</field>
</record>
<menuitem name="Hotel" sequence="10" id="menu_hotel"
icon="tryton-hotel" />
<record model="ir.ui.menu-res.group" id="menu_hotel_group_hotel">
<field name="menu" ref="menu_hotel"/>
<field name="group" ref="group_hotel"/>
</record>
<menuitem name="Configuration" parent="menu_hotel"
id="menu_configuration" sequence="10" icon="tryton-settings"/>
<record model="ir.ui.menu-res.group"
id="menu_configuration_group_hotel_admin">
<field name="menu" ref="menu_configuration"/>
<field name="group" ref="group_hotel_admin"/>
</record>
<menuitem name="Reporting" parent="menu_hotel"
id="menu_reporting" sequence="90" active="1"
icon="tryton-settings"/>
<record model="ir.sequence.type" id="sequence_type_hotel">
<field name="name">Hotel</field>
<field name="code">hotel</field>
</record>
<record model="ir.sequence.type-res.group"
id="sequence_type_hotel_group_admin">
<field name="sequence_type" ref="sequence_type_hotel"/>
<field name="group" ref="res.group_admin"/>
</record>
<record model="ir.sequence.type-res.group"
id="sequence_type_hotel_group_hotel_admin">
<field name="sequence_type" ref="sequence_type_hotel"/>
<field name="group" ref="group_hotel_admin"/>
</record>
<record model="ir.sequence" id="sequence_hotel_booking">
<field name="name">Booking</field>
<field name="code">hotel</field>
</record>
<record model="ir.sequence" id="sequence_hotel_occupancy">
<field name="name">Occupancy</field>
<field name="code">hotel</field>
</record>
</data>
</tryton>

BIN
housekeeping.ods Normal file

Binary file not shown.

248
housekeeping.py Normal file
View File

@ -0,0 +1,248 @@
# This file is part of Presik. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pyson import Eval
from trytond.model import Workflow, ModelView, ModelSQL, fields, Unique
from trytond.wizard import Wizard, StateView, Button, StateReport
from trytond.report import Report
from trytond.transaction import Transaction
from datetime import datetime
from trytond.pool import Pool
__all__ = [
'Housekeeping', 'HotelTask', 'HotelHousekeepingTask',
'HousekeepingServiceReport', 'HousekeepingService',
'HousekeepingServiceStart', 'HousekeepingCleaningType'
]
STATES = {'invisible': (Eval('type') != 'service')}
class HousekeepingCleaningType(ModelSQL, ModelView):
"Housekeeping Cleaning Type"
__name__ = "hotel.housekeeping.cleaning_type"
name = fields.Char('Name', required=True, select=True)
description = fields.Text('Description')
class Housekeeping(Workflow, ModelSQL, ModelView):
'HouseKeeping'
__name__ = 'hotel.housekeeping'
employee = fields.Many2One('company.employee', 'Employee')
room = fields.Many2One('hotel.room', 'Room', required=True)
state = fields.Selection([
('inspected', 'Inspected'),
('dirty', 'Dirty'),
('clean', 'Clean'),
('maintenance', 'Maintenance'),
], 'Status', required=True, readonly=True)
state_string = state.translated('state')
availability = fields.Selection([
('blocked', 'Blocked'),
('available', 'Available'),
('occupied', 'Occupied'),
], 'Availability', required=True)
cleaning_type = fields.Many2One('hotel.housekeeping.cleaning_type',
'Cleaning Type', required=False)
availability_string = state.translated('availability')
check_list = fields.Text('Check List')
tasks = fields.One2Many('hotel.housekeeping.task', 'housekeeping',
'House Tasks')
start_date_assigned = fields.Date('Start Date Assigned')
end_date_assigned = fields.Date('End Date Assigned')
notes = fields.Text('Notes')
check_in_time = fields.Function(fields.Time('Check In Time'), 'get_check_in_time')
check_out_time = fields.Function(fields.Time('Check In Time'), 'get_check_out_time')
@classmethod
def __setup__(cls):
super(Housekeeping, cls).__setup__()
t = cls.__table__()
cls._sql_constraints += [
('room_uniq', Unique(t, t.room), 'The room must be unique.'),
]
cls._transitions |= set((
('clean', 'dirty'),
('clean', 'inspected'),
('clean', 'maintenance'),
('dirty', 'clean'),
('dirty', 'maintenance'),
('dirty', 'inspected'),
('maintenance', 'inspected'),
('maintenance', 'dirty'),
('inspected', 'dirty'),
('inspected', 'maintenance'),
('inspected', 'clean'),
))
cls._buttons.update({
'clean': {
'invisible': Eval('state').in_(['maintenance', 'clean']),
},
'dirty': {
'invisible': Eval('state').in_(['dirty']),
},
'inspected': {
'invisible': Eval('state').in_(['inspected']),
},
'maintenance': {
'invisible': Eval('state').in_(['maintenance']),
},
})
@staticmethod
def default_state():
return 'clean'
@staticmethod
def default_avaibility():
return 'available'
@classmethod
@ModelView.button
@Workflow.transition('clean')
def clean(cls, records):
for rec in records:
rec.cleaning_type = None
rec.save()
@classmethod
@ModelView.button
@Workflow.transition('dirty')
def dirty(cls, records):
Config = Pool().get('hotel.configuration')
config = Config.get_configuration()
for rec in records:
rec.cleaning_type = config.cleaning_occupied.id
@classmethod
@ModelView.button
@Workflow.transition('maintenance')
def maintenance(cls, records):
pass
@classmethod
@ModelView.button
@Workflow.transition('inspected')
def inspected(cls, records):
pass
def get_check_in_time(self, name):
pool = Pool()
Date = pool.get('ir.date')
Configuration = pool.get('hotel.configuration')
BookingLine = pool.get('hotel.booking.line')
config = Configuration.get_configuration()
lines = BookingLine.search_read([
('room', '=', self.room.id),
('arrival_date', '=', Date.today()),
], fields_names=['id'])
if lines:
return config.check_in_time.strftime('%H:%M %p')
def get_check_out_time(self, name):
pool = Pool()
Date = pool.get('ir.date')
Configuration = pool.get('hotel.configuration')
Operation = pool.get('hotel.operation')
config = Configuration.get_configuration()
operations = Operation.search_read([
('room', '=', self.room.id),
('end_date', '=', Date.today()),
], fields_names=['id'])
if operations:
return config.check_out_time.strftime('%H:%M %p')
# def get_occupancies(self, name):
# pool = Pool()
# OccupancyLine = pool.get('hotel.occupancy.line')
# occupancies = set()
# lines = OccupancyLine.search([
# ('room.id', '=', self.room.id),
# ('occupancy.state', '=', 'confirmed'),
# ])
# for line in lines:
# occupancies.add(line.id)
# return list(occupancies)
class HotelTask(ModelSQL, ModelView):
"Hotel Task"
__name__ = "hotel.task"
name = fields.Char('Name Task', required=True, select=True)
frecuency = fields.Integer('Frecuency', select=True, help='In days')
quantity = fields.Integer('Quantity', select=True)
class HotelHousekeepingTask(ModelView, ModelSQL):
'Hotel Housekeeping Task'
__name__ = 'hotel.housekeeping.task'
housekeeping = fields.Many2One('hotel.housekeeping', 'Hotel Housekeeping',
ondelete='CASCADE', select=True, required=True)
task = fields.Many2One('hotel.task', 'Task', select=True, required=True)
frecuency = fields.Integer('Frecuency', select=True, help='In days')
quantity = fields.Integer('Quantity', select=True)
@fields.depends('task', 'frecuency')
def on_change_task(self, name=None):
if self.task:
self.frecuency = self.task.frecuency
class HousekeepingServiceStart(ModelView):
'Print Housekeeping service Start'
__name__ = 'hotel.print_housekeeping_service.start'
date = fields.Date('Date', required=True)
employee = fields.Many2One('company.employee', 'Employee')
company = fields.Many2One('company.company', 'Company', required=True)
@staticmethod
def default_date():
Date_ = Pool().get('ir.date')
return Date_.today()
@staticmethod
def default_company():
return Transaction().context.get('company')
class HousekeepingService(Wizard):
'Housekeeping Service'
__name__ = 'hotel.print_housekeeping_service'
start = StateView('hotel.print_housekeeping_service.start',
'hotel.print_housekeeping_service_start_view_form', [
Button('Cancel', 'end', 'tryton-cancel'),
Button('Open', 'print_', 'tryton-print', default=True),
])
print_ = StateReport('hotel.print_housekeeping_service.report')
def do_print_(self, action):
company = self.start.company
data = {
'date': self.start.date,
'employee': self.start.employee.id if self.start.employee else None,
'company': company.id,
}
return action, data
def transition_print_(self):
return 'end'
class HousekeepingServiceReport(Report):
__name__ = 'hotel.print_housekeeping_service.report'
@classmethod
def get_context(cls, records, data):
report_context = super(HousekeepingServiceReport, cls).get_context(records, data)
pool = Pool()
Company = pool.get('company.company')
Housekeeping = pool.get('hotel.housekeeping')
dom = []
if data['employee']:
dom.append(('employee.id', '=', data['employee']))
housekeepings = Housekeeping.search(dom)
report_context['records'] = housekeepings
report_context['company'] = Company(data['company']).party.name
report_context['date'] = datetime.now()
return report_context

144
housekeeping.xml Normal file
View File

@ -0,0 +1,144 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="housekeeping_view_form">
<field name="model">hotel.housekeeping</field>
<field name="type">form</field>
<field name="name">housekeeping_form</field>
</record>
<record model="ir.ui.view" id="housekeeping_view_tree">
<field name="model">hotel.housekeeping</field>
<field name="type">tree</field>
<field name="name">housekeeping_tree</field>
</record>
<record model="ir.action.act_window" id="act_housekeeping_form">
<field name="name">Housekeeping</field>
<field name="res_model">hotel.housekeeping</field>
</record>
<record model="ir.action.act_window.view" id="act_housekeeping_form_view1">
<field name="sequence" eval="1"/>
<field name="view" ref="housekeeping_view_tree"/>
<field name="act_window" ref="act_housekeeping_form"/>
</record>
<record model="ir.action.act_window.view" id="act_housekeeping_form_view2">
<field name="sequence" eval="2"/>
<field name="view" ref="housekeeping_view_form"/>
<field name="act_window" ref="act_housekeeping_form"/>
</record>
<menuitem parent="menu_hotel" sequence="20"
action="act_housekeeping_form" id="menu_housekeeping_form"/>
<!-- Model Access -->
<record model="ir.model.access" id="access_housekeeping">
<field name="model" search="[('model', '=', 'hotel.housekeeping')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_housekeeping_group_hotel">
<field name="model" search="[('model', '=', 'hotel.housekeeping')]"/>
<field name="group" ref="group_hotel"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_housekeeping_group_hotel_admin">
<field name="model" search="[('model', '=', 'hotel.housekeeping')]"/>
<field name="group" ref="group_hotel_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.ui.view" id="housekeeping_cleaning_type_view_form">
<field name="model">hotel.housekeeping.cleaning_type</field>
<field name="type">form</field>
<field name="name">housekeeping_cleaning_type_form</field>
</record>
<record model="ir.ui.view" id="housekeeping_cleaning_type_view_tree">
<field name="model">hotel.housekeeping.cleaning_type</field>
<field name="type">tree</field>
<field name="name">housekeeping_cleaning_type_tree</field>
</record>
<record model="ir.action.act_window" id="act_housekeeping_cleaning_type_form">
<field name="name">Cleaning Type</field>
<field name="res_model">hotel.housekeeping.cleaning_type</field>
</record>
<record model="ir.action.act_window.view" id="act_housekeeping_cleaning_type_form_view1">
<field name="sequence" eval="15"/>
<field name="view" ref="housekeeping_cleaning_type_view_tree"/>
<field name="act_window" ref="act_housekeeping_cleaning_type_form"/>
</record>
<record model="ir.action.act_window.view" id="act_housekeeping_cleaning_type_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="task_view_form"/>
<field name="act_window" ref="act_housekeeping_cleaning_type_form"/>
</record>
<menuitem name="Cleaning Type" parent="hotel.menu_configuration" sequence="50"
action="act_housekeeping_cleaning_type_form"
id="menu_hotel_housekeeping_cleaning_type"/>
<record model="ir.ui.view" id="housekeeping_task_view_form">
<field name="model">hotel.housekeeping.task</field>
<field name="type">form</field>
<field name="name">housekeeping_task_form</field>
</record>
<record model="ir.ui.view" id="housekeeping_task_view_tree">
<field name="model">hotel.housekeeping.task</field>
<field name="type">tree</field>
<field name="name">housekeeping_task_tree</field>
</record>
<record model="ir.ui.view" id="task_view_form">
<field name="model">hotel.task</field>
<field name="type">form</field>
<field name="name">task_form</field>
</record>
<record model="ir.ui.view" id="task_view_tree">
<field name="model">hotel.task</field>
<field name="type">tree</field>
<field name="name">task_tree</field>
</record>
<record model="ir.action.act_window" id="act_task_housekeeping_form">
<field name="name">Tasks Housekeeping</field>
<field name="res_model">hotel.task</field>
</record>
<record model="ir.action.act_window.view" id="act_task_housekeeping_form_view1">
<field name="sequence" eval="15"/>
<field name="view" ref="task_view_tree"/>
<field name="act_window" ref="act_task_housekeeping_form"/>
</record>
<record model="ir.action.act_window.view" id="act_task_housekeeping_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="task_view_form"/>
<field name="act_window" ref="act_task_housekeeping_form"/>
</record>
<menuitem name="Task HouseKeeping" parent="hotel.menu_configuration" sequence="50"
action="act_task_housekeeping_form" id="menu_hotel_task_housekeeping"/>
<record model="ir.action.report" id="report_housekeeping_service">
<field name="name">Housekeeping Service Report</field>
<field name="model"></field>
<field name="report_name">hotel.print_housekeeping_service.report</field>
<field name="report">hotel/housekeeping.ods</field>
</record>
<record model="ir.ui.view" id="print_housekeeping_service_start_view_form">
<field name="model">hotel.print_housekeeping_service.start</field>
<field name="type">form</field>
<field name="name">housekeeping_service_start_form</field>
</record>
<record model="ir.action.wizard" id="wizard_print_housekeeping_service">
<field name="name">HouseKeeping Service</field>
<field name="wiz_name">hotel.print_housekeeping_service</field>
</record>
<menuitem parent="hotel.menu_reporting" id="menu_housekeeping_service"
action="wizard_print_housekeeping_service"/>
</data>
</tryton>

18
icons/tryton-hotel.svg Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="212.75" height="212.75" id="svg4491" version="1.1" inkscape:version="0.48.0 r9654" sodipodi:docname="New document 13">
<defs id="defs4493"/>
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.35" inkscape:cx="109.94642" inkscape:cy="-22.196423" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:window-width="515" inkscape:window-height="436" inkscape:window-x="0" inkscape:window-y="52" inkscape:window-maximized="0"/>
<metadata id="metadata4496">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(-265.05358,-297.41576)">
<path inkscape:connector-curvature="0" style="color:#000000;fill:#008080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.1863264;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" d="m 371.42858,297.41576 c -58.75091,0 -106.375,47.62409 -106.375,106.375 0,58.75091 47.62409,106.375 106.375,106.375 58.75091,0 106.375,-47.62409 106.375,-106.375 0,-58.75091 -47.62409,-106.375 -106.375,-106.375 z m -23.8125,60.21875 91.5625,0 3.3125,0 0,24.875 0.25,0 -0.25,0.15625 0,22.78125 -8.84375,0 0,-17.125 -27.8125,23.9375 c 0,0 -0.0248,33.7793 -0.0625,33.875 l -10.78125,0 0,-28.40625 -90.0625,0 0,29.375 -10.78125,0 0,-21.53125 0,-7.84375 0,-2.9375 0,-30.34375 30.25,0 23.21875,-15.21875 0,-11.59375 z m 18.84375,9.5 c -6.30342,0 -12.00476,0.86972 -16.28125,2.25 l 0.25,0.375 -22.375,14.6875 77.71875,0 0,15.15625 c 9.15167,-7.31632 18.16136,-14.92945 27.6875,-21.6875 0.68496,-0.77363 1.0625,-1.58595 1.0625,-2.4375 0,-4.596 -10.75272,-8.34375 -24,-8.34375 -9.87331,0 -18.35213,2.10549 -22.03125,5.0625 -3.67912,-2.95701 -12.15794,-5.0625 -22.03125,-5.0625 z m -61.9375,24.25 0,19.125 5.46875,0 0,-19.125 -5.46875,0 z m 10.375,0 0,19.125 5.46875,0 0,-19.125 -5.46875,0 z m 9.84375,0 0,19.125 5.46875,0 0,-19.125 -5.46875,0 z m 9.84375,0 0,19.125 5.4375,0 0,-19.125 -5.4375,0 z m 10.90625,0 0,19.125 5.46875,0 0,-19.125 -5.46875,0 z m 11.46875,0 0,19.125 5.46875,0 0,-19.125 -5.46875,0 z m 12.03125,0 0,19.125 5.46875,0 0,-19.125 -5.46875,0 z m 10.9375,0 0,19.125 5.46875,0 0,-19.125 -5.46875,0 z m 9.28125,0 0,19.125 5.46875,0 0,-19.125 -5.46875,0 z" id="path4280"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
invoice_income_daily.ods Normal file

Binary file not shown.

BIN
invoice_simplified.fodt Normal file

Binary file not shown.

7326
locale/es.po Normal file

File diff suppressed because it is too large Load Diff

23
location.py Normal file
View File

@ -0,0 +1,23 @@
# 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.model import ModelView, ModelSQL, fields
__all__ = ['HotelLocation']
class HotelLocation(ModelSQL, ModelView):
"Hotel Location"
__name__ = "hotel.location"
name = fields.Char('Name', required=True, translate=True)
parent = fields.Many2One('hotel.location','Parent', select=True)
childs = fields.One2Many('hotel.location', 'parent', string='Children')
@classmethod
def __setup__(cls):
super(HotelLocation, cls).__setup__()
def get_rec_name(self, name):
if self.parent:
return self.parent.get_rec_name(name) + ' / ' + self.name
else:
return self.name

60
location.xml Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="location_view_tree">
<field name="model">hotel.location</field>
<field name="type">tree</field>
<field name="priority">50</field>
<field name="name">location_tree</field>
</record>
<record model="ir.ui.view" id="location_view_tree2">
<field name="model">hotel.location</field>
<field name="type">tree</field>
<field name="priority">20</field>
<field name="field_childs">childs</field>
<field name="name">location_tree2</field>
</record>
<record model="ir.ui.view" id="location_view_form">
<field name="model">hotel.location</field>
<field name="type">form</field>
<field name="name">location_form</field>
</record>
<record model="ir.action.act_window" id="act_location_tree">
<field name="name">Locations</field>
<field name="res_model">hotel.location</field>
<field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_location_tree_view1">
<field name="sequence" eval="1"/>
<field name="view" ref="location_view_tree2"/>
<field name="act_window" ref="act_location_tree"/>
</record>
<record model="ir.action.act_window.view" id="act_location_tree_view2">
<field name="sequence" eval="2"/>
<field name="view" ref="location_view_form"/>
<field name="act_window" ref="act_location_tree"/>
</record>
<menuitem parent="hotel.menu_configuration" sequence="30"
action="act_location_tree" id="menu_location_tree"/>
<record model="ir.model.access" id="access_hotel_location">
<field name="model" search="[('model', '=', 'hotel.location')]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_hotel_location_admin">
<field name="model" search="[('model', '=', 'hotel.location')]"/>
<field name="group" ref="group_hotel_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
</data>
</tryton>

BIN
migration_report.ods Normal file

Binary file not shown.

BIN
occupation_global.ods Normal file

Binary file not shown.

BIN
operation.fodt Normal file

Binary file not shown.

1494
operation.py Normal file

File diff suppressed because it is too large Load Diff

349
operation.xml Normal file
View File

@ -0,0 +1,349 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="operation_line_view_tree">
<field name="model">hotel.operation.line</field>
<field name="type">tree</field>
<field name="name">operation_line_tree</field>
</record>
<record model="ir.ui.view" id="operation_line_view_form">
<field name="model">hotel.operation.line</field>
<field name="type">form</field>
<field name="name">operation_line_form</field>
</record>
<record model="ir.ui.view" id="operation_view_tree">
<field name="model">hotel.operation</field>
<field name="type">tree</field>
<field name="name">operation_tree</field>
</record>
<record model="ir.ui.view" id="operation_view_form">
<field name="model">hotel.operation</field>
<field name="type">form</field>
<field name="name">operation_form</field>
</record>
<record model="ir.action.act_window" id="act_operation_tree">
<field name="name">Operation Forecast</field>
<field name="res_model">hotel.operation</field>
</record>
<record model="ir.action.act_window.view" id="act_operation_view_tree1">
<field name="sequence" eval="10"/>
<field name="view" ref="operation_view_tree"/>
<field name="act_window" ref="act_operation_tree"/>
</record>
<record model="ir.action.act_window.view" id="act_operation_view_tree2">
<field name="sequence" eval="20"/>
<field name="view" ref="operation_view_form"/>
<field name="act_window" ref="act_operation_tree"/>
</record>
<menuitem name="Operations" parent="hotel.menu_hotel" sequence="14"
id="menu_hotel_operation" action="act_operation_tree"/>
<record model="ir.model.button" id="operation_cancel_button">
<field name="name">cancel</field>
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
</record>
<record model="ir.model.button-res.group" id="operation_cancel_button_group_hotel">
<field name="button" ref="operation_cancel_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="operation_draft_button">
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
</record>
<record model="ir.model.button-res.group" id="operation_draft_button_group_hotel">
<field name="button" ref="operation_draft_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="operation_confirm_button">
<field name="name">confirm</field>
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
</record>
<record model="ir.model.button-res.group" id="operation_confirm_button_group_hotel">
<field name="button" ref="operation_confirm_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="hotel_operation_check_out_button">
<field name="name">check_out</field>
<field name="string">Check Out</field>
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
</record>
<record model="ir.model.button-res.group" id="hotel_operation_check_out_button_group_hotel">
<field name="button" ref="hotel_operation_check_out_button"/>
<field name="group" ref="group_hotel"/>
</record>
<!-- Model Access -->
<record model="ir.model.access" id="access_operation">
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_operation_group_hotel">
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
<field name="group" ref="group_hotel"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.model.access" id="access_operation_group_hotel_admin">
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
<field name="group" ref="group_hotel_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.ui.view" id="operation_maintenance_view_tree">
<field name="model">hotel.operation.maintenance</field>
<field name="type">tree</field>
<field name="name">operation_maintenance_tree</field>
</record>
<record model="ir.ui.view" id="operation_maintenance_view_form">
<field name="model">hotel.operation.maintenance</field>
<field name="type">form</field>
<field name="name">operation_maintenance_form</field>
</record>
<record model="ir.action.act_window" id="act_operation_maintenance_tree">
<field name="name">Operation Maintenance</field>
<field name="res_model">hotel.operation.maintenance</field>
</record>
<record model="ir.action.act_window.view" id="act_operation_maintenance_view_tree1">
<field name="sequence" eval="10"/>
<field name="view" ref="operation_maintenance_view_tree"/>
<field name="act_window" ref="act_operation_maintenance_tree"/>
</record>
<record model="ir.action.act_window.view" id="act_operation_maintenance_view_tree2">
<field name="sequence" eval="20"/>
<field name="view" ref="operation_maintenance_view_form"/>
<field name="act_window" ref="act_operation_maintenance_tree"/>
</record>
<menuitem name="Operation Maintenance" parent="hotel.menu_hotel"
sequence="17" id="menu_hotel_operation_maintenance"
action="act_operation_maintenance_tree"/>
<!-- Model Access -->
<record model="ir.model.access" id="access_operation_maintenance">
<field name="model" search="[('model', '=', 'hotel.operation.maintenance')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_operation_maintenance_group_hotel">
<field name="model" search="[('model', '=', 'hotel.operation.maintenance')]"/>
<field name="group" ref="group_hotel"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_operation_maintenance_group_hotel_admin">
<field name="model" search="[('model', '=', 'hotel.operation.maintenance')]"/>
<field name="group" ref="group_hotel_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.ui.view" id="open_migration_start_view_form">
<field name="model">hotel.open_migration.start</field>
<field name="type">form</field>
<field name="name">open_migration_form</field>
</record>
<record model="ir.action.wizard" id="act_open_migration">
<field name="name">Open Migration Report</field>
<field name="wiz_name">hotel.open_migration</field>
</record>
<record model="ir.action.report" id="report_migration">
<field name="name">Migration Report</field>
<field name="model"></field>
<field name="report_name">hotel.migration</field>
<field name="report">hotel/migration_report.ods</field>
<field name="template_extension">ods</field>
</record>
<menuitem name="Migration Report" sequence="60" parent="menu_reporting"
id="menu_migration_report" action="act_open_migration"/>
<record model="ir.action.act_window.domain" id="act_operation_form_domain_draft">
<field name="name">Draft</field>
<field name="sequence" eval="10"/>
<field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_operation_tree"/>
</record>
<record model="ir.action.act_window.domain" id="act_operation_form_domain_check_in_today">
<field name="name">Check In Today</field>
<field name="sequence" eval="30"/>
<field name="domain" eval="[
('start_date', '=', Date())
]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_operation_tree"/>
</record>
<record model="ir.action.act_window.domain" id="act_operation_form_domain_check_out_today">
<field name="name">Check Out Today</field>
<field name="sequence" eval="30"/>
<field name="domain" eval="[
('end_date', '=', Date())
]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_operation_tree"/>
</record>
<record model="ir.action.act_window.domain" id="act_operation_form_domain_check_in">
<field name="name">Check In</field>
<field name="sequence" eval="30"/>
<field name="domain" eval="[('state', '=', 'check_in')]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_operation_tree"/>
</record>
<record model="ir.action.act_window.domain" id="act_operation_form_domain_all">
<field name="name">All</field>
<field name="sequence" eval="90"/>
<field name="domain" eval="[]" pyson="1"/>
<field name="act_window" ref="act_operation_tree"/>
</record>
<record model="ir.action.report" id="report_operation">
<field name="name">Statement Operation</field>
<field name="model">hotel.operation</field>
<field name="report_name">hotel.operation</field>
<field name="report">hotel/operation.fodt</field>
</record>
<record model="ir.action.keyword" id="report_operation_keyword">
<field name="keyword">form_print</field>
<field name="model">hotel.operation,-1</field>
<field name="action" ref="report_operation"/>
</record>
<record model="ir.action.wizard" id="wizard_operation_check_out">
<field name="name">Operation Check Out</field>
<field name="wiz_name">hotel.operation.check_out</field>
<field name="model">hotel.operation</field>
</record>
<record model="ir.ui.view" id="operation_check_out_failed_view_form">
<field name="model">hotel.operation.check_out.failed</field>
<field name="type">form</field>
<field name="name">operation_check_out_form</field>
</record>
<record model="ir.ui.view" id="operation_change_room_view_form">
<field name="model">hotel.operation.change_room.ask</field>
<field name="type">form</field>
<field name="name">operation_change_room_form</field>
</record>
<record model="ir.action.wizard" id="act_operation_change_room">
<field name="name">Operation Change Room</field>
<field name="wiz_name">hotel.operation.change_room</field>
<field name="model">hotel.operation</field>
</record>
<record model="ir.action.keyword" id="act_operation_change_room_keyword">
<field name="keyword">form_action</field>
<field name="model">hotel.operation,-1</field>
<field name="action" ref="act_operation_change_room"/>
</record>
<record model="ir.ui.view" id="operation_transfer_operation_view_form">
<field name="model">hotel.operation.transfer_operation.ask</field>
<field name="type">form</field>
<field name="name">operation_transfer_operation_form</field>
</record>
<record model="ir.action.wizard" id="act_operation_transfer_operation">
<field name="name">Transfer Operation</field>
<field name="wiz_name">hotel.operation.transfer_operation</field>
<field name="model">hotel.operation</field>
</record>
<record model="ir.action.keyword" id="act_operation_transfer_operation_keyword">
<field name="keyword">form_action</field>
<field name="model">hotel.operation,-1</field>
<field name="action" ref="act_operation_transfer_operation"/>
</record>
<record model="ir.ui.view" id="operation_transfer_charge_view_form">
<field name="model">hotel.operation.transfer_charge.ask</field>
<field name="type">form</field>
<field name="name">operation_transfer_charge_form</field>
</record>
<record model="ir.action.wizard" id="act_operation_transfer_charge">
<field name="name">Transfer Charges</field>
<field name="wiz_name">hotel.operation.transfer_charge</field>
<field name="model">hotel.operation.line</field>
</record>
<record model="ir.action.keyword" id="act_operation_transfer_charge_keyword">
<field name="keyword">form_action</field>
<field name="model">hotel.operation.line,-1</field>
<field name="action" ref="act_operation_transfer_charge"/>
</record>
<record model="ir.action.report" id="report_operation_by_consumer">
<field name="name">Operation By Consumer</field>
<field name="model">hotel.operation.line</field>
<field name="report_name">hotel.operation.line</field>
<field name="report">hotel/operation_by_consumer.fodt</field>
<field name="template_extension">odt</field>
</record>
<record model="ir.action.keyword" id="act_operation_by_consumer_keyword">
<field name="keyword">form_print</field>
<field name="model">hotel.operation.line,-1</field>
<field name="action" ref="report_operation_by_consumer"/>
</record>
<record model="ir.action.wizard" id="wizard_hotel_operation_bill">
<field name="name">Bill</field>
<field name="wiz_name">hotel.operation.bill</field>
</record>
<record model="ir.action.keyword" id="act_hotel_operation_bill_keyword">
<field name="keyword">form_action</field>
<field name="model">hotel.operation,-1</field>
<field name="action" ref="wizard_hotel_operation_bill"/>
</record>
<record model="ir.model.button" id="operation_bill_button">
<field name="name">bill</field>
<field name="string">Bill</field>
<field name="model" search="[('model', '=', 'hotel.operation')]"/>
</record>
<record model="ir.model.button-res.group" id="hotel_operation_bill_button_group_hotel">
<field name="button" ref="operation_bill_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.action.wizard" id="wizard_operation_advance_voucher">
<field name="name">Voucher Advance</field>
<field name="wiz_name">account_voucher.advance_voucher</field>
<field name="model">hotel.operation</field>
</record>
<record model="ir.action.report" id="statistics_by_month_report">
<field name="name">Statistics by Month Report</field>
<field name="model"></field>
<field name="report_name">hotel.statistics_by_month.report</field>
<field name="report">hotel/statistics_by_month.ods</field>
<field name="template_extension">ods</field>
</record>
<record model="ir.ui.view" id="print_hotel_statistics_by_month_start_view_form">
<field name="model">hotel.statistics_by_month.start</field>
<field name="type">form</field>
<field name="name">statistics_by_month_start_form</field>
</record>
<record model="ir.action.wizard" id="wizard_print_statistics_by_month">
<field name="name">Statistics by Month</field>
<field name="wiz_name">hotel.statistics_by_month</field>
</record>
<menuitem parent="hotel.menu_reporting" id="menu_statistics_by_month"
action="wizard_print_statistics_by_month"/>
</data>
</tryton>

BIN
operation_by_consumer.fodt Normal file

Binary file not shown.

35
party.py Normal file
View File

@ -0,0 +1,35 @@
#This file is part of Hotel module for 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
__all__ = ['Party']
TYPE = [
('', ''),
('service_acomplished', 'Service Acomplished'),
('direct', 'Direct'),
('implicit', 'Implicit'),
]
class Party(metaclass=PoolMeta):
__name__ = 'party.party'
'''
Party field and function aditions for channels management. Sales
commissions, taxes and price lists.
'''
sale_commission = fields.Numeric('Sales Commission %', digits=(3, 2),
help="Add the percentage of sales commission for this channel.",)
# Must be required if party is hotel channel.
# states={
# 'readonly': ~Eval('active', True),
# 'required': Bool(Eval('vat_country')),
# },
# depends=['active', 'vat_country'], size=12, select=True)
sale_commission_type = fields.Selection(TYPE, 'Sales Commission Type')
visa_category = fields.Char('Visa Category')
visa_number = fields.Char('Visa Number')
visa_date = fields.Date('Visa Date')

14
party.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="party_view_form">
<field name="model">party.party</field>
<field name="inherit" ref="party.party_view_form"/>
<field name="name">party_form</field>
</record>
</data>
</tryton>

11
policy.py Normal file
View File

@ -0,0 +1,11 @@
#This file is part of Presik. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import ModelView, ModelSQL, fields
__all__ = ['HotelPolicyCancellation']
class HotelPolicyCancellation(ModelSQL, ModelView):
'Hotel Policy Cancellation'
__name__ = 'hotel.policy.cancellation'
name = fields.Char('Name', required=True)

19
policy.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="hotel_policy_cancellation_view_tree">
<field name="model">hotel.policy.cancellation</field>
<field name="type">tree</field>
<field name="name">policy_cancellation_tree</field>
</record>
<record model="ir.ui.view" id="hotel_policy_cancellation_view_form">
<field name="model">hotel.policy.cancellation</field>
<field name="type">form</field>
<field name="name">policy_cancellation_form</field>
</record>
</data>
</tryton>

25
product.py Executable file
View File

@ -0,0 +1,25 @@
# 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.model import fields
from trytond.pool import PoolMeta
from trytond.pyson import Eval
__all__ = ['Template']
KIND = [
('', ''),
('accommodation', 'Accommodation'),
('bar_restaurant', 'Bar and Restaurant')
]
class Template:
__metaclass__ = PoolMeta
__name__ = 'product.template'
kind = fields.Selection(KIND, 'Kind')
channel_code = fields.Char('Channel Code')
accommodation_capacity = fields.Integer('Accommodation Capacity', states={
'invisible': Eval('kind') != 'accommodation',
})

20
product.xml Executable file
View File

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="template_view_form">
<field name="model">product.template</field>
<field name="inherit" ref="product.template_view_form"/>
<field name="name">template_form</field>
</record>
<record model="ir.ui.view" id="template_view_tree">
<field name="model">product.template</field>
<field name="inherit" ref="product.template_view_tree"/>
<field name="name">template_tree</field>
</record>
</data>
</tryton>

BIN
registration_card.fodt Normal file

Binary file not shown.

Binary file not shown.

111
room.py Normal file
View File

@ -0,0 +1,111 @@
#This file is part of Presik. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import ModelView, ModelSQL, fields
from trytond.pyson import Eval
__all__ = ['Room', 'Amenities', 'RoomClassification', 'RoomAmenities', 'RoomTemplate']
STATES = {'readonly': (Eval('state') != 'draft')}
class Room(ModelSQL, ModelView):
'Room'
__name__ = 'hotel.room'
name = fields.Char('Name', required=True)
code = fields.Char('Code')
active = fields.Boolean('Active')
templates = fields.Many2Many('hotel.room-product.template', 'room',
'template', 'Hotel Room - Product Accommodation', domain=[
('type', '=', 'service'),
('kind', '=', 'accommodation'),
])
classification = fields.Many2One('hotel.room.classification',
'Classification')
location = fields.Many2One('hotel.location', 'Location',
select=True)
amenities = fields.Many2Many('hotel.room-hotel.amenities', 'room',
'amenities', 'Amenities')
space = fields.Integer('Space', help='Space on m2')
channel_id = fields.Char('Channel ID')
main_accommodation = fields.Many2One('product.template',
'Main Accommodation', ondelete='RESTRICT', depends=['templates'],
domain=[('id', 'in', Eval('templates', []))],
)
# TODO: Maybe add require a Current State field
min_unit_price = fields.Numeric('Min. Unit Price', digits=(16, 4))
max_unit_price = fields.Numeric('Max. Unit Price', digits=(16, 4))
@classmethod
def __setup__(cls):
super(Room, cls).__setup__()
@staticmethod
def default_active():
return True
class RoomAmenities(ModelSQL):
'Room - Amenities'
__name__ = 'hotel.room-hotel.amenities'
_rec_name = 'name'
room = fields.Many2One('hotel.room', 'Room', required=True,
ondelete='CASCADE')
amenities = fields.Many2One('hotel.amenities', 'Amenities',
required=True, ondelete='CASCADE')
class Amenities(ModelSQL, ModelView):
'Amenities'
__name__ = 'hotel.amenities'
_rec_name = 'name'
name = fields.Char('Name', required=True)
notes = fields.Text('Notes')
type = fields.Selection([
('', ''),
('lingerie', 'Lingerie Room'),
('service', 'Service'),
], 'Type of Service')
cleaning_days = fields.One2Many('hotel.cleaning_days', 'amenities',
'Cleanning Days', states={
'invisible': Eval('type') != 'lingerie',
}, depends=['type'])
@classmethod
def __setup__(cls):
super(Amenities, cls).__setup__()
class RoomClassification(ModelSQL, ModelView):
'Room Classification'
__name__ = 'hotel.room.classification'
name = fields.Char('Name', required=True)
class CleanningDays(ModelSQL, ModelView):
'Cleanning Days'
__name__ = 'hotel.cleaning_days'
amenities = fields.Many2One('hotel.amenities', 'Amenities',
required=True, ondelete='CASCADE')
weekday = fields.Selection([
('1', 'Monday'),
('2', 'Tuesday'),
('3', 'Wednesday'),
('4', 'Thursday'),
('5', 'Friday'),
('6', 'Saturday'),
('7', 'Sunday'),
], 'Weekday', required=True)
note = fields.Text('Note')
@classmethod
def __setup__(cls):
super(CleanningDays, cls).__setup__()
class RoomTemplate(ModelSQL):
'Room - Template'
__name__ = 'hotel.room-product.template'
room = fields.Many2One('hotel.room', 'Room', required=True,
ondelete='CASCADE')
template = fields.Many2One('product.template', 'Product Template',
required=True, ondelete='CASCADE')

189
room.xml Normal file
View File

@ -0,0 +1,189 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="cleaning_days_view_form">
<field name="model">hotel.workday_definition</field>
<field name="type">form</field>
<field name="name">cleaning_days_form</field>
</record>
<record model="ir.ui.view" id="cleaning_days_view_tree">
<field name="model">hotel.cleaning_days</field>
<field name="type">tree</field>
<field name="name">cleaning_days_tree</field>
</record>
<record model="ir.ui.view" id="hotel_room_view_tree">
<field name="model">hotel.room</field>
<field name="type">tree</field>
<field name="name">room_tree</field>
</record>
<record model="ir.ui.view" id="hotel_room_view_form">
<field name="model">hotel.room</field>
<field name="type">form</field>
<field name="name">room_form</field>
</record>
<record model="ir.action.act_window" id="act_room_form">
<field name="name">Room</field>
<field name="res_model">hotel.room</field>
</record>
<record model="ir.action.act_window.view" id="act_room_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="hotel_room_view_tree"/>
<field name="act_window" ref="act_room_form"/>
</record>
<record model="ir.action.act_window.view" id="act_room_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="hotel_room_view_form"/>
<field name="act_window" ref="act_room_form"/>
</record>
<menuitem name="Room" parent="hotel.menu_configuration" sequence="30"
action="act_room_form" id="menu_hotel_room"/>
<!--
<record model="ir.ui.view" id="hotel_accommodation_view_tree">
<field name="model">hotel.accommodation</field>
<field name="type">tree</field>
<field name="name">accommodation_tree</field>
</record>
<record model="ir.ui.view" id="hotel_accommodation_view_form">
<field name="model">hotel.accommodation</field>
<field name="type">form</field>
<field name="name">accommodation_form</field>
</record>
<record model="ir.action.act_window" id="act_accommodation_form">
<field name="name">Accommodation</field>
<field name="res_model">hotel.accommodation</field>
</record>
<record model="ir.action.act_window.view" id="act_accommodation_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="hotel_accommodation_view_tree"/>
<field name="act_window" ref="act_accommodation_form"/>
</record>
<record model="ir.action.act_window.view" id="act_accommodation_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="hotel_accommodation_view_form"/>
<field name="act_window" ref="act_accommodation_form"/>
</record>
<menuitem name="Accommodation" parent="hotel.menu_configuration" sequence="40"
action="act_accommodation_form" id="menu_hotel_accommodation"/>
-->
<record model="ir.model.button" id="room_clean_button">
<field name="name">clean</field>
<field name="model" search="[('model', '=', 'hotel.room')]"/>
</record>
<record model="ir.model.button-res.group" id="room_clean_button_group_hotel">
<field name="button" ref="room_clean_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="room_inspected_button">
<field name="name">inspected</field>
<field name="model" search="[('model', '=', 'hotel.room')]"/>
</record>
<record model="ir.model.button-res.group" id="room_inspected_button_group_hotel">
<field name="button" ref="room_inspected_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="room_dirty_button">
<field name="name">dirty</field>
<field name="model" search="[('model', '=', 'hotel.room')]"/>
</record>
<record model="ir.model.button-res.group" id="room_dirty_button_group_hotel">
<field name="button" ref="room_dirty_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="room_maintenance_button">
<field name="name">maintenance</field>
<field name="model" search="[('model', '=', 'hotel.room')]"/>
</record>
<record model="ir.model.button-res.group" id="room_maintenance_button_group_hotel">
<field name="button" ref="room_maintenance_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<!-- Model Access -->
<record model="ir.model.access" id="access_room">
<field name="model" search="[('model', '=', 'hotel.room')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_room_group_hotel">
<field name="model" search="[('model', '=', 'hotel.room')]"/>
<field name="group" ref="group_hotel"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_room_group_hotel_admin">
<field name="model" search="[('model', '=', 'hotel.room')]"/>
<field name="group" ref="group_hotel_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.ui.view" id="amenities_view_tree">
<field name="model">hotel.amenities</field>
<field name="type">tree</field>
<field name="name">amenities_tree</field>
</record>
<record model="ir.ui.view" id="amenities_view_form">
<field name="model">hotel.amenities</field>
<field name="type">form</field>
<field name="name">amenities_form</field>
</record>
<record model="ir.action.act_window" id="act_amenities_form">
<field name="name">Amenities</field>
<field name="res_model">hotel.amenities</field>
</record>
<record model="ir.action.act_window.view" id="act_amenities_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="amenities_view_tree"/>
<field name="act_window" ref="act_amenities_form"/>
</record>
<record model="ir.action.act_window.view" id="act_amenities_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="amenities_view_form"/>
<field name="act_window" ref="act_amenities_form"/>
</record>
<menuitem name="Amenities" parent="hotel.menu_configuration" sequence="90"
action="act_amenities_form" id="menu_hotel_amenities"/>
<record model="ir.ui.view" id="room_classification_view_tree">
<field name="model">hotel.room.classification</field>
<field name="type">tree</field>
<field name="name">room_classification_tree</field>
</record>
<record model="ir.ui.view" id="room_classification_view_form">
<field name="model">hotel.room.classification</field>
<field name="type">form</field>
<field name="name">room_classification_form</field>
</record>
<record model="ir.action.act_window" id="act_room_classification_form">
<field name="name">Room Classification</field>
<field name="res_model">hotel.room.classification</field>
</record>
<record model="ir.action.act_window.view" id="act_room_classification_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="room_classification_view_tree"/>
<field name="act_window" ref="act_room_classification_form"/>
</record>
<record model="ir.action.act_window.view" id="act_room_classification_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="room_classification_view_form"/>
<field name="act_window" ref="act_room_classification_form"/>
</record>
<menuitem name="Room Classification" parent="hotel.menu_configuration" sequence="50"
action="act_room_classification_form" id="menu_hotel_room_classification"/>
</data>
</tryton>

BIN
rooms_occupancy.ods Normal file

Binary file not shown.

224
sale.py Normal file
View File

@ -0,0 +1,224 @@
#This file is part of Presik. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from datetime import datetime
from decimal import Decimal
from trytond.pool import Pool
from trytond.wizard import Wizard, StateView, Button, StateReport
from trytond.report import Report
from trytond.model import ModelView, fields
from trytond.transaction import Transaction
__all__ = ['InvoiceIncomeDaily', 'InvoiceIncomeDailyStart',
'InvoiceIncomeDailyReport', 'InvoiceSimplifiedReport']
_ZERO = Decimal(0)
class InvoiceIncomeDailyStart(ModelView):
'Invoice Income Daily Start'
__name__ = 'hotel.invoice_income_daily.start'
company = fields.Many2One('company.company', 'Company', required=True)
invoice_date = fields.Date('Invoice Date', required=True)
user = fields.Many2One('res.user', 'User', required=True)
shop = fields.Many2One('sale.shop', 'Shop', required=True)
# journal = fields.Many2One('account.statement.journal', 'Journal')
@staticmethod
def default_company():
return Transaction().context.get('company')
@staticmethod
def default_sale_date():
Date = Pool().get('ir.date')
return Date.today()
class InvoiceIncomeDaily(Wizard):
'Invoice Income Daily'
__name__ = 'hotel.invoice_income_daily'
start = StateView('hotel.invoice_income_daily.start',
'hotel.invoice_income_daily_start_view_form', [
Button('Cancel', 'end', 'tryton-cancel'),
Button('Print', 'print_', 'tryton-ok', default=True),
])
print_ = StateReport('hotel.invoice_income_daily_report')
def do_print_(self, action):
report_context = {
'company': self.start.company.id,
'invoice_date': self.start.invoice_date,
'user': self.start.user.id,
'shop': self.start.shop.id,
}
return action, report_context
def transition_print_(self):
return 'end'
class InvoiceIncomeDailyReport(Report):
'Invoice Income Daily Report'
__name__ = 'hotel.invoice_income_daily_report'
@classmethod
def get_context(cls, records, data):
report_context = super(InvoiceIncomeDailyReport, cls).get_context(records, data)
pool = Pool()
Invoice = pool.get('account.invoice')
Company = pool.get('company.company')
company = Company(data['company'])
Statement = pool.get('account.statement')
Shop = pool.get('sale.shop')
User = pool.get('res.user')
shop = Shop(data['shop'])
statements = Statement.search([
('date', '=', data['invoice_date']),
('create_uid', '=', data['user']),
])
user = User(data['user'])
records = []
advances = []
statements_ = []
total_advances = []
advances_cash = []
advances_electronic = []
total_statements = []
for statement in statements:
st_amount = sum(l.amount for l in statement.lines)
statements_.append({
'id': statement.id,
'sale_device': statement.sale_device.name,
'journal': statement.journal.name,
'turn': statement.turn,
'total_amount': st_amount,
'state': statement.state,
})
total_statements.append(st_amount)
for l in statement.lines:
sale = l.sale
cash = 0
electronic = 0
if sale and not sale.invoice_number:
for pline in sale.payments:
if pline.statement.journal.kind == 'cash':
advances_cash.append(pline.amount)
cash = pline.amount
else:
electronic = pline.amount
advances_electronic.append(pline.amount)
advances.append({
'number': sale.number,
'reference': sale.reference,
'party': sale.party.name,
'total_amount': pline.amount,
'cash': cash,
'electronic': electronic,
})
total_advances.append(pline.amount)
dom_ = [
('company', '=', data['company']),
('invoice_date', '=', data['invoice_date']),
('shop', '=', data['shop']),
('number', '!=', None),
('state', 'in', ['posted', 'paid', 'canceled']),
('create_uid', '=', data['user']),
]
invoices = Invoice.search(dom_, order=[('number', 'ASC')])
invoices_number = []
total_invoices_cash = []
total_invoices_electronic = []
total_invoices_credit = []
total_invoices_paid = []
total_invoices_amount = []
for invoice in invoices:
invoices_number.append(invoice.number)
cash = 0
electronic = 0
credit = 0
total_invoices_amount.append(invoice.total_amount)
sale = invoice.sales[0]
if not sale.payments:
total_invoices_credit.append(invoice.amount_to_pay)
credit = invoice.amount_to_pay
else:
for p in sale.payments:
if p.statement.date == data['invoice_date']:
if p.statement.journal.kind == 'cash':
cash += p.amount
total_invoices_cash.append(p.amount)
else:
electronic += p.amount
total_invoices_electronic.append(p.amount)
total_invoices_paid.append(p.amount)
inv = {
'number': invoice.number,
'reference': invoice.reference,
'party': invoice.party.name,
'total_amount': invoice.total_amount,
'credit': credit,
'cash': cash,
'electronic': electronic,
'paid': cash + electronic,
'state': invoice.state_string,
}
records.append(inv)
report_context['records'] = records
report_context['advances'] = advances
report_context['statements'] = statements_
report_context['date'] = data['invoice_date']
report_context['company'] = company.party.name
report_context['shop'] = shop.name
report_context['user'] = user.name
report_context['print_date'] = datetime.now()
report_context['total_invoices_amount'] = sum(total_invoices_amount)
report_context['total_invoices_cash'] = sum(total_invoices_cash)
report_context['total_invoices_electronic'] = sum(total_invoices_electronic)
report_context['total_invoices_credit'] = sum(total_invoices_credit)
report_context['total_invoices_paid'] = sum(total_invoices_paid)
report_context['total_advances'] = sum(total_advances)
report_context['advances_cash'] = sum(advances_cash)
report_context['advances_electronic'] = sum(advances_electronic)
report_context['total_statements'] = sum(total_statements)
report_context['start_invoice'] = min(invoices_number) if invoices_number else ''
report_context['end_invoice'] = max(invoices_number) if invoices_number else ''
return report_context
class InvoiceSimplifiedReport(Report):
__name__ = 'account.invoice_simplified'
@classmethod
def get_context(cls, records, data):
report_context = super(InvoiceSimplifiedReport, cls).get_context(records, data)
Company = Pool().get('company.company')
categories = {}
if records:
record = records[0]
for l in record.lines:
cat = l.product.template.account_category
taxes = ''
for tax in cat.customer_taxes_used:
taxes += tax.name + ' '
if cat.id not in categories.keys():
categories[cat.id] = {
'description': cat.name,
'amount': l.amount,
'taxes': taxes
}
else:
categories[cat.id]['amount'] += l.amount
record._lines = categories.values()
report_context['company'] = Company(Transaction().context['company'])
return report_context

38
sale.xml Normal file
View File

@ -0,0 +1,38 @@
<?xml version="1.0"?>
<!-- This file is part sale_shop module for Tryton.
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.action.report" id="report_invoice_income_daily">
<field name="name">Report Invoice Income Daily</field>
<field name="model"></field>
<field name="report_name">hotel.invoice_income_daily_report</field>
<field name="report">hotel/invoice_income_daily.ods</field>
</record>
<record model="ir.ui.view" id="invoice_income_daily_start_view_form">
<field name="model">hotel.invoice_income_daily.start</field>
<field name="type">form</field>
<field name="name">invoice_income_daily_start_form</field>
</record>
<record model="ir.action.wizard" id="wizard_print_invoice_income_daily">
<field name="name">Invoice Income Daily Report</field>
<field name="wiz_name">hotel.invoice_income_daily</field>
</record>
<menuitem parent="hotel.menu_reporting" id="menu_invoice_income_daily"
action="wizard_print_invoice_income_daily"/>
<!-- <record model="ir.action.report" id="report_invoice_simplified">
<field name="name">Invoice Simplified</field>
<field name="model">account.invoice</field>
<field name="report_name">account.invoice_simplified</field>
<field name="report">hotel/invoice_simplified.fodt</field>
</record>
<record model="ir.action.keyword" id="report_invoice_simplified_keyword">
<field name="keyword">form_print</field>
<field name="model">account.invoice,-1</field>
<field name="action" ref="report_invoice_simplified"/>
</record> -->
</data>
</tryton>

BIN
service.ods Normal file

Binary file not shown.

349
service.py Normal file
View File

@ -0,0 +1,349 @@
# 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 datetime import datetime
from trytond.model import ModelView, Workflow, ModelSQL, fields
from trytond.pool import Pool
from trytond.pyson import Eval
from trytond.modules.company import CompanyReport
from trytond.wizard import Wizard, StateView, Button, StateTransition
from trytond.transaction import Transaction
__all__ = ['Service', 'ServiceLine', 'ServiceReport', 'ServiceKind',
'CreateDailyServices', 'CreateDailyServicesStart']
STATES = {
'readonly': Eval('state') == 'checked'
}
class ServiceKind(ModelSQL, ModelView):
'Service Kind'
__name__ = 'hotel.service.kind'
name = fields.Char('Name', select=True, required=True)
product = fields.Many2One('product.product', 'Product')
salable = fields.Boolean('Salable')
class Service(Workflow, ModelSQL, ModelView):
'Service'
__name__ = 'hotel.service'
_rec_name = 'kind.name'
number = fields.Char('Number', select=True, required=False)
kind = fields.Many2One('hotel.service.kind', 'Kind', required=True,
states={
'readonly': Eval('state').in_(['confirmed', 'checked'])
})
service_date = fields.Date('Date', required=True, states={
'readonly': Eval('state').in_(['confirmed', 'checked'])
})
lines = fields.One2Many('hotel.service.line', 'service', 'Lines',
states={'readonly': Eval('state') != 'open'}
)
state = fields.Selection([
('draft', 'Draft'),
('open', 'Open'),
('confirmed', 'Confirmed'),
('checked', 'Checked'),
], 'State', readonly=True, states=STATES)
state_string = state.translated('state')
description = fields.Char('Description', select=True, states=STATES)
count_services = fields.Function(fields.Integer('Count Services',
select=True), 'get_count_services')
@classmethod
def __setup__(cls):
super(Service, cls).__setup__()
cls._order.insert(0, ('service_date', 'DESC'))
cls._transitions |= set((
('draft', 'open'),
('open', 'confirmed'),
('confirmed', 'open'),
('confirmed', 'checked'),
))
cls._buttons.update({
'draft': {
'invisible': Eval('state') != 'open',
},
'open': {
'invisible': Eval('state') != 'draft',
},
'confirm': {
'invisible': Eval('state') != 'open',
},
'checked': {
'invisible': Eval('state') != 'confirmed',
},
})
@staticmethod
def default_state():
return 'draft'
@classmethod
@ModelView.button
@Workflow.transition('draft')
def draft(cls, records):
pass
@classmethod
@ModelView.button
@Workflow.transition('open')
def open(cls, records):
cls.set_number(records)
@classmethod
@ModelView.button
@Workflow.transition('confirmed')
def confirm(cls, records):
pass
@classmethod
@ModelView.button
@Workflow.transition('checked')
def checked(cls, records):
pass
def get_count_services(self, name=None):
return len(self.lines)
@classmethod
def set_number(cls, services):
"""
Fill the number field with the service sequence
"""
pool = Pool()
Sequence = pool.get('ir.sequence')
Config = pool.get('hotel.configuration')
config = Config.get_configuration()
for service in services:
if service.number or not config.hotel_service_sequence:
continue
number = Sequence.get_id(config.hotel_service_sequence.id)
cls.write([service], {'number': number})
class ServiceLine(Workflow, ModelSQL, ModelView):
'Service Line'
__name__ = 'hotel.service.line'
service = fields.Many2One('hotel.service', 'Service', required=True)
room = fields.Many2One('hotel.room', 'Room', select=True, required=True)
time_service = fields.Time('Time Service', select=True)
product = fields.Many2One('product.product', 'Product',
domain=[
('salable', '=', True),
('active', '=', True),
], required=True)
# ('template.kind', '!=', 'accommodation'),
quantity = fields.Integer('Quantity', required=True)
description = fields.Char('Description')
order = fields.Char('Order', select=True, states=STATES)
sale_line = fields.Many2One('sale.line', 'Sale Line', states={
'readonly': True,
})
guest = fields.Many2One('hotel.operation.guest', 'Guest', states=STATES,
domain=[
('operation.room', '=', Eval('room')),
# ('operation.start_date', '<=', Eval('')),
('id', 'in', Eval('current_guests')),
], depends=['current_guests'])
operation_line = fields.Many2One('hotel.operation.line', 'Operation Line',
states={'readonly': True})
current_guests = fields.Function(fields.Many2Many(
'hotel.operation.guest', None, None, 'Current Guests'),
'on_change_with_current_guests')
operation = fields.Function(fields.Many2One('hotel.operation',
'Operation'), 'get_operation')
state = fields.Selection([
('draft', 'Draft'),
('loaded', 'Loaded'),
('deleted', 'Deleted'),
('done', 'Done'),
], 'State')
state_string = state.translated('state')
@classmethod
def __setup__(cls):
super(ServiceLine, cls).__setup__()
cls._transitions |= set((
('draft', 'invoiced'),
('draft', 'loaded'),
('draft', 'done'),
('loaded', 'draft'),
))
cls._buttons.update({
'draft': {
'invisible': ~Eval('state').in_(['invoiced']),
},
'load': {
'invisible': Eval('state') != 'draft',
},
'done': {
'invisible': Eval('state') != 'draft',
},
})
cls._error_messages.update({
'sale_closed': ('You can not add charges to a sale is closed %s'),
'room_not_occupied': ('The room %s selected is not occupied'),
})
@staticmethod
def default_quantity():
return 1
@staticmethod
def default_state():
return 'draft'
@staticmethod
def default_time_service():
Company = Pool().get('company.company')
local_date = Company.convert_timezone(datetime.now())
return local_date.time()
@fields.depends('product', 'description')
def on_change_product(self):
if self.product:
self.description = self.product.name
@classmethod
@ModelView.button
@Workflow.transition('loaded')
def load(cls, records):
for record in records:
record.add_product_to_room()
@classmethod
@ModelView.button
@Workflow.transition('draft')
def draft(cls, records):
pass
@classmethod
@ModelView.button
@Workflow.transition('done')
def done(cls, records):
pass
@fields.depends('room')
def on_change_with_current_guests(self, name=None):
Operation = Pool().get('hotel.operation')
if self.room:
operations = Operation.search([
('room', '=', self.room.id),
('state', '=', 'check_in'),
])
guests = []
for op in operations:
guests.extend([g.id for g in op.guests])
return guests
def get_operation(self, name=None):
if self.operation_line:
return self.operation_line.operation.id
def add_product_to_room(self):
pool = Pool()
Operation = pool.get('hotel.operation')
OperationLine = pool.get('hotel.operation.line')
if self.sale_line:
return
dom = [
('room', '=', self.room.id),
('state', '=', 'check_in'),
('start_date', '<=', self.service.service_date),
('end_date', '>=', self.service.service_date),
]
if self.guest:
dom.append(('guests', '=', self.guest.id))
operations = Operation.search(dom)
print(operations)
if not operations:
self.raise_user_error('room_not_occupied', self.room.name)
elif len(operations) > 1:
self.raise_user_error('multiple_rooms_active')
operation = operations[0]
new_line = {
'operation': operation.id,
'date_service': self.service.service_date,
'order': self.order,
'description': self.description,
# FIXME: not use int
'quantity': int(self.quantity),
'invoice_to': operation.main_guest.id,
'unit_price': self.product.template.list_price,
'product': self.product.id,
}
line, = OperationLine.create([new_line])
self.write([self], {'operation_line': line.id})
class ServiceReport(CompanyReport):
__name__ = 'hotel.service'
@classmethod
def get_context(cls, records, data):
report_context = super(ServiceReport, cls).get_context(records, data)
return report_context
class CreateDailyServicesStart(ModelView):
'Create Daily Services Start'
__name__ = 'hotel.daily_services.start'
kind = fields.Many2One('hotel.service.kind', 'Kind', required=True)
date = fields.Date('Date', required=True)
company = fields.Many2One('company.company', 'Company', required=True)
description = fields.Char('Description')
@staticmethod
def default_company():
return Transaction().context.get('company')
class CreateDailyServices(Wizard):
'Create Daily Services'
__name__ = 'hotel.daily_services'
start = StateView('hotel.daily_services.start',
'hotel.create_daily_services_start_view_form', [
Button('Cancel', 'end', 'tryton-cancel'),
Button('Accept', 'accept_', 'tryton-ok', default=True),
])
accept_ = StateTransition()
def transition_accept_(self):
pool = Pool()
Service = pool.get('hotel.service')
Operation = pool.get('hotel.operation')
operations = Operation.search([
('start_date', '<', self.start.date),
('state', 'in', ['check_in']),
])
lines_to_create = []
service, = Service.create([{
'service_date': self.start.date,
'state': 'draft',
'kind': self.start.kind.id,
}])
Service.open([service])
if self.start.kind.product:
for op in operations:
for guest in op.guests:
lines_to_create.append({
'service': service.id,
'room': op.room.id,
'guest': guest.id,
'product': self.start.kind.product.id,
'quantity': 1,
})
if lines_to_create:
ServiceLine.create(lines_to_create)
return 'end'

193
service.xml Normal file
View File

@ -0,0 +1,193 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.action.report" id="report_hotel_service">
<field name="name">Service</field>
<field name="model">hotel.service</field>
<field name="report_name">hotel.service</field>
<field name="report">hotel/service.ods</field>
</record>
<record model="ir.action.keyword" id="report_service_keyword">
<field name="keyword">form_print</field>
<field name="model">hotel.service,-1</field>
<field name="action" ref="report_hotel_service"/>
</record>
<record model="ir.ui.view" id="service_view_tree">
<field name="model">hotel.service</field>
<field name="type">tree</field>
<field name="name">service_tree</field>
</record>
<record model="ir.ui.view" id="service_view_form">
<field name="model">hotel.service</field>
<field name="type">form</field>
<field name="name">service_form</field>
</record>
<record model="ir.action.act_window" id="act_service_tree">
<field name="name">Service</field>
<field name="res_model">hotel.service</field>
</record>
<record model="ir.action.act_window.view" id="act_service_view_tree1">
<field name="sequence" eval="10"/>
<field name="view" ref="service_view_tree"/>
<field name="act_window" ref="act_service_tree"/>
</record>
<record model="ir.action.act_window.view" id="act_service_view_tree2">
<field name="sequence" eval="20"/>
<field name="view" ref="service_view_form"/>
<field name="act_window" ref="act_service_tree"/>
</record>
<menuitem name="Service" parent="hotel.menu_hotel" sequence="14"
id="menu_hotel_service" action="act_service_tree"/>
<record model="ir.model.button" id="service_cancel_button">
<field name="name">finish</field>
<field name="model" search="[('model', '=', 'hotel.service')]"/>
</record>
<record model="ir.model.button-res.group" id="service_cancel_button_group_hotel">
<field name="button" ref="service_cancel_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="service_draft_button">
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'hotel.service')]"/>
</record>
<record model="ir.model.button-res.group" id="service_draft_button_group_hotel">
<field name="button" ref="service_draft_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<record model="ir.model.button" id="service_confirm_button">
<field name="name">confirm</field>
<field name="model" search="[('model', '=', 'hotel.service')]"/>
</record>
<record model="ir.model.button-res.group" id="service_confirm_button_group_hotel">
<field name="button" ref="service_confirm_button"/>
<field name="group" ref="hotel.group_hotel"/>
</record>
<!-- Model Access -->
<record model="ir.model.access" id="access_service">
<field name="model" search="[('model', '=', 'hotel.service')]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.model.access" id="access_service_group_hotel">
<field name="model" search="[('model', '=', 'hotel.service')]"/>
<field name="group" ref="group_hotel"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_service_group_hotel_admin">
<field name="model" search="[('model', '=', 'hotel.service')]"/>
<field name="group" ref="group_hotel_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.ui.view" id="service_line_view_tree">
<field name="model">hotel.service.line</field>
<field name="type">tree</field>
<field name="name">service_line_tree</field>
</record>
<record model="ir.ui.view" id="service_line_view_form">
<field name="model">hotel.service.line</field>
<field name="type">form</field>
<field name="name">service_line_form</field>
</record>
<record model="ir.action.act_window" id="act_service_line_tree">
<field name="name">Service Line</field>
<field name="res_model">hotel.service.line</field>
</record>
<record model="ir.ui.view" id="service_kind_view_tree">
<field name="model">hotel.service.kind</field>
<field name="type">tree</field>
<field name="name">service_kind_tree</field>
</record>
<record model="ir.ui.view" id="service_kind_view_form">
<field name="model">hotel.service.kind</field>
<field name="type">form</field>
<field name="name">service_kind_form</field>
</record>
<record model="ir.action.act_window" id="act_service_kind_tree">
<field name="name">Service Kind</field>
<field name="res_model">hotel.service.kind</field>
</record>
<record model="ir.action.act_window.view" id="act_service_kind_view_tree1">
<field name="sequence" eval="10"/>
<field name="view" ref="service_kind_view_tree"/>
<field name="act_window" ref="act_service_kind_tree"/>
</record>
<record model="ir.action.act_window.view" id="act_service_kind_view_tree2">
<field name="sequence" eval="20"/>
<field name="view" ref="service_kind_view_form"/>
<field name="act_window" ref="act_service_kind_tree"/>
</record>
<menuitem parent="hotel.menu_configuration" id="menu_hotel_service_kind"
sequence="10" action="act_service_kind_tree"/>
<record model="ir.ui.view" id="create_daily_services_start_view_form">
<field name="model">hotel.daily_services.start</field>
<field name="type">form</field>
<field name="name">create_daily_services_form</field>
</record>
<record model="ir.action.wizard" id="wizard_hotel_create_daily_services">
<field name="name">Create Daily Services</field>
<field name="wiz_name">hotel.daily_services</field>
</record>
<menuitem parent="menu_hotel_service" id="menu_create_payroll_group"
sequence="10" action="wizard_hotel_create_daily_services"/>
<record model="ir.action.act_window.domain" id="act_service_form_domain_today">
<field name="name">Today</field>
<field name="sequence" eval="10"/>
<field name="domain" eval="[
('service_date', '=', Date())
]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_service_tree"/>
</record>
<record model="ir.action.act_window.domain" id="act_service_form_domain_draft">
<field name="name">Draft</field>
<field name="sequence" eval="20"/>
<field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_service_tree"/>
</record>
<record model="ir.action.act_window.domain" id="act_service_form_domain_open">
<field name="name">Open</field>
<field name="sequence" eval="30"/>
<field name="domain" eval="[('state', '=', 'open')]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_service_tree"/>
</record>
<record model="ir.action.act_window.domain" id="act_service_form_domain_confirmed">
<field name="name">Confirmed</field>
<field name="sequence" eval="40"/>
<field name="domain" eval="[
('state', '=', 'confirmed')
]" pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="act_service_tree"/>
</record>
<record model="ir.action.act_window.domain" id="act_service_form_domain_all">
<field name="name">All</field>
<field name="sequence" eval="90"/>
<field name="domain" eval="[]" pyson="1"/>
<field name="act_window" ref="act_service_tree"/>
</record>
</data>
</tryton>

5
setup.cfg Normal file
View File

@ -0,0 +1,5 @@
[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0

132
setup.py Normal file
View File

@ -0,0 +1,132 @@
#!/usr/bin/env python
# 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 setuptools import setup
import re
import os
import io
try:
from configparser import ConfigParser
except ImportError:
from ConfigParser import ConfigParser
MODULE = 'hotel'
PREFIX = 'trytonpsk'
MODULE2PREFIX = {}
def read(fname):
return io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
def get_require_version(name):
if minor_version % 2:
require = '%s >= %s.%s.dev0, < %s.%s'
else:
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = '%s_%s' % (PREFIX, MODULE)
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
if minor_version % 2:
version = '%s.%s.dev0' % (major_version, minor_version)
download_url = (
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
name[8:], name, version))
requires = ['python-sql >= 0.4']
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [get_require_version('proteus')]
dependency_links = []
if minor_version % 2:
# Add development index for testing with proteus
dependency_links.append('https://trydevpi.tryton.org/')
setup(name=name,
version=version,
description='Tryton module for Hotel Management.',
long_description=read('README'),
author='Presik Technologies',
author_email='gerente@presik.com',
url='http://www.presik.com/',
download_url="https://bitbucket.org/presik/%s" % name,
keywords='tryton %s' % MODULE,
package_dir={'trytond.modules.%s' % MODULE: '.'},
packages=[
'trytond.modules.%s' % MODULE,
'trytond.modules.%s.tests' % MODULE,
],
package_data={
'trytond.modules.%s' % MODULE: (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt', '*.fodt',
'*.ods', 'icons/*.svg']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'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 :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Italian',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
],
license='GPL-3',
install_requires=None,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
%s = trytond.modules.%s
""" % (MODULE, MODULE),
test_suite='tests',
test_loader='trytond.test_loader:Loader',
tests_require=tests_require,
use_2to3=True,
convert_2to3_doctests=[
'tests/scenario.rst',
],
)

BIN
statistics_by_month.ods Normal file

Binary file not shown.

6
tests/__init__.py Normal file
View File

@ -0,0 +1,6 @@
# 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 .test_hotel import suite
__all__ = ['suite']

30
tryton.cfg Normal file
View File

@ -0,0 +1,30 @@
[tryton]
version=5.0.3
depends:
party
company
product
account
sale
product_price_list
sale_price_list
account_voucher
party_personal
company_timezone
xml:
hotel.xml
configuration.xml
product.xml
room.xml
data_category.xml
location.xml
booking.xml
operation.xml
housekeeping.xml
company.xml
city.xml
party.xml
channel.xml
service.xml
sale.xml
policy.xml

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="name"/>
<field name="name"/>
<label name="capacity"/>
<field name="capacity"/>
</form>

View File

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="name"/>
<field name="capacity"/>
</tree>

View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="payment_mode"/>
<field name="payment_mode" widget="selection"/>
<label name="payment_amount"/>
<field name="payment_amount"/>
<label name="advance_date"/>
<field name="advance_date"/>
<label name="party"/>
<field name="party"/>
</form>

13
view/amenities_form.xml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="name"/>
<field name="name"/>
<label name="type"/>
<field name="type"/>
<separator name="notes" colspan="4"/>
<field name="notes" colspan="4"/>
<field name="cleaning_days" colspan="4"
view_ids="hotel.cleaning_days_view_tree"/>
</form>

9
view/amenities_tree.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="name"/>
<field name="notes"/>
<field name="type"/>
<field name="cleaning_days"/>
</tree>

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="date"/>
<field name="date"/>
<label name="company"/>
<field name="company" widget="selection"/>
</form>

View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="reference"/>
<field name="reference"/>
<label name="room"/>
<field name="room"/>
<label name="main_guest"/>
<field name="main_guest"/>
<label name="accommodation"/>
<field name="accommodation"/>
<label name="state"/>
<field name="state"/>
<label name="arrival_date"/>
<field name="arrival_date"/>
<label name="departure_date"/>
<field name="departure_date"/>
</form>

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="date"/>
<field name="date"/>
<label name="company"/>
<field name="company"/>
</form>

View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="reference"/>
<field name="room"/>
<field name="main_guest"/>
<field name="state"/>
<field name="accommodation"/>
<field name="arrival_date" widget="date"/>
<field name="arrival_date" widget="time" string="Time"/>
<field name="departure_date" widget="date"/>
<field name="departure_date" widget="time" string="Time"/>
</tree>

116
view/booking_form.xml Normal file
View File

@ -0,0 +1,116 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form col="6">
<label name="party"/>
<field name="party" colspan="3"/>
<label name="number"/>
<field name="number"/>
<label name="contact"/>
<field name="contact" colspan="3"/>
<label name="booking_date"/>
<field name="booking_date"/>
<label name="price_list"/>
<field name="price_list"/>
<label name="payment_term"/>
<field name="payment_term"/>
<label name="registration_card"/>
<field name="registration_card"/>
<label name="cancellation_policy"/>
<field name="cancellation_policy" widget="selection"/>
<label name="media"/>
<field name="media"/>
<label name="party_seller"/>
<field name="party_seller"/>
<label name="taxes_exception"/>
<field name="taxes_exception"/>
<button name="select_rooms" string="Select Rooms"
icon="tryton-open" colspan="2"/>
<notebook colspan="6">
<page string="Lines" id="lines">
<field name="lines" colspan="4"
view_ids="hotel.booking_line_view_tree"/>
</page>
<page string="Additional Info" id="additional_info">
<label name="currency"/>
<field name="currency"/>
<label name="company"/>
<field name="company"/>
<label name="person_num"/>
<field name="person_num"/>
<label name="vehicles_num"/>
<field name="vehicles_num"/>
<label name="vehicle_plate"/>
<field name="vehicle_plate"/>
<label name="vip"/>
<field name="vip"/>
<label name="group"/>
<field name="group"/>
<newline/>
<separator name="comments" colspan="4"/>
<field name="comments" colspan="4"/>
</page>
<page string="Operations" id="operations">
<!-- <field name="sales" colspan="4"/> -->
<label name="invoice_method"/>
<field name="invoice_method"/>
</page>
<page string="Channel Manager" id="channel_manager">
<label name="booker"/>
<field name="booker"/>
<label name="code"/>
<field name="code"/>
<label name="created_channel"/>
<field name="created_channel"/>
</page>
<page string="Marketing" id="marketing">
<separator id="marketing_channel" string="Channel information" colspan="4"/>
<label name="guarantee"/>
<field name="guarantee"/>
<newline/>
<separator id="marketing_guest" string="Guest information" colspan="4"/>
<label name="plan"/>
<field name="plan"/>
<label name="segment"/>
<field name="segment"/>
<newline/>
<separator id="marketing_advertisement" string="Advertisement information" colspan="4"/>
<label name="source_contact"/>
<field name="source_contact"/>
</page>
<page string="Advances Payments" id="vouchers">
<field name="vouchers" colspan="4"/>
</page>
</notebook>
<group col="4" colspan="4" id="functions">
<button name="pay_advance" string="Add Advance" icon="tryton-open"
colspan="2"/>
</group>
<group col="8" colspan="4" id="buttons">
<label name="state"/>
<field name="state"/>
<button name="draft" string="Draft"
icon="tryton-clear"/>
<button name="cancel" string="Cancel"
icon="tryton-cancel"/>
<button name="confirm" string="Confirm"
icon="tryton-forward"/>
<button name="check_in" string="Check In"
icon="tryton-forward"/>
<button name="finished" string="Finished"
icon="tryton-ok"/>
<button name="no_show" string="No Show"
icon="tryton-cancel"/>
<label name="satisfaction"/>
<field name="satisfaction"/>
</group>
<group col="2" colspan="2" id="amounts">
<label name="untaxed_amount"/>
<field name="untaxed_amount"/>
<label name="tax_amount"/>
<field name="tax_amount"/>
<label name="total_amount"/>
<field name="total_amount"/>
</group>
</form>

View File

@ -0,0 +1,38 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="product"/>
<field name="product" widget="selection"/>
<label name="main_guest"/>
<field name="main_guest"/>
<label name="arrival_date"/>
<field name="arrival_date" widget="date"/>
<label name="departure_date"/>
<field name="departure_date" widget="date"/>
<label name="room"/>
<field name="room" widget="selection"/>
<label name="nights_quantity"/>
<field name="nights_quantity"/>
<label name="unit_price"/>
<field name="unit_price"/>
<label name="total_amount"/>
<field name="total_amount"/>
<label name="host_quantity"/>
<field name="host_quantity"/>
<label name="total_commission"/>
<field name="total_commission"/>
<label name="nationality"/>
<field name="nationality"/>
<label name="origin_city"/>
<field name="origin_city"/>
<label name="target_city"/>
<field name="target_city"/>
<label name="operation"/>
<field name="operation"/>
<field name="guests" colspan="4"/>
<separator name="notes" colspan="4"/>
<field name="notes" colspan="4"/>
<label name="state"/>
<field name="state"/>
</form>

View File

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="product"/>
<field name="main_guest"/>
<field name="room"/>
<field name="nights_quantity"/>
<field name="arrival_date"/>
<field name="departure_date"/>
<field name="unit_price"/>
<field name="total_amount"/>
<field name="host_quantity"/>
<field name="state"/>
</tree>

13
view/booking_tree.xml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="number"/>
<field name="party"/>
<field name="contact"/>
<field name="registration_card"/>
<field name="booking_date" widget="date"/>
<field name="price_list"/>
<field name="total_amount"/>
<field name="state"/>
</tree>

24
view/channel_form.xml Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="name"/>
<field name="name"/>
<label name="company"/>
<field name="company"/>
<label name="party"/>
<field name="party"/>
<label name="currency"/>
<field name="currency"/>
<label name="type_commission"/>
<field name="type_commission"/>
<label name="commission"/>
<field name="commission"/>
<label name="debit_account"/>
<field name="debit_account"/>
<label name="credit_account"/>
<field name="credit_account"/>
<label name="payment_method"/>
<field name="payment_method"/>
<field name="taxes" colspan="4"/>
</form>

10
view/channel_tree.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="name"/>
<field name="party"/>
<field name="type_commission"/>
<field name="commission"/>
<field name="currency"/>
</tree>

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form col="6">
<label name="weekday"/>
<field name="weekday"/>
<label name="note"/>
<field name="note"/>
</form>

View File

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree editable="bottom">
<field name="weekday"/>
<field name="note"/>
</tree>

19
view/company_form.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath
expr="/form/notebook/page[@id='reports']"
position="after">
<page string="Property Info" id="hotel_info">
<label name="mig_code"/>
<field name="mig_code"/>
<label name="city_code"/>
<field name="city_code"/>
<label name="national_tourism_registry"/>
<field name="national_tourism_registry"/>
<label name="property_code"/>
<field name="property_code"/>
</page>
</xpath>
</data>

View File

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="booking_sequence"/>
<field name="booking_sequence"/>
<label name="company"/>
<field name="company"/>
<label name="hotel_service_sequence"/>
<field name="hotel_service_sequence"/>
<label name="registration_card_sequence"/>
<field name="registration_card_sequence"/>
<label name="default_accommodation"/>
<field name="default_accommodation"/>
<label name="check_in_time"/>
<field name="check_in_time"/>
<label name="check_out_time"/>
<field name="check_out_time"/>
<label name="cleaning_check_out"/>
<field name="cleaning_check_out"/>
<label name="cleaning_check_in"/>
<field name="cleaning_check_in"/>
<label name="cleaning_occupied"/>
<field name="cleaning_occupied"/>
<!-- <label name="taxes_exception_rule"/>
<field name="taxes_exception_rule"/> -->
<label name="default_channel_seller"/>
<field name="default_channel_seller"/>
<field name="default_charges" colspan="4"/>
</form>

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="booking_sequence"/>
<field name="company"/>
<field name="check_in_time"/>
<field name="check_out_time"/>
</tree>

View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="kind"/>
<field name="kind" widget="selection"/>
<label name="company"/>
<field name="company"/>
<label name="date"/>
<field name="date"/>
<label name="description"/>
<field name="description"/>
</form>

View File

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="start_date"/>
<field name="start_date"/>
<label name="end_date"/>
<field name="end_date"/>
<label name="company"/>
<field name="company"/>
</form>

27
view/guest_form.xml Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="name"/>
<field name="name"/>
<label name="party"/>
<field name="party"/>
<label name="doc_number"/>
<field name="doc_number"/>
<label name="mobile"/>
<field name="mobile"/>
<label name="email"/>
<field name="email"/>
<label name="nationality"/>
<field name="nationality"/>
<label name="sex"/>
<field name="sex"/>
<label name="type_guest"/>
<field name="type_guest"/>
<label name="birthday"/>
<field name="birthday"/>
<label name="origin_city"/>
<field name="origin_city"/>
<label name="target_city"/>
<field name="target_city"/>
</form>

15
view/guest_tree.xml Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree editable="top">
<field name="party"/>
<field name="name"/>
<field name="type_document"/>
<field name="doc_number"/>
<field name="mobile"/>
<field name="email"/>
<field name="nationality"/>
<field name="sex"/>
<field name="type_guest"/>
<field name="birthday"/>
</tree>

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="date"/>
<field name="date"/>
<label name="company"/>
<field name="company"/>
</form>

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="name"/>
<field name="name"/>
<separator name="description" colspan="4"/>
<field name="description" colspan="4"/>
</form>

View File

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="name"/>
<field name="description"/>
</tree>

View File

@ -0,0 +1,40 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="room"/>
<field name="room"/>
<label name="employee"/>
<field name="employee"/>
<label name="availability"/>
<field name="availability"/>
<label name="state"/>
<field name="state"/>
<label name="start_date_assigned"/>
<field name="start_date_assigned"/>
<label name="end_date_assigned"/>
<field name="end_date_assigned"/>
<label name="cleaning_type"/>
<field name="cleaning_type" widget="selection"/>
<notebook colspan="4">
<page string="Tasks" id="tasks">
<field name="tasks" colspan="4"/>
</page>
<page string="Info Addtional" id="comments">
<separator string="Notes" colspan="4" id="configuration_room"/>
<field name="notes" colspan="4"/>
<separator string="Check List" colspan="4" id="check_list"/>
<field name="check_list" colspan="4"/>
</page>
</notebook>
<group col="5" colspan="4" id="buttons">
<button name="clean" string="Clean"
icon="tryton-forward"/>
<button name="dirty" string="Dirty"
icon="tryton-forward"/>
<button name="inspected" string="Inspected"
icon="tryton-forward"/>
<button name="maintenance" string="Maintenance"
icon="tryton-cancel"/>
</group>
</form>

View File

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="date"/>
<field name="date"/>
<label name="employee"/>
<field name="employee"/>
<label name="company"/>
<field name="company"/>
</form>

View File

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="task"/>
<field name="task" widget="selection"/>
<label name="quantity"/>
<field name="quantity"/>
<label name="frecuency"/>
<field name="frecuency"/>
</form>

View File

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree editable="top">
<field name="task"/>
<field name="frecuency"/>
<field name="quantity"/>
</tree>

Some files were not shown because too many files have changed in this diff Show More