lims_quality_control: Add module

This commit is contained in:
Sebastián Marró 2020-04-11 18:19:16 -03:00
parent f34ad7aa9f
commit 0820b3eb56
49 changed files with 6369 additions and 0 deletions

View file

@ -0,0 +1,15 @@
Copyright (C) 2020 Ignacio Parszyk <iparszyk@kalenislims.com>
Copyright (C) 2020 Sebastián Marró <smarro@kalenislims.com>
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/>.

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>.

View file

@ -0,0 +1,48 @@
# This file is part of lims_quality_control 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 Pool
from . import configuration
from . import quality
from . import product
from . import lims
from . import sample
def register():
Pool.register(
configuration.Configuration,
product.Template,
lims.Configuration,
lims.Method,
lims.Typification,
lims.Analysis,
lims.NotebookLine,
lims.EntryDetailAnalysis,
lims.NotebookLoadResultsManualLine,
sample.LabWorkYear,
sample.SampleAttribute,
sample.SampleAttributeAttributeSet,
sample.Sample,
sample.TakeSampleStart,
sample.CountersampleCreateStart,
quality.QualitativeValue,
quality.Template,
quality.QualityTest,
quality.CreateQualityTestStart,
quality.TemplateAddServiceStart,
module='lims_quality_control', type_='model')
Pool.register(
lims.NotebookLoadResultsManual,
sample.TakeSample,
sample.CountersampleCreate,
quality.CreateQualityTest,
quality.TemplateAddService,
quality.TestResultsReport,
quality.PrintTest,
module='lims_quality_control', type_='wizard')
Pool.register(
sample.SampleLabels,
lims.ResultReport,
quality.TestReport,
module='lims_quality_control', type_='report')

View file

@ -0,0 +1,21 @@
# This file is part of lims_quality_control module for 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, ModelSingleton
from trytond.transaction import Transaction
__all__ = ['Configuration']
class Configuration(ModelSingleton, ModelSQL, ModelView):
'Quality configuration'
__name__ = 'lims.quality.configuration'
sample_location = fields.Many2One('stock.location', 'Sample Location',
domain=[('type', '=', 'storage')])
attributes = fields.Many2Many(
'lims.quality.sample.attribute-lims.quality.configuration',
'configuration', 'attribute', 'Attributes')
quality_sequence = fields.Many2One('ir.sequence',
'Quality Sequence', domain=[('code', '=', 'lims.quality.test')],
required=True)

View file

@ -0,0 +1,46 @@
<?xml version="1.0"?>
<tryton>
<data>
<record model="ir.ui.view" id="quality_configuration_form_view">
<field name="model">lims.quality.configuration</field>
<field name="type">form</field>
<field name="name">quality_configuration_form</field>
</record>
<record model="ir.action.act_window" id="act_quality_configuration">
<field name="name">Quality Configuration</field>
<field name="res_model">lims.quality.configuration</field>
</record>
<record model="ir.action.act_window.view"
id="act_quality_configuration_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="quality_configuration_form_view"/>
<field name="act_window" ref="act_quality_configuration"/>
</record>
<record model="ir.model.access" id="access_quality_configuration">
<field name="model"
search="[('model', '=', 'lims.quality.configuration')]"/>
<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_quality_configuration_admin">
<field name="model"
search="[('model', '=', 'lims.quality.configuration')]"/>
<field name="group" ref="group_quality_control_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>
<menuitem id="menu_quality_configuration"
action="act_quality_configuration"
parent="menu_configuration" sequence="0"
icon="tryton-list"/>
</data>
</tryton>

View file

@ -0,0 +1,627 @@
# This file is part of lims_quality_control module for 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 fields
from trytond.pyson import Eval, Equal
from trytond.transaction import Transaction
from trytond.pool import Pool, PoolMeta
from trytond.exceptions import UserError
from trytond.i18n import gettext
__all__ = ['Configuration', 'Method', 'Analysis', 'Typification',
'NotebookLine', 'EntryDetailAnalysis', 'ResultReport',
'NotebookLoadResultsManualLine', 'NotebookLoadResultsManual']
_PROOF_TYPES = [
('qualitative', 'Qualitative'),
('quantitative', 'Quantitative')
]
class Configuration(metaclass=PoolMeta):
__name__ = 'lims.configuration'
qc_fraction_type = fields.Many2One('lims.fraction.type',
'QC fraction type')
class Method(metaclass=PoolMeta):
__name__ = 'lims.lab.method'
specification = fields.Text('Specification')
class Analysis(metaclass=PoolMeta):
__name__ = 'lims.analysis'
quality_type = fields.Selection(_PROOF_TYPES, 'Quality Type',
required=True)
quality_uom = fields.Many2One('product.uom', 'Quality UoM',
domain=[('category.lims_only_available', '=', True)],
states={
'invisible': ~Equal(Eval('quality_type'), 'quantitative'),
'required': Equal(Eval('quality_type'), 'quantitative'),
}, depends=['quality_type'])
quality_possible_values = fields.One2Many('lims.quality.qualitative.value',
'analysis', 'Possible Values',
states={
'invisible': ~Equal(Eval('quality_type'), 'qualitative'),
'required': Equal(Eval('quality_type'), 'qualitative'),
}, depends=['quality_type'])
@staticmethod
def default_quality_type():
return 'quantitative'
class Typification(metaclass=PoolMeta):
__name__ = 'lims.typification'
_history = True
specification = fields.Text('Specification')
quality = fields.Boolean('Quality')
quality_template = fields.Many2One('lims.quality.template',
'Quality Template')
quality_type = fields.Function(fields.Selection(_PROOF_TYPES,
'Quality Type', states={'invisible': True}),
'on_change_with_quality_type')
valid_value = fields.Many2One('lims.quality.qualitative.value',
'Valid Value',
states={
'invisible': ~Equal(Eval('quality_type'), 'qualitative'),
'required': Equal(Eval('quality_type'), 'qualitative'),
},
domain=[('id', 'in', Eval('valid_value_domain'))],
depends=['valid_value_domain', 'quality_type'])
valid_value_domain = fields.Function(fields.Many2Many(
'lims.quality.qualitative.value',
None, None, 'Valid Value domain',
states={'invisible': True}), 'on_change_with_valid_value_domain')
quality_test_report = fields.Boolean('Quality Test Report')
quality_order = fields.Integer('Quality Order')
quality_min = fields.Float('Min',
digits=(16, Eval('limit_digits', 2)), depends=['limit_digits'])
quality_max = fields.Float('Max',
digits=(16, Eval('limit_digits', 2)), depends=['limit_digits'])
@classmethod
def __setup__(cls):
super(Typification, cls).__setup__()
cls._sql_constraints = []
@classmethod
def __register__(cls, module_name):
super(Typification, cls).__register__(module_name)
table = cls.__table_handler__(module_name)
table.drop_constraint('product_matrix_analysis_method_uniq')
@fields.depends('analysis')
def on_change_with_valid_value_domain(self, name=None):
values = []
if self.analysis and self.analysis.quality_possible_values:
for value in self.analysis.quality_possible_values:
values.append(value.id)
return values
@fields.depends('analysis')
def on_change_with_quality_type(self, name=None):
if self.analysis:
return self.analysis.quality_type
@fields.depends('analysis')
def on_change_analysis(self):
if self.analysis:
if self.analysis.quality_type == 'quantitative':
self.start_uom = self.analysis.quality_uom
self.end_uom = self.analysis.quality_uom
@fields.depends('method')
def on_change_method(self):
if self.method:
self.specification = self.method.specification
def check_default(self):
if self.quality:
return
if self.by_default:
typifications = self.search([
('product_type', '=', self.product_type.id),
('matrix', '=', self.matrix.id),
('analysis', '=', self.analysis.id),
('valid', '=', True),
('by_default', '=', True),
('id', '!=', self.id),
])
if typifications:
raise UserError(gettext('lims.msg_default_typification'))
else:
if self.valid:
typifications = self.search([
('product_type', '=', self.product_type.id),
('matrix', '=', self.matrix.id),
('analysis', '=', self.analysis.id),
('valid', '=', True),
('id', '!=', self.id),
])
if not typifications:
raise UserError(
gettext('lims.msg_not_default_typification'))
@classmethod
def create(cls, vlist):
Template = Pool().get('lims.quality.template')
vlist = [x.copy() for x in vlist]
for values in vlist:
if values.get('quality_template'):
template, = Template.browse([values.get('quality_template')])
values['product_type'] = template.product.product_type.id
values['matrix'] = template.product.matrix.id
return super(Typification, cls).create(vlist)
class NotebookLine(metaclass=PoolMeta):
__name__ = 'lims.notebook.line'
typification = fields.Many2One('lims.typification', 'Typification')
quality_test = fields.Many2One('lims.quality.test', 'Quality Test',
select=True)
test_value = fields.Many2One('lims.quality.qualitative.value',
'Test Value',
states={
'readonly': True,
})
qualitative_value = fields.Many2One('lims.quality.qualitative.value',
'Qualitative Value',
domain=[
('analysis', '=', Eval('analysis')),
], depends=['analysis'])
success = fields.Function(fields.Boolean('Success',
depends=['success_icon']), 'get_success')
success_icon = fields.Function(fields.Char('Success Icon',
depends=['success']), 'get_success_icon')
quality_min = fields.Float('Min',
digits=(16, Eval('decimals', 2)), depends=['decimals'])
quality_max = fields.Float('Max',
digits=(16, Eval('decimals', 2)), depends=['decimals'])
quality_test_report = fields.Boolean('Quality Test Report')
@staticmethod
def default_quality_test_report():
return True
@classmethod
def get_success(self, lines, name):
res = {}
for line in lines:
res[line.id] = False
if line.analysis.quality_type == 'quantitative':
if line.result:
value = float(line.result)
quality_min = line.quality_min
if not isinstance(quality_min, (int, float)):
quality_min = float('-inf')
quality_max = line.quality_max
if not isinstance(quality_max, (int, float)):
quality_max = float('inf')
if (value >= quality_min and value <= quality_max):
res[line.id] = True
else:
if line.qualitative_value == line.test_value:
res[line.id] = True
return res
def get_success_icon(self, name):
if not self.accepted:
return 'lims-white'
if self.success:
return 'lims-green'
return 'lims-red'
@fields.depends('qualitative_value')
def on_change_qualitative_value(self):
if self.qualitative_value:
self.literal_result = self.qualitative_value.name
@classmethod
def fields_view_get(cls, view_id=None, view_type='form'):
pool = Pool()
User = pool.get('res.user')
Config = pool.get('lims.configuration')
UiView = pool.get('ir.ui.view')
result = super(NotebookLine, cls).fields_view_get(view_id=view_id,
view_type=view_type)
# All Notebook Lines view
if view_id and UiView(view_id).name == 'notebook_line_all_list':
return result
notebook_view = User(Transaction().user).notebook_view
if not notebook_view:
notebook_view = Config(1).default_notebook_view
if not notebook_view:
return result
if view_type == 'tree':
xml = '<?xml version="1.0"?>\n' \
'<tree editable="bottom">\n'
fields = set()
for column in notebook_view.columns:
fields.add(column.field.name)
attrs = []
if column.field.name == 'analysis':
attrs.append('icon="icon"')
if column.field.name == 'success':
attrs.append('icon="success_icon"')
if column.field.name in ('acceptance_date', 'annulment_date'):
attrs.append('widget="date"')
xml += ('<field name="%s" %s/>\n'
% (column.field.name, ' '.join(attrs)))
for depend in getattr(cls, column.field.name).depends:
fields.add(depend)
for field in ('report_date', 'result', 'converted_result',
'result_modifier', 'converted_result_modifier',
'literal_result', 'backup', 'verification', 'uncertainty',
'accepted', 'acceptance_date', 'end_date', 'report',
'annulled', 'annulment_date', 'icon'):
fields.add(field)
xml += '</tree>'
result['arch'] = xml
result['fields'] = cls.fields_get(fields_names=list(fields))
return result
class EntryDetailAnalysis(metaclass=PoolMeta):
__name__ = 'lims.entry.detail.analysis'
@classmethod
def create_notebook_lines(cls, details, fraction):
cursor = Transaction().connection.cursor()
pool = Pool()
Typification = pool.get('lims.typification')
Method = pool.get('lims.lab.method')
WaitingTime = pool.get('lims.lab.method.results_waiting')
AnalysisLaboratory = pool.get('lims.analysis-laboratory')
Notebook = pool.get('lims.notebook')
Company = pool.get('company.company')
lines_create = []
template_id = None
if Transaction().context.get('template'):
template_id = Transaction().context.get('template')
for detail in details:
query = 'SELECT default_repetitions, ' \
'initial_concentration, final_concentration, start_uom, ' \
'end_uom, detection_limit, quantification_limit, ' \
'calc_decimals, report, id ' \
'FROM "' + Typification._table + '" ' \
'WHERE product_type = %s ' \
'AND matrix = %s ' \
'AND analysis = %s ' \
'AND method = %s ' \
'AND valid'
if template_id:
query += ' AND quality_template = %s'
cursor.execute(query,
(fraction.product_type.id, fraction.matrix.id,
detail.analysis.id, detail.method.id, template_id))
else:
cursor.execute(query,
(fraction.product_type.id, fraction.matrix.id,
detail.analysis.id, detail.method.id))
typifications = cursor.fetchall()
typification = (typifications[0] if len(typifications) == 1
else None)
if typification:
repetitions = typification[0]
initial_concentration = str(typification[1] or '')
final_concentration = str(typification[2] or '')
initial_unit = typification[3]
final_unit = typification[4]
detection_limit = str(typification[5])
quantification_limit = str(typification[6])
decimals = typification[7]
report = typification[8]
else:
repetitions = 0
initial_concentration = None
final_concentration = None
initial_unit = None
final_unit = None
detection_limit = None
quantification_limit = None
decimals = 2
report = False
cursor.execute('SELECT results_estimated_waiting '
'FROM "' + WaitingTime._table + '" '
'WHERE method = %s '
'AND party = %s',
(detail.method.id, detail.party.id))
res = cursor.fetchone()
if res:
results_estimated_waiting = res[0]
else:
cursor.execute('SELECT results_estimated_waiting '
'FROM "' + Method._table + '" '
'WHERE id = %s', (detail.method.id,))
res = cursor.fetchone()
results_estimated_waiting = res and res[0] or None
cursor.execute('SELECT department '
'FROM "' + AnalysisLaboratory._table + '" '
'WHERE analysis = %s '
'AND laboratory = %s',
(detail.analysis.id, detail.laboratory.id))
res = cursor.fetchone()
department = res and res[0] or None
for i in range(0, repetitions + 1):
notebook_line = {
'analysis_detail': detail.id,
'service': detail.service.id,
'analysis': detail.analysis.id,
'analysis_origin': detail.analysis_origin,
'repetition': i,
'laboratory': detail.laboratory.id,
'method': detail.method.id,
'device': detail.device.id if detail.device else None,
'initial_concentration': initial_concentration,
'final_concentration': final_concentration,
'initial_unit': initial_unit,
'final_unit': final_unit,
'detection_limit': detection_limit,
'quantification_limit': quantification_limit,
'decimals': decimals,
'report': report,
'results_estimated_waiting': results_estimated_waiting,
'department': department,
}
if template_id:
quality_typification = Typification(typification[9])
notebook_line['typification'] = quality_typification.id
notebook_line['test_value'] = \
quality_typification.valid_value.id \
if quality_typification.valid_value else None
notebook_line['quality_test'] = Transaction().context.get(
'test')
notebook_line['quality_min'] = \
quality_typification.quality_min
notebook_line['quality_max'] = \
quality_typification.quality_max
notebook_line['quality_test_report'] = \
quality_typification.quality_test_report
lines_create.append(notebook_line)
if not lines_create:
companies = Company.search([])
if fraction.party.id not in [c.party.id for c in companies]:
raise UserError(gettext(
'lims.msg_not_services', fraction=fraction.rec_name))
with Transaction().set_user(0):
notebook = Notebook.search([
('fraction', '=', fraction.id),
])
Notebook.write(notebook, {
'lines': [('create', lines_create)],
})
class ResultReport(metaclass=PoolMeta):
__name__ = 'lims.result_report'
@classmethod
def get_reference(cls, range_type, notebook_line, language,
report_section):
res = super(ResultReport, cls).get_reference(
range_type, notebook_line, language, report_section)
if res:
return res
res = ''
if notebook_line.quality_min:
with Transaction().set_context(language=language):
resf = float(notebook_line.quality_min)
resd = abs(resf) - abs(int(resf))
if resd > 0:
res1 = str(round(notebook_line.quality_min, 2))
else:
res1 = str(int(notebook_line.quality_min))
res = gettext('lims.msg_caa_min', min=res1)
if notebook_line.quality_max:
if res:
res += ' - '
with Transaction().set_context(language=language):
resf = float(notebook_line.quality_max)
resd = abs(resf) - abs(int(resf))
if resd > 0:
res1 = str(round(notebook_line.quality_max, 2))
else:
res1 = str(int(notebook_line.quality_max))
res += gettext('lims.msg_caa_max', max=res1)
return res
class NotebookLoadResultsManualLine(metaclass=PoolMeta):
__name__ = 'lims.notebook.load_results_manual.line'
qualitative_value = fields.Many2One('lims.quality.qualitative.value',
'Qualitative Value',
domain=[
('analysis', '=', Eval('analysis')),
], depends=['analysis'])
analysis = fields.Function(fields.Many2One('lims.analysis', 'Analysis'),
'get_analysis')
def get_analysis(self, name):
return self.line.analysis.id if self.line else None
@fields.depends('result', 'literal_result', 'result_modifier', 'end_date',
'qualitative_value')
def on_change_with_end_date(self):
pool = Pool()
Date = pool.get('ir.date')
if self.end_date:
return self.end_date
if (self.result or self.literal_result or self.qualitative_value or
self.result_modifier not in ('eq', 'low')):
return Date.today()
return None
@fields.depends('qualitative_value')
def on_change_qualitative_value(self):
if self.qualitative_value:
self.literal_result = self.qualitative_value.name
class NotebookLoadResultsManual(metaclass=PoolMeta):
__name__ = 'lims.notebook.load_results_manual'
def transition_confirm_(self):
pool = Pool()
NotebookLoadResultsManualLine = pool.get(
'lims.notebook.load_results_manual.line')
NotebookLine = pool.get('lims.notebook.line')
LabProfessionalMethod = pool.get('lims.lab.professional.method')
LabProfessionalMethodRequalification = pool.get(
'lims.lab.professional.method.requalification')
Date = pool.get('ir.date')
# Write Results to Notebook lines
actions = NotebookLoadResultsManualLine.search([
('session_id', '=', self._session_id),
])
for data in actions:
notebook_line = NotebookLine(data.line.id)
if not notebook_line:
continue
notebook_line_write = {
'result': data.result,
'qualitative_value': data.qualitative_value,
'result_modifier': data.result_modifier,
'end_date': data.end_date,
'chromatogram': data.chromatogram,
'initial_unit': (data.initial_unit.id if
data.initial_unit else None),
'comments': data.comments,
'literal_result': data.literal_result,
'converted_result': None,
'converted_result_modifier': 'eq',
'backup': None,
'verification': None,
'uncertainty': None,
}
if data.result_modifier == 'na':
notebook_line_write['annulled'] = True
notebook_line_write['annulment_date'] = datetime.now()
notebook_line_write['report'] = False
professionals = [{'professional': self.result.professional.id}]
notebook_line_write['professionals'] = (
[('delete', [p.id for p in notebook_line.professionals])] +
[('create', professionals)])
NotebookLine.write([notebook_line], notebook_line_write)
# Write Supervisors to Notebook lines
supervisor_lines = {}
if hasattr(self.sit2, 'supervisor'):
supervisor_lines[self.sit2.supervisor.id] = [
l.id for l in self.sit2.lines]
for prof_id, lines in supervisor_lines.items():
notebook_lines = NotebookLine.search([
('id', 'in', lines),
])
if notebook_lines:
professionals = [{'professional': prof_id}]
notebook_line_write = {
'professionals': [('create', professionals)],
}
NotebookLine.write(notebook_lines, notebook_line_write)
# Write the execution of method
all_prof = {}
key = (self.result.professional.id, self.result.method.id)
all_prof[key] = []
if hasattr(self.sit2, 'supervisor'):
for detail in self.sit2.lines:
key = (self.sit2.supervisor.id, detail.method.id)
if key not in all_prof:
all_prof[key] = []
key = (self.result.professional.id, detail.method.id)
if self.sit2.supervisor.id not in all_prof[key]:
all_prof[key].append(self.sit2.supervisor.id)
today = Date.today()
for key, sup in all_prof.items():
professional_method, = LabProfessionalMethod.search([
('professional', '=', key[0]),
('method', '=', key[1]),
('type', '=', 'analytical'),
])
if professional_method.state == 'training':
history = LabProfessionalMethodRequalification.search([
('professional_method', '=', professional_method.id),
('type', '=', 'training'),
])
if history:
prev_supervisors = [s.supervisor.id for s in
history[0].supervisors]
supervisors = [{'supervisor': s} for s in sup
if s not in prev_supervisors]
LabProfessionalMethodRequalification.write(history, {
'last_execution_date': today,
'supervisors': [('create', supervisors)],
})
else:
supervisors = [{'supervisor': s} for s in sup]
to_create = [{
'professional_method': professional_method.id,
'type': 'training',
'date': today,
'last_execution_date': today,
'supervisors': [('create', supervisors)],
}]
LabProfessionalMethodRequalification.create(to_create)
elif professional_method.state == 'qualified':
history = LabProfessionalMethodRequalification.search([
('professional_method', '=', professional_method.id),
('type', '=', 'qualification'),
])
if history:
LabProfessionalMethodRequalification.write(history, {
'last_execution_date': today,
})
else:
to_create = [{
'professional_method': professional_method.id,
'type': 'qualification',
'date': today,
'last_execution_date': today,
}]
LabProfessionalMethodRequalification.create(to_create)
else:
history = LabProfessionalMethodRequalification.search([
('professional_method', '=', professional_method.id),
('type', '=', 'requalification'),
])
if history:
LabProfessionalMethodRequalification.write(history, {
'last_execution_date': today,
})
else:
to_create = [{
'professional_method': professional_method.id,
'type': 'requalification',
'date': today,
'last_execution_date': today,
}]
LabProfessionalMethodRequalification.create(to_create)
return 'end'

View file

@ -0,0 +1,80 @@
<?xml version="1.0"?>
<tryton>
<data>
<record model="ir.ui.view" id="lims_configuration_view">
<field name="model">lims.configuration</field>
<field name="inherit" ref="lims.lims_configuration_view"/>
<field name="name">configuration_form</field>
</record>
<record model="ir.action.act_window.domain" id="act_lims_analysis_list_domain_quantitative">
<field name="name">Quantitative</field>
<field name="sequence" eval="10"/>
<field name="domain"
eval="[('quality_type', '=', 'quantitative')]"
pyson="1"/>
<field name="act_window" ref="lims.act_lims_analysis_list"/>
</record>
<record model="ir.action.act_window.domain" id="act_lims_analysis_list_domain_qualitative">
<field name="name">Qualitative</field>
<field name="sequence" eval="20"/>
<field name="domain"
eval="[('quality_type', '=', 'qualitative')]"
pyson="1"/>
<field name="act_window" ref="lims.act_lims_analysis_list"/>
</record>
<record model="ir.action.act_window.domain" id="act_lims_analysis_list_domain_all">
<field name="name">All</field>
<field name="sequence" eval="9999"/>
<field name="domain"></field>
<field name="act_window" ref="lims.act_lims_analysis_list"/>
</record>
<record model="ir.ui.view" id="quality_typification_view_form">
<field name="model">lims.typification</field>
<field name="type">form</field>
<field name="name">quality_typification_form</field>
</record>
<record model="ir.ui.view" id="quality_typification_view_list">
<field name="model">lims.typification</field>
<field name="type">tree</field>
<field name="name">quality_typification_list</field>
</record>
<record model="ir.ui.view" id="lims_typification_view_form">
<field name="model">lims.typification</field>
<field name="inherit" ref="lims.lims_typification_view_form"/>
<field name="name">typification_form</field>
</record>
<record model="ir.ui.view" id="lims_typification_view_list">
<field name="model">lims.typification</field>
<field name="inherit" ref="lims.lims_typification_view_list"/>
<field name="name">typification_list</field>
</record>
<record model="ir.ui.view" id="lims_analysis_view_form">
<field name="model">lims.analysis</field>
<field name="inherit" ref="lims.lims_analysis_view_form"/>
<field name="name">analysis_form</field>
</record>
<record model="ir.ui.view" id="lims_analysis_view_list">
<field name="model">lims.analysis</field>
<field name="inherit" ref="lims.lims_analysis_view_list"/>
<field name="name">analysis_list</field>
</record>
<record model="ir.ui.view" id="lims_lab_method_view_form">
<field name="model">lims.lab.method</field>
<field name="inherit" ref="lims.lims_lab_method_view_form"/>
<field name="name">method_form</field>
</record>
<record model="ir.ui.view" id="lims_notebook_load_results_manual_result_line_view_list">
<field name="model">lims.notebook.load_results_manual.line</field>
<field name="inherit" ref="lims.lims_notebook_load_results_manual_result_line_view_list"/>
<field name="name">notebook_load_results_manual_result_line_list</field>
</record>
</data>
</tryton>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,50 @@
<?xml version="1.0"?>
<tryton>
<data grouped="1">
<record model="ir.message" id="msg_delete_template">
<field name="text">Template "%(template)s" can not be deleted.</field>
</record>
<record model="ir.message" id="msg_delete_test">
<field name="text">Test "%(test)s" can not be deleted.</field>
</record>
<record model="ir.message" id="msg_no_entry_quality">
<field name="text">No default entry for quality control.</field>
</record>
<record model="ir.message" id="msg_no_qc_fraction_type">
<field name="text">No quality control fraction type defined.</field>
</record>
<record model="ir.message" id="msg_no_qc_default_configuration">
<field name="text">Missing package type or fraction state for qc fraction type.</field>
</record>
<record model="ir.message" id="msg_sample_used">
<field name="text">Sample already used for a test.</field>
</record>
<record model="ir.message" id="msg_missing_accepted_lines">
<field name="text">There are lines without accepted.</field>
</record>
<record model="ir.message" id="msg_missing_results_report">
<field name="text">There are lines without results report.</field>
</record>
<record model="ir.message" id="msg_missing_countersample">
<field name="text">Missing countersample.</field>
</record>
<record model="ir.message" id="msg_records_not_selected">
<field name="text">Records are not selected.</field>
</record>
<record model="ir.message" id="msg_not_test_sample">
<field name="text">Sample must be already used for a test.</field>
</record>
<record model="ir.message" id="msg_has_countersample">
<field name="text">Sample already has a countersample.</field>
</record>
<record model="ir.message" id="msg_can_not_print_test">
<field name="text">Test is not finished.</field>
</record>
<record model="ir.message" id="msg_missing_template_lines">
<field name="text">Template does not have lines.</field>
</record>
<record model="ir.message" id="msg_template_not_draft">
<field name="text">Template is not in draft state.</field>
</record>
</data>
</tryton>

View file

@ -0,0 +1,14 @@
# This file is part of lims_quality_control module for 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__ = ['Template']
class Template(metaclass=PoolMeta):
__name__ = 'product.template'
product_type = fields.Many2One('lims.product.type', 'Product type')
matrix = fields.Many2One('lims.matrix', 'Matrix')

View file

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<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>
</data>
</tryton>

View file

@ -0,0 +1,607 @@
# This file is part of lims_quality_control module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
import datetime
from trytond.model import Workflow, ModelView, ModelSQL, DeactivableMixin, \
fields
from trytond.wizard import Wizard, StateView, StateTransition, StateAction, \
StateReport, Button
from trytond.pyson import PYSONEncoder, Bool, Equal, Eval, Not
from trytond.transaction import Transaction
from trytond.pool import Pool
from trytond.tools import grouped_slice, reduce_ids
from trytond.exceptions import UserError
from trytond.i18n import gettext
from trytond.modules.company import CompanyReport
__all__ = ['QualitativeValue', 'Template', 'QualityTest',
'CreateQualityTestStart', 'CreateQualityTest', 'TemplateAddServiceStart',
'TemplateAddService', 'TestResultsReport', 'PrintTest', 'TestReport']
_STATES = {
'readonly': Eval('state') != 'draft',
}
_DEPENDS = ['state']
class QualitativeValue(DeactivableMixin, ModelSQL, ModelView):
'Quality Value'
__name__ = 'lims.quality.qualitative.value'
name = fields.Char('Name', required=True, translate=True,
select=True)
analysis = fields.Many2One('lims.analysis', 'Analysis')
typification = fields.Many2One('lims.typification', 'Typification')
class Template(Workflow, ModelSQL, ModelView):
'Quality Template'
__name__ = 'lims.quality.template'
_history = True
name = fields.Char('Name', required=True, translate=True,
select=True, states=_STATES, depends=_DEPENDS)
product = fields.Many2One('product.product', 'Product', required=True,
select=True, states=_STATES, depends=_DEPENDS)
company = fields.Many2One('company.company', 'Company', required=True,
select=True, states=_STATES, depends=_DEPENDS)
comments = fields.Text('Comments', states=_STATES, depends=_DEPENDS)
lines = fields.One2Many('lims.typification', 'quality_template', 'Lines',
domain=[
('quality', '=', True),
],
context={'quality': True},
states=_STATES, depends=_DEPENDS + ['product'])
revision = fields.Integer(
"Revision", required=True, readonly=True)
countersample_required = fields.Boolean('Countersample Required',
states=_STATES, depends=_DEPENDS)
range_validate = fields.Boolean('Ranges Validate',
states=_STATES, depends=_DEPENDS)
range_type = fields.Many2One('lims.range.type', 'Range Type',
states={
'readonly': Eval('state') != 'draft',
'invisible': Not(Bool(Eval('range_validate'))),
'required': Bool(Eval('range_validate')),
}, depends=_DEPENDS + ['range_validate'])
start_date = fields.Date('Start Date', states=_STATES, depends=_DEPENDS)
end_date = fields.Date('End Date', states=_STATES, depends=_DEPENDS)
state = fields.Selection([
('draft', 'Draft'),
('active', 'Active'),
('not_active', 'Not Active'),
], 'State', readonly=True, required=True)
@classmethod
def __setup__(cls):
super(Template, cls).__setup__()
cls._transitions |= set((
('draft', 'active'),
('active', 'draft'),
('active', 'not_active'),
('not_active', 'active'),
))
cls._buttons.update({
'active': {
'invisible': (Eval('state') == 'active'),
'icon': 'tryton-forward',
},
'not_active': {
'invisible': (Eval('state') != 'active'),
'icon': 'tryton-forward',
},
'draft': {
'invisible': (Eval('state') != 'active'),
'icon': 'tryton-clear',
},
})
@classmethod
def default_revision(cls):
return 1
@classmethod
def default_start_date(cls):
Date = Pool().get('ir.date')
return Date.today()
@staticmethod
def default_state():
return 'draft'
@staticmethod
def default_company():
return Transaction().context.get('company')
@classmethod
def copy(cls, templates, default=None):
if default is None:
default = {}
if 'lines' not in default:
default['lines'] = None
default['revision'] = 1
return super(Template, cls).copy(templates, default)
@classmethod
def check_delete(cls, templates):
for t in templates:
if t.state != 'draft' or t.revision > 1:
raise UserError(gettext(
'lims_quality_control.msg_delete_template',
template=t.rec_name))
@classmethod
def delete(cls, templates):
cls.check_delete(templates)
super(Template, cls).delete(templates)
@classmethod
@ModelView.button
@Workflow.transition('draft')
def draft(cls, templates):
cursor = Transaction().connection.cursor()
table = cls.__table__()
# Use SQL and before super to avoid two history entries
for sub_sales in grouped_slice(templates):
cursor.execute(*table.update(
[table.revision],
[table.revision + 1],
where=reduce_ids(table.id, sub_sales)))
@classmethod
@ModelView.button
@Workflow.transition('active')
def active(cls, templates):
for template in templates:
if not template.lines:
raise UserError(gettext(
'lims_quality_control.msg_missing_template_lines'))
@classmethod
@ModelView.button
@Workflow.transition('not_active')
def not_active(cls, templates):
pass
class QualityTest(Workflow, ModelSQL, ModelView):
'Quality Test'
__name__ = 'lims.quality.test'
_rec_name = 'number'
number = fields.Char('Number', readonly=True, select=True,
states={'required': Not(Equal(Eval('state'), 'draft'))})
company = fields.Many2One('company.company', 'Company', required=True,
select=True, states=_STATES, depends=_DEPENDS)
test_date = fields.DateTime('Date', states=_STATES, depends=_DEPENDS)
comments = fields.Text('Comments', states=_STATES, depends=_DEPENDS)
lines = fields.One2Many('lims.notebook.line', 'quality_test', 'Lines',
domain=[
('quality_test_report', '=', True),
],
readonly=True, context={'quality': True})
template = fields.Many2One('lims.quality.template', 'Template',
required=True, states=_STATES, depends=_DEPENDS)
sample = fields.Many2One('lims.sample', 'Sample',
domain=[('lot.product', '=', Eval('product'))],
states=_STATES, depends=_DEPENDS + ['product'])
countersample = fields.Function(fields.Many2One('lims.sample',
'Countersample',
states={
'invisible': Not(Bool(Eval('countersample'))),
}), 'get_countersample')
product = fields.Function(fields.Many2One('product.product', 'Product',
states=_STATES, depends=_DEPENDS), 'on_change_with_product',
searcher='search_product')
lot = fields.Function(fields.Many2One('stock.lot', 'Lot',
states=_STATES, depends=_DEPENDS), 'on_change_with_lot',
searcher='search_lot')
success = fields.Function(fields.Boolean('Success'), 'get_success')
confirmed_date = fields.DateTime('Confirmed Date', readonly=True,
states={
'invisible': Eval('state') == 'draft',
},
depends=_DEPENDS)
state = fields.Selection([
('draft', 'Draft'),
('confirmed', 'Confirmed'),
('successful', 'Successful'),
('failed', 'Failed'),
], 'State', readonly=True, required=True)
state_string = state.translated('state')
@classmethod
def __setup__(cls):
super(QualityTest, cls).__setup__()
cls._order.insert(0, ('number', 'DESC'))
cls._transitions |= set((
('draft', 'confirmed'),
('confirmed', 'successful'),
('confirmed', 'failed'),
))
cls._buttons.update({
'confirm': {
'invisible': (Eval('state') != 'draft'),
'icon': 'tryton-go-next',
},
'manager_validate': {
'invisible': (Eval('state') != 'confirmed'),
'icon': 'tryton-ok',
},
})
def get_success(self, name):
for line in self.lines:
if not line.success:
return False
return True
@fields.depends('sample')
def get_countersample(self, name):
if self.sample and self.sample.countersample:
return self.sample.countersample.id
@staticmethod
def default_test_date():
return datetime.datetime.now()
@staticmethod
def default_state():
return 'draft'
@staticmethod
def default_company():
return Transaction().context.get('company')
@fields.depends('template')
def on_change_with_product(self, name=None):
if self.template:
return self.template.product.id
@classmethod
def search_product(cls, name, clause):
return ['OR', ('template.product.name',) + tuple(clause[1:]),
('template.product.code',) + tuple(clause[1:]),
]
@fields.depends('sample')
def on_change_with_lot(self, name=None):
if self.sample:
return self.sample.lot.id
@classmethod
def search_lot(cls, name, clause):
return [('sample.lot',) + tuple(clause[1:])]
@classmethod
def check_delete(cls, tests):
for t in tests:
if t.state != 'draft':
raise UserError(gettext(
'lims_quality_control.msg_delete_test',
test=t.rec_name))
@classmethod
def delete(cls, tests):
cls.check_delete(tests)
super(QualityTest, cls).delete(tests)
@classmethod
@ModelView.button
@Workflow.transition('confirmed')
def confirm(cls, tests):
for test in tests:
test.apply_template_values()
test.save()
cls.set_number(tests)
cls.write(tests, {'confirmed_date': datetime.datetime.now()})
@classmethod
@Workflow.transition('successful')
def successful(cls, tests):
pass
@classmethod
@Workflow.transition('failed')
def failed(cls, tests):
pass
@classmethod
@ModelView.button
def manager_validate(cls, tests):
for test in tests:
for line in test.lines:
if not line.accepted:
raise UserError(gettext(
'lims_quality_control.msg_missing_accepted_lines'))
if line.report and not line.results_report:
raise UserError(gettext(
'lims_quality_control.msg_missing_results_report'))
if (test.template.countersample_required and
not test.sample.countersamples):
raise UserError(gettext(
'lims_quality_control.msg_missing_countersample'))
if test.success:
cls.successful(tests)
else:
cls.failed(tests)
@classmethod
def set_number(cls, tests):
pool = Pool()
Config = pool.get('lims.quality.configuration')
Sequence = pool.get('ir.sequence')
config = Config(1)
for test in tests:
test.number = Sequence.get_id(config.quality_sequence.id)
test.save()
def apply_template_values(self):
pool = Pool()
Service = pool.get('lims.service')
Fraction = pool.get('lims.fraction')
# new services
services_default = []
for line in self.template.lines:
laboratory_id = (line.analysis.laboratories[0].laboratory.id
if line.analysis.type != 'group' else None)
services_default.append({
'fraction': self.sample.fractions[0].id,
'analysis': line.analysis.id,
'laboratory': laboratory_id,
'method': line.method.id,
'device': (line.analysis.devices[0].device.id
if line.analysis.devices else None),
})
for service in services_default:
new_service, = Service.create([service])
# new analysis details (on service create)
# confirm fraction: new notebook and stock move
context = {
'template': self.template.id,
'test': self.id,
}
with Transaction().set_context(context):
Fraction.confirm(self.sample.fractions)
sample = self.sample
if sample.test_state != 'countersample':
sample.test_state = 'done'
sample.quality_test = self.id
sample.save()
@classmethod
def copy(cls, tests, default=None):
if default is None:
default = {}
if 'templates' not in default:
default['templates'] = None
return super(QualityTest, cls).copy(tests, default)
class CreateQualityTestStart(ModelView):
'Create Quality Test Start'
__name__ = 'lims.create.quality.test.start'
template = fields.Many2One('lims.quality.template', 'Template',
required=True,
domain=[
('product', '=', Eval('product')),
('state', '=', 'active'),
('end_date', '>=', Eval('date')),
],
depends=['product', 'date'])
product = fields.Many2One('product.product', 'Product')
test_created = fields.Many2One('lims.quality.test', 'Test created')
date = fields.Date('Date')
@staticmethod
def default_date():
Date = Pool().get('ir.date')
return Date.today()
class CreateQualityTest(Wizard):
'Create Quality Test'
__name__ = 'lims.create.quality.test'
start = StateTransition()
ask = StateView('lims.create.quality.test.start',
'lims_quality_control.lims_create_quality_test_start_view_form', [
Button('Cancel', 'end', 'tryton-cancel'),
Button('Confirm', 'confirm', 'tryton-ok', default=True),
])
confirm = StateTransition()
open_ = StateAction('lims_quality_control.act_quality_test')
def transition_start(self):
Sample = Pool().get('lims.sample')
sample = Sample(Transaction().context['active_id'])
if sample.test_state == 'done':
raise UserError(gettext(
'lims_quality_control.msg_sample_used'))
return 'ask'
def default_ask(self, fields):
pool = Pool()
Sample = pool.get('lims.sample')
Template = pool.get('lims.quality.template')
Date = pool.get('ir.date')
sample = Sample(Transaction().context['active_id'])
product_id = sample.lot.product.id
res = {
'product': product_id,
}
templates = Template.search([
('product', '=', product_id),
('state', '=', 'active'),
('end_date', '>=', Date.today()),
])
if len(templates) == 1:
res['template'] = templates[0].id
return res
def transition_confirm(self):
test = self.create_test()
self.ask.test_created = test.id
return 'open_'
def create_test(self):
pool = Pool()
Sample = pool.get('lims.sample')
Test = pool.get('lims.quality.test')
sample = Sample(Transaction().context.get('active_id'))
new_test, = Test.create([{
'template': self.ask.template.id,
'sample': sample.id,
}])
return new_test
def do_open_(self, action):
action['views'].reverse()
return action, {
'res_id': [self.ask.test_created.id],
}
class TemplateAddServiceStart(ModelView):
'Template Add Service Start'
__name__ = 'lims.template.add.service.start'
service = fields.Many2One('lims.analysis', 'Service',
required=True,
domain=[
('type', 'in', ['set', 'group']),
('state', '=', 'active'),
])
class TemplateAddService(Wizard):
'Template Add Service'
__name__ = 'lims.template.add.service'
start = StateTransition()
ask = StateView('lims.template.add.service.start',
'lims_quality_control.lims_template_add_service_start_view_form', [
Button('Cancel', 'end', 'tryton-cancel'),
Button('Add', 'add', 'tryton-ok', default=True),
])
add = StateTransition()
def transition_start(self):
Template = Pool().get('lims.quality.template')
template = Template(Transaction().context['active_id'])
if template.state != 'draft':
raise UserError(gettext(
'lims_quality_control.msg_template_not_draft'))
return 'ask'
def transition_add(self):
self.add_service()
return 'end'
def add_service(self):
pool = Pool()
Template = pool.get('lims.quality.template')
Typification = pool.get('lims.typification')
template = Template(Transaction().context.get('active_id'))
for analysis in self.ask.service.all_included_analysis:
typification = Typification()
typification.quality = True
typification.quality_template = template.id
typification.analysis = analysis.id
typification.method = analysis.methods[0]
if analysis.quality_type == 'qualitative':
typification.valid_value = \
analysis.quality_possible_values[0].id
typification.save()
class TestResultsReport(Wizard):
'Test Results Report'
__name__ = 'lims.test.results_report'
start = StateAction('lims.act_lims_results_report')
def do_start(self, action):
pool = Pool()
Test = pool.get('lims.quality.test')
EntryDetailAnalysis = pool.get('lims.entry.detail.analysis')
active_ids = Transaction().context['active_ids']
tests = Test.browse(active_ids)
sample_ids = [test.sample.id for test in tests]
results_report_ids = []
details = EntryDetailAnalysis.search([('sample', 'in', sample_ids)])
if details:
results_report_ids = [d.results_report.id for d in details
if d.results_report]
action['pyson_domain'] = PYSONEncoder().encode([
('id', 'in', results_report_ids),
])
action['name'] += ' (%s)' % ', '.join(
t.rec_name for t in tests)
return action, {}
class PrintTest(Wizard):
'Print Test'
__name__ = 'lims.print_test'
start = StateTransition()
print_ = StateReport('lims.quality.control.report')
def transition_start(self):
Test = Pool().get('lims.quality.test')
test = Test(Transaction().context['active_id'])
if test.state not in ['successful', 'failed']:
raise UserError(gettext(
'lims_quality_control.msg_can_not_print_test'))
return 'print_'
def do_print_(self, action):
return action, {
'ids': Transaction().context['active_ids'],
}
class TestReport(CompanyReport):
'Test Report'
__name__ = 'lims.quality.control.report'
@classmethod
def get_context(cls, records, data):
Test = Pool().get('lims.quality.test')
report_context = super(TestReport, cls).get_context(records, data)
report_context['objects'] = Test.browse(data['ids'])
report_context['get_professionals'] = cls.get_professionals
return report_context
@classmethod
def get_professionals(cls, test):
professionals = []
for line in test.lines:
for professional in line.professionals:
professionals.append(professional)
professionals = list(set([
p.professional.party.name for p in professionals]))
return ' / '.join(professionals)

View file

@ -0,0 +1,447 @@
<?xml version="1.0"?>
<tryton>
<data>
<record model="res.group" id="group_quality_control_admin">
<field name="name">LIMS Quality Control Administration</field>
</record>
<record model="res.user-res.group" id="user_admin_group_quality_control_admin">
<field name="user" ref="res.user_admin"/>
<field name="group" ref="group_quality_control_admin"/>
</record>
<record model="res.group" id="group_quality_control">
<field name="name">LIMS Quality Control</field>
</record>
<record model="res.user-res.group" id="user_admin_group_quality_control">
<field name="user" ref="res.user_admin"/>
<field name="group" ref="group_quality_control"/>
</record>
<record model="ir.rule.group" id="rule_group_quality_template">
<field name="name">User in company</field>
<field name="model" search="[('model', '=', 'lims.quality.template')]"/>
<field name="global_p" eval="True"/>
</record>
<record model="ir.rule" id="rule_quality_template">
<field name="domain"
eval="[('company', '=', Eval('user', {}).get('company', -1))]"
pyson="1"/>
<field name="rule_group" ref="rule_group_quality_template"/>
</record>
<record model="ir.rule.group" id="rule_group_quality_test">
<field name="name">User in company</field>
<field name="model" search="[('model', '=', 'lims.quality.test')]"/>
<field name="global_p" eval="True"/>
</record>
<record model="ir.rule" id="rule_quality_test">
<field name="domain"
eval="[('company', '=', Eval('user', {}).get('company', -1))]"
pyson="1"/>
<field name="rule_group" ref="rule_group_quality_test"/>
</record>
<record model="ir.ui.view" id="quality_qualitative_value_form_view">
<field name="model">lims.quality.qualitative.value</field>
<field name="type">form</field>
<field name="name">quality_qualitative_value_form</field>
</record>
<record model="ir.ui.view" id="quality_qualitative_value_tree_view">
<field name="model">lims.quality.qualitative.value</field>
<field name="type">tree</field>
<field name="name">quality_qualitative_value_tree</field>
</record>
<record model="ir.action.act_window" id="act_quality_qualitative_value">
<field name="name">Quality Value</field>
<field name="res_model">lims.quality.qualitative.value</field>
<field name="search_value"></field>
</record>
<record model="ir.action.act_window.view" id="act_quality_qualitative_value_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="quality_qualitative_value_tree_view"/>
<field name="act_window" ref="act_quality_qualitative_value"/>
</record>
<record model="ir.action.act_window.view" id="act_quality_qualitative_value_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="quality_qualitative_value_form_view"/>
<field name="act_window" ref="act_quality_qualitative_value"/>
</record>
<record model="ir.model.access" id="access_quality_qualitative_value">
<field name="model" search="[('model', '=', 'lims.quality.qualitative.value')]"/>
<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_quality_qualitative_value_admin">
<field name="model" search="[('model', '=', 'lims.quality.qualitative.value')]"/>
<field name="group" ref="group_quality_control_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.model.button" id="quality_template_draft_button">
<field name="name">draft</field>
<field name="string">Reset to Draft</field>
<field name="model" search="[('model', '=', 'lims.quality.template')]"/>
</record>
<record model="ir.model.button-res.group"
id="quality_template_draft_button_group_quality_admin">
<field name="button" ref="quality_template_draft_button"/>
<field name="group" ref="group_quality_control_admin"/>
</record>
<record model="ir.model.button" id="quality_template_active_button">
<field name="name">active</field>
<field name="string">Activate</field>
<field name="model" search="[('model', '=', 'lims.quality.template')]"/>
</record>
<record model="ir.model.button-res.group"
id="quality_template_active_button_group_quality_admin">
<field name="button" ref="quality_template_active_button"/>
<field name="group" ref="group_quality_control_admin"/>
</record>
<record model="ir.model.button" id="quality_template_not_active_button">
<field name="name">not_active</field>
<field name="string">Deactivate</field>
<field name="model" search="[('model', '=', 'lims.quality.template')]"/>
</record>
<record model="ir.model.button-res.group"
id="quality_template_not_active_button_group_quality_admin">
<field name="button" ref="quality_template_not_active_button"/>
<field name="group" ref="group_quality_control_admin"/>
</record>
<record model="ir.ui.view" id="quality_template_form_view">
<field name="model">lims.quality.template</field>
<field name="type">form</field>
<field name="name">quality_template_form</field>
</record>
<record model="ir.ui.view" id="quality_template_tree_view">
<field name="model">lims.quality.template</field>
<field name="type">tree</field>
<field name="name">quality_template_tree</field>
</record>
<record model="ir.action.act_window" id="act_quality_template">
<field name="name">Quality Template</field>
<field name="res_model">lims.quality.template</field>
<field name="search_value"></field>
</record>
<record model="ir.action.act_window.view" id="act_quality_template_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="quality_template_tree_view"/>
<field name="act_window" ref="act_quality_template"/>
</record>
<record model="ir.action.act_window.view" id="act_quality_template_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="quality_template_form_view"/>
<field name="act_window" ref="act_quality_template"/>
</record>
<record model="ir.action.act_window.domain" id="act_quality_template_domain_draft">
<field name="name">Draft</field>
<field name="sequence" eval="10"/>
<field name="domain"
eval="[('state', '=', 'draft')]"
pyson="1"/>
<field name="act_window" ref="act_quality_template"/>
</record>
<record model="ir.action.act_window.domain" id="act_quality_template_domain_active">
<field name="name">Active</field>
<field name="sequence" eval="20"/>
<field name="domain"
eval="[('state', '=', 'active')]"
pyson="1"/>
<field name="act_window" ref="act_quality_template"/>
</record>
<record model="ir.action.act_window.domain" id="act_quality_template_domain_not_active">
<field name="name">Not Active</field>
<field name="sequence" eval="30"/>
<field name="domain"
eval="[('state', '=', 'not_active')]"
pyson="1"/>
<field name="act_window" ref="act_quality_template"/>
</record>
<record model="ir.action.act_window.domain" id="act_quality_template_domain_all">
<field name="name">All</field>
<field name="sequence" eval="9999"/>
<field name="domain"></field>
<field name="act_window" ref="act_quality_template"/>
</record>
<record model="ir.model.access" id="access_quality_template">
<field name="model" search="[('model', '=', 'lims.quality.template')]"/>
<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_quality_template_admin">
<field name="model" search="[('model', '=', 'lims.quality.template')]"/>
<field name="group" ref="group_quality_control_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="quality_test_form_view">
<field name="model">lims.quality.test</field>
<field name="type">form</field>
<field name="name">quality_test_form</field>
</record>
<record model="ir.ui.view" id="quality_test_tree_view">
<field name="model">lims.quality.test</field>
<field name="type">tree</field>
<field name="name">quality_test_tree</field>
</record>
<record model="ir.action.act_window" id="act_quality_test">
<field name="name">Quality Test</field>
<field name="res_model">lims.quality.test</field>
<field name="search_value"></field>
</record>
<record model="ir.action.act_window.view" id="act_quality_test_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="quality_test_tree_view"/>
<field name="act_window" ref="act_quality_test"/>
</record>
<record model="ir.action.act_window.view" id="act_quality_test_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="quality_test_form_view"/>
<field name="act_window" ref="act_quality_test"/>
</record>
<record model="ir.action.act_window.domain" id="act_quality_test_domain_draft">
<field name="name">Draft</field>
<field name="sequence" eval="10"/>
<field name="domain"
eval="[('state', '=', 'draft')]"
pyson="1"/>
<field name="act_window" ref="act_quality_test"/>
</record>
<record model="ir.action.act_window.domain" id="act_quality_test_domain_confirmed">
<field name="name">Confirmed</field>
<field name="sequence" eval="20"/>
<field name="domain"
eval="[('state', '=', 'confirmed')]"
pyson="1"/>
<field name="act_window" ref="act_quality_test"/>
</record>
<record model="ir.action.act_window.domain" id="act_quality_test_domain_successful">
<field name="name">Successful</field>
<field name="sequence" eval="30"/>
<field name="domain"
eval="[('state', '=', 'successful')]"
pyson="1"/>
<field name="act_window" ref="act_quality_test"/>
</record>
<record model="ir.action.act_window.domain" id="act_quality_test_domain_failed">
<field name="name">Failed</field>
<field name="sequence" eval="40"/>
<field name="domain"
eval="[('state', '=', 'failed')]"
pyson="1"/>
<field name="act_window" ref="act_quality_test"/>
</record>
<record model="ir.action.act_window.domain" id="act_quality_test_domain_all">
<field name="name">All</field>
<field name="sequence" eval="9999"/>
<field name="domain"></field>
<field name="act_window" ref="act_quality_test"/>
</record>
<record model="ir.model.access" id="access_quality_test">
<field name="model" search="[('model', '=', 'lims.quality.test')]"/>
<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_quality_test_quality">
<field name="model" search="[('model', '=', 'lims.quality.test')]"/>
<field name="group" ref="group_quality_control"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_quality_test_admin">
<field name="model" search="[('model', '=', 'lims.quality.test')]"/>
<field name="group" ref="group_quality_control_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.sequence.type" id="sequence_type_quality">
<field name="name">Quality Control</field>
<field name="code">lims.quality.test</field>
</record>
<record model="ir.sequence.type-res.group"
id="sequence_type_quality_group_admin">
<field name="sequence_type" ref="sequence_type_quality"/>
<field name="group" ref="res.group_admin"/>
</record>
<record model="ir.sequence.type-res.group"
id="sequence_type_quality_group_quality_admin">
<field name="sequence_type" ref="sequence_type_quality"/>
<field name="group" ref="group_quality_control"/>
</record>
<record model="ir.sequence" id="sequence_quality">
<field name="name">Quality Control</field>
<field name="code">lims.quality.test</field>
</record>
<record model="ir.model.button" id="quality_draft_button">
<field name="name">draft</field>
<field name="string">Reset to Draft</field>
<field name="model" search="[('model', '=', 'lims.quality.test')]"/>
</record>
<record model="ir.model.button-res.group"
id="quality_draft_button_group_quality_admin">
<field name="button" ref="quality_draft_button"/>
<field name="group" ref="group_quality_control_admin"/>
</record>
<record model="ir.model.button" id="quality_confirm_button">
<field name="name">confirm</field>
<field name="string">Confirm</field>
<field name="model" search="[('model', '=', 'lims.quality.test')]"/>
</record>
<record model="ir.model.button-res.group"
id="quality_confirm_button_group_quality">
<field name="button" ref="quality_confirm_button"/>
<field name="group" ref="group_quality_control"/>
</record>
<record model="ir.model.button" id="quality_manager_validate_button">
<field name="name">manager_validate</field>
<field name="string">Validate</field>
<field name="model" search="[('model', '=', 'lims.quality.test')]"/>
</record>
<record model="ir.model.button-res.group"
id="quality_manager_validate_button_group_quality_admin">
<field name="button" ref="quality_manager_validate_button"/>
<field name="group" ref="group_quality_control_admin"/>
</record>
<record model="ir.model.button" id="quality_cancel_button">
<field name="name">cancel</field>
<field name="model" search="[('model', '=', 'lims.quality.test')]"/>
</record>
<record model="ir.model.button-res.group"
id="quality_cancel_button_group_quality">
<field name="button" ref="quality_cancel_button"/>
<field name="group" ref="group_quality_control"/>
</record>
<record model="ir.model.button" id="quality_apply_templates_button">
<field name="name">apply_templates</field>
<field name="string">Apply Templates</field>
<field name="confirm">Applying templates will remove any data already introduced in the test. Are you sure you want to apply templates?</field>
<field name="model" search="[('model', '=', 'lims.quality.test')]"/>
</record>
<record model="ir.model.button-res.group"
id="quality_apply_templates_button_group_quality_admin">
<field name="button" ref="quality_apply_templates_button"/>
<field name="group" ref="group_quality_control_admin"/>
</record>
<menuitem id="menu_quality_control" name="Quality Control"
sequence="1" />
<record model="ir.ui.menu-res.group" id="menu_quality_group_quality">
<field name="menu" ref="menu_quality_control"/>
<field name="group" ref="group_quality_control"/>
</record>
<menuitem name="Configuration" parent="menu_quality_control"
id="menu_configuration"
sequence="0" icon="tryton-settings"/>
<record model="ir.ui.menu-res.group" id="menu_quality_configuration_group_quality_admin">
<field name="menu" ref="menu_configuration"/>
<field name="group" ref="group_quality_control_admin"/>
</record>
<menuitem action="act_quality_template" id="menu_quality_template"
parent="menu_quality_control" sequence="10" name="Templates"/>
<menuitem action="act_quality_test" id="menu_quality_test"
parent="menu_quality_control" sequence="20" name="Tests"/>
<record model="ir.ui.view" id="lims_create_quality_test_start_view_form">
<field name="model">lims.create.quality.test.start</field>
<field name="type">form</field>
<field name="name">create_quality_test_start_form</field>
</record>
<record model="ir.action.wizard" id="wiz_lims_create_quality_test">
<field name="name">Create Quality Test</field>
<field name="wiz_name">lims.create.quality.test</field>
<field name="model">lims.sample</field>
</record>
<record model="ir.action.keyword" id="lims_create_quality_test_keyword">
<field name="keyword">form_action</field>
<field name="model">lims.sample,-1</field>
<field name="action" ref="wiz_lims_create_quality_test"/>
</record>
<record model="ir.ui.view" id="lims_template_add_service_start_view_form">
<field name="model">lims.template.add.service.start</field>
<field name="type">form</field>
<field name="name">add_service_start_form</field>
</record>
<record model="ir.action.wizard" id="wiz_lims_template_add_service">
<field name="name">Add Service</field>
<field name="wiz_name">lims.template.add.service</field>
<field name="model">lims.quality.template</field>
</record>
<record model="ir.action.keyword" id="lims_template_add_service_keyword">
<field name="keyword">form_action</field>
<field name="model">lims.quality.template,-1</field>
<field name="action" ref="wiz_lims_template_add_service"/>
</record>
<record model="ir.action.wizard" id="wiz_lims_test_results_report">
<field name="name">Test Results Reports</field>
<field name="wiz_name">lims.test.results_report</field>
</record>
<record model="ir.action.keyword" id="lims_test_results_report_keyword">
<field name="keyword">form_relate</field>
<field name="model">lims.quality.test,-1</field>
<field name="action" ref="wiz_lims_test_results_report"/>
</record>
<record model="ir.action.wizard" id="wiz_print_test">
<field name="name">Test Report</field>
<field name="wiz_name">lims.print_test</field>
</record>
<record model="ir.action.keyword" id="print_test_keyword">
<field name="keyword">form_print</field>
<field name="model">lims.quality.test,-1</field>
<field name="action" ref="wiz_print_test"/>
</record>
<record model="ir.action.report" id="report_test">
<field name="name">Test Report</field>
<field name="model">lims.quality.test</field>
<field name="report_name">lims.quality.control.report</field>
<field name="report">lims_quality_control/report/test_report.fodt</field>
<field name="extension">pdf</field>
</record>
</data>
</tryton>

View file

@ -0,0 +1,944 @@
<?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
<office:meta><meta:creation-date>2020-01-14T15:29:16.163960942</meta:creation-date><dc:date>2020-04-07T12:10:47.465078684</dc:date><meta:editing-duration>P2DT7H32M24S</meta:editing-duration><meta:editing-cycles>24</meta:editing-cycles><meta:generator>LibreOffice/6.4.2.2$Linux_X86_64 LibreOffice_project/40$Build-2</meta:generator><meta:document-statistic meta:table-count="1" meta:image-count="0" meta:object-count="0" meta:page-count="2" meta:paragraph-count="25" meta:word-count="60" meta:character-count="695" meta:non-whitespace-character-count="656"/></office:meta>
<office:settings>
<config:config-item-set config:name="ooo:view-settings">
<config:config-item config:name="ViewAreaTop" config:type="long">32411</config:config-item>
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
<config:config-item config:name="ViewAreaWidth" config:type="long">20756</config:config-item>
<config:config-item config:name="ViewAreaHeight" config:type="long">8634</config:config-item>
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
<config:config-item-map-indexed config:name="Views">
<config:config-item-map-entry>
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">2060</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">32722</config:config-item>
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
<config:config-item config:name="VisibleTop" config:type="long">32411</config:config-item>
<config:config-item config:name="VisibleRight" config:type="long">20754</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">41044</config:config-item>
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
<config:config-item config:name="ZoomFactor" config:type="short">160</config:config-item>
<config:config-item config:name="IsSelectedFrame" config:type="boolean">true</config:config-item>
<config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
</config:config-item-map-entry>
</config:config-item-map-indexed>
</config:config-item-set>
<config:config-item-set config:name="ooo:configuration-settings">
<config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
<config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
<config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
<config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
<config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
<config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
<config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
<config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
<config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
<config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
<config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
<config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
<config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
<config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
<config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrintFaxName" config:type="string"/>
<config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
<config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
<config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
<config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
<config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
<config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
<config:config-item config:name="Rsid" config:type="int">1418150</config:config-item>
<config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
<config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
<config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
<config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
<config:config-item config:name="PrinterName" config:type="string"/>
<config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
<config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
<config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
<config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
<config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
<config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
<config:config-item config:name="PrintEmptyPages" config:type="boolean">false</config:config-item>
<config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
<config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
<config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
<config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
<config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
<config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
<config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
<config:config-item config:name="RsidRoot" config:type="int">1176009</config:config-item>
<config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
<config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
<config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
<config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
<config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
<config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
<config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
<config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
</config:config-item-set>
</office:settings>
<office:scripts>
<office:script script:language="ooo:Basic">
<ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink">
<ooo:library-embedded ooo:name="Standard"/>
</ooo:libraries>
</office:script>
</office:scripts>
<office:font-face-decls>
<style:font-face style:name="FreeSans1" svg:font-family="FreeSans" style:font-family-generic="swiss"/>
<style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Open Sans" svg:font-family="&apos;Open Sans&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="Liberation Sans1" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-adornments="Predeterminado" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="DejaVu Sans" svg:font-family="&apos;DejaVu Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="FreeSans" svg:font-family="FreeSans" style:font-family-generic="system" style:font-pitch="variable"/>
<style:font-face style:name="Open Sans1" svg:font-family="&apos;Open Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
</office:font-face-decls>
<office:styles>
<style:default-style style:family="graphic">
<style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
<style:tab-stops/>
</style:paragraph-properties>
<style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="es" fo:country="AR" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="FreeSans" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
</style:default-style>
<style:default-style style:family="paragraph">
<style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
<style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="es" fo:country="AR" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="FreeSans" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
</style:default-style>
<style:default-style style:family="table">
<style:table-properties table:border-model="collapsing"/>
</style:default-style>
<style:default-style style:family="table-row">
<style:table-row-properties fo:keep-together="auto"/>
</style:default-style>
<style:style style:name="Standard" style:family="paragraph" style:class="text"/>
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/>
<style:text-properties style:font-name="Liberation Sans1" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="DejaVu Sans" style:font-family-asian="&apos;DejaVu Sans&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="FreeSans" style:font-family-complex="FreeSans" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
</style:style>
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" loext:contextual-spacing="false" fo:line-height="115%"/>
</style:style>
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
<style:text-properties style:font-size-asian="12pt" style:font-name-complex="FreeSans1" style:font-family-complex="FreeSans" style:font-family-generic-complex="swiss"/>
</style:style>
<style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
<style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="FreeSans1" style:font-family-complex="FreeSans" style:font-family-generic-complex="swiss" style:font-size-complex="12pt" style:font-style-complex="italic"/>
</style:style>
<style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
<style:text-properties style:font-size-asian="12pt" style:font-name-complex="FreeSans1" style:font-family-complex="FreeSans" style:font-family-generic-complex="swiss"/>
</style:style>
<style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
</style:style>
<style:style style:name="Horizontal_20_Line" style:display-name="Horizontal Line" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="html">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.499cm" loext:contextual-spacing="false" style:border-line-width-bottom="0.002cm 0.035cm 0.002cm" fo:padding="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="1.11pt double #808080" text:number-lines="false" text:line-number="0" style:join-border="false"/>
<style:text-properties fo:font-size="6pt" style:font-size-asian="6pt" style:font-size-complex="6pt"/>
</style:style>
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties text:number-lines="false" text:line-number="0">
<style:tab-stops>
<style:tab-stop style:position="8.5cm" style:type="center"/>
<style:tab-stop style:position="17cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
</style:style>
<style:style style:name="Header" style:family="paragraph" style:parent-style-name="Header_20_and_20_Footer" style:class="extra">
<style:paragraph-properties text:number-lines="false" text:line-number="0">
<style:tab-stops>
<style:tab-stop style:position="8.5cm" style:type="center"/>
<style:tab-stop style:position="17cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
</style:style>
<style:style style:name="Frame_20_contents" style:display-name="Frame contents" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="extra"/>
<style:style style:name="Placeholder" style:family="text">
<style:text-properties fo:font-variant="small-caps" fo:color="#008080" style:text-underline-style="dotted" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style>
<style:style style:name="Frame" style:family="graphic">
<style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
</style:style>
<text:outline-style style:name="Outline">
<text:outline-level-style text:level="1" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="2" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="3" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="4" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="5" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="6" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="7" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="8" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="9" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
<text:outline-level-style text:level="10" style:num-format="">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"/>
</style:list-level-properties>
</text:outline-level-style>
</text:outline-style>
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
<text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
</office:styles>
<office:automatic-styles>
<style:style style:name="Table1" style:family="table">
<style:table-properties style:width="17.496cm" fo:margin-left="0.265cm" fo:break-before="auto" fo:break-after="auto" table:align="left" fo:background-color="transparent" fo:keep-with-next="auto" style:may-break-between-rows="true" style:writing-mode="page">
<style:background-image/>
</style:table-properties>
</style:style>
<style:style style:name="Table1.A" style:family="table-column">
<style:table-column-properties style:column-width="1.108cm"/>
</style:style>
<style:style style:name="Table1.B" style:family="table-column">
<style:table-column-properties style:column-width="2.498cm"/>
</style:style>
<style:style style:name="Table1.C" style:family="table-column">
<style:table-column-properties style:column-width="10.402cm"/>
</style:style>
<style:style style:name="Table1.D" style:family="table-column">
<style:table-column-properties style:column-width="1.686cm"/>
</style:style>
<style:style style:name="Table1.E" style:family="table-column">
<style:table-column-properties style:column-width="1.704cm"/>
</style:style>
<style:style style:name="Table1.F" style:family="table-column">
<style:table-column-properties style:column-width="0.099cm"/>
</style:style>
<style:style style:name="Table1.A1" style:family="table-cell">
<style:table-cell-properties style:vertical-align="middle" fo:padding="0.049cm" fo:border-left="none" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Table1.A2" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Table1.3" style:family="table-row">
<style:table-row-properties fo:background-color="transparent" fo:keep-together="auto">
<style:background-image/>
</style:table-row-properties>
</style:style>
<style:style style:name="Table1.A3" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Table1.B3" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Table1.C3" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Table1.D3" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Table1.E3" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Table1.F3" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="Table1.A4" style:family="table-cell">
<style:table-cell-properties fo:padding="0.049cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
</style:style>
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Horizontal_20_Line">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.25cm" loext:contextual-spacing="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans" fo:language="zxx" fo:country="none" officeooo:paragraph-rsid="0011f1c9" style:language-asian="zxx" style:country-asian="none" style:language-complex="zxx" style:country-complex="none"/>
</style:style>
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Horizontal_20_Line">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.25cm" loext:contextual-spacing="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties officeooo:paragraph-rsid="0011f1c9"/>
</style:style>
<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Horizontal_20_Line">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.25cm" loext:contextual-spacing="false" fo:break-before="page">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties officeooo:paragraph-rsid="00148442"/>
</style:style>
<style:style style:name="P4" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="normal" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="8pt" style:font-weight-asian="normal" style:font-size-complex="8pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="normal" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="8pt" style:font-weight-asian="normal" style:font-size-complex="8pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="normal" officeooo:rsid="00132d19" officeooo:paragraph-rsid="00132d19" style:font-size-asian="8pt" style:font-weight-asian="normal" style:font-size-complex="8pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P7" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="normal" officeooo:rsid="00132d19" officeooo:paragraph-rsid="00132d19" style:font-size-asian="8pt" style:font-weight-asian="normal" style:font-size-complex="8pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="normal" officeooo:rsid="00148442" officeooo:paragraph-rsid="00148442" style:font-size-asian="8pt" style:font-weight-asian="normal" style:font-size-complex="8pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P9" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="P10" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="bold" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="8pt" style:font-weight-asian="bold" style:font-size-complex="8pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P11" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="bold" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="8pt" style:font-weight-asian="bold" style:font-size-complex="8pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P12" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="9pt" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="9pt" style:font-size-complex="9pt"/>
</style:style>
<style:style style:name="P13" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="9pt" fo:language="zxx" fo:country="none" fo:font-weight="bold" officeooo:rsid="006b7a53" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="9pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="bold" style:font-size-complex="9pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P14" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="9pt" fo:font-weight="normal" officeooo:paragraph-rsid="00132d19" style:font-size-asian="9pt" style:font-weight-asian="normal" style:font-size-complex="9pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P15" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="11pt" fo:font-weight="bold" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="11pt" style:font-weight-asian="bold" style:font-size-complex="11pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P16" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:language="zxx" fo:country="none" officeooo:paragraph-rsid="0011f1c9" style:language-asian="zxx" style:country-asian="none" style:language-complex="zxx" style:country-complex="none"/>
</style:style>
<style:style style:name="P17" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:language="zxx" fo:country="none" fo:font-weight="bold" officeooo:rsid="006b7a53" officeooo:paragraph-rsid="00132d19" style:font-size-asian="7pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="bold" style:font-size-complex="7pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P18" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:font-weight="bold" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="7pt" style:font-weight-asian="bold" style:font-size-complex="7pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P19" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:font-weight="bold" officeooo:rsid="00148442" officeooo:paragraph-rsid="00148442" style:font-size-asian="7pt" style:font-weight-asian="bold" style:font-size-complex="7pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P20" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:font-weight="normal" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="7pt" style:font-weight-asian="normal" style:font-size-complex="7pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P21" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:font-weight="normal" officeooo:paragraph-rsid="00148442" style:font-size-asian="7pt" style:font-weight-asian="normal" style:font-size-complex="7pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P22" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:font-weight="normal" officeooo:paragraph-rsid="00132d19" style:font-size-asian="7pt" style:font-weight-asian="normal" style:font-size-complex="7pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P23" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:font-weight="normal" officeooo:paragraph-rsid="00148442" style:font-size-asian="7pt" style:font-weight-asian="normal" style:font-size-complex="7pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P24" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties fo:font-size="8pt" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="P25" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties officeooo:paragraph-rsid="0011f1c9"/>
</style:style>
<style:style style:name="P26" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties officeooo:paragraph-rsid="0011f1c9"/>
</style:style>
<style:style style:name="P27" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties officeooo:paragraph-rsid="00132d19"/>
</style:style>
<style:style style:name="P28" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:text-properties style:font-name="Liberation Sans" fo:font-size="9pt" fo:language="zxx" fo:country="none" fo:font-weight="bold" officeooo:rsid="006b7a53" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="9pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="bold" style:font-size-complex="9pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P29" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Liberation Sans" fo:font-size="7pt" fo:language="zxx" fo:country="none" fo:font-weight="bold" officeooo:rsid="00148442" officeooo:paragraph-rsid="00148442" style:font-size-asian="7pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="bold" style:font-size-complex="7pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P30" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Liberation Sans" fo:font-size="7pt" fo:language="zxx" fo:country="none" fo:font-weight="bold" officeooo:rsid="006b7a53" officeooo:paragraph-rsid="00148442" style:font-size-asian="7pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="bold" style:font-size-complex="7pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P31" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties fo:font-size="9pt" fo:font-weight="bold" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="9pt" style:font-weight-asian="bold" style:font-size-complex="9pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P32" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties fo:font-size="7pt" fo:font-weight="bold" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="7pt" style:font-weight-asian="bold" style:font-size-complex="7pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P33" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0.15cm" fo:text-align="end" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="8pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="8pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P34" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0.15cm" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="normal" officeooo:rsid="002e7cdf" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="8pt" style:font-weight-asian="normal" style:font-size-complex="8pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P35" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0.15cm" fo:text-align="end" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:paragraph-rsid="00132d19" style:font-size-asian="7pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="7pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P36" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0.15cm" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:paragraph-rsid="00148442" style:font-size-asian="7pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="7pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P37" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0.15cm" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:font-weight="normal" officeooo:rsid="002e7cdf" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="7pt" style:font-weight-asian="normal" style:font-size-complex="7pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P38" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="8pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="8pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P39" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="7pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="7pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P40" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="11pt" fo:font-weight="bold" officeooo:rsid="0011f1c9" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="11pt" style:font-weight-asian="bold" style:font-size-complex="11pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P41" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="9pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:rsid="006b7a53" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="9pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="9pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P42" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="9pt" fo:language="zxx" fo:country="none" fo:font-weight="bold" officeooo:rsid="006b7a53" officeooo:paragraph-rsid="0011f1c9" style:font-size-asian="9pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="bold" style:font-size-complex="9pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P43" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="10pt" fo:font-weight="bold" officeooo:rsid="00132d19" officeooo:paragraph-rsid="00132d19" style:font-size-asian="10pt" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P44" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="10pt" fo:font-weight="normal" officeooo:rsid="00132d19" officeooo:paragraph-rsid="00132d19" style:font-size-asian="10pt" style:font-weight-asian="normal" style:font-size-complex="10pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P45" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="10pt" fo:font-weight="normal" officeooo:rsid="0015a3a6" officeooo:paragraph-rsid="0015a3a6" style:font-size-asian="10pt" style:font-weight-asian="normal" style:font-size-complex="10pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P46" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:language="zxx" fo:country="none" fo:font-weight="bold" officeooo:rsid="0015a3a6" officeooo:paragraph-rsid="0015a3a6" style:font-size-asian="7pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="bold" style:font-size-complex="7pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P47" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="7pt" fo:font-weight="bold" officeooo:rsid="0015a3a6" officeooo:paragraph-rsid="0015a3a6" style:font-size-asian="7pt" style:font-weight-asian="bold" style:font-size-complex="7pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="P48" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false">
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="normal" officeooo:rsid="00148442" officeooo:paragraph-rsid="00148442" style:font-size-asian="8pt" style:font-weight-asian="normal" style:font-size-complex="8pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="P49" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties>
<style:tab-stops>
<style:tab-stop style:position="9.5cm"/>
<style:tab-stop style:position="18.9cm" style:type="right"/>
</style:tab-stops>
</style:paragraph-properties>
<style:text-properties officeooo:paragraph-rsid="00132d19"/>
</style:style>
<style:style style:name="P50" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
<style:text-properties style:font-name="Liberation Sans" fo:font-size="7pt" fo:language="zxx" fo:country="none" fo:font-weight="bold" officeooo:rsid="0015a3a6" officeooo:paragraph-rsid="0015a3a6" style:font-size-asian="7pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="bold" style:font-size-complex="7pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="T1" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-weight="normal" style:font-weight-asian="normal" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="T2" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="9pt" fo:language="zxx" fo:country="none" officeooo:rsid="006b7a53" style:font-size-asian="9pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="9pt" style:language-complex="zxx" style:country-complex="none"/>
</style:style>
<style:style style:name="T3" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="9pt" fo:language="zxx" fo:country="none" officeooo:rsid="0015a3a6" style:font-size-asian="9pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="9pt" style:language-complex="zxx" style:country-complex="none"/>
</style:style>
<style:style style:name="T4" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="9pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:rsid="006b7a53" style:font-size-asian="9pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="9pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="T5" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="9pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:rsid="0015a3a6" style:font-size-asian="9pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="9pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="T6" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="9pt" style:font-size-asian="9pt" style:font-size-complex="9pt"/>
</style:style>
<style:style style:name="T7" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:rsid="006b7a53" style:font-size-asian="8pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="8pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="T8" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:rsid="00132d19" style:font-size-asian="8pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="8pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="T9" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:language="zxx" fo:country="none" fo:font-weight="normal" officeooo:rsid="0015a3a6" style:font-size-asian="8pt" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="normal" style:font-size-complex="8pt" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="T10" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="T11" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" officeooo:rsid="00626ee7" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="T12" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="normal" style:font-size-asian="8pt" style:font-weight-asian="normal" style:font-size-complex="8pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="T13" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="8pt" fo:font-weight="normal" officeooo:rsid="00626ee7" style:font-size-asian="8pt" style:font-weight-asian="normal" style:font-size-complex="8pt" style:font-weight-complex="normal"/>
</style:style>
<style:style style:name="T14" style:family="text">
<style:text-properties style:font-name="Liberation Sans1" fo:font-size="10pt" fo:font-weight="bold" style:font-size-asian="10pt" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="T15" style:family="text">
<style:text-properties officeooo:rsid="006b7a53"/>
</style:style>
<style:style style:name="T16" style:family="text">
<style:text-properties fo:language="zxx" fo:country="none" fo:font-weight="bold" officeooo:rsid="006b7a53" style:language-asian="zxx" style:country-asian="none" style:font-weight-asian="bold" style:language-complex="zxx" style:country-complex="none" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="T17" style:family="text">
<style:text-properties fo:language="zxx" fo:country="none" officeooo:rsid="006b7a53" style:language-asian="zxx" style:country-asian="none" style:language-complex="zxx" style:country-complex="none"/>
</style:style>
<style:style style:name="T18" style:family="text">
<style:text-properties fo:font-size="8pt" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="T19" style:family="text">
<style:text-properties fo:font-size="8pt" officeooo:rsid="00626ee7" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
</style:style>
<style:style style:name="T20" style:family="text">
<style:text-properties fo:font-size="8pt" fo:language="zxx" fo:country="none" officeooo:rsid="006b7a53" style:font-size-asian="8pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="8pt" style:language-complex="zxx" style:country-complex="none"/>
</style:style>
<style:style style:name="T21" style:family="text">
<style:text-properties fo:font-size="8pt" fo:language="zxx" fo:country="none" officeooo:rsid="00132d19" style:font-size-asian="8pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="8pt" style:language-complex="zxx" style:country-complex="none"/>
</style:style>
<style:style style:name="T22" style:family="text">
<style:text-properties officeooo:rsid="006d5c80"/>
</style:style>
<style:style style:name="T23" style:family="text">
<style:text-properties officeooo:rsid="0011f1c9"/>
</style:style>
<style:style style:name="T24" style:family="text">
<style:text-properties officeooo:rsid="00132d19"/>
</style:style>
<style:style style:name="T25" style:family="text">
<style:text-properties fo:font-weight="bold" officeooo:rsid="00132d19" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="T26" style:family="text">
<style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="T27" style:family="text">
<style:text-properties fo:font-size="10pt" fo:font-weight="bold" style:font-size-asian="10pt" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="T28" style:family="text">
<style:text-properties fo:font-size="10pt" fo:font-weight="bold" officeooo:rsid="00132d19" style:font-size-asian="10pt" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="T29" style:family="text">
<style:text-properties fo:font-size="9pt" fo:font-weight="bold" officeooo:rsid="006b7a53" style:font-size-asian="9pt" style:font-weight-asian="bold" style:font-size-complex="9pt" style:font-weight-complex="bold"/>
</style:style>
<style:style style:name="T30" style:family="text">
<style:text-properties style:font-name="Open Sans" fo:font-size="12pt" fo:font-style="italic" fo:font-weight="bold" fo:background-color="#a4c2f4" loext:char-shading-value="0" style:font-name-asian="Open Sans1" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-name-complex="Open Sans1" style:font-size-complex="12pt"/>
</style:style>
<style:style style:name="T31" style:family="text">
<style:text-properties officeooo:rsid="0015a3a6"/>
</style:style>
<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
<style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" fo:padding="0cm" fo:border="none" style:shadow="none" draw:shadow-opacity="100%">
<style:columns fo:column-count="1" fo:column-gap="0cm"/>
</style:graphic-properties>
</style:style>
<style:page-layout style:name="pm1">
<style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="1.499cm" fo:margin-right="1.499cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
<style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
</style:page-layout-properties>
<style:header-style>
<style:header-footer-properties fo:min-height="0.998cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.499cm" fo:background-color="transparent" style:dynamic-spacing="false" draw:fill="none" draw:fill-color="#729fcf"/>
</style:header-style>
<style:footer-style/>
</style:page-layout>
<style:page-layout style:name="pm2">
<style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
<style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
</style:page-layout-properties>
<style:header-style/>
<style:footer-style/>
</style:page-layout>
</office:automatic-styles>
<office:master-styles>
<style:master-page style:name="Standard" style:page-layout-name="pm1">
<style:header>
<text:p text:style-name="Header"><draw:frame draw:style-name="fr1" draw:name="image: (company.logo, &apos;image/png&apos;, &apos;6cm&apos;, &apos;1.5cm&apos;)" text:anchor-type="paragraph" svg:x="0.06cm" svg:y="0.019cm" svg:width="6.001cm" draw:z-index="1">
<draw:text-box fo:min-height="1.6cm">
<text:p text:style-name="Frame_20_contents"/>
</draw:text-box>
</draw:frame></text:p>
<text:p text:style-name="Header"/>
<text:p text:style-name="Header"/>
</style:header>
</style:master-page>
<style:master-page style:name="First_20_Page" style:display-name="First Page" style:page-layout-name="pm2" style:next-style-name="Standard"/>
</office:master-styles>
<office:body>
<office:text text:use-soft-page-breaks="true">
<office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
<text:sequence-decls>
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
<text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
</text:sequence-decls>
<text:p text:style-name="P5"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;test in objects&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P3"/>
<text:p text:style-name="P40"><text:span text:style-name="T31">Quality Test Report</text:span></text:p>
<text:p text:style-name="P1"/>
<text:p text:style-name="P26"><text:span text:style-name="T3">Date</text:span><text:span text:style-name="T6">: </text:span><text:span text:style-name="T6"><text:placeholder text:placeholder-type="text">&lt;format_date(test.test_date, user.language)&gt;</text:placeholder></text:span><text:span text:style-name="T6"><text:tab/><text:tab/></text:span><text:span text:style-name="T3">TEST</text:span><text:span text:style-name="T6">: </text:span><text:span text:style-name="T6"><text:placeholder text:placeholder-type="text">&lt;test.number&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P26"><text:span text:style-name="T3">PRODUCT</text:span><text:span text:style-name="T6">: </text:span><text:span text:style-name="T14"><text:placeholder text:placeholder-type="text">&lt;test.product.rec_name&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P41"/>
<text:p text:style-name="P26"><text:span text:style-name="T5">SAMPLE</text:span><text:span text:style-name="T4">:</text:span><text:span text:style-name="T13"> </text:span><text:span text:style-name="T12"><text:s/></text:span><text:span text:style-name="T12"><text:placeholder text:placeholder-type="text">&lt;test.sample.number&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P27"><text:span text:style-name="T9">COUNTERSAMPLE</text:span><text:span text:style-name="T7">:</text:span><text:span text:style-name="T13"> </text:span><text:span text:style-name="T12"><text:s/></text:span><text:span text:style-name="T12"><text:placeholder text:placeholder-type="text">&lt;test.sample.countersample.number if test.sample.countersample else &apos;&apos;&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P27"><text:span text:style-name="T7">LOT:</text:span><text:span text:style-name="T11"> </text:span><text:span text:style-name="T10"><text:s/></text:span><text:span text:style-name="T14"><text:placeholder text:placeholder-type="text">&lt;test.lot.number&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P9"/>
<text:p text:style-name="P13">RESULTS</text:p>
<text:p text:style-name="P4"/>
<table:table table:name="Table1" table:style-name="Table1">
<table:table-column table:style-name="Table1.A"/>
<table:table-column table:style-name="Table1.B"/>
<table:table-column table:style-name="Table1.C"/>
<table:table-column table:style-name="Table1.D"/>
<table:table-column table:style-name="Table1.E"/>
<table:table-column table:style-name="Table1.F"/>
<table:table-header-rows>
<table:table-row>
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
<text:p text:style-name="P50">Valid</text:p>
</table:table-cell>
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
<text:p text:style-name="P50">Analysis</text:p>
</table:table-cell>
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
<text:p text:style-name="P46">Specification</text:p>
</table:table-cell>
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
<text:p text:style-name="P47">Result</text:p>
</table:table-cell>
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
<text:p text:style-name="P19">Min-Max</text:p>
</table:table-cell>
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
<text:p text:style-name="P32"/>
</table:table-cell>
</table:table-row>
</table:table-header-rows>
<table:table-row>
<table:table-cell table:style-name="Table1.A2" table:number-columns-spanned="6" office:value-type="string">
<text:p text:style-name="P20"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;line in test.lines&quot;&gt;</text:placeholder></text:p>
</table:table-cell>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
</table:table-row>
<table:table-row table:style-name="Table1.3">
<table:table-cell table:style-name="Table1.A3" office:value-type="string">
<text:p text:style-name="P23"><text:placeholder text:placeholder-type="text">&lt;&apos;✓&apos; if line.success else &apos;x&apos;&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Table1.B3" office:value-type="string">
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;line.analysis.rec_name&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Table1.C3" office:value-type="string">
<text:p text:style-name="P22"><text:placeholder text:placeholder-type="text">&lt;line.typification.specification&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Table1.D3" office:value-type="string">
<text:p text:style-name="P35"><text:placeholder text:placeholder-type="text">&lt;line.result or line.literal_result&gt;</text:placeholder><text:s/><text:placeholder text:placeholder-type="text">&lt;line.initial_unit and line.initial_unit.symbol or &apos;&apos;&gt;</text:placeholder></text:p>
<text:p text:style-name="P39"/>
</table:table-cell>
<table:table-cell table:style-name="Table1.E3" office:value-type="string">
<text:p text:style-name="P36"><text:placeholder text:placeholder-type="text">&lt;line.quality_min&gt;</text:placeholder><text:s/>- <text:placeholder text:placeholder-type="text">&lt;line.quality_max&gt;</text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Table1.F3" office:value-type="string">
<text:p text:style-name="P37"/>
</table:table-cell>
</table:table-row>
<table:table-row>
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="6" office:value-type="string">
<text:p text:style-name="P20"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
</table:table-cell>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
<table:covered-table-cell/>
</table:table-row>
</table:table>
<text:p text:style-name="P5"/>
<text:p text:style-name="P8">Analysts: <text:span text:style-name="T24"><text:placeholder text:placeholder-type="text">&lt;get_professionals(test)&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P8"/>
<text:p text:style-name="P6">Result: <text:span text:style-name="T27"><text:placeholder text:placeholder-type="text">&lt;test.state_string&gt;</text:placeholder></text:span></text:p>
<text:p text:style-name="P43"/>
<text:p text:style-name="P43"/>
<text:p text:style-name="P43"/>
<text:p text:style-name="P44">_____________________________</text:p>
<text:p text:style-name="P45">Signature</text:p>
<text:p text:style-name="P5"/>
<text:p text:style-name="P5"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
<text:p text:style-name="P5"/>
</office:text>
</office:body>
</office:document>

View file

@ -0,0 +1,358 @@
# This file is part of lims_quality_control module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
from datetime import datetime
from dateutil.relativedelta import relativedelta
from trytond.model import fields, ModelView, ModelSQL, DictSchemaMixin
from trytond.wizard import Wizard, StateView, StateTransition, StateAction, \
Button
from trytond.pool import Pool, PoolMeta
from trytond.transaction import Transaction
from trytond.pyson import PYSONEncoder, Bool, Not, Eval
from trytond.report import Report
from trytond.exceptions import UserError
from trytond.i18n import gettext
__all__ = ['LabWorkYear', 'SampleAttribute', 'SampleAttributeAttributeSet',
'Sample', 'TakeSampleStart', 'TakeSample', 'CountersampleCreateStart',
'CountersampleCreate', 'SampleLabels']
class LabWorkYear(metaclass=PoolMeta):
__name__ = 'lims.lab.workyear'
default_entry_quality = fields.Many2One('lims.entry',
'Default entry quality')
class SampleAttribute(DictSchemaMixin, ModelSQL, ModelView):
'Sample Attribute'
__name__ = 'lims.quality.sample.attribute'
sets = fields.Many2Many(
'lims.quality.sample.attribute-lims.quality.configuration',
'attribute', 'configuration', 'Sets')
class SampleAttributeAttributeSet(ModelSQL):
'Sample Attribute - Set'
__name__ = 'lims.quality.sample.attribute-lims.quality.configuration'
_table = 'lims_sample_attribute_quality_configuration'
attribute = fields.Many2One('lims.quality.sample.attribute', 'Attribute',
required=True, ondelete='CASCADE', select=True)
configuration = fields.Many2One('lims.quality.configuration', 'Set',
required=True, ondelete='CASCADE', select=True)
class Sample(metaclass=PoolMeta):
__name__ = 'lims.sample'
quality = fields.Boolean('Quality')
lot = fields.Many2One('stock.lot', 'Lot')
test_state = fields.Selection([
('pending', 'Pending'),
('done', 'Done'),
('countersample', 'Countersample'),
], 'Test State', readonly=True)
attributes = fields.Dict('lims.quality.sample.attribute', 'Attributes')
product = fields.Function(fields.Many2One('product.product',
'Product'), 'on_change_with_product', searcher='search_product')
quality_test = fields.Many2One('lims.quality.test', 'Test', readonly=True)
countersample_original_sample = fields.Many2One('lims.sample',
'Countersample Original sample', readonly=True,
states={'invisible': Not(Bool(Eval('countersample_original_sample')))})
countersamples = fields.One2Many('lims.sample',
'countersample_original_sample', 'Countersamples', readonly=True)
countersample = fields.Function(fields.Many2One('lims.sample',
'Countersample'), 'get_countersample')
@staticmethod
def default_test_state():
return 'pending'
@fields.depends('lot')
def on_change_with_product(self, name=None):
if self.lot:
return self.lot.product.id
@classmethod
def search_product(cls, name, clause):
return [('lot.' + name,) + tuple(clause[1:])]
@fields.depends('countersamples')
def get_countersample(self, name):
if self.countersamples:
return self.countersamples[0].id
class TakeSampleStart(ModelView):
'Take Sample Start'
__name__ = 'lims.take.sample.start'
date = fields.Date('Date', required=True)
label = fields.Char('Label', required=True)
attributes = fields.Dict('lims.quality.sample.attribute', 'Attributes')
@staticmethod
def default_date():
Date = Pool().get('ir.date')
return Date.today()
class TakeSample(Wizard):
'Take Sample'
__name__ = 'lims.take.sample'
start = StateView('lims.take.sample.start',
'lims_quality_control.lims_take_sample_start_view_form', [
Button('Cancel', 'end', 'tryton-cancel'),
Button('Confirm', 'confirm', 'tryton-ok', default=True),
])
confirm = StateTransition()
def transition_confirm(self):
sample = self.create_sample()
return 'end'
def create_sample(self):
pool = Pool()
Config = pool.get('lims.configuration')
QualityConfig = pool.get('lims.quality.configuration')
Lot = pool.get('stock.lot')
LabWorkYear = pool.get('lims.lab.workyear')
Entry = pool.get('lims.entry')
Sample = pool.get('lims.sample')
Fraction = pool.get('lims.fraction')
lot = Lot(Transaction().context.get('active_id'))
if not lot.product.template.product_type:
raise UserError(gettext('lims.msg_no_product_product_type'))
if not lot.product.template.matrix:
raise UserError(gettext('lims.msg_no_product_matrix'))
config = Config(1)
if not config.qc_fraction_type:
raise UserError(gettext(
'lims_quality_control.msg_no_qc_fraction_type'))
fraction_type = config.qc_fraction_type
if (not fraction_type.default_package_type or
not fraction_type.default_fraction_state):
raise UserError(gettext(
'lims_quality_control.msg_no_qc_default_configuration'))
quality_config = QualityConfig(1)
workyear_id = LabWorkYear.find()
workyear = LabWorkYear(workyear_id)
if not workyear.default_entry_quality:
raise UserError(gettext(
'lims_quality_control.msg_no_entry_quality'))
entry = Entry(workyear.default_entry_quality.id)
obj_description = self._get_obj_description(lot.product)
# new sample
new_sample, = Sample.create([{
'quality': True,
'lot': lot.id,
'attributes': self.start.attributes,
'entry': entry.id,
'date': datetime.now(),
'product_type': lot.product.template.product_type.id,
'matrix': lot.product.template.matrix.id,
'zone': (entry.party.entry_zone.id
if entry.party.entry_zone else None),
'label': self.start.label,
'obj_description': obj_description,
'packages_quantity': 1,
'fractions': [],
}])
new_sample.label = '%s [%s]' % (new_sample.label, new_sample.number)
new_sample.save()
# new fraction
fraction_default = {
'sample': new_sample.id,
'type': fraction_type.id,
'storage_location': quality_config.sample_location.id,
'packages_quantity': 1,
'package_type': fraction_type.default_package_type.id,
'fraction_state': fraction_type.default_fraction_state.id,
'services': [],
}
if fraction_type.max_storage_time:
fraction_default['storage_time'] = fraction_type.max_storage_time
elif quality_config.sample_location.storage_time:
fraction_default['storage_time'] = (
quality_config.sample_location.storage_time)
else:
fraction_default['storage_time'] = 3
new_fraction, = Fraction.create([fraction_default])
def _get_obj_description(self, product):
cursor = Transaction().connection.cursor()
ObjectiveDescription = Pool().get('lims.objective_description')
cursor.execute('SELECT id '
'FROM "' + ObjectiveDescription._table + '" '
'WHERE product_type = %s '
'AND matrix = %s',
(product.template.product_type.id, product.template.matrix.id))
res = cursor.fetchone()
return res and res[0] or None
class CountersampleCreateStart(ModelView):
'Countersample Create Start'
__name__ = 'lims.countersample.create.start'
location = fields.Many2One('stock.location', 'Location', required=True)
countersamples = fields.Many2Many(
'lims.sample', None, None, 'Countersamples')
class CountersampleCreate(Wizard):
'Countersample Create'
__name__ = 'lims.countersample.create'
start = StateTransition()
ask = StateView('lims.countersample.create.start',
'lims_quality_control.lims_countersample_create_start_view_form', [
Button('Cancel', 'end', 'tryton-cancel'),
Button('Create', 'create_', 'tryton-ok', default=True),
])
create_ = StateTransition()
open_ = StateAction('lims_quality_control.act_lims_sample_list')
def transition_start(self):
Sample = Pool().get('lims.sample')
if not Transaction().context['active_ids']:
raise UserError(gettext(
'lims_quality_control.msg_records_not_selected'))
samples = Sample.browse(Transaction().context['active_ids'])
for sample in samples:
if sample.test_state != 'done':
raise UserError(gettext(
'lims_quality_control.msg_not_test_sample'))
if sample.countersample:
raise UserError(gettext(
'lims_quality_control.msg_has_countersample'))
return 'ask'
def transition_create_(self):
countersamples = self.create_countersample()
self.ask.countersamples = [sample.id for sample in countersamples]
return 'open_'
def create_countersample(self):
pool = Pool()
Sample = pool.get('lims.sample')
Fraction = pool.get('lims.fraction')
Move = pool.get('stock.move')
Date = pool.get('ir.date')
samples = Sample.browse(Transaction().context.get('active_ids'))
countersamples = []
for sample in samples:
# new countersample
new_countersample, = Sample.create([{
'quality': True,
'lot': sample.lot.id,
'attributes': sample.attributes,
'entry': sample.entry.id,
'date': datetime.now(),
'product_type': sample.product_type.id,
'matrix': sample.matrix.id,
'zone': sample.zone.id if sample.zone else None,
'label': sample.label,
'obj_description': sample.obj_description,
'packages_quantity': sample.packages_quantity,
'countersample_original_sample': sample.id,
'test_state': 'countersample',
'fractions': [],
}])
# new fraction
fraction_default = {
'sample': new_countersample.id,
'type': sample.fractions[0].type.id,
'storage_location': self.ask.location.id,
'packages_quantity': sample.packages_quantity,
'package_type': sample.fractions[0].package_type.id,
'fraction_state': sample.fractions[0].fraction_state.id,
'storage_time': sample.fractions[0].storage_time,
'countersample_location': self.ask.location.id,
'countersample_date': Date.today(),
'expiry_date': Date.today() + relativedelta(
months=sample.fractions[0].storage_time),
'services': [],
}
new_fraction, = Fraction.create([fraction_default])
moves = self._get_stock_moves([new_fraction])
Move.do(moves)
countersamples.append(new_countersample)
return countersamples
def do_open_(self, action):
action['pyson_domain'] = PYSONEncoder().encode([
('id', 'in', [sample.id for sample in self.ask.countersamples]),
])
action['views'].reverse()
return action, {
'res_id': [self.ask.countersamples[0].id],
}
def _get_stock_moves(self, fractions):
pool = Pool()
Config = pool.get('lims.configuration')
User = pool.get('res.user')
Move = pool.get('stock.move')
config_ = Config(1)
if config_.fraction_product:
product = config_.fraction_product
else:
raise UserError(gettext('lims.msg_missing_fraction_product'))
company = User(Transaction().user).company
moves = []
for fraction in fractions:
with Transaction().set_user(0, set_context=True):
move = Move()
move.product = product.id
move.fraction = fraction.id
move.quantity = fraction.packages_quantity
move.uom = product.default_uom
move.from_location = \
fraction.sample.countersample_original_sample.fractions[
0].storage_location.id
move.to_location = fraction.countersample_location.id
move.company = company
move.planned_date = fraction.countersample_date
move.origin = fraction
move.state = 'draft'
move.save()
moves.append(move)
return moves
class SampleLabels(Report):
'Sample Labels'
__name__ = 'lims.sample.labels.report'
@classmethod
def get_context(cls, records, data):
report_context = super(SampleLabels, cls).get_context(records, data)
labels = []
for sample in records:
for fraction in sample.fractions:
for i in range(fraction.packages_quantity):
labels.append(fraction)
report_context['labels'] = labels
return report_context

View file

@ -0,0 +1,155 @@
<?xml version="1.0"?>
<tryton>
<data>
<record model="ir.ui.view" id="lims_workyear_view_form">
<field name="model">lims.lab.workyear</field>
<field name="inherit" ref="lims.lims_workyear_view_form"/>
<field name="name">workyear_form</field>
</record>
<record model="ir.ui.view" id="lims_sample_view_form">
<field name="model">lims.sample</field>
<field name="inherit" ref="lims.lims_sample_view_form"/>
<field name="name">sample_form</field>
</record>
<record model="ir.ui.view" id="lims_sample_view_list">
<field name="model">lims.sample</field>
<field name="inherit" ref="lims.lims_sample_view_list"/>
<field name="name">sample_list</field>
</record>
<record model="ir.ui.view" id="quality_sample_view_form">
<field name="model">lims.sample</field>
<field name="type">form</field>
<field name="name">quality_sample_form</field>
</record>
<record model="ir.ui.view" id="quality_sample_view_list">
<field name="model">lims.sample</field>
<field name="type">tree</field>
<field name="name">quality_sample_list</field>
</record>
<record model="ir.action.act_window" id="act_lims_sample_list">
<field name="name">Samples</field>
<field name="res_model">lims.sample</field>
<field name="domain" eval="[('quality', '=', True)]" pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_lims_sample_view_list">
<field name="sequence" eval="10"/>
<field name="view" ref="quality_sample_view_list"/>
<field name="act_window" ref="act_lims_sample_list"/>
</record>
<record model="ir.action.act_window.view" id="act_lims_sample_view_form">
<field name="sequence" eval="20"/>
<field name="view" ref="quality_sample_view_form"/>
<field name="act_window" ref="act_lims_sample_list"/>
</record>
<record model="ir.action.act_window.domain" id="act_lims_sample_list_domain_pending">
<field name="name">Pending</field>
<field name="sequence" eval="10"/>
<field name="domain"
eval="[('test_state', '=', 'pending')]"
pyson="1"/>
<field name="act_window" ref="act_lims_sample_list"/>
</record>
<record model="ir.action.act_window.domain" id="act_lims_sample_list_domain_done">
<field name="name">Done</field>
<field name="sequence" eval="20"/>
<field name="domain"
eval="[('test_state', '=', 'done')]"
pyson="1"/>
<field name="act_window" ref="act_lims_sample_list"/>
</record>
<record model="ir.action.act_window.domain" id="act_lims_sample_list_domain_countersample">
<field name="name">Countersample</field>
<field name="sequence" eval="30"/>
<field name="domain"
eval="[('test_state', '=', 'countersample')]"
pyson="1"/>
<field name="act_window" ref="act_lims_sample_list"/>
</record>
<menuitem parent="menu_quality_control" action="act_lims_sample_list"
id="lims_sample_menu" sequence="30"/>
<record model="ir.ui.view" id="sample_attribute_view_list">
<field name="model">lims.quality.sample.attribute</field>
<field name="type">tree</field>
<field name="name">sample_attribute_list</field>
</record>
<record model="ir.ui.view" id="sample_attribute_view_form">
<field name="model">lims.quality.sample.attribute</field>
<field name="type">form</field>
<field name="name">sample_attribute_form</field>
</record>
<record model="ir.action.act_window" id="act_sample_attribute">
<field name="name">Quality Sample Attributes</field>
<field name="res_model">lims.quality.sample.attribute</field>
</record>
<record model="ir.action.act_window.view"
id="act_sample_attribute_view_list">
<field name="sequence" eval="10"/>
<field name="view" ref="sample_attribute_view_list"/>
<field name="act_window" ref="act_sample_attribute"/>
</record>
<record model="ir.action.act_window.view"
id="act_sample_attribute_view_form">
<field name="sequence" eval="20"/>
<field name="view" ref="sample_attribute_view_form"/>
<field name="act_window" ref="act_sample_attribute"/>
</record>
<menuitem action="act_sample_attribute" id="menu_sample_attribute"
parent="menu_configuration" sequence="70"/>
<record model="ir.ui.view" id="lims_take_sample_start_view_form">
<field name="model">lims.take.sample.start</field>
<field name="type">form</field>
<field name="name">take_sample_start_form</field>
</record>
<record model="ir.action.wizard" id="wiz_lims_take_sample">
<field name="name">Take Sample</field>
<field name="wiz_name">lims.take.sample</field>
<field name="model">stock.lot</field>
</record>
<record model="ir.action.keyword" id="lims_take_sample_keyword">
<field name="keyword">form_action</field>
<field name="model">stock.lot,-1</field>
<field name="action" ref="wiz_lims_take_sample"/>
</record>
<record model="ir.ui.view" id="lims_countersample_create_start_view_form">
<field name="model">lims.countersample.create.start</field>
<field name="type">form</field>
<field name="name">countersample_create_start_form</field>
</record>
<record model="ir.action.wizard" id="wiz_lims_countersample_create">
<field name="name">Countersample Create</field>
<field name="wiz_name">lims.countersample.create</field>
<field name="model">lims.sample</field>
</record>
<record model="ir.action.keyword" id="lims_countersample_create_keyword">
<field name="keyword">form_action</field>
<field name="model">lims.sample,-1</field>
<field name="action" ref="wiz_lims_countersample_create"/>
</record>
<record model="ir.action.report" id="report_sample_labels">
<field name="name">Sample Labels</field>
<field name="model">lims.sample</field>
<field name="report_name">lims.sample.labels.report</field>
<field name="report">lims/report/entry_labels_report.fodt</field>
<field name="extension">pdf</field>
</record>
<record model="ir.action.keyword" id="report_sample_labels_keyword">
<field name="keyword">form_print</field>
<field name="model">lims.sample,-1</field>
<field name="action" ref="report_sample_labels"/>
</record>
</data>
</tryton>

View file

@ -0,0 +1,9 @@
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
try:
from trytond.modules.lims_quality_control.tests.test_lims_quality_control \
import suite
except ImportError:
from .test_lims_quality_control import suite
__all__ = ['suite']

View file

@ -0,0 +1,517 @@
=============================
LIMS Quality Control Scenario
=============================
Imports::
>>> import datetime
>>> from dateutil.relativedelta import relativedelta
>>> from decimal import Decimal
>>> from operator import attrgetter
>>> from proteus import config, Model, Wizard
>>> from trytond.tests.tools import activate_modules
>>> from trytond.modules.company.tests.tools import create_company, \
... get_company
>>> from trytond.modules.lims.tests.tools import \
... set_lims_configuration, create_workyear
>>> from trytond.modules.lims_quality_control.tests.tools import \
... create_base_tables
>>> today = datetime.date.today()
Install quality_test module::
>>> config = activate_modules('lims_quality_control')
Create company::
>>> _ = create_company()
>>> company = get_company()
Set Lims configuration::
>>> set_lims_configuration(company)
>>> create_workyear(company, today)
Create base tables::
>>> create_base_tables()
Create Quality Configuration::
>>> Sequence = Model.get('ir.sequence')
>>> Configuration = Model.get('lims.quality.configuration')
>>> quality_sequence, = Sequence.find([('code', '=', 'lims.quality.test')])
>>> sample_location, = Model.get('stock.location').find([
... ('code', '=', 'STO')])
>>> configuration = Configuration(1)
>>> configuration.quality_sequence = quality_sequence
>>> configuration.sample_location = sample_location
>>> configuration.save()
>>> LabWorkYear = Model.get('lims.lab.workyear')
>>> workyear = LabWorkYear(1)
>>> workyear.default_entry_quality = workyear.default_entry_control
>>> workyear.save()
Add zone to default entry for samples party::
>>> Zone = Model.get('lims.zone')
>>> zone = Zone(
... code='N',
... description='North')
>>> zone.save()
>>> party = workyear.default_entry_quality.party
>>> party.entry_zone = zone
>>> party.save()
Create Product Type::
>>> ProductType = Model.get('lims.product.type')
>>> product_type = ProductType(
... code='WINE',
... description='Wine')
>>> product_type.save()
Create Matrix::
>>> Matrix = Model.get('lims.matrix')
>>> matrix = Matrix(
... code='GRAPE',
... description='Grape')
>>> matrix.save()
Create Method::
>>> LabMethod = Model.get('lims.lab.method')
>>> method = LabMethod(
... code='001',
... name='SQ 001 : By liquid chromatography',
... determination='SQ 008 : By high performance liquid chromatography (HPLC) with refractive index detector (RID).',
... requalification_months=12,
... results_estimated_waiting=10)
>>> method.save()
Add qualification for the professional::
>>> Professional = Model.get('lims.laboratory.professional')
>>> professional, = Professional.find([('code', '=', 'LP')])
>>> LabProfessionalMethod = Model.get('lims.lab.professional.method')
>>> professional_method = LabProfessionalMethod(
... professional=professional,
... method=method,
... state='qualified',
... type='preparation')
>>> _ = professional_method.requalification_history.new(
... type='qualification',
... date=today,
... last_execution_date=today)
>>> professional_method.save()
Create analysis product category::
>>> ProductCategory = Model.get('product.category')
>>> analysis_product_category = ProductCategory(
... name='Test analysis')
>>> analysis_product_category.save()
>>> LimsConfiguration = Model.get('lims.configuration')
>>> lims_config, = LimsConfiguration.find()
>>> lims_config.analysis_product_category = analysis_product_category
>>> lims_config.save()
Create Analyses::
>>> laboratory, = Model.get('lims.laboratory').find([('code', '=', 'SQ')])
>>> device, = Model.get('lims.lab.device').find([('code', '=', 'PH01')])
>>> unit, = Model.get('product.uom').find([('name', '=', 'Test UoM')])
>>> Analysis = Model.get('lims.analysis')
>>> analysis = Analysis(
... code='0001',
... description='Glucose',
... type='analysis',
... behavior='normal',
... quality_type='quantitative',
... quality_uom=unit)
>>> _ = analysis.laboratories.new(laboratory=laboratory)
>>> analysis.methods.append(LabMethod(method.id))
>>> _ = analysis.devices.new(laboratory=laboratory, device=device)
>>> analysis.save()
>>> analysis.click('activate')
>>> Typification = Model.get('lims.typification')
>>> typification_1 = Typification(
... product_type=product_type,
... matrix=matrix,
... analysis=analysis,
... method=method,
... quality=True,
... quality_min=0.0,
... quality_max=5.0)
>>> typification_1.save()
>>> analysis = Analysis(
... code='0002',
... description='Fructose',
... type='analysis',
... behavior='normal',
... quality_type='quantitative',
... quality_uom=unit)
>>> _ = analysis.laboratories.new(laboratory=laboratory)
>>> analysis.methods.append(LabMethod(method.id))
>>> _ = analysis.devices.new(laboratory=laboratory, device=device)
>>> analysis.save()
>>> analysis.click('activate')
>>> typification_2 = Typification(
... product_type=product_type,
... matrix=matrix,
... analysis=analysis,
... method=method,
... quality=True,
... quality_min=1.0,
... quality_max=10.0)
>>> typification_2.save()
>>> analysis = Analysis(
... code='0003',
... description='Colour',
... type='analysis',
... behavior='normal',
... quality_type='qualitative')
>>> _ = analysis.laboratories.new(laboratory=laboratory)
>>> analysis.methods.append(LabMethod(method.id))
>>> _ = analysis.devices.new(laboratory=laboratory, device=device)
>>> _ = analysis.quality_possible_values.new(name='Valid')
>>> _ = analysis.quality_possible_values.new(name='Not valid')
>>> analysis.save()
>>> analysis.click('activate')
>>> QualitativeValue = Model.get('lims.quality.qualitative.value')
>>> qualitative_value, = QualitativeValue.find([
... ('name', '=', 'Valid'),
... ('analysis', '=', analysis),
... ])
>>> typification_3 = Typification(
... product_type=product_type,
... matrix=matrix,
... analysis=analysis,
... method=method,
... quality=True,
... valid_value=qualitative_value)
>>> typification_3.save()
>>> analysis = Analysis(
... code='0004',
... description='Smell',
... type='analysis',
... behavior='normal',
... quality_type='qualitative')
>>> _ = analysis.laboratories.new(laboratory=laboratory)
>>> analysis.methods.append(LabMethod(method.id))
>>> _ = analysis.devices.new(laboratory=laboratory, device=device)
>>> _ = analysis.quality_possible_values.new(name='Valid')
>>> _ = analysis.quality_possible_values.new(name='Not valid')
>>> analysis.save()
>>> analysis.click('activate')
>>> qualitative_value, = QualitativeValue.find([
... ('name', '=', 'Valid'),
... ('analysis', '=', analysis),
... ])
>>> typification_4 = Typification(
... product_type=product_type,
... matrix=matrix,
... analysis=analysis,
... method=method,
... quality=True,
... valid_value=qualitative_value)
>>> typification_4.save()
Create Quality Fraction Type::
>>> PackagingType = Model.get('lims.packaging.type')
>>> packaging_type = PackagingType(
... code='01',
... description='Package')
>>> packaging_type.save()
>>> PackagingIntegrity = Model.get('lims.packaging.integrity')
>>> packaging_integrity = PackagingIntegrity(
... code='OK',
... description='Ok')
>>> packaging_integrity.save()
>>> fraction_type = Model.get('lims.fraction.type')(
... code='QC',
... description='Quality control',
... default_package_type=packaging_type,
... default_fraction_state=packaging_integrity)
>>> fraction_type.save()
>>> LimsConfiguration = Model.get('lims.configuration')
>>> lims_config, = LimsConfiguration.find()
>>> lims_config.qc_fraction_type = fraction_type
>>> lims_config.save()
Create product to test::
>>> ProductUom = Model.get('product.uom')
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
>>> ProductTemplate = Model.get('product.template')
>>> test_product = ProductTemplate()
>>> test_product.name = 'Kalenis Wine'
>>> test_product.default_uom = unit
>>> test_product.type = 'goods'
>>> test_product.product_type = product_type
>>> test_product.matrix = matrix
>>> test_product.save()
Create Template, Kalenis Wine::
>>> Template = Model.get('lims.quality.template')
>>> template = Template()
>>> template.name = 'Kalenis Wine'
>>> template.product, = test_product.products
>>> template.end_date = today
>>> template.comments = 'Comments'
>>> template.save()
>>> typification_1.quality_template = template
>>> typification_1.save()
>>> typification_2.quality_template = template
>>> typification_2.save()
>>> typification_3.quality_template = template
>>> typification_3.save()
>>> typification_4.quality_template = template
>>> typification_4.save()
>>> template.click('active')
Create Lot::
>>> Lot = Model.get('stock.lot')
>>> lot = Lot(
... number='0001',
... product=test_product.products[0])
>>> lot.save()
Take a sample::
>>> take_sample = Wizard('lims.take.sample', [lot])
>>> take_sample.form.label = 'LBL-001'
>>> take_sample.execute('confirm')
>>> take_sample.state
'end'
Create quality test::
>>> Sample = Model.get('lims.sample')
>>> sample, = Sample.find([('lot', '=', lot)])
>>> create_test = Wizard('lims.create.quality.test', [sample])
>>> create_test.form.product, = test_product.products
>>> create_test.execute('confirm')
>>> test, = create_test.actions[0]
>>> test.click('confirm')
>>> test.state
'confirmed'
>>> len(test.lines)
4
Create Planification::
>>> Planification = Model.get('lims.planification')
>>> planification = Planification()
>>> planification.laboratory = laboratory
>>> planification.start_date = today
>>> planification.date_from = today
>>> planification.date_to = today
>>> planification.analysis.append(typification_1.analysis)
>>> planification.analysis.append(typification_2.analysis)
>>> planification.analysis.append(typification_3.analysis)
>>> planification.analysis.append(typification_4.analysis)
>>> _ = planification.technicians.new(laboratory_professional=professional)
>>> planification.save()
>>> planification.reload()
>>> search_fractions = Wizard('lims.planification.search_fractions',
... [planification])
>>> details = Model.get(
... 'lims.planification.search_fractions.detail').find()
>>> for d in details:
... search_fractions.form.details.append(d)
>>> search_fractions.execute('add')
>>> planification.reload()
>>> planification.click('preplan')
>>> planification.state
'preplanned'
>>> len(planification.analysis)
4
>>> for f in planification.details:
... for s in f.details:
... s.staff_responsible.append(Professional(professional.id))
>>> planification.save()
>>> planification.reload()
>>> technicians_qualification = Wizard(
... 'lims.planification.technicians_qualification', [planification])
>>> _ = planification.click('confirm')
>>> planification.state
'confirmed'
Add results and check success in lines:
>>> quantitavive_results = {
... typification_1: '6.0',
... typification_2: '3.0',
... }
>>> qualitative_results = {
... typification_3: 'Not valid',
... typification_4: 'Valid',
... }
>>> for line in test.lines:
... if line.typification in [typification_1, typification_2]:
... line.result = quantitavive_results[line.typification]
... if line.typification in [typification_3, typification_4]:
... qualitative_value, = QualitativeValue.find([
... ('name', '=', qualitative_results[line.typification]),
... ('analysis', '=', line.analysis),
... ])
... line.qualitative_value = qualitative_value
... line.end_date = today
... line.accepted = True
... line.save()
... line.success
True
False
True
False
Create results report:
>>> generate_results_report = Wizard('lims.generate_results_report')
>>> generate_results_report.form.date_from = today
>>> generate_results_report.form.date_to = today
>>> generate_results_report.form.laboratory = laboratory
>>> generate_results_report.form.generation_type = 'aut'
>>> generate_results_report.execute('search')
>>> generate_results_report.execute('generate')
>>> results_report_version, = generate_results_report.actions[0]
>>> _ = results_report_version.click('revise')
>>> results_report_version.state
'revised'
Validate "failed" Test::
>>> test.reload()
>>> test.click('manager_validate')
>>> test.state
'failed'
Take a second sample::
>>> take_sample = Wizard('lims.take.sample', [lot])
>>> take_sample.form.label = 'LBL-002'
>>> take_sample.execute('confirm')
>>> take_sample.state
'end'
Create a second quality test::
>>> Sample = Model.get('lims.sample')
>>> sample, = Sample.find([
... ('lot', '=', lot),
... ('label', 'like', 'LBL-002%'),
... ])
>>> create_test = Wizard('lims.create.quality.test', [sample])
>>> create_test.form.product, = test_product.products
>>> create_test.execute('confirm')
>>> test, = create_test.actions[0]
>>> test.click('confirm')
>>> test.state
'confirmed'
>>> len(test.lines)
4
Create second Planification::
>>> planification = Planification()
>>> planification.laboratory = laboratory
>>> planification.start_date = today
>>> planification.date_from = today
>>> planification.date_to = today
>>> planification.analysis.append(Analysis(typification_1.analysis.id))
>>> planification.analysis.append(Analysis(typification_2.analysis.id))
>>> planification.analysis.append(Analysis(typification_3.analysis.id))
>>> planification.analysis.append(Analysis(typification_4.analysis.id))
>>> _ = planification.technicians.new(laboratory_professional=professional)
>>> planification.save()
>>> planification.reload()
>>> search_fractions = Wizard('lims.planification.search_fractions',
... [planification])
>>> details = Model.get(
... 'lims.planification.search_fractions.detail').find()
>>> for d in details:
... search_fractions.form.details.append(d)
>>> search_fractions.execute('add')
>>> planification.reload()
>>> planification.click('preplan')
>>> planification.state
'preplanned'
>>> len(planification.analysis)
4
>>> for f in planification.details:
... for s in f.details:
... s.staff_responsible.append(Professional(professional.id))
>>> planification.save()
>>> planification.reload()
>>> technicians_qualification = Wizard(
... 'lims.planification.technicians_qualification', [planification])
>>> _ = planification.click('confirm')
>>> planification.state
'confirmed'
Add results and check success in lines:
>>> quantitavive_results = {
... typification_1: '5.0',
... typification_2: '3.0',
... }
>>> qualitative_results = {
... typification_3: 'Valid',
... typification_4: 'Valid',
... }
>>> for line in test.lines:
... if line.typification in [typification_1, typification_2]:
... line.result = quantitavive_results[line.typification]
... if line.typification in [typification_3, typification_4]:
... qualitative_value, = QualitativeValue.find([
... ('name', '=', qualitative_results[line.typification]),
... ('analysis', '=', line.analysis),
... ])
... line.qualitative_value = qualitative_value
... line.end_date = today
... line.accepted = True
... line.save()
... line.success
True
True
True
True
Create second results report:
>>> generate_results_report = Wizard('lims.generate_results_report')
>>> generate_results_report.form.date_from = today
>>> generate_results_report.form.date_to = today
>>> generate_results_report.form.laboratory = laboratory
>>> generate_results_report.form.generation_type = 'aut'
>>> generate_results_report.execute('search')
>>> generate_results_report.execute('generate')
>>> results_report_version, = generate_results_report.actions[0]
>>> _ = results_report_version.click('revise')
>>> results_report_version.state
'revised'
Validate "success" Test::
>>> test.reload()
>>> test.click('manager_validate')
>>> test.state
'successful'

View file

@ -0,0 +1,25 @@
#!/usr/bin/env python
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
import unittest
import doctest
import trytond.tests.test_tryton
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import doctest_teardown
from trytond.tests.test_tryton import doctest_checker
class TestCase(ModuleTestCase):
'Test module'
module = 'lims_quality_control'
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(TestCase))
suite.addTests(doctest.DocFileSuite(
'scenario_lims_quality_control.rst',
tearDown=doctest_teardown, encoding='utf-8',
checker=doctest_checker,
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
return suite

View file

@ -0,0 +1,76 @@
# -*- coding: utf-8 -*-
# This file is part of the lims module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
from proteus import Model
__all__ = ['create_base_tables']
def create_base_tables(config=None):
"Create Base Tables"
# Configuration / Laboratory
_create_base_laboratory_tables(config)
def _create_base_laboratory_tables(config=None):
"Configuration / Laboratory"
LaboratoryProfessional = Model.get('lims.laboratory.professional',
config=config)
Laboratory = Model.get('lims.laboratory', config=config)
LabDeviceType = Model.get('lims.lab.device.type', config=config)
LabDevice = Model.get('lims.lab.device', config=config)
User = Model.get('res.user', config=config)
Party = Model.get('party.party', config=config)
Location = Model.get('stock.location', config=config)
UomCategory = Model.get('product.uom.category', config=config)
Uom = Model.get('product.uom', config=config)
lims_user = User(1)
party = Party(
name='Laboratory Professional',
is_lab_professional=True,
lims_user=lims_user)
party.save()
professional = LaboratoryProfessional(
party=party,
code='LP',
role='Responsible')
professional.save()
related_location, = Location.find([('code', '=', 'STO')])
laboratory = Laboratory(
code='SQ',
description='Chemistry Laboratory',
default_laboratory_professional=professional,
default_signer=professional,
related_location=related_location,
section='sq')
laboratory.save()
lims_user.laboratories.append(laboratory)
lims_user.save()
device_type = LabDeviceType(
code='PH',
description='pH Meters')
device_type.save()
device = LabDevice(
code='PH01',
description='pH Meter 01',
device_type=device_type)
device.laboratories.new(laboratory=laboratory)
device.save()
uom_cateogory = UomCategory(
name='Test Category',
lims_only_available=True)
uom_cateogory.save()
uom = Uom(
name='Test UoM',
symbol='TUoM',
category=uom_cateogory)
uom.save()

View file

@ -0,0 +1,11 @@
[tryton]
version=5.4.0
depends:
lims
xml:
quality.xml
configuration.xml
product.xml
lims.xml
sample.xml
message.xml

View file

@ -0,0 +1,5 @@
<?xml version="1.0"?>
<form>
<label name="service"/>
<field name="service"/>
</form>

View file

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<data>
<xpath expr="/form/notebook/page[@id='laboratories']" position="before">
<page id="quality" string="Quality">
<label name="quality_type"/>
<field name="quality_type"/>
<label name="quality_uom"/>
<field name="quality_uom"/>
<field name="quality_possible_values" colspan="4"/>
</page>
</xpath>
</data>

View file

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<data>
<xpath expr="/tree/field[@name='code']" position="before">
<field name="quality_type"/>
</xpath>
</data>

View file

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<data>
<xpath expr="/form/notebook/page[@id='fraction_type']/field[@name='itl_fraction_type']" position="after">
<label name="qc_fraction_type"/>
<field name="qc_fraction_type"/>
</xpath>
</data>

View file

@ -0,0 +1,5 @@
<?xml version="1.0"?>
<form>
<label name="location"/>
<field name="location"/>
</form>

View file

@ -0,0 +1,5 @@
<?xml version="1.0"?>
<form>
<label name="template"/>
<field name="template"/>
</form>

View file

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<data>
<xpath expr="/form/field[@name='results_waiting']" position="replace">
<notebook>
<page id="specification" string="Specification">
<field name="specification" colspan="4"/>
</page>
<page id="results_waiting" string="Results Waiting">
<field name="results_waiting" colspan="4"/>
</page>
</notebook>
</xpath>
</data>

View file

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<data>
<xpath expr="/tree/field[@name='result']" position="after">
<field name="qualitative_value"/>
</xpath>
</data>

View file

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<form>
<label name="sample_location"/>
<field name="sample_location"/>
<label name="quality_sequence"/>
<field name="quality_sequence"/>
<field name="attributes" colspan="4"/>
</form>

View file

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<form>
<label name="name"/>
<field name="name"/>
<label name="active"/>
<field name="active"/>
</form>

View file

@ -0,0 +1,4 @@
<?xml version="1.0"?>
<tree editable="bottom">
<field name="name"/>
</tree>

View file

@ -0,0 +1,31 @@
<?xml version="1.0"?>
<form>
<label name="number"/>
<field name="number"/>
<label name="lot"/>
<field name="lot"/>
<label name="product"/>
<field name="product"/>
<label name="quality_test"/>
<field name="quality_test"/>
<label name="countersample"/>
<field name="countersample"/>
<label name="countersample_original_sample"/>
<field name="countersample_original_sample"/>
<notebook>
<page string="General" id="general">
<label name="date"/>
<field name="date"/>
<field name="fractions" colspan="4"/>
</page>
<page string="Attributes" id="attributes">
<field name="attributes" colspan="4"/>
</page>
<page string="Comments" id="comments">
<separator string="Report comments" colspan="4" id="report_comments"/>
<field name="report_comments" colspan="4"/>
<separator string="Comments" colspan="4" id="comments"/>
<field name="comments" colspan="4"/>
</page>
</notebook>
</form>

View file

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<tree>
<field name="number" icon="icon"/>
<field name="lot"/>
<field name="product"/>
<field name="date" widget="date"/>
<field name="date" widget="time" string="Time"/>
<field name="create_date2" widget="date"/>
<field name="create_date2" widget="time" string="Time"/>
<field name="quality_test"/>
<field name="confirmed" tree_invisible="1" />
<field name="has_results_report" tree_invisible="1" />
<field name="countersample"/>
<field name="countersample_original_sample"/>
</tree>

View file

@ -0,0 +1,45 @@
<?xml version="1.0"?>
<form>
<group id="name" colspan="2">
<label name="name"/>
<field name="name" xexpand="1"/>
<label name="revision"/>
<field name="revision" xexpand="0"/>
</group>
<label name="product"/>
<field name="product"/>
<group id="dates" colspan="2" col="4">
<label name="start_date"/>
<field name="start_date"/>
<label name="end_date"/>
<field name="end_date"/>
</group>
<group id="checkboxes" colspan="2" col="-1">
<label name="countersample_required"/>
<field name="countersample_required"/>
<label name="range_validate"/>
<field name="range_validate"/>
<label name="range_type"/>
<field name="range_type"/>
</group>
<label name="company"/>
<field name="company"/>
<notebook colspan="4">
<page name="lines">
<field name="lines" colspan="4" mode="tree,form"
view_ids="lims_quality_control.quality_typification_view_list,lims_quality_control.quality_typification_view_form"/>
</page>
<page string="Comments" id="comments">
<field name="comments" colspan="4"/>
</page>
</notebook>
<group col="5" colspan="4" id="state">
<label name="state"/>
<field name="state"/>
<group col="3" id="buttons">
<button name="draft"/>
<button name="active"/>
<button name="not_active"/>
</group>
</group>
</form>

View file

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<tree>
<field name="name"/>
<field name="revision"/>
<field name="product"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="company"/>
<field name="state"/>
</tree>

View file

@ -0,0 +1,41 @@
<?xml version="1.0"?>
<form>
<group col="6" colspan="4" id="header_data">
<label name="number"/>
<field name="number"/>
<label name="test_date"/>
<field name="test_date"/>
</group>
<label name="template"/>
<field name="template"/>
<label name="lot"/>
<field name="lot"/>
<label name="product"/>
<field name="product"/>
<label name="sample"/>
<field name="sample"/>
<label name="company"/>
<field name="company"/>
<label name="countersample"/>
<field name="countersample"/>
<notebook colspan="4">
<page name="lines">
<field name="lines" colspan="4"/>
</page>
<page string="Comments" id="comments">
<field name="comments" colspan="4"/>
</page>
</notebook>
<group col="7" colspan="4" id="state">
<label name="state"/>
<field name="state"/>
<label name="confirmed_date"/>
<field name="confirmed_date"/>
<label name="success"/>
<field name="success"/>
<group col="3" id="buttons">
<button name="confirm"/>
<button name="manager_validate"/>
</group>
</group>
</form>

View file

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<tree>
<field name="number"/>
<field name="company"/>
<field name="template"/>
<field name="lot"/>
<field name="product"/>
<field name="sample"/>
<field name="countersample"/>
<field name="state"/>
<field name="test_date" widget="date"/>
<field name="test_date" widget="time" string="Test Time"/>
</tree>

View file

@ -0,0 +1,70 @@
<?xml version="1.0"?>
<form>
<label name="quality_template"/>
<field name="quality_template"/>
<label name="quality_test_report"/>
<field name="quality_test_report"/>
<label name="quality_order"/>
<field name="quality_order"/>
<label name="analysis"/>
<field name="analysis"/>
<label name="method"/>
<field name="method"/>
<label name="default_repetitions"/>
<field name="default_repetitions"/>
<label name="limit_digits"/>
<field name="limit_digits"/>
<label name="quality_min"/>
<field name="quality_min"/>
<label name="quality_max"/>
<field name="quality_max"/>
<label name="initial_concentration"/>
<field name="initial_concentration"/>
<label name="start_uom"/>
<field name="start_uom"/>
<label name="final_concentration"/>
<field name="final_concentration"/>
<label name="end_uom"/>
<field name="end_uom"/>
<label name="calc_decimals"/>
<field name="calc_decimals"/>
<label name="valid_value"/>
<field name="valid_value"/>
<notebook>
<!-- <page string="Qualitative info" id="qualitative_info" >
<label name="valid_value"/>
<field name="valid_value"/>
<field name="quality_possible_values" colspan="4"/>
</page> -->
<page string="Specification" id="specification" >
<field name="specification" colspan="4"/>
</page>
<page string="Additional analysis" id="additionals" >
<label name="additional"/>
<field name="additional"/>
<field name="additionals" colspan="4"/>
</page>
<page string="Technical scope versions" id="technical_scope_versions">
<field name="technical_scope_versions" colspan="4"/>
</page>
<page string="Comments" id="comments" >
<field name="comments" colspan="4"/>
</page>
</notebook>
<group col="8" colspan="4" id="checkboxes">
<label name="report"/>
<field name="report"/>
<label name="check_result_limits"/>
<field name="check_result_limits"/>
<label name="by_default"/>
<field name="by_default"/>
<label name="valid"/>
<field name="valid"/>
</group>
<label name="report_type"/>
<field name="report_type"/>
<label name="report_result_type"/>
<field name="report_result_type"/>
<field name="valid_value_domain"/>
<field name="quality" invisible="1"/>
</form>

View file

@ -0,0 +1,27 @@
<?xml version="1.0"?>
<tree>
<field name="quality_template"/>
<field name="quality_test_report"/>
<field name="quality_order"/>
<field name="analysis"/>
<field name="method_view"/>
<field name="valid_value"/>
<field name="quality_min"/>
<field name="quality_max"/>
<field name="calc_decimals"/>
<field name="initial_concentration"/>
<field name="start_uom"/>
<field name="final_concentration"/>
<field name="end_uom"/>
<field name="default_repetitions"/>
<field name="technical_scope_versions"/>
<field name="comments"/>
<field name="additional"/>
<field name="additionals"/>
<field name="by_default"/>
<field name="report"/>
<field name="check_result_limits"/>
<field name="report_type"/>
<field name="report_result_type"/>
<field name="valid_view"/>
</tree>

View file

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<form>
<label name="name"/>
<field name="name"/>
<label name="string"/>
<field name="string"/>
<label name="type_"/>
<field name="type_"/>
<label name="digits"/>
<field name="digits"/>
<separator name="selection" colspan="4"/>
<label name="selection_sorted"/>
<field name="selection_sorted"/>
<field name="selection" colspan="4"/>
</form>

View file

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<tree>
<field name="name" expand="1"/>
<field name="string" expand="1"/>
<field name="type_"/>
</tree>

View file

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<data>
<xpath expr="/form/notebook/page[@id='general']" position="after">
<page string="Quality" id="quality">
<label name="lot"/>
<field name="lot"/>
<field name="attributes" colspan="4"/>
</page>
</xpath>
</data>

View file

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<data>
<xpath expr="/tree/field[@name='number']" position="after">
<field name="lot"/>
</xpath>
</data>

View file

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<form>
<label name="date"/>
<field name="date"/>
<label name="label"/>
<field name="label"/>
<field name="attributes" colspan="4"/>
</form>

View file

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<data>
<xpath
expr="/form/notebook/page[@id='general']/group[@id='checkboxes']"
position="after">
<label name="product_type"/>
<field name="product_type"/>
<label name="matrix"/>
<field name="matrix"/>
</xpath>
</data>

View file

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<data>
<xpath expr="/form/label[@name='product_type']" position="before">
<label name="quality"/>
<field name="quality"/>
<newline/>
</xpath>
</data>

View file

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<data>
<xpath expr="/tree/field[@name='product_type']" position="before">
<field name="quality"/>
</xpath>
</data>

View file

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<data>
<xpath expr="/form/field[@name='default_entry_control']" position="after">
<label name="default_entry_quality"/>
<field name="default_entry_quality"/>
</xpath>
</data>