diff --git a/.travis.yml b/.travis.yml index 59ef060..a6c98f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ addons: env: global: - - VERSION="11.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" + - VERSION="12.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" matrix: - TESTS="1" ODOO_REPO="odoo/odoo" diff --git a/README.md b/README.md index cde4e8c..f927b29 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) -[![Build Status](https://travis-ci.org/muk-it/muk_base.svg?branch=11.0)](https://travis-ci.org/muk-it/muk_base) -[![codecov](https://codecov.io/gh/muk-it/muk_base/branch/11.0/graph/badge.svg)](https://codecov.io/gh/muk-it/muk_base) +[![Build Status](https://travis-ci.org/muk-it/muk_base.svg?branch=12.0)](https://travis-ci.org/muk-it/muk_base) +[![codecov](https://codecov.io/gh/muk-it/muk_base/branch/12.0/graph/badge.svg)](https://codecov.io/gh/muk-it/muk_base) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/c867f25820614ed795e7567e37bd81c0)](https://www.codacy.com/app/keshrath/muk_base?utm_source=github.com&utm_medium=referral&utm_content=muk-it/muk_base&utm_campaign=Badge_Grade) [![Demo](https://img.shields.io/badge/demo-Try%20me-243742.svg)](https://demo.mukit.at/) diff --git a/muk_attachment_lobject/LICENSE b/muk_attachment_lobject/LICENSE deleted file mode 100644 index faf7bf4..0000000 --- a/muk_attachment_lobject/LICENSE +++ /dev/null @@ -1,619 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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 \ No newline at end of file diff --git a/muk_attachment_lobject/__init__.py b/muk_attachment_lobject/__init__.py deleted file mode 100644 index d4754a6..0000000 --- a/muk_attachment_lobject/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from odoo import api, SUPERUSER_ID - -from . import models - -def _install_force_storage(cr, registry): - env = api.Environment(cr, SUPERUSER_ID, {}) - config = env['ir.config_parameter'].sudo() - config.set_param('ir_attachment.location', 'lobject') - attachment = env['ir.attachment'] - attachment.sudo().force_storage() - -def _uninstall_force_storage(cr, registry): - env = api.Environment(cr, SUPERUSER_ID, {}) - config = env['ir.config_parameter'].sudo() - config.set_param('ir_attachment.location', 'file') - attachment = env['ir.attachment'] - attachment.sudo().force_storage() \ No newline at end of file diff --git a/muk_attachment_lobject/__manifest__.py b/muk_attachment_lobject/__manifest__.py deleted file mode 100644 index 186e47c..0000000 --- a/muk_attachment_lobject/__manifest__.py +++ /dev/null @@ -1,52 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -{ - "name": "MuK Large Objects Attachment", - "summary": """Large Objects Attachment Location""", - "version": '11.0.2.0.2', - "category": 'Extra Tools', - "license": "AGPL-3", - "website": "http://www.mukit.at", - "live_test_url": "https://demo.mukit.at/web/login", - "author": "MuK IT", - "contributors": [ - "Mathias Markl ", - ], - 'depends': [ - 'muk_fields_lobject', - ], - "qweb": [ - "static/src/xml/*.xml", - ], - "images": [ - 'static/description/banner.png' - ], - "external_dependencies": { - "python": [], - "bin": [], - }, - "application": False, - "installable": True, - "auto_install": False, - "post_init_hook": "_install_force_storage", - "uninstall_hook": "_uninstall_force_storage", -} \ No newline at end of file diff --git a/muk_attachment_lobject/doc/changelog.rst b/muk_attachment_lobject/doc/changelog.rst deleted file mode 100644 index f2ae21c..0000000 --- a/muk_attachment_lobject/doc/changelog.rst +++ /dev/null @@ -1,9 +0,0 @@ -`2.0.0` -------- - -- Migrated to Python 3 - -`1.0.0` -------- - -- Init version diff --git a/muk_attachment_lobject/doc/index.rst b/muk_attachment_lobject/doc/index.rst deleted file mode 100644 index 8fa8975..0000000 --- a/muk_attachment_lobject/doc/index.rst +++ /dev/null @@ -1,121 +0,0 @@ -=================================== -MuK Large Object Attachment Storage -=================================== - -Provides a new attachment location to save attachments as PostgreSQL large objects. -To enable the large object storage option change the `ir_attachment.location` -parameter to `lobject`. - -**Advantages over the in-database storage** - -* Better RAM efficiency (This is more important for large files than for small ones.) -* Possibility to easily dump the base without the large objects (This can be useful for reproducing bugs.) - -**Advantages over the file system storage** - -* Large objects are transactional (fully ACID) -* They work out of the box in multi-system setups (So there is no need for NFS or similar file sharing tools.) -* Enables you to easily create backups of the entire system - - -Installation -============ - -To install this module, you need to: - -Download the module and add it to your Odoo addons folder. Afterward, log on to -your Odoo server and go to the Apps menu. Trigger the debug mode and update the -list by clicking on the "Update Apps List" link. Now install the module by -clicking on the install button. - -Another way to install this module is via the package management for Python -(`PyPI `_). - -To install our modules using the package manager make sure -`odoo-autodiscover `_ is installed -correctly. Then open a console and install the module by entering the following -command: - -``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -The module name consists of the Odoo version and the module name, where -underscores are replaced by a dash. - -**Module:** - -``odoo-addon-`` - -**Example:** - -``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` - -Once the installation has been successfully completed, the app is already in the -correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the -debug mode and update the list by clicking on the "Update Apps List" link. Now -install the module by clicking on the install button. - -The biggest advantage of this variant is that you can now also update the app -using the "pip" command. To do this, enter the following command in your console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo. The steps are the same as for the installation only the button has changed -from "Install" to "Upgrade". - -You can also view available Apps directly in our `repository `_ -and find a more detailed installation guide on our `website `_. - -For modules licensed under OPL-1, you will receive access data when you purchase -the module. If the modules were not purchased directly from -`MuK IT `_ please contact our support (support@mukit.at) -with a confirmation of purchase to receive the corresponding access data. - -Upgrade -============ - -To upgrade this module, you need to: - -Download the module and add it to your Odoo addons folder. Restart the server -and log on to your Odoo server. Select the Apps menu and upgrade the module by -clicking on the upgrade button. - -If you installed the module using the "pip" command, you can also update the -module in the same way. Just type the following command into the console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo, just like you would normally. - -Configuration -============= - -The module has an init hook, which automatically stores all attachments in -large objects, so no additional configuration is needed to use this module. - -Usage -============= - -This module has no direct visible effect on the system. However, existing and -future attachments are stored as large objects. - -Credits -======= - -Contributors ------------- - -* Mathias Markl - -Author & Maintainer -------------------- - -This module is maintained by the `MuK IT GmbH `_. - -MuK IT is an Austrian company specialized in customizing and extending Odoo. -We develop custom solutions for your individual needs to help you focus on -your strength and expertise to grow your business. - -If you want to get in touch please contact us via mail -(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/muk_attachment_lobject/i18n/de.po b/muk_attachment_lobject/i18n/de.po deleted file mode 100644 index 4ea453a..0000000 --- a/muk_attachment_lobject/i18n/de.po +++ /dev/null @@ -1,33 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * muk_attachment_lobject -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-22 07:52+0000\n" -"PO-Revision-Date: 2018-01-22 07:52+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: muk_attachment_lobject -#: model:ir.model.fields,field_description:muk_attachment_lobject.field_ir_attachment_store_lobject -msgid "Data" -msgstr "Persönliche Daten" - -#. module: muk_attachment_lobject -#: code:addons/muk_attachment_lobject/models/ir_attachment.py:54 -#, python-format -msgid "Only administrators can execute this action." -msgstr "Only administrators can execute this action." - -#. module: muk_attachment_lobject -#: model:ir.model,name:muk_attachment_lobject.model_ir_attachment -msgid "ir.attachment" -msgstr "ir.attachment" - diff --git a/muk_attachment_lobject/i18n/muk_attachment_lobject.pot b/muk_attachment_lobject/i18n/muk_attachment_lobject.pot deleted file mode 100644 index 4a98789..0000000 --- a/muk_attachment_lobject/i18n/muk_attachment_lobject.pot +++ /dev/null @@ -1,33 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * muk_attachment_lobject -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-22 07:51+0000\n" -"PO-Revision-Date: 2018-01-22 07:51+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: muk_attachment_lobject -#: model:ir.model.fields,field_description:muk_attachment_lobject.field_ir_attachment_store_lobject -msgid "Data" -msgstr "" - -#. module: muk_attachment_lobject -#: code:addons/muk_attachment_lobject/models/ir_attachment.py:54 -#, python-format -msgid "Only administrators can execute this action." -msgstr "" - -#. module: muk_attachment_lobject -#: model:ir.model,name:muk_attachment_lobject.model_ir_attachment -msgid "ir.attachment" -msgstr "" - diff --git a/muk_attachment_lobject/models/__init__.py b/muk_attachment_lobject/models/__init__.py deleted file mode 100644 index 5387265..0000000 --- a/muk_attachment_lobject/models/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import ir_attachment diff --git a/muk_attachment_lobject/models/ir_attachment.py b/muk_attachment_lobject/models/ir_attachment.py deleted file mode 100644 index 9cf2157..0000000 --- a/muk_attachment_lobject/models/ir_attachment.py +++ /dev/null @@ -1,92 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import base64 -import logging -import mimetypes - -from odoo import api, models, _ -from odoo.exceptions import AccessError - -from odoo.addons.muk_fields_lobject.fields.lobject import LargeObject - -_logger = logging.getLogger(__name__) - -class LObjectIrAttachment(models.Model): - - _inherit = 'ir.attachment' - - store_lobject = LargeObject( - string="Data") - - @api.model - def force_storage(self): - if not self.env.user._is_admin(): - raise AccessError(_('Only administrators can execute this action.')) - attachments = self.search(['|', ['res_field', '=', False], ['res_field', '!=', False]]) - for index, attach in enumerate(attachments): - _logger.info(_("Migrate Attachment %s of %s") % (index, len(attachments))) - attach.write({'datas': attach.datas}) - return True - - @api.depends('store_fname', 'db_datas', 'store_lobject') - def _compute_datas(self): - bin_size = self._context.get('bin_size') - for attach in self: - if attach.store_lobject: - if bin_size: - attach.datas = attach.store_lobject - else: - attach.datas = attach.with_context({'base64': True}).store_lobject - else: - super(LObjectIrAttachment, attach)._compute_datas() - - def _inverse_datas(self): - location = self._storage() - for attach in self: - if location == 'lobject': - value = attach.datas - bin_data = base64.b64decode(value) if value else b'' - vals = { - 'file_size': len(bin_data), - 'checksum': self._compute_checksum(bin_data), - 'index_content': self._index(bin_data, attach.datas_fname, attach.mimetype), - 'store_fname': False, - 'db_datas': False, - 'store_lobject': bin_data, - } - fname = attach.store_fname - super(LObjectIrAttachment, attach.sudo()).write(vals) - if fname: - self._file_delete(fname) - else: - super(LObjectIrAttachment, attach)._inverse_datas() - - def _compute_mimetype(self, values): - mimetype = super(LObjectIrAttachment, self)._compute_mimetype(values) - if not mimetype or mimetype == 'application/octet-stream': - mimetype = None - for attach in self: - if attach.mimetype: - mimetype = attach.mimetype - if not mimetype and attach.datas_fname: - mimetype = mimetypes.guess_type(attach.datas_fname)[0] - return mimetype or 'application/octet-stream' diff --git a/muk_attachment_lobject/static/description/banner.png b/muk_attachment_lobject/static/description/banner.png deleted file mode 100644 index 4c36d0c..0000000 Binary files a/muk_attachment_lobject/static/description/banner.png and /dev/null differ diff --git a/muk_attachment_lobject/static/description/icon.png b/muk_attachment_lobject/static/description/icon.png deleted file mode 100644 index 1d59a25..0000000 Binary files a/muk_attachment_lobject/static/description/icon.png and /dev/null differ diff --git a/muk_attachment_lobject/static/description/index.html b/muk_attachment_lobject/static/description/index.html deleted file mode 100644 index 052fe2d..0000000 --- a/muk_attachment_lobject/static/description/index.html +++ /dev/null @@ -1,83 +0,0 @@ -
-
-

MuK Large Objects Attachment

-

Large Objects Attachment Location

-

MuK IT GmbH - - www.mukit.at

-
-
- -
-
-
-

Overview

-
-

- Provides a new attachment location to save attachment as large - objects. To enable the large object storage option change the - ir_attachment.location - parameter to - lobject - . -

-
Advantages over the in-database storage
-
    -
  • Better RAM efficiency (This is more important for large files than for small ones.)
  • -
  • Possibility to easily dump the base without the large objects (This can be useful for reproducing bugs.)
  • -
-
Advantages over the file system storage
-
    -
  • Large objects are transactional (fully ACID)
  • -
  • They work out of the box in multi-system setups (So there is no need for NFS or similar file sharing tools.)
  • -
  • Enables you to easily create backups of the entire system
  • -
-
-
-
-
- -
-

Demo

-
-
-
User:
-
-
-
apps
-
-
-
Password:
-
-
-
demo
-
-
- -
- -
-

Help and Support

-
Feel free to - contact us, if you need any help with your Odoo integration or addiontal - features.
- - -
\ No newline at end of file diff --git a/muk_attachment_lobject/static/description/logo.png b/muk_attachment_lobject/static/description/logo.png deleted file mode 100644 index 9427ce3..0000000 Binary files a/muk_attachment_lobject/static/description/logo.png and /dev/null differ diff --git a/muk_attachment_lobject/tests/__init__.py b/muk_attachment_lobject/tests/__init__.py deleted file mode 100644 index 92cb5e2..0000000 --- a/muk_attachment_lobject/tests/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import test_attachment \ No newline at end of file diff --git a/muk_attachment_lobject/tests/test_attachment.py b/muk_attachment_lobject/tests/test_attachment.py deleted file mode 100644 index 1157bec..0000000 --- a/muk_attachment_lobject/tests/test_attachment.py +++ /dev/null @@ -1,61 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import base64 -import logging -import unittest - -from odoo.tests import common - -_logger = logging.getLogger(__name__) - -class AttachmentTestCase(common.HttpCase): - - at_install = False - post_install = True - - def setUp(self): - super(AttachmentTestCase, self).setUp() - self.attachment = self.env['ir.attachment'].sudo() - self.param = self.env['ir.config_parameter'].sudo() - - def tearDown(self): - super(AttachmentTestCase, self).tearDown() - - def test_attachment(self): - self.param.set_param('ir_attachment.location', 'lobject') - attach = self.attachment.create({ - 'name': "Test", - 'datas': base64.b64encode(b"\xff data")}) - self.assertTrue(attach.datas) - self.assertTrue(attach.with_context({'bin_size': True}).datas) - oid = attach.with_context({'oid': True}).store_lobject - self.assertTrue(oid) - attach.write({'datas': base64.b64encode(b"\xff data")}) - self.assertTrue(oid != attach.with_context({'oid': True}).store_lobject) - self.assertTrue(attach.export_data(['datas'])) - self.assertTrue(attach.export_data(['datas'], raw_data=True)) - attach.unlink() - - @unittest.skip("The test takes a long time and is therefore skipped by default.") - def test_migration(self): - self.param.set_param('ir_attachment.location', 'lobject') - self.attachment.force_storage() \ No newline at end of file diff --git a/muk_automation_extension/LICENSE b/muk_automation_extension/LICENSE deleted file mode 100644 index faf7bf4..0000000 --- a/muk_automation_extension/LICENSE +++ /dev/null @@ -1,619 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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 \ No newline at end of file diff --git a/muk_automation_extension/__init__.py b/muk_automation_extension/__init__.py deleted file mode 100644 index 0453e2d..0000000 --- a/muk_automation_extension/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import models \ No newline at end of file diff --git a/muk_automation_extension/__manifest__.py b/muk_automation_extension/__manifest__.py deleted file mode 100644 index 38c66f8..0000000 --- a/muk_automation_extension/__manifest__.py +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -{ - "name": "MuK Automation Extension", - "summary": """Extension for Odoo's Base Automation""", - "version": '11.0.1.0.1', - "category": 'Extra Tools', - "license": "AGPL-3", - "website": "https://www.mukit.at", - "live_test_url": "https://demo.mukit.at/web/login", - "author": "MuK IT", - "contributors": [ - "Mathias Markl ", - ], - "depends": [ - "base_automation", - ], - "data": [ - ], - "qweb": [ - "static/src/xml/*.xml", - ], - "images": [ - 'static/description/banner.png' - ], - "external_dependencies": { - "python": [], - "bin": [], - }, - "application": False, - "installable": True, -} diff --git a/muk_automation_extension/doc/changelog.rst b/muk_automation_extension/doc/changelog.rst deleted file mode 100644 index 9ee2b48..0000000 --- a/muk_automation_extension/doc/changelog.rst +++ /dev/null @@ -1,4 +0,0 @@ -`1.0.0` -------- - -- Init version diff --git a/muk_automation_extension/doc/index.rst b/muk_automation_extension/doc/index.rst deleted file mode 100644 index 1f88b2b..0000000 --- a/muk_automation_extension/doc/index.rst +++ /dev/null @@ -1,106 +0,0 @@ -======================== -MuK Automation Extension -======================== - -Technical module to extend the Base Automation module. Another trigger is added, -which executes the action during creation, update and deletion. - -Installation -============ - -To install this module, you need to: - -Download the module and add it to your Odoo addons folder. Afterward, log on to -your Odoo server and go to the Apps menu. Trigger the debug mode and update the -list by clicking on the "Update Apps List" link. Now install the module by -clicking on the install button. - -Another way to install this module is via the package management for Python -(`PyPI `_). - -To install our modules using the package manager make sure -`odoo-autodiscover `_ is installed -correctly. Then open a console and install the module by entering the following -command: - -``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -The module name consists of the Odoo version and the module name, where -underscores are replaced by a dash. - -**Module:** - -``odoo-addon-`` - -**Example:** - -``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` - -Once the installation has been successfully completed, the app is already in the -correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the -debug mode and update the list by clicking on the "Update Apps List" link. Now -install the module by clicking on the install button. - -The biggest advantage of this variant is that you can now also update the app -using the "pip" command. To do this, enter the following command in your console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo. The steps are the same as for the installation only the button has changed -from "Install" to "Upgrade". - -You can also view available Apps directly in our `repository `_ -and find a more detailed installation guide on our `website `_. - -For modules licensed under OPL-1, you will receive access data when you purchase -the module. If the modules were not purchased directly from -`MuK IT `_ please contact our support (support@mukit.at) -with a confirmation of purchase to receive the corresponding access data. - -Upgrade -============ - -To upgrade this module, you need to: - -Download the module and add it to your Odoo addons folder. Restart the server -and log on to your Odoo server. Select the Apps menu and upgrade the module by -clicking on the upgrade button. - -If you installed the module using the "pip" command, you can also update the -module in the same way. Just type the following command into the console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo, just like you would normally. - -Configuration -============= - -No additional configuration is needed to use this module. - -Usage -============= - -Another trigger can now be selected in the From View of Base Automation. - -Credits -======= - -Contributors ------------- - -* Mathias Markl - -Author & Maintainer -------------------- - -This module is maintained by the `MuK IT GmbH `_. - -MuK IT is an Austrian company specialized in customizing and extending Odoo. -We develop custom solutions for your individual needs to help you focus on -your strength and expertise to grow your business. - -If you want to get in touch please contact us via mail -(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/muk_automation_extension/i18n/de.po b/muk_automation_extension/i18n/de.po deleted file mode 100644 index 756515f..0000000 --- a/muk_automation_extension/i18n/de.po +++ /dev/null @@ -1,22 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * muk_automation_extension -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-20 18:29+0000\n" -"PO-Revision-Date: 2018-05-20 18:29+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: muk_automation_extension -#: model:ir.model,name:muk_automation_extension.model_base_automation -msgid "Automated Action" -msgstr "Automatische Aktion" - diff --git a/muk_automation_extension/i18n/muk_automation_extension.pot b/muk_automation_extension/i18n/muk_automation_extension.pot deleted file mode 100644 index f31a1ff..0000000 --- a/muk_automation_extension/i18n/muk_automation_extension.pot +++ /dev/null @@ -1,22 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * muk_automation_extension -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-20 18:30+0000\n" -"PO-Revision-Date: 2018-05-20 18:30+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: muk_automation_extension -#: model:ir.model,name:muk_automation_extension.model_base_automation -msgid "Automated Action" -msgstr "" - diff --git a/muk_automation_extension/models/__init__.py b/muk_automation_extension/models/__init__.py deleted file mode 100644 index a931033..0000000 --- a/muk_automation_extension/models/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import base_automation \ No newline at end of file diff --git a/muk_automation_extension/models/base_automation.py b/muk_automation_extension/models/base_automation.py deleted file mode 100644 index b0ed177..0000000 --- a/muk_automation_extension/models/base_automation.py +++ /dev/null @@ -1,96 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from collections import defaultdict - -from odoo import api, models, fields - -_logger = logging.getLogger(__name__) - -class BaseAutomation(models.Model): - - _inherit = 'base.automation' - - trigger = fields.Selection( - selection_add=[('on_create_or_write_or_unlink', 'On Creation & Update & Deletion')]) - - @api.onchange('trigger') - def onchange_trigger(self): - super(BaseAutomation, self).onchange_trigger() - if self.trigger == "on_create_or_write_or_unlink": - self.filter_pre_domain = False - self.trg_date_id = False - self.trg_date_range = False - self.trg_date_range_type = False - - @api.model_cr - def _register_hook(self): - def make_create(): - @api.model - def create(self, vals, **kw): - actions = self.env['base.automation']._get_actions(self, ['on_create_or_write_or_unlink']) - record = create.origin(self.with_env(actions.env), vals, **kw) - for action in actions.with_context(old_values=None): - action._process(action._filter_post(record)) - return record.with_env(self.env) - return create - - def make_write(): - @api.multi - def _write(self, vals, **kw): - actions = self.env['base.automation']._get_actions(self, ['on_create_or_write_or_unlink']) - records = self.with_env(actions.env) - pre = {action: action._filter_pre(records) for action in actions} - old_values = { - old_vals.pop('id'): old_vals - for old_vals in records.read(list(vals)) - } - _write.origin(records, vals, **kw) - for action in actions.with_context(old_values=old_values): - action._process(action._filter_post(pre[action])) - return True - return _write - - def make_unlink(): - @api.multi - def unlink(self, **kwargs): - actions = self.env['base.automation']._get_actions(self, ['on_create_or_write_or_unlink']) - records = self.with_env(actions.env) - for action in actions: - action._process(action._filter_post(records)) - return unlink.origin(self, **kwargs) - return unlink - - patched_models = defaultdict(set) - def patch(model, name, method): - if model not in patched_models[name]: - patched_models[name].add(model) - model._patch_method(name, method) - - super(BaseAutomation, self)._register_hook() - for action_rule in self.with_context({}).search([]): - Model = self.env.get(action_rule.model_name) - if Model is None: - continue - if action_rule.trigger == 'on_create_or_write_or_unlink': - patch(Model, 'create', make_create()) - patch(Model, '_write', make_write()) - patch(Model, 'unlink', make_unlink()) \ No newline at end of file diff --git a/muk_automation_extension/static/description/banner.png b/muk_automation_extension/static/description/banner.png deleted file mode 100644 index 26936b0..0000000 Binary files a/muk_automation_extension/static/description/banner.png and /dev/null differ diff --git a/muk_automation_extension/static/description/icon.png b/muk_automation_extension/static/description/icon.png deleted file mode 100644 index e77a7cb..0000000 Binary files a/muk_automation_extension/static/description/icon.png and /dev/null differ diff --git a/muk_automation_extension/static/description/index.html b/muk_automation_extension/static/description/index.html deleted file mode 100644 index 647046c..0000000 --- a/muk_automation_extension/static/description/index.html +++ /dev/null @@ -1,66 +0,0 @@ -
-
-

MuK Automation Extension

-

Extension for Odoo's Base Automation

-

MuK IT GmbH - - www.mukit.at

-
-
- -
-
-
-

Overview

-

Technical module to extend the Base Automation - module. Another trigger is added, which executes the action during - creation, update and deletion. The new trigger can now be selected - in the From View of Base Automation.

-
-
-
- -
-

Demo

-
-
-
User:
-
-
-
apps
-
-
-
Password:
-
-
-
demo
-
-
- -
- -
-

Help and Support

-
Feel free to - contact us, if you need any help with your Odoo integration or - addiontal features.
- - -
\ No newline at end of file diff --git a/muk_automation_extension/static/description/logo.png b/muk_automation_extension/static/description/logo.png deleted file mode 100644 index 9427ce3..0000000 Binary files a/muk_automation_extension/static/description/logo.png and /dev/null differ diff --git a/muk_autovacuum/LICENSE b/muk_autovacuum/LICENSE deleted file mode 100644 index faf7bf4..0000000 --- a/muk_autovacuum/LICENSE +++ /dev/null @@ -1,619 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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 \ No newline at end of file diff --git a/muk_autovacuum/__init__.py b/muk_autovacuum/__init__.py deleted file mode 100644 index eaf8b97..0000000 --- a/muk_autovacuum/__init__.py +++ /dev/null @@ -1,69 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from odoo import api, SUPERUSER_ID - -from . import models - -def _get_value(env, model): - model_model = env['ir.model'] - model_fields = env['ir.model.fields'] - model = model_model.search([('model', '=', model)], limit=1) - if model.exists(): - field_domain = [ - ('model_id', '=', model.id), - ('ttype', '=', 'datetime'), - ('name', '=', 'create_date')] - field = model_fields.search(field_domain, limit=1) - return model, field - return None - -def _init_default_rules(cr, registry): - env = api.Environment(cr, SUPERUSER_ID, {}) - rule = env['muk_autovacuum.rules'] - values = _get_value(env, 'mail.message') - if values: - rule.create({ - 'name': "Delete Message Attachments after 6 Months", - 'model': values[0].id, - 'active': False, - 'state': 'time', - 'time_field': values[1].id, - 'time_type': 'months', - 'time': 6, - 'only_attachments': True}) - rule.create({ - 'name': "Delete Messages after 1 Year", - 'model': values[0].id, - 'active': False, - 'state': 'time', - 'time_field': values[1].id, - 'time_type': 'years', - 'time': 1}) - values = _get_value(env, 'ir.logging') - if values: - rule.create({ - 'name': "Delete Logs after 2 Weeks", - 'model': values[0].id, - 'active': False, - 'state': 'time', - 'time_field': values[1].id, - 'time_type': 'weeks', - 'time': 2, - 'protect_starred': False}) \ No newline at end of file diff --git a/muk_autovacuum/__manifest__.py b/muk_autovacuum/__manifest__.py deleted file mode 100644 index c164456..0000000 --- a/muk_autovacuum/__manifest__.py +++ /dev/null @@ -1,53 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -{ - "name": "MuK Autovacuum", - "summary": """Configure automatic garbage collection""", - "version": "11.0.2.1.3", - "category": "Extra Tools", - "license": "AGPL-3", - "website": "https://www.mukit.at", - "live_test_url": "https://demo.mukit.at/web/login", - "author": "MuK IT", - "contributors": [ - "Mathias Markl ", - ], - "depends": [ - "base", - ], - "data": [ - "security/ir.model.access.csv", - "views/rules.xml", - ], - "qweb": [ - "static/src/xml/*.xml", - ], - "images": [ - 'static/description/banner.png' - ], - "external_dependencies": { - "python": [], - "bin": [], - }, - "auto_install": False, - "application": False, - "installable": True, - "post_init_hook": '_init_default_rules', -} \ No newline at end of file diff --git a/muk_autovacuum/doc/changelog.rst b/muk_autovacuum/doc/changelog.rst deleted file mode 100644 index b0e796f..0000000 --- a/muk_autovacuum/doc/changelog.rst +++ /dev/null @@ -1,20 +0,0 @@ -`2.0.0` -------- - -- Added Python Expressions - -`2.0.0` -------- - -- Migrated to Python 3 - -`1.1.0` -------- - -- Add field selector - - -`1.0.0` -------- - -- Init version diff --git a/muk_autovacuum/doc/index.rst b/muk_autovacuum/doc/index.rst deleted file mode 100644 index 7b1ccf3..0000000 --- a/muk_autovacuum/doc/index.rst +++ /dev/null @@ -1,113 +0,0 @@ -============== -MuK Autovacuum -============== - -Allows the administrator to create rules to automatically garbage collect -a certain model. Every rule can have a different time interval additional -constraints. An extra constraint can be for example to only delete inactive -records. - -Installation -============ - -To install this module, you need to: - -Download the module and add it to your Odoo addons folder. Afterward, log on to -your Odoo server and go to the Apps menu. Trigger the debug mode and update the -list by clicking on the "Update Apps List" link. Now install the module by -clicking on the install button. - -Another way to install this module is via the package management for Python -(`PyPI `_). - -To install our modules using the package manager make sure -`odoo-autodiscover `_ is installed -correctly. Then open a console and install the module by entering the following -command: - -``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -The module name consists of the Odoo version and the module name, where -underscores are replaced by a dash. - -**Module:** - -``odoo-addon-`` - -**Example:** - -``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` - -Once the installation has been successfully completed, the app is already in the -correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the -debug mode and update the list by clicking on the "Update Apps List" link. Now -install the module by clicking on the install button. - -The biggest advantage of this variant is that you can now also update the app -using the "pip" command. To do this, enter the following command in your console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo. The steps are the same as for the installation only the button has changed -from "Install" to "Upgrade". - -You can also view available Apps directly in our `repository `_ -and find a more detailed installation guide on our `website `_. - -For modules licensed under OPL-1, you will receive access data when you purchase -the module. If the modules were not purchased directly from -`MuK IT `_ please contact our support (support@mukit.at) -with a confirmation of purchase to receive the corresponding access data. - -Upgrade -============ - -To upgrade this module, you need to: - -Download the module and add it to your Odoo addons folder. Restart the server -and log on to your Odoo server. Select the Apps menu and upgrade the module by -clicking on the upgrade button. - -If you installed the module using the "pip" command, you can also update the -module in the same way. Just type the following command into the console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo, just like you would normally. - -Configuration -============= - -To configure this module, you need to: - -#. Go to *Settings* while being in debug mode. -#. Afterwards go to *Technical -> Automation -> Auto Vacuum Rules*. -#. And create a new rule. - -Usage -============= - -This module has no direct visible effect on the system. The garbage collections -happens during the autovacuum cron job. - -Credits -======= - -Contributors ------------- - -* Mathias Markl - -Author & Maintainer -------------------- - -This module is maintained by the `MuK IT GmbH `_. - -MuK IT is an Austrian company specialized in customizing and extending Odoo. -We develop custom solutions for your individual needs to help you focus on -your strength and expertise to grow your business. - -If you want to get in touch please contact us via mail -(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/muk_autovacuum/i18n/de.po b/muk_autovacuum/i18n/de.po deleted file mode 100644 index 007e5e1..0000000 --- a/muk_autovacuum/i18n/de.po +++ /dev/null @@ -1,173 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * muk_autovacuum -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-22 19:26+0000\n" -"PO-Revision-Date: 2018-01-22 20:30+0100\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"Language: de\n" -"X-Generator: Poedit 2.0.5\n" - -#. module: muk_autovacuum -#: model:ir.actions.act_window,name:muk_autovacuum.action_rule -#: model:ir.model,name:muk_autovacuum.model_muk_autovacuum_rules -#: model:ir.ui.menu,name:muk_autovacuum.menu_rules -#: model:ir.ui.view,arch_db:muk_autovacuum.view_refresh_rule_tree -msgid "Auto Vacuum Rules" -msgstr "Auto Vacuum Regeln" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_create_uid -msgid "Created by" -msgstr "Erstellt von" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_create_date -msgid "Created on" -msgstr "Erstellt am" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Days" -msgstr "Tage" - -#. module: muk_autovacuum -#: model:ir.model.fields,help:muk_autovacuum.field_muk_autovacuum_rules_time -msgid "Delete older data than x." -msgstr "Lösche ältere Daten als x." - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_display_name -msgid "Display Name" -msgstr "Anzeigename" - -#. module: muk_autovacuum -#: model:ir.model.fields,help:muk_autovacuum.field_muk_autovacuum_rules_protect_starred -msgid "Do not delete starred records." -msgstr "Einträge mit einem Stern werden nicht gelöscht." - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_field -msgid "Field" -msgstr "Feld" - -#. module: muk_autovacuum -#: code:addons/muk_autovacuum/models/ir_autovacuum.py:84 -#, python-format -msgid "GC'd %s %s records" -msgstr "GC'd %s %s records" - -#. module: muk_autovacuum -#: code:addons/muk_autovacuum/models/ir_autovacuum.py:80 -#, python-format -msgid "GC'd %s attachments from %s entries" -msgstr "GC'd %s attachments from %s entries" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Hours" -msgstr "Stunden" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_id -msgid "ID" -msgstr "ID" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules___last_update -msgid "Last Modified on" -msgstr "Zuletzt geändert am" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_write_uid -msgid "Last Updated by" -msgstr "Zuletzt aktualisiert durch" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_write_date -msgid "Last Updated on" -msgstr "Zuletzt aktualisiert am" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Minutes" -msgstr "Minuten" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_model -msgid "Model" -msgstr "Modell" - -#. module: muk_autovacuum -#: model:ir.model.fields,help:muk_autovacuum.field_muk_autovacuum_rules_model -msgid "Model on which the rule is applied." -msgstr "Model welches die Regel zuordnet ist." - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Months" -msgstr "Monate" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_only_inactive -msgid "Only Archived" -msgstr "Nur archivierte Einträge" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_only_attachments -msgid "Only Attachments" -msgstr "Nur Anhänge" - -#. module: muk_autovacuum -#: model:ir.model.fields,help:muk_autovacuum.field_muk_autovacuum_rules_only_inactive -msgid "Only delete archived records." -msgstr "Es werden nur archivierte Einträge gelöscht." - -#. module: muk_autovacuum -#: model:ir.model.fields,help:muk_autovacuum.field_muk_autovacuum_rules_only_attachments -msgid "Only delete record attachments." -msgstr "Es werden nur Anhänge gelöscht." - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_protect_starred -msgid "Protect Starred" -msgstr "Schütze Einträge mit Stern" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_sequence -msgid "Sequence" -msgstr "Nummernfolge" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_time -msgid "Time" -msgstr "Zeit" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_time_type -msgid "Time Unit" -msgstr "Interval" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Weeks" -msgstr "Wochen" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Years" -msgstr "Jahre" - -#. module: muk_autovacuum -#: model:ir.model,name:muk_autovacuum.model_ir_autovacuum -msgid "ir.autovacuum" -msgstr "ir.autovacuum" diff --git a/muk_autovacuum/i18n/muk_autovacuum.pot b/muk_autovacuum/i18n/muk_autovacuum.pot deleted file mode 100644 index c82c766..0000000 --- a/muk_autovacuum/i18n/muk_autovacuum.pot +++ /dev/null @@ -1,172 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * muk_autovacuum -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-22 19:26+0000\n" -"PO-Revision-Date: 2018-01-22 19:26+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: muk_autovacuum -#: model:ir.actions.act_window,name:muk_autovacuum.action_rule -#: model:ir.model,name:muk_autovacuum.model_muk_autovacuum_rules -#: model:ir.ui.menu,name:muk_autovacuum.menu_rules -#: model:ir.ui.view,arch_db:muk_autovacuum.view_refresh_rule_tree -msgid "Auto Vacuum Rules" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_create_uid -msgid "Created by" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_create_date -msgid "Created on" -msgstr "" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Days" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,help:muk_autovacuum.field_muk_autovacuum_rules_time -msgid "Delete older data than x." -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_display_name -msgid "Display Name" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,help:muk_autovacuum.field_muk_autovacuum_rules_protect_starred -msgid "Do not delete starred records." -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_field -msgid "Field" -msgstr "" - -#. module: muk_autovacuum -#: code:addons/muk_autovacuum/models/ir_autovacuum.py:84 -#, python-format -msgid "GC'd %s %s records" -msgstr "" - -#. module: muk_autovacuum -#: code:addons/muk_autovacuum/models/ir_autovacuum.py:80 -#, python-format -msgid "GC'd %s attachments from %s entries" -msgstr "" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Hours" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_id -msgid "ID" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules___last_update -msgid "Last Modified on" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_write_uid -msgid "Last Updated by" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_write_date -msgid "Last Updated on" -msgstr "" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Minutes" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_model -msgid "Model" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,help:muk_autovacuum.field_muk_autovacuum_rules_model -msgid "Model on which the rule is applied." -msgstr "" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Months" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_only_inactive -msgid "Only Archived" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_only_attachments -msgid "Only Attachments" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,help:muk_autovacuum.field_muk_autovacuum_rules_only_inactive -msgid "Only delete archived records." -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,help:muk_autovacuum.field_muk_autovacuum_rules_only_attachments -msgid "Only delete record attachments." -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_protect_starred -msgid "Protect Starred" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_sequence -msgid "Sequence" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_time -msgid "Time" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model.fields,field_description:muk_autovacuum.field_muk_autovacuum_rules_time_type -msgid "Time Unit" -msgstr "" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Weeks" -msgstr "" - -#. module: muk_autovacuum -#: selection:muk_autovacuum.rules,time_type:0 -msgid "Years" -msgstr "" - -#. module: muk_autovacuum -#: model:ir.model,name:muk_autovacuum.model_ir_autovacuum -msgid "ir.autovacuum" -msgstr "" - diff --git a/muk_autovacuum/models/__init__.py b/muk_autovacuum/models/__init__.py deleted file mode 100644 index 81c79ec..0000000 --- a/muk_autovacuum/models/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import rules -from . import ir_autovacuum \ No newline at end of file diff --git a/muk_autovacuum/models/ir_autovacuum.py b/muk_autovacuum/models/ir_autovacuum.py deleted file mode 100644 index bdaf7d3..0000000 --- a/muk_autovacuum/models/ir_autovacuum.py +++ /dev/null @@ -1,88 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import time -import logging -import datetime -import dateutil - -from odoo import _ -from odoo import models, api -from odoo.tools.safe_eval import safe_eval -from odoo.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT - -_logger = logging.getLogger(__name__) - -_types = { - 'days': lambda interval: datetime.timedelta(days=interval), - 'years': lambda interval: datetime.timedelta(weeks=interval*52), - 'hours': lambda interval: datetime.timedelta(hours=interval), - 'weeks': lambda interval: datetime.timedelta(weeks=interval), - 'months': lambda interval: datetime.timedelta(days=interval*30), - 'minutes': lambda interval: datetime.timedelta(minutes=interval), -} - -class AutoVacuum(models.AbstractModel): - - _inherit = 'ir.autovacuum' - - @api.model - def power_on(self, *args, **kwargs): - res = super(AutoVacuum, self).power_on(*args, **kwargs) - rules = self.env['muk_autovacuum.rules'].sudo().search([], order='sequence asc') - for rule in rules: - if rule.state in ['time', 'size', 'domain']: - model = self.env[rule.model.model].sudo() - records = self.env[rule.model.model] - if rule.state == 'time': - computed_time = datetime.datetime.utcnow() - _types[rule.time_type](rule.time) - domain = [(rule.time_field.name, '<', computed_time.strftime(DEFAULT_SERVER_DATETIME_FORMAT))] - if rule.protect_starred: - for field in rule.model.field_id: - if field.name in ['starred', 'favorite', 'is_starred', 'is_favorite']: - domain.append((field.name, '=', False)) - if rule.only_inactive and "active" in rule.model.field_id.mapped("name"): - domain.append(('active', '=', False)) - _logger.info(_("GC domain: %s"), domain) - records = model.with_context({'active_test': False}).search(domain) - elif rule.state == 'size': - size = rule.size if rule.size_type == 'fixed' else rule.size_parameter_value - count = model.with_context({'active_test': False}).search([], count=True) - if count > size: - limit = count - size - _logger.info(_("GC domain: [] order: %s limit: %s"), rule.size_order, limit) - records = model.with_context({'active_test': False}).search([], order=rule.size_order, limit=limit) - elif rule.state == 'domain': - _logger.info(_("GC domain: %s"), rule.domain) - domain = safe_eval(rule.domain, rules._get_eval_domain_context()) - records = model.with_context({'active_test': False}).search(domain) - if rule.only_attachments: - attachments = self.env['ir.attachment'].sudo().search([ - ('res_model', '=', rule.model.model), - ('res_id', 'in', records.mapped('id'))]) - count = len(attachments) - attachments.unlink() - _logger.info(_("GC'd %s attachments from %s entries"), count, rule.model.model) - else: - count = len(records) - records.unlink() - _logger.info(_("GC'd %s %s records"), count, rule.model.model) - elif rule.state == 'code': - safe_eval(rule.code.strip(), rules._get_eval_code_context(rule), mode="exec") - return res \ No newline at end of file diff --git a/muk_autovacuum/models/rules.py b/muk_autovacuum/models/rules.py deleted file mode 100644 index e15eb13..0000000 --- a/muk_autovacuum/models/rules.py +++ /dev/null @@ -1,318 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import time -import logging -import datetime -import dateutil - -from pytz import timezone - -from odoo import _ -from odoo import models, api, fields -from odoo.exceptions import ValidationError, Warning -from odoo.tools import DEFAULT_SERVER_DATE_FORMAT -from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT -from odoo.tools.safe_eval import safe_eval, test_python_expr - -_logger = logging.getLogger(__name__) - -class AutoVacuumRules(models.Model): - - _name = 'muk_autovacuum.rules' - _description = "Auto Vacuum Rules" - _order = "sequence asc" - - #---------------------------------------------------------- - # Defaults - #---------------------------------------------------------- - - def _default_sequence(self): - record = self.sudo().search([], order='sequence desc', limit=1) - if record.exists(): - return record.sequence + 1 - else: - return 1 - - #---------------------------------------------------------- - # Database - #---------------------------------------------------------- - - name = fields.Char( - string='Name', - required=True) - - active = fields.Boolean( - string='Active', - default=True) - - state = fields.Selection( - selection=[ - ('time', 'Time Based'), - ('size', 'Size Based'), - ('domain', 'Domain Based'), - ('code', 'Code Based')], - string='Rule Type', - default='time', - required=True) - - sequence = fields.Integer( - string='Sequence', - default=_default_sequence, - required=True) - - model = fields.Many2one( - comodel_name='ir.model', - string="Model", - required=True, - ondelete='cascade', - help="Model on which the rule is applied.") - - model_name = fields.Char( - related='model.model', - string="Model Name", - readonly=True, - store=True) - - time_field = fields.Many2one( - comodel_name='ir.model.fields', - domain="[('model_id', '=', model), ('ttype', '=', 'datetime')]", - string='Time Field', - ondelete='cascade', - states={ - 'time': [('required', True)], - 'size': [('invisible', True)], - 'domain': [('invisible', True)], - 'code': [('invisible', True)]}) - - time_type = fields.Selection( - selection=[ - ('minutes', 'Minutes'), - ('hours', 'Hours'), - ('days', 'Days'), - ('weeks', 'Weeks'), - ('months', 'Months'), - ('years', 'Years')], - string='Time Unit', - default='months', - states={ - 'time': [('required', True)], - 'size': [('invisible', True)], - 'domain': [('invisible', True)], - 'code': [('invisible', True)]}) - - time = fields.Integer( - string='Time', - default=1, - states={ - 'time': [('required', True)], - 'size': [('invisible', True)], - 'domain': [('invisible', True)], - 'code': [('invisible', True)]}, - help="Delete older data than x.") - - size_type = fields.Selection( - selection=[ - ('fixed', 'Fixed Value'), - ('parameter', 'System Parameter')], - string='Size Type', - default='fixed', - states={ - 'time': [('invisible', True)], - 'size': [('required', True)], - 'domain': [('invisible', True)], - 'code': [('invisible', True)]}) - - size_parameter = fields.Many2one( - comodel_name='ir.config_parameter', - string='System Parameter', - ondelete='cascade', - states={ - 'time': [('invisible', True)], - 'size': [('required', True)], - 'domain': [('invisible', True)], - 'code': [('invisible', True)]}) - - size_parameter_value = fields.Integer( - compute='_compute_size_parameter_value', - string='Size', - states={ - 'time': [('invisible', True)], - 'size': [('readonly', True)], - 'domain': [('invisible', True)], - 'code': [('invisible', True)]}, - help="Delete records with am index greater than x.") - - size_order = fields.Char( - string='Size Order', - default='create_date desc', - states={ - 'time': [('invisible', True)], - 'size': [('required', True)], - 'domain': [('invisible', True)], - 'code': [('invisible', True)]}, - help="Order by which the index is defined.") - - size = fields.Integer( - string='Size', - default=200, - states={ - 'time': [('invisible', True)], - 'size': [('required', True)], - 'domain': [('invisible', True)], - 'code': [('invisible', True)]}, - help="Delete records with am index greater than x.") - - domain = fields.Char( - string='Domain', - states={ - 'time': [('invisible', True)], - 'size': [('invisible', True)], - 'domain': [('required', True)], - 'code': [('invisible', True)]}, - help="Delete all records which match the domain.") - - code = fields.Text( - string='Code', - states={ - 'time': [('invisible', True)], - 'size': [('invisible', True)], - 'domain': [('invisible', True)] , - 'code': [('required', True)]}, - help="Code which will be executed during the clean up.") - - protect_starred = fields.Boolean( - string='Protect Starred', - default=True, - states={ - 'time': [('invisible', False)], - 'size': [('invisible', True)], - 'domain': [('invisible', True)], - 'code': [('invisible', True)]}, - help="""Do not delete starred records. - Checks for the following fields: - - starred - - favorite - - is_starred - - is_favorite""") - - only_inactive = fields.Boolean( - string='Only Archived', - default=False, - states={ - 'time': [('invisible', False)], - 'size': [('invisible', True)], - 'domain': [('invisible', True)], - 'code': [('invisible', True)]}, - help="Only delete archived records.") - - only_attachments = fields.Boolean( - string='Only Attachments', - default=False, - states={ - 'time': [('invisible', False)], - 'size': [('invisible', False)], - 'domain': [('invisible', False)], - 'code': [('invisible', True)]}, - help="Only delete record attachments.") - - #---------------------------------------------------------- - # Functions - #---------------------------------------------------------- - - @api.model - def _get_eval_domain_context(self): - return { - 'datetime': datetime, - 'dateutil': dateutil, - 'time': time, - 'uid': self.env.uid, - 'user': self.env.user - } - - @api.model - def _get_eval_code_context(self, rule): - return { - 'env': self.env, - 'model': self.env[rule.model_name], - 'uid': self.env.user.id, - 'user': self.env.user, - 'time': time, - 'datetime': datetime, - 'dateutil': dateutil, - 'timezone': timezone, - 'date_format': DEFAULT_SERVER_DATE_FORMAT, - 'datetime_format': DEFAULT_SERVER_DATETIME_FORMAT, - 'Warning': Warning, - 'logger': logging.getLogger("%s (%s)" % (__name__, rule.name)), - } - - #---------------------------------------------------------- - # View - #---------------------------------------------------------- - - @api.onchange('model') - def _onchange_model(self): - field_domain = [ - ('model_id', '=', self.model.id), - ('ttype', '=', 'datetime'), - ('name', '=', 'create_date')] - record = self.env['ir.model.fields'].sudo().search(field_domain, limit=1) - if record.exists(): - self.time_field = record - else: - return None - - #---------------------------------------------------------- - # Read - #---------------------------------------------------------- - - @api.depends('size_parameter') - def _compute_size_parameter_value(self): - for record in self: - try: - record.size_parameter_value = int(record.size_parameter.value) - except ValueError: - record.size_parameter_value = None - - #---------------------------------------------------------- - # Create, Update, Delete - #---------------------------------------------------------- - - @api.constrains('code') - def _check_code(self): - for record in self.sudo().filtered('code'): - message = test_python_expr(expr=record.code.strip(), mode="exec") - if message: - raise ValidationError(message) - - @api.constrains( - 'state', 'model', 'domain', 'code', - 'time_field', 'time_type', 'time', - 'size_type', 'size_parameter', 'size_order', 'size') - def _validate(self): - validators = { - 'time': lambda rec: rec.time_field and rec.time_type and rec.time, - 'size': lambda rec: rec.size_order and (rec.size_parameter or rec.size), - 'domain': lambda rec: rec.domain, - 'code': lambda rec: rec.code, - } - for record in self: - if not validators[record.state](record): - raise ValidationError(_("Rule validation has failed!")) \ No newline at end of file diff --git a/muk_autovacuum/security/ir.model.access.csv b/muk_autovacuum/security/ir.model.access.csv deleted file mode 100644 index a369089..0000000 --- a/muk_autovacuum/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink - -access_muk_autovacuum_rules_group_cron,muk_autovacuum_rules group_rules,model_muk_autovacuum_rules,base.group_system,1,1,1,1 \ No newline at end of file diff --git a/muk_autovacuum/static/description/banner.png b/muk_autovacuum/static/description/banner.png deleted file mode 100644 index 7540bae..0000000 Binary files a/muk_autovacuum/static/description/banner.png and /dev/null differ diff --git a/muk_autovacuum/static/description/icon.png b/muk_autovacuum/static/description/icon.png deleted file mode 100644 index 932907c..0000000 Binary files a/muk_autovacuum/static/description/icon.png and /dev/null differ diff --git a/muk_autovacuum/static/description/index.html b/muk_autovacuum/static/description/index.html deleted file mode 100644 index 04b7598..0000000 --- a/muk_autovacuum/static/description/index.html +++ /dev/null @@ -1,70 +0,0 @@ -
-
-

MuK Auto Vacuum

-

Configure automatic garbage collection

-

MuK IT GmbH - - www.mukit.at

-
- -
-
-
- -
-
-
-

Overview

-

Allows the administrator to create rules to - automatically garbage collect a certain model. Every rule can have a - different time interval additional constraints. An extra constraint - can be for example to only delete inactive records.

-
-
-
- -
-

Demo

-
-
-
User:
-
-
-
apps
-
-
-
Password:
-
-
-
demo
-
-
- -
- -
-

Help and Support

-
Feel free to - contact us, if you need any help with your Odoo integration or - addiontal features.
- - -
\ No newline at end of file diff --git a/muk_autovacuum/static/description/logo.png b/muk_autovacuum/static/description/logo.png deleted file mode 100644 index 9427ce3..0000000 Binary files a/muk_autovacuum/static/description/logo.png and /dev/null differ diff --git a/muk_autovacuum/static/description/screenshot.png b/muk_autovacuum/static/description/screenshot.png deleted file mode 100644 index ef9395f..0000000 Binary files a/muk_autovacuum/static/description/screenshot.png and /dev/null differ diff --git a/muk_autovacuum/tests/__init__.py b/muk_autovacuum/tests/__init__.py deleted file mode 100644 index 85c6cff..0000000 --- a/muk_autovacuum/tests/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import test_autovacuum \ No newline at end of file diff --git a/muk_autovacuum/tests/test_autovacuum.py b/muk_autovacuum/tests/test_autovacuum.py deleted file mode 100644 index e71bf6f..0000000 --- a/muk_autovacuum/tests/test_autovacuum.py +++ /dev/null @@ -1,88 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging -import datetime - -from odoo.tests import common -from odoo.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT - -_logger = logging.getLogger(__name__) - -class AutoVacuumTestCase(common.TransactionCase): - - at_install = False - post_install = True - - def _setUpData(self): - model_logs = self.env['ir.logging'] - time = datetime.datetime.utcnow() - datetime.timedelta(days=60) - for index in range(0, 3): - model_logs.create({ - 'create_date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT), - 'create_uid': self.env.user.id, - 'name': "Test %s" % index, - 'type': 'server', - 'dbname': self.env.cr.dbname, - 'level': "INFO", - 'message': "TEST", - 'path': "PATH", - 'func': "TEST", - 'line': 1}) - - def _setUpRules(self): - model_rule = self.env['muk_autovacuum.rules'] - model_model = self.env['ir.model'] - model_fields = self.env['ir.model.fields'] - model_logs = model_model.search([('model', '=', 'ir.logging')], limit=1) - time_field_domain = [ - ('model_id', '=', model_logs.id), - ('ttype', '=', 'datetime'), - ('name', '=', 'create_date')] - time_field_logs = model_fields.search(time_field_domain, limit=1) - model_rule.create({ - 'name': "Delete Logs after 1 Minute", - 'state': 'time', - 'model': model_logs.id, - 'time_field': time_field_logs.id, - 'time_type': 'minutes', - 'time': 1}) - model_rule.create({ - 'name': "Delete Logs Count > 1", - 'state': 'size', - 'model': model_logs.id, - 'size': 1, - 'size_order': "id desc", - 'size_type': 'fixed'}) - model_rule.create({ - 'name': "Delete Logs with Domain", - 'state': 'domain', - 'model': model_logs.id, - 'domain': "[]"}) - - def setUp(self): - super(AutoVacuumTestCase, self).setUp() - self._setUpData() - self._setUpRules() - - def tearDown(self): - super(AutoVacuumTestCase, self).tearDown() - - def test_autovacuum(self): - self.env['ir.cron'].search([('model_id', '=', 'ir.autovacuum')]).ir_actions_server_id.run() \ No newline at end of file diff --git a/muk_autovacuum/views/rules.xml b/muk_autovacuum/views/rules.xml deleted file mode 100644 index fbba6d1..0000000 --- a/muk_autovacuum/views/rules.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - muk_autovacuum_rules.search - muk_autovacuum.rules - - - - - - - - - - - - - - - - - muk_autovacuum_rules.tree - muk_autovacuum.rules - - - - - - - - - - - - - muk_autovacuum_rules.form - muk_autovacuum.rules - -
- -
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Help with Python expressions

-

Various fields may use Python code or Python expressions. The following variables can be used:

-
    -
  • uid, user: User on which the rule is triggered
  • -
  • env: Odoo Environment on which the rule is triggered
  • -
  • model: Odoo Model of the record on which the rule is triggered
  • -
  • time, datetime, dateutil, timezone: useful Python libraries
  • -
  • date_format, datetime_format: server date and time formats
  • -
  • logger.info(message): Python logging framework
  • -
  • Warning: Warning Exception to use with raise
  • -
-
-
-
-
-
-
-
-
- - - Auto Vacuum Rules - muk_autovacuum.rules - tree,form - {'search_default_all': 1} - - - - -
\ No newline at end of file diff --git a/muk_converter/LICENSE b/muk_converter/LICENSE deleted file mode 100644 index faf7bf4..0000000 --- a/muk_converter/LICENSE +++ /dev/null @@ -1,619 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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 \ No newline at end of file diff --git a/muk_converter/__init__.py b/muk_converter/__init__.py deleted file mode 100644 index 091b8c9..0000000 --- a/muk_converter/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import service -from . import tools -from . import models -from . import wizards \ No newline at end of file diff --git a/muk_converter/__manifest__.py b/muk_converter/__manifest__.py deleted file mode 100644 index 94a8e8d..0000000 --- a/muk_converter/__manifest__.py +++ /dev/null @@ -1,57 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -{ - "name": "MuK Converter", - "summary": """Universal Converter""", - "version": '11.0.1.1.6', - "category": 'Extra Tools', - "license": "AGPL-3", - "website": "https://www.mukit.at", - "live_test_url": "https://demo.mukit.at/web/login", - "author": "MuK IT", - "contributors": [ - "Mathias Markl ", - ], - "depends": [ - "muk_utils", - "muk_autovacuum", - "muk_fields_lobject", - ], - "data": [ - "security/ir.model.access.csv", - "views/convert.xml", - "data/params.xml", - "data/autovacuum.xml", - ], - "qweb": [ - "static/src/xml/*.xml", - ], - "images": [ - 'static/description/banner.png' - ], - "external_dependencies": { - "python": [], - "bin": [ - "unoconv", - ], - }, - "application": False, - "installable": True, -} diff --git a/muk_converter/data/autovacuum.xml b/muk_converter/data/autovacuum.xml deleted file mode 100644 index a1eb590..0000000 --- a/muk_converter/data/autovacuum.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - Delete all converted files that exceed the store size - size - - parameter - - used_date desc - - - \ No newline at end of file diff --git a/muk_converter/data/params.xml b/muk_converter/data/params.xml deleted file mode 100644 index c17f55c..0000000 --- a/muk_converter/data/params.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - muk_converter.max_store - 20 - - - - \ No newline at end of file diff --git a/muk_converter/doc/changelog.rst b/muk_converter/doc/changelog.rst deleted file mode 100644 index 4222f97..0000000 --- a/muk_converter/doc/changelog.rst +++ /dev/null @@ -1,9 +0,0 @@ -`1.1.0` -------- - -- Added converter wizard - -`1.0.0` -------- - -- Init version diff --git a/muk_converter/doc/index.rst b/muk_converter/doc/index.rst deleted file mode 100644 index 89b15a2..0000000 --- a/muk_converter/doc/index.rst +++ /dev/null @@ -1,134 +0,0 @@ -============= -MuK Converter -============= - -Technical module to provide some utility features and libraries that can be used -in other applications. This module has no direct effect on the running system. - -Requirements -============= - -unoconv -------------- - -Universal Office Converter (unoconv) is a command line tool to convert any -document format that LibreOffice can import to any document format that -LibreOffice can export. It makes use of the LibreOffice's UNO bindings for -non-interactive conversion of documents. - -To install unoconv please follow the instructions (`here `_). - -Make sure that unoconv can be executed from the console and the conversion -is done correctly. - -To set an individual path for the LibreOffice installation, the config -variable ``uno_path`` can be set accordingly in the Odoo config. - -Under Windows you should rename the ``unoconv`` file to ``unoconv.py`` and set -the corresponding path for the ``uno_path`` variable. Since it does not work -reliably with the environment variable ``UNO_PATH``. - -Installation -============ - -To install this module, you need to: - -Download the module and add it to your Odoo addons folder. Afterward, log on to -your Odoo server and go to the Apps menu. Trigger the debug mode and update the -list by clicking on the "Update Apps List" link. Now install the module by -clicking on the install button. - -Another way to install this module is via the package management for Python -(`PyPI `_). - -To install our modules using the package manager make sure -`odoo-autodiscover `_ is installed -correctly. Then open a console and install the module by entering the following -command: - -``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -The module name consists of the Odoo version and the module name, where -underscores are replaced by a dash. - -**Module:** - -``odoo-addon-`` - -**Example:** - -``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` - -Once the installation has been successfully completed, the app is already in the -correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the -debug mode and update the list by clicking on the "Update Apps List" link. Now -install the module by clicking on the install button. - -The biggest advantage of this variant is that you can now also update the app -using the "pip" command. To do this, enter the following command in your console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo. The steps are the same as for the installation only the button has changed -from "Install" to "Upgrade". - -You can also view available Apps directly in our `repository `_ -and find a more detailed installation guide on our `website `_. - -For modules licensed under OPL-1, you will receive access data when you purchase -the module. If the modules were not purchased directly from -`MuK IT `_ please contact our support (support@mukit.at) -with a confirmation of purchase to receive the corresponding access data. - -Upgrade -============ - -To upgrade this module, you need to: - -Download the module and add it to your Odoo addons folder. Restart the server -and log on to your Odoo server. Select the Apps menu and upgrade the module by -clicking on the upgrade button. - -If you installed the module using the "pip" command, you can also update the -module in the same way. Just type the following command into the console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo, just like you would normally. - -Configuration -============= - -The converter uses a store to avoid the repeated conversion of the same file. -To avoid unnecessary memory consumption, Odoo's AutoVaccum Cron Job empties -the store accordingly. The system parameter ``muk_converter.max_store`` can -be used to set the maximum number of elements that can be in the store after -cleaning. By default, this value is set to 20. - -Usage -============= - -This module has no direct visible effect on the system. It provides functions -to convert data from one file format to another. - -Credits -======= - -Contributors ------------- - -* Mathias Markl - -Author & Maintainer -------------------- - -This module is maintained by the `MuK IT GmbH `_. - -MuK IT is an Austrian company specialized in customizing and extending Odoo. -We develop custom solutions for your individual needs to help you focus on -your strength and expertise to grow your business. - -If you want to get in touch please contact us via mail -(sale@mukit.at) or visit our website (https://mukit.at). \ No newline at end of file diff --git a/muk_converter/i18n/de.po b/muk_converter/i18n/de.po deleted file mode 100644 index 41afeae..0000000 --- a/muk_converter/i18n/de.po +++ /dev/null @@ -1,678 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * muk_converter -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-17 19:15+0000\n" -"PO-Revision-Date: 2018-05-17 21:18+0200\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"Language: de\n" -"X-Generator: Poedit 2.0.6\n" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "BIB" -msgstr "BIB" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "BMP" -msgstr "BMP" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "CSV" -msgstr "CSV" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "Cancel" -msgstr "Abbrechen" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_checksum -msgid "Checksum" -msgstr "Checksum" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "Close" -msgstr "Schließen" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "Conversion Complete" -msgstr "Konvertierung abgeschlossen" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "Convert" -msgstr "Konvertieren" - -#. module: muk_converter -#: code:addons/muk_converter/wizards/convert.py:86 -#: model:ir.actions.act_window,name:muk_converter.action_converter_convert -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -#, python-format -msgid "Convert File" -msgstr "Konverter Datei" - -#. module: muk_converter -#: model:ir.model,name:muk_converter.model_muk_converter_converter -msgid "Converter" -msgstr "Konverter" - -#. module: muk_converter -#: model:ir.model,name:muk_converter.model_muk_converter_store -msgid "Converter Store" -msgstr "Konverter Speicher" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_create_uid -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_create_uid -msgid "Created by" -msgstr "Erstellt von" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_create_date -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_create_date -msgid "Created on" -msgstr "Erstellt am" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DBF" -msgstr "DBF" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DIF" -msgstr "DIF" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOC" -msgstr "DOC" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOC6" -msgstr "DOC6" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOC95" -msgstr "DOC95" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOCBOOK" -msgstr "DOCBOOK" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOCX" -msgstr "DOCX" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOCX7" -msgstr "DOCX7" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_content -msgid "Data" -msgstr "Persönliche Daten" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_display_name -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_converter_display_name -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_display_name -msgid "Display Name" -msgstr "Anzeigename" - -#. module: muk_converter -#: selection:muk_converter.convert,state:0 -msgid "Download" -msgstr "Download" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "EMF" -msgstr "EMF" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "EPS" -msgstr "EPS" - -#. module: muk_converter -#: model:ir.model.fields,help:muk_converter.field_muk_converter_convert_type -msgid "Either a binary file or an url can be converted" -msgstr "Es kann entweder eine Binärdatei oder eine URL konvertiert werden." - -#. module: muk_converter -#: selection:muk_converter.convert,state:0 -msgid "Export" -msgstr "Export" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "FODG" -msgstr "FODG" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "FODP" -msgstr "FODP" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "FODS" -msgstr "FODS" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "FODT" -msgstr "FODT" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_input_binary -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_output_binary -#: selection:muk_converter.convert,type:0 -msgid "File" -msgstr "Datei" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_input_name -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_output_name -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_content_fname -msgid "Filename" -msgstr "Dateiname" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_format -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_format -msgid "Format" -msgstr "Format" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "GIF" -msgstr "GIF" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "HTML" -msgstr "HTML" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "Here is the converted file:" -msgstr "Hier ist die konvertierte Datei:" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_id -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_converter_id -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_id -msgid "ID" -msgstr "ID" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "JPG" -msgstr "JPG" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "LATEX" -msgstr "LATEX" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert___last_update -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_converter___last_update -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store___last_update -msgid "Last Modified on" -msgstr "Zuletzt geändert am" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_write_uid -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_write_uid -msgid "Last Updated by" -msgstr "Zuletzt aktualisiert durch" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_write_date -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_write_date -msgid "Last Updated on" -msgstr "Zuletzt aktualisiert am" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "MEDIAWIKI" -msgstr "MEDIAWIKI" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "MET" -msgstr "MET" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_name -msgid "Name" -msgstr "Name" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "ODD" -msgstr "ODD" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "ODG" -msgstr "ODG" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "ODP" -msgstr "ODP" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "ODS" -msgstr "ODS" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "ODT" -msgstr "ODT" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "OOXML" -msgstr "OOXML" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "OTG" -msgstr "OTG" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "OTP" -msgstr "OTP" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "OTS" -msgstr "OTS" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "OTT" -msgstr "OTT" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PBM" -msgstr "PBM" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PCT" -msgstr "PCT" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PDB" -msgstr "PDB" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PDF" -msgstr "PDF" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PGM" -msgstr "PGM" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PNG" -msgstr "PNG" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "POT" -msgstr "POT" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "POTM" -msgstr "POTM" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PPM" -msgstr "PPM" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PPS" -msgstr "PPS" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PPT" -msgstr "PPT" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PPTX" -msgstr "PPTX" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PSW" -msgstr "PSW" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PWP" -msgstr "PWP" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PXL" -msgstr "PXL" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "RAS" -msgstr "RAS" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "RTF" -msgstr "RTF" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDA" -msgstr "SDA" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDC" -msgstr "SDC" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDC3" -msgstr "SDC3" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDC4" -msgstr "SDC4" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDD" -msgstr "SDD" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDD3" -msgstr "SDD3" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDD4" -msgstr "SDD4" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDW" -msgstr "SDW" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDW3" -msgstr "SDW3" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDW4" -msgstr "SDW4" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SLK" -msgstr "SLK" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "STC" -msgstr "STC" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "STD" -msgstr "STD" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "STI" -msgstr "STI" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "STW" -msgstr "STW" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SVG" -msgstr "SVG" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SVM" -msgstr "SVM" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SWF" -msgstr "SWF" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXC" -msgstr "SXC" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXD" -msgstr "SXD" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXD3" -msgstr "SXD3" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXD5" -msgstr "SXD5" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXI" -msgstr "SXI" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXW" -msgstr "SXW" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_state -msgid "State" -msgstr "Status" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "TEXT" -msgstr "TEXT" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "TIFF" -msgstr "TIFF" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "TXT" -msgstr "TXT" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "" -"The file has been successfully converted and can now be used.\n" -"\t\t\t\t\t\tYou can download the file by clicking on the link below." -msgstr "Die Datei wurde erfolgreich konvertiert und kann nun verwendet werden. Mit einem Klick auf den angeführten Link kann die Datei heruntergeladen werden." - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_type -msgid "Type" -msgstr "Typ" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "UOP" -msgstr "UOP" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "UOS" -msgstr "UOS" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "UOT" -msgstr "UOT" - -#. module: muk_converter -#: selection:muk_converter.convert,type:0 -msgid "URL" -msgstr "URL" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_input_url -msgid "Url" -msgstr "URL" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_used_date -msgid "Used on" -msgstr "Used on" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "VOR" -msgstr "VOR" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "VOR3" -msgstr "VOR3" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "VOR4" -msgstr "VOR4" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "VOR5" -msgstr "VOR5" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "WMF" -msgstr "WMF" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "WPS" -msgstr "WPS" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XHTML" -msgstr "XHTML" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLS" -msgstr "XLS" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLS5" -msgstr "XLS5" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLS95" -msgstr "XLS95" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLSX" -msgstr "XLSX" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLT" -msgstr "XLT" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLT5" -msgstr "XLT5" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLT95" -msgstr "XLT95" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XPM" -msgstr "XPM" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XPMBIB" -msgstr "XPMBIB" - -#. module: muk_converter -#: model:ir.model,name:muk_converter.model_ir_autovacuum -msgid "ir.autovacuum" -msgstr "ir.autovacuum" - -#. module: muk_converter -#: model:ir.model,name:muk_converter.model_muk_converter_convert -msgid "muk_converter.convert" -msgstr "muk_converter.convert" diff --git a/muk_converter/i18n/muk_converter.pot b/muk_converter/i18n/muk_converter.pot deleted file mode 100644 index 6491c90..0000000 --- a/muk_converter/i18n/muk_converter.pot +++ /dev/null @@ -1,676 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * muk_converter -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-17 19:15+0000\n" -"PO-Revision-Date: 2018-05-17 19:15+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "BIB" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "BMP" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "CSV" -msgstr "" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "Cancel" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_checksum -msgid "Checksum" -msgstr "" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "Close" -msgstr "" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "Conversion Complete" -msgstr "" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "Convert" -msgstr "" - -#. module: muk_converter -#: code:addons/muk_converter/wizards/convert.py:86 -#: model:ir.actions.act_window,name:muk_converter.action_converter_convert -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -#, python-format -msgid "Convert File" -msgstr "" - -#. module: muk_converter -#: model:ir.model,name:muk_converter.model_muk_converter_converter -msgid "Converter" -msgstr "" - -#. module: muk_converter -#: model:ir.model,name:muk_converter.model_muk_converter_store -msgid "Converter Store" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_create_uid -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_create_uid -msgid "Created by" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_create_date -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_create_date -msgid "Created on" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DBF" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DIF" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOC" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOC6" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOC95" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOCBOOK" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOCX" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "DOCX7" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_content -msgid "Data" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_display_name -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_converter_display_name -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_display_name -msgid "Display Name" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,state:0 -msgid "Download" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "EMF" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "EPS" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,help:muk_converter.field_muk_converter_convert_type -msgid "Either a binary file or an url can be converted" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,state:0 -msgid "Export" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "FODG" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "FODP" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "FODS" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "FODT" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_input_binary -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_output_binary -#: selection:muk_converter.convert,type:0 -msgid "File" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_input_name -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_output_name -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_content_fname -msgid "Filename" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_format -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_format -msgid "Format" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "GIF" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "HTML" -msgstr "" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "Here is the converted file:" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_id -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_converter_id -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_id -msgid "ID" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "JPG" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "LATEX" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert___last_update -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_converter___last_update -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store___last_update -msgid "Last Modified on" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_write_uid -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_write_uid -msgid "Last Updated by" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_write_date -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_write_date -msgid "Last Updated on" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "MEDIAWIKI" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "MET" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_name -msgid "Name" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "ODD" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "ODG" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "ODP" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "ODS" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "ODT" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "OOXML" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "OTG" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "OTP" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "OTS" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "OTT" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PBM" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PCT" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PDB" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PDF" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PGM" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PNG" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "POT" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "POTM" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PPM" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PPS" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PPT" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PPTX" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PSW" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PWP" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "PXL" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "RAS" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "RTF" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDA" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDC" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDC3" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDC4" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDD" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDD3" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDD4" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDW" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDW3" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SDW4" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SLK" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "STC" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "STD" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "STI" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "STW" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SVG" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SVM" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SWF" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXC" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXD" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXD3" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXD5" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXI" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "SXW" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_state -msgid "State" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "TEXT" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "TIFF" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "TXT" -msgstr "" - -#. module: muk_converter -#: model:ir.ui.view,arch_db:muk_converter.view_converter_convert_form -msgid "The file has been successfully converted and can now be used.\n" -" You can download the file by clicking on the link below." -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_type -msgid "Type" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "UOP" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "UOS" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "UOT" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,type:0 -msgid "URL" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_convert_input_url -msgid "Url" -msgstr "" - -#. module: muk_converter -#: model:ir.model.fields,field_description:muk_converter.field_muk_converter_store_used_date -msgid "Used on" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "VOR" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "VOR3" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "VOR4" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "VOR5" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "WMF" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "WPS" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XHTML" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLS" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLS5" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLS95" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLSX" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLT" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLT5" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XLT95" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XPM" -msgstr "" - -#. module: muk_converter -#: selection:muk_converter.convert,format:0 -msgid "XPMBIB" -msgstr "" - -#. module: muk_converter -#: model:ir.model,name:muk_converter.model_ir_autovacuum -msgid "ir.autovacuum" -msgstr "" - -#. module: muk_converter -#: model:ir.model,name:muk_converter.model_muk_converter_convert -msgid "muk_converter.convert" -msgstr "" - diff --git a/muk_converter/models/__init__.py b/muk_converter/models/__init__.py deleted file mode 100644 index 7b5786b..0000000 --- a/muk_converter/models/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import converter -from . import store \ No newline at end of file diff --git a/muk_converter/models/converter.py b/muk_converter/models/converter.py deleted file mode 100644 index a5642d5..0000000 --- a/muk_converter/models/converter.py +++ /dev/null @@ -1,57 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import hashlib -import logging - -from odoo import api, models, fields - -from odoo.addons.muk_converter.tools import converter - -_logger = logging.getLogger(__name__) - -class Converter(models.AbstractModel): - - _name = 'muk_converter.converter' - _description = 'Converter' - - @api.model - def convert(self, filename, content, format="pdf", recompute=False): - def parse(filename, content, format): - return converter.convert(filename, content, format) - def store(checksum, filename, content, format, stored): - if not stored.exists(): - self.env['muk_converter.store'].sudo().create({ - 'checksum': checksum, - 'format': format, - 'content_fname': filename, - 'content': content}) - else: - stored.write({'used_date': fields.Datetime.now}) - checksum = hashlib.sha1(content).hexdigest() - stored = self.env['muk_converter.store'].sudo().search( - [["checksum", "=", checksum], ["format", "=", format]], limit=1) - if not recompute and stored.exists(): - return stored.content - else: - output = parse(filename, content, format) - name = "%s.%s" % (filename, format) - store(checksum, name, output, format, stored) - return output - \ No newline at end of file diff --git a/muk_converter/models/store.py b/muk_converter/models/store.py deleted file mode 100644 index ebece78..0000000 --- a/muk_converter/models/store.py +++ /dev/null @@ -1,61 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import api, models, fields - -from odoo.addons.muk_fields_lobject.fields.lobject import LargeObject - -_logger = logging.getLogger(__name__) - -class Store(models.Model): - - _name = 'muk_converter.store' - _description = 'Converter Store' - - name = fields.Char( - compute="_compute_name", - string="Name", - store=True) - - used_date = fields.Date( - string="Used on", - default=fields.Datetime.now) - - checksum = fields.Char( - string="Checksum", - required=True) - - format = fields.Char( - string="Format", - required=True) - - content_fname = fields.Char( - string="Filename", - required=True) - - content = LargeObject( - string="Data", - required=True) - - @api.depends('checksum', 'content_fname') - def _compute_name(self): - for record in self: - record.name = "%s (%s)" % (record.content_fname, record.checksum) diff --git a/muk_converter/security/ir.model.access.csv b/muk_converter/security/ir.model.access.csv deleted file mode 100644 index c5c6dc3..0000000 --- a/muk_converter/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink - -access_muk_converter_store,access_muk_converter_store,model_muk_converter_store,base.group_erp_manager,1,1,1,1 \ No newline at end of file diff --git a/muk_converter/service/__init__.py b/muk_converter/service/__init__.py deleted file mode 100644 index c91e4b8..0000000 --- a/muk_converter/service/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import unoconv diff --git a/muk_converter/service/unoconv.py b/muk_converter/service/unoconv.py deleted file mode 100644 index d452f08..0000000 --- a/muk_converter/service/unoconv.py +++ /dev/null @@ -1,156 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import io -import base64 -import shutil -import urllib -import logging -import tempfile -import mimetypes - -from subprocess import Popen -from subprocess import PIPE -from subprocess import CalledProcessError - -from contextlib import closing - -from odoo.tools import config -from odoo.tools.mimetypes import guess_mimetype - -from odoo.addons.muk_utils.tools import utils_os - -_logger = logging.getLogger(__name__) - -FORMATS = [ - "bib", "bmp", "csv", "dbf", "dif", "doc", "doc6", "doc95", "docbook", "docx", "docx7", "emf", - "eps", "fodg", "fodp", "fods", "fodt", "gif", "html", "jpg", "latex", "mediawiki", "met", "odd", - "odg", "odp", "ods", "odt", "ooxml", "otg", "otp", "ots", "ott", "pbm", "pct", "pdb", "pdf", "pgm", - "png", "pot", "potm", "ppm", "pps", "ppt", "pptx", "psw", "pwp", "pxl", "ras", "rtf", "sda", "sdc", - "sdc3", "sdc4", "sdd", "sdd3", "sdd4", "sdw", "sdw3", "sdw4", "slk", "stc", "std", "sti", "stw", - "svg", "svm", "swf", "sxc", "sxd", "sxd3", "sxd5", "sxi", "sxw", "text", "tiff", "txt", "uop", "uos", - "uot", "vor", "vor3", "vor4", "vor5", "wmf", "wps", "xhtml", "xls", "xls5", "xls95", "xlsx", "xlt", - "xlt5", "xlt95", "xpm""bib", "bmp", "csv", "dbf", "dif", "doc", "doc6", "doc95", "docbook", "docx", - "docx7", "emf", "eps", "fodg", "fodp", "fods", "fodt", "gif", "html", "jpg", "latex", "mediawiki", - "met", "odd", "odg", "odp", "ods", "odt", "ooxml", "otg", "otp", "ots", "ott", "pbm", "pct", "pdb", - "pdf", "pgm", "png", "pot", "potm", "ppm", "pps", "ppt", "pptx", "psw", "pwp", "pxl", "ras", "rtf", - "sda", "sdc", "sdc3", "sdc4", "sdd", "sdd3", "sdd4", "sdw", "sdw3", "sdw4", "slk", "stc", "std", - "sti", "stw", "svg", "svm", "swf", "sxc", "sxd", "sxd3", "sxd5", "sxi", "sxw", "text", "tiff", - "txt", "uop", "uos", "uot", "vor", "vor3", "vor4", "vor5", "wmf", "wps", "xhtml", "xls", "xls5", - "xls95", "xlsx", "xlt", "xlt5", "xlt95", "xpm" -] - -IMPORTS = [ - "bmp", "csv", "dbf", "dif", "doc", "docx", "dot", "emf", "eps", "epub", "fodg", "fodp", "fods", - "fodt", "gif", "gnm", "gnumeric", "htm", "html", "jpeg", "jpg", "met", "mml", "odb", "odf", "odg", - "odp", "ods", "odt", "pbm", "pct", "pdb", "pdf", "pgm", "png", "pot", "ppm", "pps", "ppt", "pptx", - "psw", "pxl", "ras", "rtf", "sda", "sdc", "sdd", "sdp", "sdw", "sgl", "slk", "stc", "std", "sti", - "stw", "svg", "svm", "swf", "sxc", "sxd", "sxi", "sxm", "sxw", "tif", "tiff", "txt", "uof", "uop", - "uos", "uot", "vor", "wmf", "wri", "xls", "xlsx", "xlt", "xlw", "xml", "xpm""bmp", "csv", "dbf", - "dif", "doc", "docx", "dot", "emf", "eps", "epub", "fodg", "fodp", "fods", "fodt", "gif", "gnm", - "gnumeric", "htm", "html", "jpeg", "jpg", "met", "mml", "odb", "odf", "odg", "odp", "ods", "odt", - "pbm", "pct", "pdb", "pdf", "pgm", "png", "pot", "ppm", "pps", "ppt", "pptx", "psw", "pxl", "ras", - "rtf", "sda", "sdc", "sdd", "sdp", "sdw", "sgl", "slk", "stc", "std", "sti", "stw", "svg", "svm", - "swf", "sxc", "sxd", "sxi", "sxm", "sxw", "tif", "tiff", "text", "uof", "uop", "uos", "uot", "vor", - "wmf", "wri", "xls", "xlsx", "xlt", "xlw", "xml", "xpm" -] - -def formats(): - return FORMATS - -def imports(): - return IMPORTS - -def unoconv_environ(): - env = os.environ.copy() - uno_path = config.get('uno_path', False) - if uno_path: - env['UNO_PATH'] = config['uno_path'] - return env - -def convert(input_path, output_path, doctype="document", format="pdf"): - """ - Convert a file to the given format. - - :param input_path: The path of the file to convert. - :param output_path: The path of the output where the converted file is to be saved. - :param doctype: Specify the document type (document, graphics, presentation, spreadsheet). - :param format: Specify the output format for the document. - :raises CalledProcessError: The command returned non-zero exit status 1. - :raises OSError: This exception is raised when a system function returns a system-related error. - """ - try: - env = unoconv_environ() - shell = True if os.name in ('nt', 'os2') else False - args = ['unoconv', '--format=%s' % format, '--output=%s' % output_path, input_path] - process = Popen(args, stdout=PIPE, env=env, shell=shell) - outs, errs = process.communicate() - return_code = process.wait() - if return_code: - raise CalledProcessError(return_code, args, outs, errs) - except CalledProcessError: - _logger.exception("Error while running unoconv.") - raise - except OSError: - _logger.exception("Error while running unoconv.") - raise - -def convert_binary(binary, mimetype=None, filename=None, export="binary", doctype="document", format="pdf"): - """ - Converts a binary value to the given format. - - :param binary: The binary value. - :param mimetype: The mimetype of the binary value. - :param filename: The filename of the binary value. - :param export: The output format (binary, file, base64). - :param doctype: Specify the document type (document, graphics, presentation, spreadsheet). - :param format: Specify the output format for the document. - :return: Returns the output depending on the given format. - :raises ValueError: The file extension could not be determined or the format is invalid. - """ - extension = utils_os.get_extension(binary, filename, mimetype) - if not extension: - raise ValueError("The file extension could not be determined.") - if format not in FORMATS: - raise ValueError("Invalid export format.") - if extension not in IMPORTS: - raise ValueError("Invalid import format.") - tmp_dir = tempfile.mkdtemp() - try: - tmp_wpath = os.path.join(tmp_dir, "tmpfile." + extension) - tmp_ppath = os.path.join(tmp_dir, "tmpfile." + format) - if os.name == 'nt': - tmp_wpath = tmp_wpath.replace("\\", "/") - tmp_ppath = tmp_ppath.replace("\\", "/") - with closing(open(tmp_wpath, 'wb')) as file: - file.write(binary) - convert(tmp_wpath, tmp_ppath, doctype, format) - with closing(open(tmp_ppath, 'rb')) as file: - if export == 'file': - output = io.BytesIO() - output.write(file.read()) - output.close() - return output - elif export == 'base64': - return base64.b64encode(file.read()) - else: - return file.read() - finally: - shutil.rmtree(tmp_dir) \ No newline at end of file diff --git a/muk_converter/static/description/banner.png b/muk_converter/static/description/banner.png deleted file mode 100644 index bc16e39..0000000 Binary files a/muk_converter/static/description/banner.png and /dev/null differ diff --git a/muk_converter/static/description/icon.png b/muk_converter/static/description/icon.png deleted file mode 100644 index 51e2549..0000000 Binary files a/muk_converter/static/description/icon.png and /dev/null differ diff --git a/muk_converter/static/description/index.html b/muk_converter/static/description/index.html deleted file mode 100644 index b8b7d63..0000000 --- a/muk_converter/static/description/index.html +++ /dev/null @@ -1,67 +0,0 @@ -
-
-

MuK Converter

-

Universal Converter

-

MuK IT GmbH - - www.mukit.at

-
-
- -
-
-
-

Overview

-

Technical module to provide some utility - features. The module is mainly used as a dependency by other modules - and to provide a collection of common libraries. This module has no - direct visible effect on the system. It provides functions to - convert data from one file format to another.

-
-
-
- -
-

Demo

-
-
-
User:
-
-
-
apps
-
-
-
Password:
-
-
-
demo
-
-
- -
- -
-

Help and Support

-
Feel free to - contact us, if you need any help with your Odoo integration or - addiontal features.
- - -
\ No newline at end of file diff --git a/muk_converter/static/description/logo.png b/muk_converter/static/description/logo.png deleted file mode 100644 index 9427ce3..0000000 Binary files a/muk_converter/static/description/logo.png and /dev/null differ diff --git a/muk_converter/tests/__init__.py b/muk_converter/tests/__init__.py deleted file mode 100644 index e123041..0000000 --- a/muk_converter/tests/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import test_unoconv -from . import test_converter \ No newline at end of file diff --git a/muk_converter/tests/data/sample.png b/muk_converter/tests/data/sample.png deleted file mode 100644 index acc60b2..0000000 Binary files a/muk_converter/tests/data/sample.png and /dev/null differ diff --git a/muk_converter/tests/test_converter.py b/muk_converter/tests/test_converter.py deleted file mode 100644 index f1fd914..0000000 --- a/muk_converter/tests/test_converter.py +++ /dev/null @@ -1,55 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import logging -import unittest - -from odoo.tests import common - -from odoo.addons.muk_converter.tools import converter - -_path = os.path.dirname(os.path.dirname(__file__)) -_logger = logging.getLogger(__name__) - -class ConverterTestCase(common.TransactionCase): - - def setUp(self): - super(ConverterTestCase, self).setUp() - - def tearDown(self): - super(ConverterTestCase, self).tearDown() - - def test_formats(self): - self.assertTrue(converter.formats()) - - @unittest.skipIf(os.environ.get('TRAVIS', False), "Skipped for Travis CI") - def test_convert(self): - with open(os.path.join(_path, 'tests/data', 'sample.png'), 'rb') as file: - self.assertTrue(converter.convert('sample.png', file.read(), "pdf")) - - @unittest.skipIf(os.environ.get('TRAVIS', False), "Skipped for Travis CI") - def test_convert2pdf(self): - with open(os.path.join(_path, 'tests/data', 'sample.png'), 'rb') as file: - self.assertTrue(converter.convert2pdf('sample.png', file.read())) - - @unittest.skipIf(os.environ.get('TRAVIS', False), "Skipped for Travis CI") - def test_convert2html(self): - with open(os.path.join(_path, 'tests/data', 'sample.png'), 'rb') as file: - self.assertTrue(converter.convert2html('sample.png', file.read())) \ No newline at end of file diff --git a/muk_converter/tests/test_unoconv.py b/muk_converter/tests/test_unoconv.py deleted file mode 100644 index 26e0ab1..0000000 --- a/muk_converter/tests/test_unoconv.py +++ /dev/null @@ -1,43 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import logging -import unittest - -from odoo.tests import common - -from odoo.addons.muk_converter.service import unoconv - -_path = os.path.dirname(os.path.dirname(__file__)) -_logger = logging.getLogger(__name__) - -class UnoconvTestCase(common.TransactionCase): - - def setUp(self): - super(UnoconvTestCase, self).setUp() - - def tearDown(self): - super(UnoconvTestCase, self).tearDown() - - @unittest.skipIf(os.environ.get('TRAVIS', False), "Skipped for Travis CI") - def test_convert_binary(self): - with open(os.path.join(_path, 'tests/data', 'sample.png'), 'rb') as file: - self.assertTrue(unoconv.convert_binary(file.read())) - \ No newline at end of file diff --git a/muk_converter/tools/__init__.py b/muk_converter/tools/__init__.py deleted file mode 100644 index 2450763..0000000 --- a/muk_converter/tools/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### diff --git a/muk_converter/tools/converter.py b/muk_converter/tools/converter.py deleted file mode 100644 index eed7da3..0000000 --- a/muk_converter/tools/converter.py +++ /dev/null @@ -1,45 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import tools - -from odoo.addons.muk_converter.service import unoconv - -_logger = logging.getLogger(__name__) - -def formats(): - return unoconv.formats() - -def selection_formats(): - return list(map(lambda format: (format, format.upper()), unoconv.formats())) - -def imports(): - return unoconv.imports() - -def convert(filename, content, format): - return unoconv.convert_binary(binary=content, filename=filename, format=format) - -def convert2pdf(filename, content): - return unoconv.convert_binary(binary=content, filename=filename) - -def convert2html(filename, content): - output = unoconv.convert_binary(binary=content, filename=filename, format="html") - return tools.html_sanitize(output) \ No newline at end of file diff --git a/muk_converter/views/convert.xml b/muk_converter/views/convert.xml deleted file mode 100644 index 918b1c4..0000000 --- a/muk_converter/views/convert.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - muk_converter_convert.form - muk_converter.convert - -
- - - - - - - - - - - - -
- -

Conversion Complete

-

The file has been successfully converted and can now be used. - You can download the file by clicking on the link below. -

-

- Here is the converted file: - -

-
-
-
-
-
-
-
-
- - - Convert File - ir.actions.act_window - muk_converter.convert - form - form - new - - -
diff --git a/muk_converter/wizards/__init__.py b/muk_converter/wizards/__init__.py deleted file mode 100644 index 545046e..0000000 --- a/muk_converter/wizards/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import convert \ No newline at end of file diff --git a/muk_converter/wizards/convert.py b/muk_converter/wizards/convert.py deleted file mode 100644 index 209524f..0000000 --- a/muk_converter/wizards/convert.py +++ /dev/null @@ -1,109 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import base64 -import uuid -import logging -import mimetypes - -from odoo import _, api, fields, models - -from odoo.addons.muk_utils.tools.http import get_response -from odoo.addons.muk_converter.tools import converter - -_logger = logging.getLogger(__name__) - -class ConverterWizard(models.TransientModel): - - _name = "muk_converter.convert" - - state = fields.Selection( - selection=[("export", "Export"), ("download", "Download")], - string="State", - required=True, - default="export") - - type = fields.Selection( - selection=[("url", "URL"), ("binary", "File")], - string="Type", - default="binary", - change_default=True, - states={'export': [('required', True)]}, - help="Either a binary file or an url can be converted") - - input_url = fields.Char( - string="Url") - - input_name = fields.Char( - string="Filename") - - input_binary = fields.Binary( - string="File") - - format = fields.Selection( - selection=converter.selection_formats(), - string="Format", - default="pdf", - states={'export': [('required', True)]}) - - output_name = fields.Char( - string="Filename", - readonly=True, - states={'download': [('required', True)]}) - - output_binary = fields.Binary( - string="File", - readonly=True, - states={'download': [('required', True)]}) - - @api.multi - def convert(self): - def export(record, content, filename): - name = "%s.%s" % (os.path.splitext(filename)[0], record.format) - output = record.env['muk_converter.converter'].convert(filename, content) - record.write({ - 'state': 'download', - 'output_name': name, - 'output_binary': base64.b64encode(output)}) - return { - "name": _("Convert File"), - 'type': 'ir.actions.act_window', - 'res_model': 'muk_converter.convert', - 'view_mode': 'form', - 'view_type': 'form', - 'res_id': record.id, - 'views': [(False, 'form')], - 'target': 'new', - } - record = self[0] - if record.input_url: - status, headers, content = get_response(record.input_url) - if status != 200: - raise ValueError("Failed to retrieve the file from the url.") - else: - extension = mimetypes.guess_extension(headers['content-type'])[1:].strip().lower() - if extension not in converter.imports(): - raise ValueError("Invalid import format.") - else: - return export(record, content, record.input_name or "%s.%s" % (uuid.uuid4(), extension)) - elif record.input_name and record.input_binary: - return export(record, base64.b64decode(record.input_binary), record.input_name) - else: - raise ValueError("The conversion requires either a valid url or a filename and a file.") \ No newline at end of file diff --git a/muk_fields_lobject/LICENSE b/muk_fields_lobject/LICENSE deleted file mode 100644 index faf7bf4..0000000 --- a/muk_fields_lobject/LICENSE +++ /dev/null @@ -1,619 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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 \ No newline at end of file diff --git a/muk_fields_lobject/__init__.py b/muk_fields_lobject/__init__.py deleted file mode 100644 index 38678d2..0000000 --- a/muk_fields_lobject/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import fields -from . import models -from . import controllers - -def _patch_system(): - from . import base \ No newline at end of file diff --git a/muk_fields_lobject/__manifest__.py b/muk_fields_lobject/__manifest__.py deleted file mode 100644 index ff1a7b8..0000000 --- a/muk_fields_lobject/__manifest__.py +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -{ - "name": "MuK Large Objects", - "summary": """PGSQL Large Objects Support""", - "version": '11.0.2.2.1', - "category": 'Extra Tools', - "license": "AGPL-3", - "website": "https://www.mukit.at", - "live_test_url": "https://demo.mukit.at/web/login", - "author": "MuK IT", - "contributors": [ - "Mathias Markl ", - ], - "depends": [ - "base", - ], - "qweb": [ - "static/src/xml/*.xml", - ], - "images": [ - 'static/description/banner.png' - ], - "external_dependencies": { - "python": [], - "bin": [], - }, - "auto_install": False, - "application": False, - "installable": True, - "post_load": "_patch_system", -} diff --git a/muk_fields_lobject/base/__init__.py b/muk_fields_lobject/base/__init__.py deleted file mode 100644 index 94fc962..0000000 --- a/muk_fields_lobject/base/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import fields -from . import models \ No newline at end of file diff --git a/muk_fields_lobject/base/fields.py b/muk_fields_lobject/base/fields.py deleted file mode 100644 index 121ebfb..0000000 --- a/muk_fields_lobject/base/fields.py +++ /dev/null @@ -1,24 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from odoo import fields - -from odoo.addons.muk_fields_lobject.fields.lobject import LargeObject - -fields.LargeObject = LargeObject \ No newline at end of file diff --git a/muk_fields_lobject/base/models.py b/muk_fields_lobject/base/models.py deleted file mode 100644 index 9f9b583..0000000 --- a/muk_fields_lobject/base/models.py +++ /dev/null @@ -1,41 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import models, api - -from odoo.addons.muk_utils.tools import patch - -_logger = logging.getLogger(__name__) - -@api.multi -@patch.monkey_patch_model(models.BaseModel) -def unlink(self): - oids = [] - for name in self._fields: - field = self._fields[name] - if field.type == 'lobject' and field.store: - for record in self: - oid = record.with_context({'oid': True})[name] - if oid: - oids.append(oid) - unlink.super(self) - for oid in oids: - self.env.cr._cnx.lobject(oid, 'rb').unlink() \ No newline at end of file diff --git a/muk_fields_lobject/controllers/__init__.py b/muk_fields_lobject/controllers/__init__.py deleted file mode 100644 index f872850..0000000 --- a/muk_fields_lobject/controllers/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import main diff --git a/muk_fields_lobject/controllers/main.py b/muk_fields_lobject/controllers/main.py deleted file mode 100644 index 2a09be7..0000000 --- a/muk_fields_lobject/controllers/main.py +++ /dev/null @@ -1,69 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from werkzeug import utils -from werkzeug import wrappers - -from odoo import http -from odoo.http import request - -_logger = logging.getLogger(__name__) - -def lobject_content(xmlid=None, model=None, id=None, field='content', unique=False, - filename=None, filename_field='content_fname', download=False, mimetype=None, - default_mimetype='application/octet-stream', access_token=None, env=None): - return request.registry['ir.http'].lobject_content( - xmlid=xmlid, model=model, id=id, field=field, unique=unique, filename=filename, - filename_field=filename_field, download=download, mimetype=mimetype, - default_mimetype=default_mimetype, access_token=access_token, env=env) - -class LargeObjectController(http.Controller): - - @http.route(['/web/lobject', - '/web/lobject/', - '/web/lobject//', - '/web/lobject/', - '/web/lobject//', - '/web/lobject/-', - '/web/lobject/-/', - '/web/lobject///', - '/web/lobject////'], type='http', auth="public") - def content_lobject(self, xmlid=None, model=None, id=None, field='content', - filename=None, filename_field='content_fname', unique=None, mimetype=None, - download=None, data=None, token=None, access_token=None): - - status, headers, content = lobject_content( - xmlid=xmlid, model=model, id=id, field=field, unique=unique, filename=filename, - filename_field=filename_field, download=download, mimetype=mimetype, - access_token=access_token) - if status == 304: - response = wrappers.Response(status=status, headers=headers) - elif status == 301: - return utils.redirect(content, code=301) - elif status != 200: - response = request.not_found() - else: - headers.append(('Content-Length', content.seek(0, 2))) - content.seek(0, 0) - response = wrappers.Response(content, headers=headers, status=status, direct_passthrough=True) - if token: - response.set_cookie('fileToken', token) - return response \ No newline at end of file diff --git a/muk_fields_lobject/doc/changelog.rst b/muk_fields_lobject/doc/changelog.rst deleted file mode 100644 index 8466ee4..0000000 --- a/muk_fields_lobject/doc/changelog.rst +++ /dev/null @@ -1,22 +0,0 @@ -`2.2.0` -------- - -- Monkey Patch Methods - -`2.1.0` -------- - -- Added XML View Support - -`2.0.0` -------- - -- Migrated to Python 3 -- Can handle Base64 input -- Can return value as Base64 -- Can return value as Checksum - -`1.0.0` -------- - -- Init version diff --git a/muk_fields_lobject/doc/index.rst b/muk_fields_lobject/doc/index.rst deleted file mode 100644 index f0110ba..0000000 --- a/muk_fields_lobject/doc/index.rst +++ /dev/null @@ -1,127 +0,0 @@ -======================= -MuK Large Objects Field -======================= - -PostgreSQL offers support for large objects, which provide stream-style access -to user data that is stored in a special large-object structure. They are useful -with data values too large to be manipulated conveniently as a whole. - -Psycopg allows access to the large object using the `lobject` class. Objects are -generated using the `connection.lobject()` factory method. Data can be retrieved -either as bytes or as Unicode strings. - -Psycopg large object support efficient import/export with file system files using -the `lo_import()` and `lo_export()` libpq functions. - -Changed in version 2.6: added support for large objects greated than 2GB. Note -that the support is enabled only if all the following conditions are verified: - -* the Python build is 64 bits; -* the extension was built against at least libpq 9.3; -* the server version is at least PostgreSQL 9.3 (server_version must be >= 90300). - -If Psycopg was built with 64 bits large objects support (i.e. the first two -contidions above are verified), the `psycopg2.__version__` constant will contain -the lo64 flag. If any of the contition is not met several lobject methods will -fail if the arguments exceed 2GB. - -Installation -============ - -To install this module, you need to: - -Download the module and add it to your Odoo addons folder. Afterward, log on to -your Odoo server and go to the Apps menu. Trigger the debug mode and update the -list by clicking on the "Update Apps List" link. Now install the module by -clicking on the install button. - -Another way to install this module is via the package management for Python -(`PyPI `_). - -To install our modules using the package manager make sure -`odoo-autodiscover `_ is installed -correctly. Then open a console and install the module by entering the following -command: - -``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -The module name consists of the Odoo version and the module name, where -underscores are replaced by a dash. - -**Module:** - -``odoo-addon-`` - -**Example:** - -``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` - -Once the installation has been successfully completed, the app is already in the -correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the -debug mode and update the list by clicking on the "Update Apps List" link. Now -install the module by clicking on the install button. - -The biggest advantage of this variant is that you can now also update the app -using the "pip" command. To do this, enter the following command in your console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo. The steps are the same as for the installation only the button has changed -from "Install" to "Upgrade". - -You can also view available Apps directly in our `repository `_ -and find a more detailed installation guide on our `website `_. - -For modules licensed under OPL-1, you will receive access data when you purchase -the module. If the modules were not purchased directly from -`MuK IT `_ please contact our support (support@mukit.at) -with a confirmation of purchase to receive the corresponding access data. - -Upgrade -============ - -To upgrade this module, you need to: - -Download the module and add it to your Odoo addons folder. Restart the server -and log on to your Odoo server. Select the Apps menu and upgrade the module by -clicking on the upgrade button. - -If you installed the module using the "pip" command, you can also update the -module in the same way. Just type the following command into the console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo, just like you would normally. - -Configuration -============= - -No additional configuration is needed to use this module. - -Usage -============= - -This module has no direct visible effect on the system. It adds a new field type, -which can be used in other modules. - -Credits -======= - -Contributors ------------- - -* Mathias Markl - -Author & Maintainer -------------------- - -This module is maintained by the `MuK IT GmbH `_. - -MuK IT is an Austrian company specialized in customizing and extending Odoo. -We develop custom solutions for your individual needs to help you focus on -your strength and expertise to grow your business. - -If you want to get in touch please contact us via mail -(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/muk_fields_lobject/fields/__init__.py b/muk_fields_lobject/fields/__init__.py deleted file mode 100644 index 031eb0e..0000000 --- a/muk_fields_lobject/fields/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ - ################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import lobject diff --git a/muk_fields_lobject/fields/lobject.py b/muk_fields_lobject/fields/lobject.py deleted file mode 100644 index 7695570..0000000 --- a/muk_fields_lobject/fields/lobject.py +++ /dev/null @@ -1,101 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import base64 -import hashlib -import logging -import binascii -import tempfile - -from odoo import fields -from odoo.tools import human_size - -_logger = logging.getLogger(__name__) - -class LargeObject(fields.Field): - - type = 'lobject' - column_type = ('oid', 'oid') - _slots = { - 'prefetch': False, - 'context_dependent': True, - } - - def convert_to_column(self, value, record, values=None): - oid = record.with_context({'oid': True})[self.name] - if oid: - record.env.cr._cnx.lobject(oid, 'rb').unlink() - if not value: - return None - lobject = record.env.cr._cnx.lobject(0, 'wb') - if isinstance(value, bytes): - try: - if base64.b64encode(base64.b64decode(value)) == value: - lobject.write(base64.b64decode(value)) - else: - lobject.write(value) - except binascii.Error: - lobject.write(value) - elif isinstance(value, str): - lobject.write(base64.b64decode(value.encode('ascii'))) - else: - while True: - chunk = value.read(4096) - if not chunk: - break - lobject.write(chunk) - return lobject.oid - - def convert_to_record(self, value, record): - if value and isinstance(value, int): - lobject = record.env.cr._cnx.lobject(value, 'rb') - if record._context.get('human_size'): - return human_size(lobject.seek(0, 2)) - elif record._context.get('bin_size'): - return lobject.seek(0, 2) - elif record._context.get('oid'): - return lobject.oid - elif record._context.get('base64'): - return base64.b64encode(lobject.read()) - elif record._context.get('stream'): - file = tempfile.TemporaryFile() - while True: - chunk = lobject.read(4096) - if not chunk: - file.seek(0) - return file - file.write(chunk) - elif record._context.get('checksum'): - checksum = hashlib.md5() - while True: - chunk = lobject.read(4096) - if not chunk: - return checksum.hexdigest() - checksum.update(chunk) - else: - return lobject.read() - return value - - def convert_to_export(self, value, record): - if value: - lobject = record.env.cr._cnx.lobject(value, 'rb') - if record._context.get('export_raw_data'): - return lobject.read() - return base64.b64encode(lobject.read()) - return '' \ No newline at end of file diff --git a/muk_fields_lobject/i18n/de.po b/muk_fields_lobject/i18n/de.po deleted file mode 100644 index 518abef..0000000 --- a/muk_fields_lobject/i18n/de.po +++ /dev/null @@ -1,16 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-22 07:53+0000\n" -"PO-Revision-Date: 2018-01-22 07:53+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - diff --git a/muk_fields_lobject/i18n/muk_fields_lobject.pot b/muk_fields_lobject/i18n/muk_fields_lobject.pot deleted file mode 100644 index 518abef..0000000 --- a/muk_fields_lobject/i18n/muk_fields_lobject.pot +++ /dev/null @@ -1,16 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-22 07:53+0000\n" -"PO-Revision-Date: 2018-01-22 07:53+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - diff --git a/muk_fields_lobject/models/__init__.py b/muk_fields_lobject/models/__init__.py deleted file mode 100644 index 471635d..0000000 --- a/muk_fields_lobject/models/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ - ################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import ir_http -from . import ir_model_fields diff --git a/muk_fields_lobject/models/ir_http.py b/muk_fields_lobject/models/ir_http.py deleted file mode 100644 index 927117d..0000000 --- a/muk_fields_lobject/models/ir_http.py +++ /dev/null @@ -1,69 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging -import mimetypes - -from odoo import models -from odoo.http import request, STATIC_CACHE -from odoo.exceptions import AccessError - -_logger = logging.getLogger(__name__) - -class LargeObjectControllerIrHttp(models.AbstractModel): - - _inherit = 'ir.http' - - @classmethod - def lobject_content(cls, xmlid=None, model=None, id=None, field='content', unique=False, - filename=None, filename_field='content_fname', download=False, mimetype=None, - default_mimetype='application/octet-stream', access_token=None, env=None): - obj = None - env = env or request.env - if xmlid: - obj = env.ref(xmlid, False) - elif id and model in env.registry: - obj = env[model].browse(int(id)) - if not obj or not obj.exists() or field not in obj: - return (404, [], None) - try: - last_update = obj['__last_update'] - except AccessError: - return (403, [], None) - status, headers, content = None, [], None - content = obj.with_context({'stream': True})[field] or b'' - if not filename: - if filename_field in obj: - filename = obj[filename_field] - else: - filename = "%s-%s-%s" % (obj._name, obj.id, field) - mimetype = 'mimetype' in obj and obj.mimetype or False - if not mimetype and filename: - mimetype = mimetypes.guess_type(filename)[0] - if not mimetype: - mimetype = default_mimetype - headers += [('Content-Type', mimetype), ('X-Content-Type-Options', 'nosniff')] - etag = bool(request) and request.httprequest.headers.get('If-None-Match') - retag = '"%s"' % obj.with_context({'checksum': True})[field] if content else "" - status = status or (304 if etag == retag else 200) - headers.append(('ETag', retag)) - headers.append(('Cache-Control', 'max-age=%s' % (STATIC_CACHE if unique else 0))) - if download: - headers.append(('Content-Disposition', cls.content_disposition(filename))) - return (status, headers, content) \ No newline at end of file diff --git a/muk_fields_lobject/models/ir_model_fields.py b/muk_fields_lobject/models/ir_model_fields.py deleted file mode 100644 index eacd9be..0000000 --- a/muk_fields_lobject/models/ir_model_fields.py +++ /dev/null @@ -1,27 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from odoo import _, api, models, fields -from odoo.exceptions import ValidationError - -class IrModelField(models.Model): - - _inherit = 'ir.model.fields' - - ttype = fields.Selection(selection_add=[('lobject', 'lobject')]) \ No newline at end of file diff --git a/muk_fields_lobject/static/description/banner.png b/muk_fields_lobject/static/description/banner.png deleted file mode 100644 index 6a008b7..0000000 Binary files a/muk_fields_lobject/static/description/banner.png and /dev/null differ diff --git a/muk_fields_lobject/static/description/icon.png b/muk_fields_lobject/static/description/icon.png deleted file mode 100644 index d5301c7..0000000 Binary files a/muk_fields_lobject/static/description/icon.png and /dev/null differ diff --git a/muk_fields_lobject/static/description/index.html b/muk_fields_lobject/static/description/index.html deleted file mode 100644 index 46d8ecc..0000000 --- a/muk_fields_lobject/static/description/index.html +++ /dev/null @@ -1,120 +0,0 @@ -
-
-

MuK PGSQL Large Objects

-

PGSQL Large Objects Support

-

MuK IT GmbH - - www.mukit.at

-
-
- -
-
-
-

Overview

-
-

Provides a field to store bytes as PostgreSQL large objects. - PostgreSQL offers support for large objects, which provide - stream-style access to user data that is stored in a special - large-object structure. They are useful with data values too large - to be manipulated conveniently as a whole.

-
Psycopg2 for Python
-

- Psycopg allows access to the large object using the - lobject - class. Objects are generated using the - connection.lobject() - factory method. Data can be retrieved either as bytes or as Unicode - strings. -

-

- Psycopg large object support efficient import/export with file - system files using the - lo_import() - and - lo_export() - libpq functions. -

-

Changed in version 2.6: added support for large objects - greated than 2GB. Note that the support is enabled only if all the - following conditions are verified:

-
    -
  • the Python build is 64 bits;
  • -
  • the extension was built against at least libpq 9.3;
  • -
  • the server version is at least PostgreSQL 9.3 - (server_version must be >= 90300).
  • -
-

- If Psycopg was built with 64 bits large objects support (i.e. the - first two contidions above are verified), the - psycopg2.__version__ - constant will contain the lo64 flag. If any of the contition is not - met several lobject methods will fail if the arguments exceed 2GB. -

-
- -
-		    	
-from odoo.addons.muk_fields_lobject.fields.lobject import LargeObject
-
-class LargeObjectModel(models.Model):
-
-    data_content = LargeObject(string="Data")
-
-    @api.multi
-    def data(self):
-        for record in self:
-            bytes = record.data_content
-            oid = record.with_context({'oid': True}).data_content
-            size = record.with_context({'bin_size': True}).data_content
-            stream = record.with_context({'stream': True}).data_content
-		    	
-			
-
-
-
- -
-

Demo

-
-
-
User:
-
-
-
apps
-
-
-
Password:
-
-
-
demo
-
-
- -
- -
-

Help and Support

-
Feel free to - contact us, if you need any help with your Odoo integration or addiontal - features.
- - -
\ No newline at end of file diff --git a/muk_fields_lobject/static/description/logo.png b/muk_fields_lobject/static/description/logo.png deleted file mode 100644 index 9427ce3..0000000 Binary files a/muk_fields_lobject/static/description/logo.png and /dev/null differ diff --git a/muk_fields_lobject/tests/__init__.py b/muk_fields_lobject/tests/__init__.py deleted file mode 100644 index 609d308..0000000 --- a/muk_fields_lobject/tests/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import test_lobject diff --git a/muk_fields_lobject/tests/test_lobject.py b/muk_fields_lobject/tests/test_lobject.py deleted file mode 100644 index c500a48..0000000 --- a/muk_fields_lobject/tests/test_lobject.py +++ /dev/null @@ -1,40 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import logging - -from odoo.tests import common - -from odoo.addons.muk_fields_lobject.fields.lobject import LargeObject - -_path = os.path.dirname(os.path.dirname(__file__)) -_logger = logging.getLogger(__name__) - -class LargeObjectTestCase(common.TransactionCase): - - def setUp(self): - super(LargeObjectTestCase, self).setUp() - - def tearDown(self): - super(LargeObjectTestCase, self).tearDown() - - def test_import(self): - self.assertEqual(LargeObject.type, "lobject") - \ No newline at end of file diff --git a/muk_models_groupby_hour/LICENSE b/muk_models_groupby_hour/LICENSE deleted file mode 100644 index faf7bf4..0000000 --- a/muk_models_groupby_hour/LICENSE +++ /dev/null @@ -1,619 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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 \ No newline at end of file diff --git a/muk_models_groupby_hour/__init__.py b/muk_models_groupby_hour/__init__.py deleted file mode 100644 index a62c730..0000000 --- a/muk_models_groupby_hour/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -def _patch_system(): - from . import base \ No newline at end of file diff --git a/muk_models_groupby_hour/__manifest__.py b/muk_models_groupby_hour/__manifest__.py deleted file mode 100644 index 52dd92e..0000000 --- a/muk_models_groupby_hour/__manifest__.py +++ /dev/null @@ -1,50 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -{ - "name": "MuK Groupby Hour", - "summary": """Group records by hour""", - "version": '11.0.2.0.1', - "category": 'Extra Tools', - "license": "AGPL-3", - "website": "http://www.mukit.at", - "author": "MuK IT", - "contributors": [ - "Mathias Markl ", - ], - "depends": [ - "muk_utils", - ], - "data": [ - ], - "qweb": [ - "static/src/xml/*.xml", - ], - "images": [ - 'static/description/banner.png' - ], - "external_dependencies": { - "python": [], - "bin": [], - }, - "auto_install": False, - "application": False, - "installable": True, - "post_load": "_patch_system", -} \ No newline at end of file diff --git a/muk_models_groupby_hour/base/__init__.py b/muk_models_groupby_hour/base/__init__.py deleted file mode 100644 index bb5b74e..0000000 --- a/muk_models_groupby_hour/base/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import models \ No newline at end of file diff --git a/muk_models_groupby_hour/base/models.py b/muk_models_groupby_hour/base/models.py deleted file mode 100644 index 45c5bc5..0000000 --- a/muk_models_groupby_hour/base/models.py +++ /dev/null @@ -1,59 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import re -import pytz -import hashlib -import logging -import psycopg2 -import dateutil - -from odoo import _ -from odoo import models, api, fields -from odoo.tools import ustr, pycompat, human_size - -from odoo.addons.muk_utils.tools import patch - -_logger = logging.getLogger(__name__) - -@api.model -@patch.monkey_patch_model(models.BaseModel) -def _read_group_process_groupby(self, gb, query): - split = gb.split(':') - field_type = self._fields[split[0]].type - gb_function = split[1] if len(split) == 2 else None - temporal = field_type in ('date', 'datetime') - tz_convert = field_type == 'datetime' and self._context.get('tz') in pytz.all_timezones - qualified_field = self._inherits_join_calc(self._table, split[0], query) - if temporal and gb_function in ['hour']: - if tz_convert: - qualified_field = "timezone('%s', timezone('UTC',%s))" % (self._context.get('tz', 'UTC'), qualified_field) - qualified_field = "date_trunc('%s', %s)" % (gb_function or 'month', qualified_field) - if field_type == 'boolean': - qualified_field = "coalesce(%s,false)" % qualified_field - return { - 'field': split[0], - 'groupby': gb, - 'type': field_type, - 'display_format': 'hh:00 dd MMM', - 'interval': dateutil.relativedelta.relativedelta(hours=1), - 'tz_convert': tz_convert, - 'qualified_field': qualified_field - } - return _read_group_process_groupby.super(self, gb, query) \ No newline at end of file diff --git a/muk_models_groupby_hour/doc/changelog.rst b/muk_models_groupby_hour/doc/changelog.rst deleted file mode 100644 index f2ae21c..0000000 --- a/muk_models_groupby_hour/doc/changelog.rst +++ /dev/null @@ -1,9 +0,0 @@ -`2.0.0` -------- - -- Migrated to Python 3 - -`1.0.0` -------- - -- Init version diff --git a/muk_models_groupby_hour/doc/index.rst b/muk_models_groupby_hour/doc/index.rst deleted file mode 100644 index 110b7e8..0000000 --- a/muk_models_groupby_hour/doc/index.rst +++ /dev/null @@ -1,118 +0,0 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - -.. image:: https://gitlab.mukit.at/base/muk_models_groupby_hour/badges/11.0/pipeline.svg - :target: https://gitlab.mukit.at/base/muk_models_groupby_hour/commits/11.0 - :alt: Pipeline status - -.. image:: https://gitlab.mukit.at/base/muk_models_groupby_hour/badges/11.0/coverage.svg - :target: https://gitlab.mukit.at/base/muk_models_groupby_hour/commits/11.0 - :alt: Coverage report - -================ -MuK Groupby Hour -================ - -Technical module to provide some utility features to enable group by hour. This -module has no direct effect on the running system. - -Installation -============ - -To install this module, you need to: - -Download the module and add it to your Odoo addons folder. Afterward, log on to -your Odoo server and go to the Apps menu. Trigger the debug mode and update the -list by clicking on the "Update Apps List" link. Now install the module by -clicking on the install button. - -Another way to install this module is via the package management for Python -(`PyPI `_). - -To install our modules using the package manager make sure -`odoo-autodiscover `_ is installed -correctly. Then open a console and install the module by entering the following -command: - -``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -The module name consists of the Odoo version and the module name, where -underscores are replaced by a dash. - -**Module:** - -``odoo-addon-`` - -**Example:** - -``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` - -Once the installation has been successfully completed, the app is already in the -correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the -debug mode and update the list by clicking on the "Update Apps List" link. Now -install the module by clicking on the install button. - -The biggest advantage of this variant is that you can now also update the app -using the "pip" command. To do this, enter the following command in your console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo. The steps are the same as for the installation only the button has changed -from "Install" to "Upgrade". - -You can also view available Apps directly in our `repository `_ -and find a more detailed installation guide on our `website `_. - -For modules licensed under OPL-1, you will receive access data when you purchase -the module. If the modules were not purchased directly from -`MuK IT `_ please contact our support (support@mukit.at) -with a confirmation of purchase to receive the corresponding access data. - -Upgrade -============ - -To upgrade this module, you need to: - -Download the module and add it to your Odoo addons folder. Restart the server -and log on to your Odoo server. Select the Apps menu and upgrade the module by -clicking on the upgrade button. - -If you installed the module using the "pip" command, you can also update the -module in the same way. Just type the following command into the console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo, just like you would normally. - -Configuration -============= - -No additional configuration is needed to use this module. - -Usage -============= - -This module has no direct visible effect on the system. It provide utility features. - -Credits -======= - -Contributors ------------- - -* Mathias Markl - -Author & Maintainer -------------------- - -This module is maintained by the `MuK IT GmbH `_. - -MuK IT is an Austrian company specialized in customizing and extending Odoo. -We develop custom solutions for your individual needs to help you focus on -your strength and expertise to grow your business. - -If you want to get in touch please contact us via mail -(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/muk_models_groupby_hour/i18n/de.po b/muk_models_groupby_hour/i18n/de.po deleted file mode 100644 index 6351218..0000000 --- a/muk_models_groupby_hour/i18n/de.po +++ /dev/null @@ -1,16 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-22 07:51+0000\n" -"PO-Revision-Date: 2018-01-22 07:51+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - diff --git a/muk_models_groupby_hour/i18n/muk_models_groupby_hour.pot b/muk_models_groupby_hour/i18n/muk_models_groupby_hour.pot deleted file mode 100644 index 85fd792..0000000 --- a/muk_models_groupby_hour/i18n/muk_models_groupby_hour.pot +++ /dev/null @@ -1,16 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-22 07:50+0000\n" -"PO-Revision-Date: 2018-01-22 07:50+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - diff --git a/muk_models_groupby_hour/static/description/banner.png b/muk_models_groupby_hour/static/description/banner.png deleted file mode 100644 index 13758a7..0000000 Binary files a/muk_models_groupby_hour/static/description/banner.png and /dev/null differ diff --git a/muk_models_groupby_hour/static/description/icon.png b/muk_models_groupby_hour/static/description/icon.png deleted file mode 100644 index 3300c62..0000000 Binary files a/muk_models_groupby_hour/static/description/icon.png and /dev/null differ diff --git a/muk_models_groupby_hour/static/description/index.html b/muk_models_groupby_hour/static/description/index.html deleted file mode 100644 index 94ec278..0000000 --- a/muk_models_groupby_hour/static/description/index.html +++ /dev/null @@ -1,83 +0,0 @@ -
-
-

MuK Groupby Hour

-

Group records by hour

-

MuK IT GmbH - - www.mukit.at

-
-
- -
-
-
-

Overview

-
-

- Allow records to be grouped by hour. Similar to the already - existing options ( - day, week, month, quarter, year - ). Just add the paramerter - groupby='date:hour' - like shown below. -

-
-
-		    	
-@api.multi
-def sales_per_hour(self):
-	daily_sales = self.env['sale.report'].read_group(
-		domain=[],
-		fields=['date', 'price_subtotal'],
-		groupby='date:hour')
-	return daily_sales
-		    	
-			
-
-
-
- -
-

Demo

-
-
-
User:
-
-
-
apps
-
-
-
Password:
-
-
-
demo
-
-
- -
- -
-

Help and Support

-
Feel free to - contact us, if you need any help with your Odoo integration or addiontal - features.
- - -
\ No newline at end of file diff --git a/muk_models_groupby_hour/static/description/logo.png b/muk_models_groupby_hour/static/description/logo.png deleted file mode 100644 index 9427ce3..0000000 Binary files a/muk_models_groupby_hour/static/description/logo.png and /dev/null differ diff --git a/muk_models_groupby_hour/tests/__init__.py b/muk_models_groupby_hour/tests/__init__.py deleted file mode 100644 index 1f0f16b..0000000 --- a/muk_models_groupby_hour/tests/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import test_groupby \ No newline at end of file diff --git a/muk_models_groupby_hour/tests/test_groupby.py b/muk_models_groupby_hour/tests/test_groupby.py deleted file mode 100644 index 5adf0a7..0000000 --- a/muk_models_groupby_hour/tests/test_groupby.py +++ /dev/null @@ -1,53 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import json -import base64 -import logging -import unittest -import requests - -import odoo -from odoo import _ -from odoo.tests import common - -_logger = logging.getLogger(__name__) - -class AttachmentTestCase(common.TransactionCase): - - at_install = False - post_install = True - - def setUp(self): - super(AttachmentTestCase, self).setUp() - self.attachment = self.env['ir.attachment'].sudo() - - def tearDown(self): - super(AttachmentTestCase, self).tearDown() - - def test_groupy(self): - result = self.attachment.read_group( - domain=[], - fields=['name', 'create_date'], - groupby='create_date:hour') - self.assertTrue(result) - \ No newline at end of file diff --git a/muk_security/LICENSE b/muk_security/LICENSE deleted file mode 100644 index faf7bf4..0000000 --- a/muk_security/LICENSE +++ /dev/null @@ -1,619 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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 \ No newline at end of file diff --git a/muk_security/__init__.py b/muk_security/__init__.py deleted file mode 100644 index ba31b8c..0000000 --- a/muk_security/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import models - -def _patch_system(): - from . import base \ No newline at end of file diff --git a/muk_security/__manifest__.py b/muk_security/__manifest__.py deleted file mode 100644 index aa961f3..0000000 --- a/muk_security/__manifest__.py +++ /dev/null @@ -1,57 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -{ - "name": "MuK Security", - "summary": """Security Features""", - "version": "11.0.1.1.1", - "category": "Extra Tools", - "license": "AGPL-3", - "website": "http://www.mukit.at", - "live_test_url": "https://demo.mukit.at/web/login", - "author": "MuK IT", - "contributors": [ - "Mathias Markl ", - ], - "depends": [ - "muk_utils", - "muk_autovacuum", - ], - "data": [ - "security/security.xml", - "security/ir.model.access.csv", - "views/lock.xml", - "views/groups.xml", - "data/autovacuum.xml", - ], - "qweb": [ - "static/src/xml/*.xml", - ], - "images": [ - 'static/description/banner.png' - ], - "external_dependencies": { - "python": [], - "bin": [], - }, - "auto_install": True, - "application": False, - "installable": True, - "post_load": "_patch_system", -} \ No newline at end of file diff --git a/muk_security/base/__init__.py b/muk_security/base/__init__.py deleted file mode 100644 index cb2ac54..0000000 --- a/muk_security/base/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import api -from . import models \ No newline at end of file diff --git a/muk_security/base/api.py b/muk_security/base/api.py deleted file mode 100644 index acd9848..0000000 --- a/muk_security/base/api.py +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import models, api, SUPERUSER_ID - -from odoo.addons.muk_utils.tools import patch -from odoo.addons.muk_security.tools import helper - -_logger = logging.getLogger(__name__) - -@api.model -@patch.monkey_patch(api.Environment) -def __call__(self, cr=None, user=None, context=None): - env = __call__.super(self, cr, user, context) - if user and isinstance(user, helper.NoSecurityUid): - env.uid = user - return env - return env \ No newline at end of file diff --git a/muk_security/base/models.py b/muk_security/base/models.py deleted file mode 100644 index ab20304..0000000 --- a/muk_security/base/models.py +++ /dev/null @@ -1,40 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import models, api, SUPERUSER_ID - -from odoo.addons.muk_utils.tools import patch -from odoo.addons.muk_security.tools import helper - -_logger = logging.getLogger(__name__) - -@api.model -def suspend_security(self, user=None): - return self.sudo(user=helper.NoSecurityUid(user or self.env.uid)) - -models.BaseModel.suspend_security = suspend_security - -@api.model -@patch.monkey_patch_model(models.BaseModel) -def check_field_access_rights(self, operation, fields): - if isinstance(self.env.uid, helper.NoSecurityUid): - return fields or list(self._fields) - return check_field_access_rights.super(self, operation, fields) \ No newline at end of file diff --git a/muk_security/data/autovacuum.xml b/muk_security/data/autovacuum.xml deleted file mode 100644 index 0c6f26e..0000000 --- a/muk_security/data/autovacuum.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - Cleans up locks that have not been removed correctly - code - - -locks = env['muk_security.lock'] -for lock in model.search([]): - if not lock.lock_ref: - locks |= lock -locks.unlink() - - - - \ No newline at end of file diff --git a/muk_security/doc/changelog.rst b/muk_security/doc/changelog.rst deleted file mode 100644 index 5a60853..0000000 --- a/muk_security/doc/changelog.rst +++ /dev/null @@ -1,9 +0,0 @@ -`1.1.0` -------- - -- Updated dependencies - -`1.0.0` -------- - -- Init version diff --git a/muk_security/doc/index.rst b/muk_security/doc/index.rst deleted file mode 100644 index 69e6ab4..0000000 --- a/muk_security/doc/index.rst +++ /dev/null @@ -1,106 +0,0 @@ -============ -MuK Security -============ - -Technical module to provide some utility and security features that can be used -in other applications. This module has no direct effect on the running system. - -Installation -============ - -To install this module, you need to: - -Download the module and add it to your Odoo addons folder. Afterward, log on to -your Odoo server and go to the Apps menu. Trigger the debug mode and update the -list by clicking on the "Update Apps List" link. Now install the module by -clicking on the install button. - -Another way to install this module is via the package management for Python -(`PyPI `_). - -To install our modules using the package manager make sure -`odoo-autodiscover `_ is installed -correctly. Then open a console and install the module by entering the following -command: - -``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -The module name consists of the Odoo version and the module name, where -underscores are replaced by a dash. - -**Module:** - -``odoo-addon-`` - -**Example:** - -``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` - -Once the installation has been successfully completed, the app is already in the -correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the -debug mode and update the list by clicking on the "Update Apps List" link. Now -install the module by clicking on the install button. - -The biggest advantage of this variant is that you can now also update the app -using the "pip" command. To do this, enter the following command in your console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo. The steps are the same as for the installation only the button has changed -from "Install" to "Upgrade". - -You can also view available Apps directly in our `repository `_ -and find a more detailed installation guide on our `website `_. - -For modules licensed under OPL-1, you will receive access data when you purchase -the module. If the modules were not purchased directly from -`MuK IT `_ please contact our support (support@mukit.at) -with a confirmation of purchase to receive the corresponding access data. - -Upgrade -============ - -To upgrade this module, you need to: - -Download the module and add it to your Odoo addons folder. Restart the server -and log on to your Odoo server. Select the Apps menu and upgrade the module by -clicking on the upgrade button. - -If you installed the module using the "pip" command, you can also update the -module in the same way. Just type the following command into the console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo, just like you would normally. - -Configuration -============= - -No additional configuration is needed to use this module. - -Usage -============= - -This module has no direct visible effect on the system. It provide security features. - -Credits -======= - -Contributors ------------- - -* Mathias Markl - -Author & Maintainer -------------------- - -This module is maintained by the `MuK IT GmbH `_. - -MuK IT is an Austrian company specialized in customizing and extending Odoo. -We develop custom solutions for your individual needs to help you focus on -your strength and expertise to grow your business. - -If you want to get in touch please contact us via mail -(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/muk_security/models/__init__.py b/muk_security/models/__init__.py deleted file mode 100644 index 5354471..0000000 --- a/muk_security/models/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import lock -from . import locking -from . import access -from . import access_groups -from . import security_groups -from . import res_groups -from . import res_users -from . import ir_rule -from . import ir_model_access diff --git a/muk_security/models/access.py b/muk_security/models/access.py deleted file mode 100644 index 192324a..0000000 --- a/muk_security/models/access.py +++ /dev/null @@ -1,136 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import _ -from odoo import models, api, fields -from odoo.exceptions import AccessError - -_logger = logging.getLogger(__name__) - -class BaseModelAccess(models.AbstractModel): - - _name = 'muk_security.access' - _description = "MuK Access Model" - _inherit = 'muk_utils.model' - - #---------------------------------------------------------- - # Database - #---------------------------------------------------------- - - permission_read = fields.Boolean( - compute='_compute_permissions', - search='_search_permission_read', - string="Read Access") - - permission_create = fields.Boolean( - compute='_compute_permissions', - search='_search_permission_create', - string="Create Access") - - permission_write = fields.Boolean( - compute='_compute_permissions', - search='_search_permission_write', - string="Write Access") - - permission_unlink = fields.Boolean( - compute='_compute_permissions', - search='_search_permission_unlink', - string="Delete Access") - - #---------------------------------------------------------- - # Function - #---------------------------------------------------------- - - @api.model - def check_access_rights(self, operation, raise_exception=True): - return super(BaseModelAccess, self).check_access_rights(operation, raise_exception) - - @api.multi - def check_access_rule(self, operation): - return super(BaseModelAccess, self).check_access_rule(operation) - - @api.model - def _apply_ir_rules(self, query, mode='read'): - return super(BaseModelAccess, self)._apply_ir_rules(query, mode) - - @api.model - def check_field_access_rights(self, operation, fields): - return super(BaseModelAccess, self).check_field_access_rights(operation, fields) - - @api.multi - def check_access(self, operation, raise_exception=False): - try: - access_right = self.check_access_rights(operation, raise_exception) - access_rule = self.check_access_rule(operation) == None - access = access_right and access_rule - if not access and raise_exception: - raise AccessError(_("This operation is forbidden!")) - return access - except AccessError: - if raise_exception: - raise AccessError(_("This operation is forbidden!")) - return False - - #---------------------------------------------------------- - # Search - #---------------------------------------------------------- - - @api.model - def _search_permission_read(self, operator, operand): - records = self.search([]).filtered(lambda r: r.check_access('read') == True) - if operator == '=' and operand: - return [('id', 'in', records.mapped('id'))] - return [('id', 'not in', records.mapped('id'))] - - @api.model - def _search_permission_create(self, operator, operand): - records = self.search([]).filtered(lambda r: r.check_access('create') == True) - if operator == '=' and operand: - return [('id', 'in', records.mapped('id'))] - return [('id', 'not in', records.mapped('id'))] - - @api.model - def _search_permission_write(self, operator, operand): - records = self.search([]).filtered(lambda r: r.check_access('write') == True) - if operator == '=' and operand: - return [('id', 'in', records.mapped('id'))] - return [('id', 'not in', records.mapped('id'))] - - @api.model - def _search_permission_unlink(self, operator, operand): - records = self.search([]).filtered(lambda r: r.check_access('unlink') == True) - if operator == '=' and operand: - return [('id', 'in', records.mapped('id'))] - return [('id', 'not in', records.mapped('id'))] - - #---------------------------------------------------------- - # Read, View - #---------------------------------------------------------- - - @api.multi - def _compute_permissions(self): - for record in self: - record.update({ - 'permission_read': record.check_access('read'), - 'permission_create': record.check_access('create'), - 'permission_write': record.check_access('write'), - 'permission_unlink': record.check_access('unlink'), - }) \ No newline at end of file diff --git a/muk_security/models/access_groups.py b/muk_security/models/access_groups.py deleted file mode 100644 index 2951f98..0000000 --- a/muk_security/models/access_groups.py +++ /dev/null @@ -1,308 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import _, SUPERUSER_ID -from odoo import models, api, fields -from odoo.exceptions import AccessError - -from odoo.addons.muk_security.tools import helper - -_logger = logging.getLogger(__name__) - -class BaseModelAccessGroups(models.AbstractModel): - - _name = 'muk_security.access_groups' - _description = "MuK Access Groups Model" - _inherit = 'muk_security.access' - - # Set it to True to enforced security even if no group has been set - _strict_security = False - - # If set the group fields are restricted by the access group - _field_groups = None - - # If set the suspend fields are restricted by the access group - _suspend_groups = None - - #---------------------------------------------------------- - # Datebase - #---------------------------------------------------------- - - @api.model - def _add_magic_fields(self): - super(BaseModelAccessGroups, self)._add_magic_fields() - def add(name, field): - if name not in self._fields: - self._add_field(name, field) - base, model = self._name.split(".") - add('suspend_security_read', fields.Boolean( - _module=base, - string="Suspend Security for Read", - automatic=True, - default=False, - groups=self._suspend_groups)) - add('suspend_security_create', fields.Boolean( - _module=base, - string="Suspend Security for Create", - automatic=True, - default=False, - groups=self._suspend_groups)) - add('suspend_security_write', fields.Boolean( - _module=base, - string="Suspend Security for Write", - automatic=True, - default=False, - groups=self._suspend_groups)) - add('suspend_security_unlink', fields.Boolean( - _module=base, - string="Suspend Security for Unlink", - automatic=True, - default=False, - groups=self._suspend_groups)) - add('groups', fields.Many2many( - _module=base, - comodel_name='muk_security.groups', - relation='muk_groups_%s_rel' % model, - column1='aid', - column2='gid', - string="Groups", - automatic=True, - groups=self._field_groups)) - add('complete_groups', fields.Many2many( - _module=base, - comodel_name='muk_security.groups', - relation='muk_groups_complete_%s_rel' % model, - column1='aid', - column2='gid', - string="Complete Groups", - compute='_compute_groups', - store=True, - automatic=True, - groups=self._field_groups)) - - #---------------------------------------------------------- - # Function - #---------------------------------------------------------- - - @api.multi - def trigger_computation(self, fields, *largs, **kwargs): - super(BaseModelAccessGroups, self).trigger_computation(fields, *largs, **kwargs) - if "complete_groups" in fields: - self.suspend_security()._compute_groups() - - @api.model - def check_group_values(self, values): - if any(field in values for field in ['groups']): - return True - return False - - @api.multi - @api.returns('muk_security.groups') - def get_groups(self): - self.ensure_one() - groups = self.env['muk_security.groups'] - groups |= self.groups - return groups - - @api.model - def _get_no_access_ids(self): - base, model = self._name.split(".") - if not self._strict_security: - sql = ''' - SELECT id - FROM %s a - WHERE NOT EXISTS ( - SELECT * - FROM muk_groups_complete_%s_rel r - WHERE r.aid = a.id - ); - ''' % (self._table, model) - self.env.cr.execute(sql) - fetch = self.env.cr.fetchall() - return len(fetch) > 0 and list(map(lambda x: x[0], fetch)) or [] - else: - return [] - - @api.model - def _get_suspended_access_ids(self, operation): - base, model = self._name.split(".") - sql = ''' - SELECT id - FROM %s a - WHERE a.suspend_security_%s = true - ''' % (self._table, operation) - self.env.cr.execute(sql) - fetch = self.env.cr.fetchall() - return len(fetch) > 0 and list(map(lambda x: x[0], fetch)) or [] - - @api.model - def _get_access_ids(self): - base, model = self._name.split(".") - sql = ''' - SELECT r.aid - FROM muk_groups_complete_%s_rel r - JOIN muk_security_groups g ON r.gid = g.id - JOIN muk_security_groups_users_rel u ON r.gid = u.gid - WHERE u.uid = %s AND g.perm_read = true - ''' % (model, self.env.user.id) - self.env.cr.execute(sql) - fetch = self.env.cr.fetchall() - access_ids = len(fetch) > 0 and list(map(lambda x: x[0], fetch)) or [] - return access_ids - - @api.model - def _get_ids_without_security(self, operation): - no_access_ids = self._get_no_access_ids() - suspended_access_ids = self._get_suspended_access_ids(operation) - return list(set(no_access_ids).union(suspended_access_ids)) - - @api.model - def _get_complete_access_ids(self, operation): - access_ids = self._get_access_ids() - no_access_ids = self._get_no_access_ids() - suspended_access_ids = self._get_suspended_access_ids(operation) - return list(set(access_ids).union(no_access_ids, suspended_access_ids)) - - @api.multi - def _eval_access_skip(self, operation): - if isinstance(self.env.uid, helper.NoSecurityUid): - return True - return False - - @api.multi - def check_access_groups(self, operation): - if self.env.user.id == SUPERUSER_ID or self._eval_access_skip(operation): - return None - base, model = self._name.split(".") - filter_ids = self._get_ids_without_security(operation) - for record in self.filtered(lambda rec: rec.id not in filter_ids): - sql = ''' - SELECT perm_%s - FROM muk_groups_complete_%s_rel r - JOIN muk_security_groups g ON g.id = r.gid - JOIN muk_security_groups_users_rel u ON u.gid = g.id - WHERE r.aid = %s AND u.uid = %s - ''' % (operation, model, record.id, self.env.user.id) - self.env.cr.execute(sql) - fetch = self.env.cr.fetchall() - if not any(list(map(lambda x: x[0], fetch))): - raise AccessError(_("This operation is forbidden!")) - - @api.multi - def check_access(self, operation, raise_exception=False): - res = super(BaseModelAccessGroups, self).check_access(operation, raise_exception) - try: - access_groups = self.check_access_groups(operation) == None - access = res and access_groups - if not access and raise_exception: - raise AccessError(_("This operation is forbidden!")) - return access - except AccessError: - if raise_exception: - raise AccessError(_("This operation is forbidden!")) - return False - - #---------------------------------------------------------- - # Read - #---------------------------------------------------------- - - @api.multi - def _after_read(self, result, *largs, **kwargs): - result = super(BaseModelAccessGroups, self)._after_read(result) - if self.env.user.id == SUPERUSER_ID or self._eval_access_skip("read"): - return result - access_ids = self._get_complete_access_ids("read") - result = [result] if not isinstance(result, list) else result - if len(access_ids) > 0: - access_result = [] - for record in result: - if record['id'] in access_ids: - access_result.append(record) - return access_result - return [] - - @api.model - def _after_search(self, result, *largs, **kwargs): - result = super(BaseModelAccessGroups, self)._after_search(result) - if self.env.user.id == SUPERUSER_ID or self._eval_access_skip("read"): - return result - access_ids = self._get_complete_access_ids("read") - if len(access_ids) > 0: - access_result = self.env[self._name] - if isinstance(result, int): - if result in access_ids: - return result - else: - for record in result: - if record.id in access_ids: - access_result += record - return access_result - return self.env[self._name] - - @api.model - def _after_name_search(self, result, *largs, **kwargs): - result = super(BaseModelAccessGroups, self)._after_name_search(result) - if self.env.user.id == SUPERUSER_ID or self._eval_access_skip("read"): - return result - access_ids = self._get_complete_access_ids("read") - if len(access_ids) > 0: - access_result = [] - for tuple in result: - if tuple[0] in access_ids: - access_result.append(tuple) - return access_result - return [] - - #---------------------------------------------------------- - # Read, View - #---------------------------------------------------------- - - @api.multi - def _compute_groups(self, write=True): - if write: - for record in self: - record.complete_groups = record.get_groups() - else: - self.ensure_one() - return {'complete_groups': [(6, 0, self.get_groups().mapped('id'))]} - - #---------------------------------------------------------- - # Create, Update, Delete - #---------------------------------------------------------- - - @api.multi - def _before_write(self, vals, *largs, **kwargs): - self.check_access_groups('write') - return super(BaseModelAccessGroups, self)._before_write(vals, *largs, **kwargs) - - @api.multi - def _before_unlink(self, *largs, **kwargs): - self.check_access_groups('unlink') - return super(BaseModelAccessGroups, self)._before_unlink(*largs, **kwargs) - - @api.multi - def _check_recomputation(self, vals, olds, *largs, **kwargs): - super(BaseModelAccessGroups, self)._check_recomputation(vals, olds, *largs, **kwargs) - fields = [] - if self.check_group_values(vals): - fields.extend(['complete_groups']) - if fields: - self.trigger_computation(fields) diff --git a/muk_security/models/ir_model_access.py b/muk_security/models/ir_model_access.py deleted file mode 100644 index a8dad25..0000000 --- a/muk_security/models/ir_model_access.py +++ /dev/null @@ -1,39 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import api, fields, models -from odoo import tools, _ -from odoo.exceptions import ValidationError - -from odoo.addons.muk_security.tools import helper - -_logger = logging.getLogger(__name__) - -class ExtendedIrModelAccess(models.Model): - - _inherit = 'ir.model.access' - - @api.model - @tools.ormcache_context('self._uid', 'model', 'mode', 'raise_exception', keys=('lang',)) - def check(self, model, mode='read', raise_exception=True): - if isinstance(self.env.uid, helper.NoSecurityUid): - return True - return super(ExtendedIrModelAccess, self).check(model, mode=mode, raise_exception=raise_exception) \ No newline at end of file diff --git a/muk_security/models/ir_rule.py b/muk_security/models/ir_rule.py deleted file mode 100644 index 9acc3eb..0000000 --- a/muk_security/models/ir_rule.py +++ /dev/null @@ -1,39 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import api, fields, models -from odoo import tools, _ -from odoo.exceptions import ValidationError - -from odoo.addons.muk_security.tools import helper - -_logger = logging.getLogger(__name__) - -class ExtendedIrRule(models.Model): - - _inherit = 'ir.rule' - - @api.model - @tools.ormcache('self._uid', 'model_name', 'mode') - def _compute_domain(self, model_name, mode="read"): - if isinstance(self.env.uid, helper.NoSecurityUid): - return None - return super(ExtendedIrRule, self)._compute_domain(model_name, mode=mode) \ No newline at end of file diff --git a/muk_security/models/lock.py b/muk_security/models/lock.py deleted file mode 100644 index 3b79f1d..0000000 --- a/muk_security/models/lock.py +++ /dev/null @@ -1,72 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import models, api, fields - -_logger = logging.getLogger(__name__) - -class Lock(models.Model): - - _name = 'muk_security.lock' - _description = "Lock" - - name = fields.Char( - compute='_compute_lock_ref_data', - string="Name", - store=True) - - locked_by = fields.Char( - string="Locked by", - required=True) - - locked_by_ref = fields.Many2one( - comodel_name='res.users', - string="Locked by") - - lock_ref = fields.Reference( - selection=[], - string="Reference", - required=True) - - lock_ref_model = fields.Char( - compute='_compute_lock_ref_data', - string="Reference Model", - store=True) - - lock_ref_id = fields.Char( - compute='_compute_lock_ref_data', - string="Reference ID", - store=True) - - token = fields.Char( - string="Token") - - operation = fields.Char( - string="Operation") - - @api.depends('lock_ref') - def _compute_lock_ref_data(self): - for record in self: - record.update({ - 'name': "Lock for " + str(record.lock_ref.display_name), - 'lock_ref_model': record.lock_ref._name, - 'lock_ref_id': record.lock_ref.id}) - \ No newline at end of file diff --git a/muk_security/models/locking.py b/muk_security/models/locking.py deleted file mode 100644 index 03cc3a3..0000000 --- a/muk_security/models/locking.py +++ /dev/null @@ -1,251 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import hashlib -import logging -import itertools - -from odoo import _ -from odoo import models, api, fields -from odoo.exceptions import AccessError - -_logger = logging.getLogger(__name__) - -class BaseModelLocking(models.AbstractModel): - - _name = 'muk_security.locking' - _description = 'MuK Locking Model' - _inherit = 'muk_utils.model' - - #---------------------------------------------------------- - # Database - #---------------------------------------------------------- - - locked = fields.Many2one( - comodel_name='muk_security.lock', - compute='_compute_lock', - string="Locked") - - locked_state = fields.Boolean( - compute='_compute_lock', - string="Locked") - - locked_by = fields.Many2one( - related='locked.locked_by_ref', - comodel_name='res.users', - string="Locked by") - - editor = fields.Boolean( - compute='_compute_editor', - string="Editor") - - #---------------------------------------------------------- - # Functions - #---------------------------------------------------------- - - @api.model - def generate_operation_key(self): - return hashlib.sha1(os.urandom(128)).hexdigest() - - #---------------------------------------------------------- - # Locking - #---------------------------------------------------------- - - @api.multi - def lock(self, user=None, operation=None, *largs, **kwargs): - result = [] - for record in self: - lock = record.is_locked() - if lock and lock.operation and lock.operation == operation: - result.append({ - 'record': record, - 'lock': lock, - 'token': lock.token}) - elif lock and ((lock.operation and lock.operation != operation) or not lock.operation): - raise AccessError(_("The record (%s[%s]) is locked, so it can't be locked again.") % - (record._name, record.id)) - else: - token = hashlib.sha1(os.urandom(128)).hexdigest() - lock = self.env['muk_security.lock'].sudo().create({ - 'locked_by': user and user.name or "System", - 'locked_by_ref': user and user.id or None, - 'lock_ref': record._name + ',' + str(record.id), - 'token': token, - 'operation': operation}) - result.append({ - 'record': record, - 'lock': lock, - 'token': token}) - return result - - @api.multi - def unlock(self, *largs, **kwargs): - for record in self: - locks = self.env['muk_security.lock'].sudo().search( - [('lock_ref', '=', "%s,%s" % (record._name, str(record.id)))]) - locks.sudo().unlink() - return True - - @api.model - def unlock_operation(self, operation, *largs, **kwargs): - locks = self.env['muk_security.lock'].sudo().search([('operation', '=', operation)]) - references = [ - list((k, list(map(lambda rec: rec.lock_ref_id, v)))) - for k, v in itertools.groupby( - locks.sorted(key=lambda rec: rec.lock_ref_model), - lambda rec: rec.lock_ref_model)] - locks.sudo().unlink() - return references - - @api.multi - def is_locked(self, *largs, **kwargs): - self.ensure_one() - lock = self.env['muk_security.lock'].sudo().search( - [('lock_ref', '=', self._name + ',' + str(self.id))], limit=1) - if lock.id: - return lock - return False - - @api.multi - def is_locked_by(self, *largs, **kwargs): - self.ensure_one() - lock = self.env['muk_security.lock'].sudo().search( - [('lock_ref', '=', self._name + ',' + str(self.id))], limit=1) - if lock.id: - return lock.locked_by_ref - return False - - @api.multi - def _checking_lock_user(self, *largs, **kwargs): - for record in self: - lock = record.is_locked() - if lock and lock.locked_by_ref and not lock.locked_by_ref.id != self.env.user.id: - raise AccessError(_("The record (%s[%s]) is locked by a user, so it can't be changes or deleted.") % - (self._name, self.id)) - - @api.multi - def _checking_lock(self, operation=None, *largs, **kwargs): - self._checking_lock_user() - for record in self: - lock = record.is_locked() - if lock and lock.operation and lock.operation != operation: - print(operation, lock.operation) - raise IOError - raise AccessError(_("The record (%s[%s]) is locked, so it can't be changes or deleted.") % - (self._name, self.id)) - - @api.multi - def user_lock(self, *largs, **kwargs): - self.ensure_one() - lock = self.is_locked() - if lock: - if lock.locked_by_ref: - raise AccessError(_("The record is already locked by another user. (%s)") % lock.locked_by_ref.name) - else: - raise AccessError(_("The record is already locked.")) - return self.lock(user=self.env.user) - - @api.multi - def user_unlock(self, *largs, **kwargs): - self.ensure_one() - lock = self.is_locked() - if lock: - if lock.locked_by_ref and lock.locked_by_ref.id == self.env.user.id: - self.unlock() - else: - if lock.locked_by_ref: - raise AccessError(_("The record is already locked by another user. (%s)") % lock.locked_by_ref.name) - else: - raise AccessError(_("The record is already locked.")) - return True - - #---------------------------------------------------------- - # Read, View - #---------------------------------------------------------- - - @api.multi - def _compute_lock(self): - for record in self: - locked = record.is_locked() - record.update({ - 'locked_state': bool(locked), - 'locked': locked}) - - @api.depends('locked') - def _compute_editor(self): - for record in self: - record.editor = record.is_locked_by() == record.env.user - - #---------------------------------------------------------- - # Create, Update, Delete - #---------------------------------------------------------- - - @api.multi - def write(self, vals): - operation = self.generate_operation_key() - vals = self._before_write_operation(vals, operation) - process_operation = self.env.context['operation'] if 'operation' in self.env.context else operation - result = super(BaseModelLocking, self.with_context(operation=process_operation)).write(vals) - for record in self: - record._after_write_record_operation(vals, operation) - result = self._after_write_operation(result, vals, operation) - return result - - @api.multi - def _before_write_operation(self, vals, operation, *largs, **kwargs): - if 'operation' in self.env.context: - self._checking_lock(self.env.context['operation']) - else: - self._checking_lock(operation) - return vals - - @api.multi - def _after_write_record_operation(self, vals, operation, *largs, **kwargs): - return vals - - @api.multi - def _after_write_operation(self, result, vals, operation, *largs, **kwargs): - return result - - @api.multi - def unlink(self): - operation = self.generate_operation_key() - self._before_unlink_operation(operation) - for record in self: - record._before_unlink_record_operation(operation) - process_operation = self.env.context['operation'] if 'operation' in self.env.context else operation - result = super(BaseModelLocking, self.with_context(operation=process_operation)).unlink() - self._after_unlink_operation(result, operation) - return result - - @api.multi - def _before_unlink_operation(self, operation, *largs, **kwargs): - if 'operation' in self.env.context: - self._checking_lock(self.env.context['operation']) - else: - self._checking_lock(operation) - - @api.multi - def _before_unlink_record_operation(self, operation, *largs, **kwargs): - pass - - @api.multi - def _after_unlink_operation(self, result, operation, *largs, **kwargs): - pass \ No newline at end of file diff --git a/muk_security/models/res_groups.py b/muk_security/models/res_groups.py deleted file mode 100644 index 64d0b1c..0000000 --- a/muk_security/models/res_groups.py +++ /dev/null @@ -1,41 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import api, fields, models -from odoo import tools, _ -from odoo.exceptions import ValidationError - -_logger = logging.getLogger(__name__) - -class AccessGroups(models.Model): - - _inherit = "res.groups" - - #---------------------------------------------------------- - # Database - #---------------------------------------------------------- - - security_groups = fields.Many2many( - comodel_name='muk_security.groups', - relation='muk_security_groups_groups_rel', - column1='rid', - column2='gid', - string='Groups') \ No newline at end of file diff --git a/muk_security/models/res_users.py b/muk_security/models/res_users.py deleted file mode 100644 index 516dddd..0000000 --- a/muk_security/models/res_users.py +++ /dev/null @@ -1,57 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import api, fields, models -from odoo import tools, _ -from odoo.exceptions import ValidationError - -from odoo.addons.base.res import res_users - -from odoo.addons.muk_security.tools import helper - -_logger = logging.getLogger(__name__) - -class AccessUser(models.Model): - - _inherit = 'res.users' - - #---------------------------------------------------------- - # Database - #---------------------------------------------------------- - - security_groups = fields.Many2many( - comodel_name='muk_security.groups', - relation='muk_security_groups_explicit_users_rel', - column1='uid', - column2='gid', - string='Groups', - readonly=True) - - #---------------------------------------------------------- - # Functions - #---------------------------------------------------------- - - @classmethod - def _browse(cls, ids, env, prefetch=None): - return super(AccessUser, cls)._browse([ - id if not isinstance(id, helper.NoSecurityUid) - else super(helper.NoSecurityUid, id).__int__() - for id in ids], env, prefetch=prefetch) \ No newline at end of file diff --git a/muk_security/models/security_groups.py b/muk_security/models/security_groups.py deleted file mode 100644 index 39f3909..0000000 --- a/muk_security/models/security_groups.py +++ /dev/null @@ -1,43 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from odoo import models, fields, api - -class AccessGroups(models.Model): - - _name = 'muk_security.groups' - _description = "Access Groups" - _inherit = 'muk_utils.groups' - - #---------------------------------------------------------- - # Database - #---------------------------------------------------------- - - perm_read = fields.Boolean( - string='Read Access') - - perm_create = fields.Boolean( - string='Create Access') - - perm_write = fields.Boolean( - string='Write Access') - - perm_unlink = fields.Boolean( - string='Unlink Access') - \ No newline at end of file diff --git a/muk_security/security/ir.model.access.csv b/muk_security/security/ir.model.access.csv deleted file mode 100644 index b550356..0000000 --- a/muk_security/security/ir.model.access.csv +++ /dev/null @@ -1,5 +0,0 @@ -id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink - -access_security_groups_user,security_groups_user,model_muk_security_groups,base.group_user,1,1,1,1 - -access_security_lock_admin,security_lock_admin,model_muk_security_lock,base.group_erp_manager,1,0,0,1 \ No newline at end of file diff --git a/muk_security/security/security.xml b/muk_security/security/security.xml deleted file mode 100644 index 13798f6..0000000 --- a/muk_security/security/security.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - User can only edit and delete their own groups. - - - - - - - [('create_uid','=',user.id)] - - - - Admins can edit and delete all groups. - - - - - - - [(1 ,'=', 1)] - - - - diff --git a/muk_security/static/description/banner.png b/muk_security/static/description/banner.png deleted file mode 100644 index a73ca83..0000000 Binary files a/muk_security/static/description/banner.png and /dev/null differ diff --git a/muk_security/static/description/icon.png b/muk_security/static/description/icon.png deleted file mode 100644 index 7513912..0000000 Binary files a/muk_security/static/description/icon.png and /dev/null differ diff --git a/muk_security/static/description/index.html b/muk_security/static/description/index.html deleted file mode 100644 index 7a536ac..0000000 --- a/muk_security/static/description/index.html +++ /dev/null @@ -1,65 +0,0 @@ -
-
-

MuK Security

-

Utility Features

-

MuK IT GmbH - - www.mukit.at

-
-
- -
-
-
-

Overview

-

Technical module to provide some utility and - security features. The module is mainly used as a dependency by - other modules and has no direct visible effect on the system.

-
-
-
- -
-

Demo

-
-
-
User:
-
-
-
apps
-
-
-
Password:
-
-
-
demo
-
-
- -
- -
-

Help and Support

-
Feel free to - contact us, if you need any help with your Odoo integration or - addiontal features.
- - -
\ No newline at end of file diff --git a/muk_security/static/description/logo.png b/muk_security/static/description/logo.png deleted file mode 100644 index 9427ce3..0000000 Binary files a/muk_security/static/description/logo.png and /dev/null differ diff --git a/muk_security/tests/__init__.py b/muk_security/tests/__init__.py deleted file mode 100644 index cb6eb81..0000000 --- a/muk_security/tests/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import test_suspend_security \ No newline at end of file diff --git a/muk_security/tests/test_suspend_security.py b/muk_security/tests/test_suspend_security.py deleted file mode 100644 index 7a40283..0000000 --- a/muk_security/tests/test_suspend_security.py +++ /dev/null @@ -1,50 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import base64 -import logging - -from odoo import exceptions -from odoo.tests import common - -_path = os.path.dirname(os.path.dirname(__file__)) -_logger = logging.getLogger(__name__) - -class SuspendSecurityTestCase(common.TransactionCase): - - at_install = False - post_install = True - - def setUp(self): - super(SuspendSecurityTestCase, self).setUp() - - def tearDown(self): - super(SuspendSecurityTestCase, self).tearDown() - - def test_suspend_security(self): - user_id = self.env.ref('base.user_demo').id - with self.assertRaises(exceptions.AccessError): - self.env.ref('base.user_root').sudo(user_id).name = 'test' - self.env.ref('base.user_root').sudo(user_id).suspend_security().name = 'test' - self.assertEqual(self.env.ref('base.user_root').name, 'test') - self.assertEqual(self.env.ref('base.user_root').write_uid.id, user_id) - - def test_normalize(self): - self.env['res.users'].browse(self.env['res.users'].suspend_security().env.uid) \ No newline at end of file diff --git a/muk_security/tools/__init__.py b/muk_security/tools/__init__.py deleted file mode 100644 index efc0a9b..0000000 --- a/muk_security/tools/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import helper \ No newline at end of file diff --git a/muk_security/tools/helper.py b/muk_security/tools/helper.py deleted file mode 100644 index 1a7fe2f..0000000 --- a/muk_security/tools/helper.py +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################### -# -# MuK Document Management System -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -class NoSecurityUid(int): - - def __int__(self): - return self - - def __eq__(self, other): - if isinstance(other, int): - return False - return super(NoSecurityUid, self).__int__() == other - - def __iter__(self): - yield super(NoSecurityUid, self).__int__() - - def __hash__(self): - return super(NoSecurityUid, self).__hash__() \ No newline at end of file diff --git a/muk_security/views/groups.xml b/muk_security/views/groups.xml deleted file mode 100644 index 672f48e..0000000 --- a/muk_security/views/groups.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - muk_security_groups.tree - muk_security.groups - - - - - - - - - - - - - - muk_security_groups.form - muk_security.groups - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - - Access Groups - muk_security.groups - tree,form - - - - -
\ No newline at end of file diff --git a/muk_security/views/lock.xml b/muk_security/views/lock.xml deleted file mode 100644 index 3742271..0000000 --- a/muk_security/views/lock.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - muk_security_lock.tree - muk_security.lock - - - - - - - - - - - - - Record Locks - muk_security.lock - tree - - - - - \ No newline at end of file diff --git a/muk_thumbnails/LICENSE b/muk_thumbnails/LICENSE deleted file mode 100644 index faf7bf4..0000000 --- a/muk_thumbnails/LICENSE +++ /dev/null @@ -1,619 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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 \ No newline at end of file diff --git a/muk_thumbnails/__init__.py b/muk_thumbnails/__init__.py deleted file mode 100644 index 01d7964..0000000 --- a/muk_thumbnails/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import service -from . import tools \ No newline at end of file diff --git a/muk_thumbnails/__manifest__.py b/muk_thumbnails/__manifest__.py deleted file mode 100644 index 6da16e1..0000000 --- a/muk_thumbnails/__manifest__.py +++ /dev/null @@ -1,53 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -{ - "name": 'MuK Thumbnails', - "summary": """File Thumbnails""", - "version": '11.0.1.0.2', - "category": 'Document Management', - "license": "AGPL-3", - "website": "http://www.mukit.at", - "author": "MuK IT", - "contributors": [ - "Mathias Markl ", - ], - "depends": [ - "muk_converter", - ], - "data": [ - ], - "demo": [ - ], - "qweb": [ - "static/src/xml/*.xml", - ], - "images": [ - 'static/description/banner.png' - ], - "external_dependencies": { - "python": [ - "wand", - "moviepy", - ], - "bin": [], - }, - "application": False, - "installable": True, -} diff --git a/muk_thumbnails/doc/changelog.rst b/muk_thumbnails/doc/changelog.rst deleted file mode 100644 index 9ee2b48..0000000 --- a/muk_thumbnails/doc/changelog.rst +++ /dev/null @@ -1,4 +0,0 @@ -`1.0.0` -------- - -- Init version diff --git a/muk_thumbnails/doc/index.rst b/muk_thumbnails/doc/index.rst deleted file mode 100644 index 7392ab2..0000000 --- a/muk_thumbnails/doc/index.rst +++ /dev/null @@ -1,178 +0,0 @@ -============== -MuK Thumbnails -============== - -Technical module to provide some utility features and libraries that can be used -in other applications. This module has no direct effect on the running system. - -Requirements -============= - -Unoconv -------------- - -Universal Office Converter (unoconv) is a command line tool to convert any -document format that LibreOffice can import to any document format that -LibreOffice can export. It makes use of the LibreOffice's UNO bindings for -non-interactive conversion of documents. - -To install unoconv please follow the instructions (`here `_). - -Make sure that unoconv can be executed from the console and the conversion -is done correctly. - -To set an individual path for the LibreOffice installation, the config -variable ``uno_path`` can be set accordingly in the Odoo config. - -Under Windows you should rename the ``unoconv`` file to ``unoconv.py`` and set -the corresponding path for the ``uno_path`` variable. Since it does not work -reliably with the environment variable ``UNO_PATH``. - -FFmpeg -------------- - -FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. - -To install FFmpeg please follow the instructions (`here `_). - -Ghostscript -------------- - -Ghostscript is a suite of software based on an interpreter for Adobe Systems PostScript and -Portable Document Format (PDF) page description languages. Its main purposes are the -rasterization or rendering of such page description language files, for the display or printing -of document pages, and the conversion between PostScript and PDF files. - -To install Ghostscript please follow the instructions (`here `_). - -ImageMagick -------------- - -ImageMagick can be used to create, edit, compose, or convert bitmap images. It can read and write -images in a variety of formats (over 200) including PNG, JPEG, GIF, HEIC, TIFF, DPX, EXR, WebP, -Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and -transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, -ellipses and Bezier curves. - -To install ImageMagick please follow the instructions (`here `_). - -Wand -------------- - -Wand is a ctypes-based simple ImageMagick binding for Python. It is used to interact with ImageMagick via a Python interface. - -To install Wand please follow the instructions (`here `_). - -Imageio -------------- - -Imageio is a Python library that provides an easy interface to read and write a wide range of image data, including animated images, volumetric data, and scientific formats. - -To install Imageio please follow the instructions (`here `_). - -MoviePy -------------- - -MoviePy is a Python module for video editing, which can be used for basic operations (like cuts, concatenations, title insertions), video compositing (a.k.a. non-linear editing), video processing, or to create advanced effects. It can read and write the most common video formats, including GIF. - -To install MoviePy please follow the instructions (`here `_). - -Installation -============ - -To install this module, you need to: - -Download the module and add it to your Odoo addons folder. Afterward, log on to -your Odoo server and go to the Apps menu. Trigger the debug mode and update the -list by clicking on the "Update Apps List" link. Now install the module by -clicking on the install button. - -Another way to install this module is via the package management for Python -(`PyPI `_). - -To install our modules using the package manager make sure -`odoo-autodiscover `_ is installed -correctly. Then open a console and install the module by entering the following -command: - -``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -The module name consists of the Odoo version and the module name, where -underscores are replaced by a dash. - -**Module:** - -``odoo-addon-`` - -**Example:** - -``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` - -Once the installation has been successfully completed, the app is already in the -correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the -debug mode and update the list by clicking on the "Update Apps List" link. Now -install the module by clicking on the install button. - -The biggest advantage of this variant is that you can now also update the app -using the "pip" command. To do this, enter the following command in your console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo. The steps are the same as for the installation only the button has changed -from "Install" to "Upgrade". - -You can also view available Apps directly in our `repository `_ -and find a more detailed installation guide on our `website `_. - -For modules licensed under OPL-1, you will receive access data when you purchase -the module. If the modules were not purchased directly from -`MuK IT `_ please contact our support (support@mukit.at) -with a confirmation of purchase to receive the corresponding access data. - -Upgrade -============ - -To upgrade this module, you need to: - -Download the module and add it to your Odoo addons folder. Restart the server -and log on to your Odoo server. Select the Apps menu and upgrade the module by -clicking on the upgrade button. - -If you installed the module using the "pip" command, you can also update the -module in the same way. Just type the following command into the console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo, just like you would normally. - -Configuration -============= - -No additional configuration is needed to use this module. - -Usage -============= - -This module has no direct visible effect on the system. It provide utility features. - -Credits -======= - -Contributors ------------- - -* Mathias Markl - -Author & Maintainer -------------------- - -This module is maintained by the `MuK IT GmbH `_. - -MuK IT is an Austrian company specialized in customizing and extending Odoo. -We develop custom solutions for your individual needs to help you focus on -your strength and expertise to grow your business. - -If you want to get in touch please contact us via mail -(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/muk_thumbnails/service/__init__.py b/muk_thumbnails/service/__init__.py deleted file mode 100644 index 81ff585..0000000 --- a/muk_thumbnails/service/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import thumbnail \ No newline at end of file diff --git a/muk_thumbnails/service/thumbnail.py b/muk_thumbnails/service/thumbnail.py deleted file mode 100644 index dcdda3f..0000000 --- a/muk_thumbnails/service/thumbnail.py +++ /dev/null @@ -1,211 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import io -import sys -import PyPDF2 -import base64 -import shutil -import urllib -import logging -import tempfile -import mimetypes - -from contextlib import closing - -from odoo.tools import config -from odoo.tools.mimetypes import guess_mimetype - -from odoo.addons.muk_utils.tools import utils_os -from odoo.addons.muk_converter.service import unoconv - -_logger = logging.getLogger(__name__) - -try: - from wand.image import Image - from wand.color import Color -except ImportError: - Image = False - Color = False - _logger.warn('Cannot `import wand`.') - -try: - import imageio -except ImportError: - imageio = False - _logger.warn('Cannot `import imageio`.') - -try: - from moviepy.editor import VideoFileClip -except ImportError: - VideoFileClip = False - _logger.warn('Cannot `import moviepy`.') - -FORMATS = [ - "png", "jpg", "jepg" -] - -VIDEO_IMPORTS = [ - "mp4", "mov", "wav", "avi", "mpg", "flv", "wmv", "webm" -] - -PDF_IMPORTS = [ - "pdf" -] - -WAND_IMPORTS = [ - "aai", "art", "arw", "avi", "avs", "bpg", "brf", "cals", "cgm", "cin", "cip", "cmyk", "cmyka", "svg", - "cr2", "crw", "cur", "cut", "dcm", "dcr", "dcx", "dds", "dib", "djvu", "dng", "dot", "dpx", "tim", - "emf", "epdf", "epi", "eps", "eps2", "eps3", "epsf", "epsi", "ept", "exr", "fax", "fig", "fits", - "fpx", "gplt", "gray", "graya", "hdr", "hdr", "heic", "hpgl", "hrz", "html", "ico", "info", "ttf", - "inline", "isobrl", "isobrl6", "jbig", "jng", "jp2", "jpt", "j2c", "j2k", "jxr", "json", "man", "bmp", - "mat", "miff", "mono", "mng", "m2v", "mpeg", "mpc", "mpr", "mrw", "msl", "mtv", "mvg", "nef", "yuv", - "orf", "otb", "p7", "palm", "pam", "clipboard", "pbm", "pcd", "pcds", "pcl", "pcx", "pdb", "jpe", - "pef", "pes", "pfa", "pfb", "pfm", "pgm", "picon", "pict", "pix", "png8", "png00", "png24", "tiff", - "png32", "png48", "png64", "pnm", "ppm", "ps", "ps2", "ps3", "psb", "psd", "ptif", "pwp", "rad", - "raf", "rgb", "rgba", "rgf", "rla", "rle", "sct", "sfw", "sgi", "shtml", "sid", " mrsid", "jpeg", - "sparse-color", "sun", "tga", "ubrl", "ubrl6", "uyvy", "vicar", "viff", "wbmp", "jpg", "png", "uil", - "wdp", "webp", "wmf", "wpg", "x", "xbm", "xcf", "xpm", "xwd", "x3f", "ycbcr", "ycbcra", "bmp3", "bmp2", -] - -def formats(): - return FORMATS - -def imports(): - return VIDEO_IMPORTS + PDF_IMPORTS + WAND_IMPORTS + unoconv.IMPORTS - -def create_thumbnail(binary, mimetype=None, filename=None, export="binary", format="png", page=0, frame=0, - animation=False, video_resize={'width': 256}, image_resize='256x256>', image_crop=None): - """ - Converts a thumbnail for a given file. - - :param binary: The binary value. - :param mimetype: The mimetype of the binary value. - :param filename: The filename of the binary value. - :param export: The output format (binary, file, base64). - :param format: Specify the output format for the document. - :param page: Specifies the page if the file has several pages, e.g. if it is a PDF file. - :param frame: Specifies the frame if the file has several frames, e.g. if it is a video file. - :param animation: In this case, the parameter frame specifies the number of frames. - :param video_resize: Specify to resize the output image. - :param image_resize: Specify to resize the output image. - :param image_crop: Specify to crop the output image. - :return: Returns the output depending on the given format. - :raises ValueError: The file extension could not be determined or the format is invalid. - """ - extension = utils_os.get_extension(binary, filename, mimetype) - if not extension: - raise ValueError("The file extension could not be determined.") - if format not in FORMATS: - raise ValueError("Invalid export format.") - if extension not in (VIDEO_IMPORTS + PDF_IMPORTS + WAND_IMPORTS + unoconv.IMPORTS): - raise ValueError("Invalid import format.") - if not imageio or not Image or not VideoFileClip: - raise ValueError("Some libraries couldn't be imported.") - image_data = None - image_extension = extension - if extension in WAND_IMPORTS: - image_data = binary - elif not image_data and (extension in PDF_IMPORTS or extension in unoconv.IMPORTS): - pdf_data = binary if extension in PDF_IMPORTS else None - if not pdf_data: - image_extension = "pdf" - pdf_data = unoconv.convert_binary(binary, mimetype, filename) - reader = PyPDF2.PdfFileReader(io.BytesIO(pdf_data)) - writer = PyPDF2.PdfFileWriter() - if reader.getNumPages() >= page: - writer.addPage(reader.getPage(page)) - else: - writer.addPage(reader.getPage(0)) - pdf_bytes = io.BytesIO() - writer.write(pdf_bytes) - image_data = pdf_bytes.getvalue() - if image_data: - with Image(blob=image_data, format=image_extension) as thumbnail: - thumbnail.format = format - if image_extension == "pdf": - thumbnail.background_color = Color('white') - thumbnail.alpha_channel = 'remove' - if image_resize: - thumbnail.transform(resize=image_resize) - if image_crop: - thumbnail.transform(crop=image_crop) - if export == 'file': - return io.BytesIO(thumbnail.make_blob()) - elif export == 'base64': - return base64.b64encode(thumbnail.make_blob()) - else: - return thumbnail.make_blob() - elif extension in VIDEO_IMPORTS: - tmp_dir = tempfile.mkdtemp() - try: - tmp_wpath = os.path.join(tmp_dir, "tmpfile.%s" % extension) - if os.name == 'nt': - tmp_wpath = tmp_wpath.replace("\\", "/") - with closing(open(tmp_wpath, 'wb')) as file: - file.write(binary) - clip = VideoFileClip(tmp_wpath) - try: - tmp_opath = os.path.join(tmp_dir, "output.%s" % format) - clip.resize(**video_resize) - if animation: - files = [] - current_frame = 0 - while clip.duration > current_frame and current_frame < frame: - filename = os.path.join(tmp_dir, "output_%s.png" % frame) - clip.save_frame(filename, t=frame) - files.append(filename) - frame += 0.25 - tmp_opath = os.path.join(tmp_dir, "output.gif") - with imageio.get_writer(tmp_opath, fps=5, mode='I') as writer: - for filename in files: - image = imageio.imread(filename) - writer.append_data(image) - elif clip.duration > int(frame): - clip.save_frame(tmp_opath, t=int(frame)) - else: - clip.save_frame(tmp_opath, t=int(0)) - if os.path.isfile(tmp_opath): - with open(tmp_opath, 'rb') as file: - if export == 'file': - return io.BytesIO(file.read()) - elif export == 'base64': - return base64.b64encode(file.read()) - else: - return file.read() - else: - raise ValueError("No output could be created from the video.") - finally: - try: - clip.reader.close() - del clip.reader - if clip.audio != None: - clip.audio.reader.close_proc() - del clip.audio - del clip - except Exception as e: - sys.exc_clear() - finally: - try: - shutil.rmtree(tmp_dir) - except PermissionError: - _logger.warn("Temporary directory could not be deleted.") - else: - raise ValueError("No output could be generated.") \ No newline at end of file diff --git a/muk_thumbnails/static/description/banner.png b/muk_thumbnails/static/description/banner.png deleted file mode 100644 index b0f9ccb..0000000 Binary files a/muk_thumbnails/static/description/banner.png and /dev/null differ diff --git a/muk_thumbnails/static/description/icon.png b/muk_thumbnails/static/description/icon.png deleted file mode 100644 index 48086e1..0000000 Binary files a/muk_thumbnails/static/description/icon.png and /dev/null differ diff --git a/muk_thumbnails/static/description/index.html b/muk_thumbnails/static/description/index.html deleted file mode 100644 index 8080a04..0000000 --- a/muk_thumbnails/static/description/index.html +++ /dev/null @@ -1,66 +0,0 @@ -
-
-

MuK Thumbnails

-

File Thumbnails

-

MuK IT GmbH - - www.mukit.at

-
-
- -
-
-
-

Overview

-

Technical module to provide some utility - features and libraries that can be used in other applications. This - module has no direct effect on the running system. It has no direct - visible effect on the system.

-
-
-
- -
-

Demo

-
-
-
User:
-
-
-
apps
-
-
-
Password:
-
-
-
demo
-
-
- -
- -
-

Help and Support

-
Feel free to - contact us, if you need any help with your Odoo integration or - addiontal features.
- - -
\ No newline at end of file diff --git a/muk_thumbnails/static/description/logo.png b/muk_thumbnails/static/description/logo.png deleted file mode 100644 index 9427ce3..0000000 Binary files a/muk_thumbnails/static/description/logo.png and /dev/null differ diff --git a/muk_thumbnails/tests/__init__.py b/muk_thumbnails/tests/__init__.py deleted file mode 100644 index d5db690..0000000 --- a/muk_thumbnails/tests/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import test_thumbnail \ No newline at end of file diff --git a/muk_thumbnails/tests/data/sample.mp4 b/muk_thumbnails/tests/data/sample.mp4 deleted file mode 100644 index 20733f8..0000000 Binary files a/muk_thumbnails/tests/data/sample.mp4 and /dev/null differ diff --git a/muk_thumbnails/tests/data/sample.xls b/muk_thumbnails/tests/data/sample.xls deleted file mode 100644 index 795ff7c..0000000 Binary files a/muk_thumbnails/tests/data/sample.xls and /dev/null differ diff --git a/muk_thumbnails/tests/test_thumbnail.py b/muk_thumbnails/tests/test_thumbnail.py deleted file mode 100644 index 81fffe5..0000000 --- a/muk_thumbnails/tests/test_thumbnail.py +++ /dev/null @@ -1,48 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import logging -import unittest - -from odoo.tests import common - -from odoo.addons.muk_thumbnails.service import thumbnail - -_path = os.path.dirname(os.path.dirname(__file__)) -_logger = logging.getLogger(__name__) - -class ThumbnailTestCase(common.TransactionCase): - - def setUp(self): - super(ThumbnailTestCase, self).setUp() - - def tearDown(self): - super(ThumbnailTestCase, self).tearDown() - - @unittest.skipIf(os.environ.get('TRAVIS', False), "Skipped for Travis CI") - def test_thumbnail_unoconv(self): - with open(os.path.join(_path, 'tests/data', 'sample.xls'), 'rb') as file: - self.assertTrue(thumbnail.create_thumbnail(binary=file.read(), filename='sample.xls')) - - @unittest.skipIf(os.environ.get('TRAVIS', False), "Skipped for Travis CI") - def test_thumbnail_video(self): - with open(os.path.join(_path, 'tests/data', 'sample.mp4'), 'rb') as file: - self.assertTrue(thumbnail.create_thumbnail(binary=file.read(), filename='sample.mp4')) - \ No newline at end of file diff --git a/muk_thumbnails/tools/__init__.py b/muk_thumbnails/tools/__init__.py deleted file mode 100644 index 81ff585..0000000 --- a/muk_thumbnails/tools/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import thumbnail \ No newline at end of file diff --git a/muk_thumbnails/tools/thumbnail.py b/muk_thumbnails/tools/thumbnail.py deleted file mode 100644 index 4230859..0000000 --- a/muk_thumbnails/tools/thumbnail.py +++ /dev/null @@ -1,38 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import tools - -from odoo.addons.muk_thumbnails.service import thumbnail - -_logger = logging.getLogger(__name__) - -def formats(): - return thumbnail.formats() - -def selection_formats(): - return list(map(lambda format: (format, format.upper()), thumbnail.formats())) - -def imports(): - return thumbnail.imports() - -def create_thumbnail(filename, content, mimetype=None, export="binary"): - return thumbnail.create_thumbnail(binary=content, filename=filename, mimetype=mimetype, export=export) \ No newline at end of file diff --git a/muk_utils/LICENSE b/muk_utils/LICENSE deleted file mode 100644 index faf7bf4..0000000 --- a/muk_utils/LICENSE +++ /dev/null @@ -1,619 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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 \ No newline at end of file diff --git a/muk_utils/__init__.py b/muk_utils/__init__.py deleted file mode 100644 index 5b5d62d..0000000 --- a/muk_utils/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import models -from . import tools \ No newline at end of file diff --git a/muk_utils/__manifest__.py b/muk_utils/__manifest__.py deleted file mode 100644 index ead5626..0000000 --- a/muk_utils/__manifest__.py +++ /dev/null @@ -1,51 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -{ - "name": "MuK Utils", - "summary": """Utility Features""", - "version": '11.0.1.0.13', - "category": 'Extra Tools', - "license": "AGPL-3", - "website": "https://www.mukit.at", - "live_test_url": "https://demo.mukit.at/web/login", - "author": "MuK IT", - "contributors": [ - "Mathias Markl ", - ], - "depends": [ - "base", - ], - "data": [ - "data/ir_cron.xml", - ], - "qweb": [ - "static/src/xml/*.xml", - ], - "images": [ - 'static/description/banner.png' - ], - "external_dependencies": { - "python": [], - "bin": [], - }, - "auto_install": True, - "application": False, - "installable": True, -} diff --git a/muk_utils/data/ir_cron.xml b/muk_utils/data/ir_cron.xml deleted file mode 100644 index f1b8983..0000000 --- a/muk_utils/data/ir_cron.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - Cron job to update the Groups - - - - 1 - days - -1 - - code - -model_names = model.pool.descendants(['muk_utils.groups'], '_inherit', '_inherits') -for model_name in model_names: - group = model.env[model_name].sudo() - if not group._abstract: - group.update_groups() - - - - diff --git a/muk_utils/doc/changelog.rst b/muk_utils/doc/changelog.rst deleted file mode 100644 index 9ee2b48..0000000 --- a/muk_utils/doc/changelog.rst +++ /dev/null @@ -1,4 +0,0 @@ -`1.0.0` -------- - -- Init version diff --git a/muk_utils/doc/index.rst b/muk_utils/doc/index.rst deleted file mode 100644 index c7d39fd..0000000 --- a/muk_utils/doc/index.rst +++ /dev/null @@ -1,106 +0,0 @@ -========= -MuK Utils -========= - -Technical module to provide some utility features and libraries that can be used -in other applications. This module has no direct effect on the running system. - -Installation -============ - -To install this module, you need to: - -Download the module and add it to your Odoo addons folder. Afterward, log on to -your Odoo server and go to the Apps menu. Trigger the debug mode and update the -list by clicking on the "Update Apps List" link. Now install the module by -clicking on the install button. - -Another way to install this module is via the package management for Python -(`PyPI `_). - -To install our modules using the package manager make sure -`odoo-autodiscover `_ is installed -correctly. Then open a console and install the module by entering the following -command: - -``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -The module name consists of the Odoo version and the module name, where -underscores are replaced by a dash. - -**Module:** - -``odoo-addon-`` - -**Example:** - -``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` - -Once the installation has been successfully completed, the app is already in the -correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the -debug mode and update the list by clicking on the "Update Apps List" link. Now -install the module by clicking on the install button. - -The biggest advantage of this variant is that you can now also update the app -using the "pip" command. To do this, enter the following command in your console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo. The steps are the same as for the installation only the button has changed -from "Install" to "Upgrade". - -You can also view available Apps directly in our `repository `_ -and find a more detailed installation guide on our `website `_. - -For modules licensed under OPL-1, you will receive access data when you purchase -the module. If the modules were not purchased directly from -`MuK IT `_ please contact our support (support@mukit.at) -with a confirmation of purchase to receive the corresponding access data. - -Upgrade -============ - -To upgrade this module, you need to: - -Download the module and add it to your Odoo addons folder. Restart the server -and log on to your Odoo server. Select the Apps menu and upgrade the module by -clicking on the upgrade button. - -If you installed the module using the "pip" command, you can also update the -module in the same way. Just type the following command into the console: - -``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` - -When the process is finished, restart your server and update the application in -Odoo, just like you would normally. - -Configuration -============= - -No additional configuration is needed to use this module. - -Usage -============= - -This module has no direct visible effect on the system. It provide utility features. - -Credits -======= - -Contributors ------------- - -* Mathias Markl - -Author & Maintainer -------------------- - -This module is maintained by the `MuK IT GmbH `_. - -MuK IT is an Austrian company specialized in customizing and extending Odoo. -We develop custom solutions for your individual needs to help you focus on -your strength and expertise to grow your business. - -If you want to get in touch please contact us via mail -(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/muk_utils/i18n/de.po b/muk_utils/i18n/de.po deleted file mode 100644 index d8b517e..0000000 --- a/muk_utils/i18n/de.po +++ /dev/null @@ -1,108 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * muk_utils -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-07 14:50+0000\n" -"PO-Revision-Date: 2018-06-07 14:50+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_create_uid -msgid "Created by" -msgstr "Erstellt von" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_create_date -msgid "Created on" -msgstr "Erstellt am" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_base_display_name -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_display_name -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_locking_display_name -msgid "Display Name" -msgstr "Anzeigename" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_base_id -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_id -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_locking_id -msgid "ID" -msgstr "ID" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_base___last_update -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock___last_update -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_locking___last_update -msgid "Last Modified on" -msgstr "Zuletzt geändert am" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_write_uid -msgid "Last Updated by" -msgstr "Zuletzt aktualisiert durch" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_write_date -msgid "Last Updated on" -msgstr "Zuletzt aktualisiert am" - -#. module: muk_utils -#: model:ir.model,name:muk_utils.model_muk_utils_lock -msgid "Lock" -msgstr "Lock" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_locked_by -msgid "Locked by" -msgstr "Locked by" - -#. module: muk_utils -#: model:ir.model,name:muk_utils.model_muk_utils_base -msgid "MuK Base Model" -msgstr "MuK Base Model" - -#. module: muk_utils -#: model:ir.model,name:muk_utils.model_muk_utils_locking -msgid "MuK Locking Model" -msgstr "MuK Locking Model" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_name -msgid "Name" -msgstr "Name" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_lock_ref -msgid "Object Reference" -msgstr "Object Reference" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_operation -msgid "Operation" -msgstr "Operation" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_token -msgid "Token" -msgstr "Token" - -#. module: muk_utils -#: selection:muk_utils.lock,locked_by_ref:0 -msgid "User" -msgstr "User" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_locked_by_ref -msgid "User Reference" -msgstr "User Reference" - diff --git a/muk_utils/i18n/muk_utils.pot b/muk_utils/i18n/muk_utils.pot deleted file mode 100644 index bacbfb9..0000000 --- a/muk_utils/i18n/muk_utils.pot +++ /dev/null @@ -1,108 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * muk_utils -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-07 14:50+0000\n" -"PO-Revision-Date: 2018-06-07 14:50+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_create_uid -msgid "Created by" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_create_date -msgid "Created on" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_base_display_name -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_display_name -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_locking_display_name -msgid "Display Name" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_base_id -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_id -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_locking_id -msgid "ID" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_base___last_update -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock___last_update -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_locking___last_update -msgid "Last Modified on" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_write_uid -msgid "Last Updated by" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_write_date -msgid "Last Updated on" -msgstr "" - -#. module: muk_utils -#: model:ir.model,name:muk_utils.model_muk_utils_lock -msgid "Lock" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_locked_by -msgid "Locked by" -msgstr "" - -#. module: muk_utils -#: model:ir.model,name:muk_utils.model_muk_utils_base -msgid "MuK Base Model" -msgstr "" - -#. module: muk_utils -#: model:ir.model,name:muk_utils.model_muk_utils_locking -msgid "MuK Locking Model" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_name -msgid "Name" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_lock_ref -msgid "Object Reference" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_operation -msgid "Operation" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_token -msgid "Token" -msgstr "" - -#. module: muk_utils -#: selection:muk_utils.lock,locked_by_ref:0 -msgid "User" -msgstr "" - -#. module: muk_utils -#: model:ir.model.fields,field_description:muk_utils.field_muk_utils_lock_locked_by_ref -msgid "User Reference" -msgstr "" - diff --git a/muk_utils/models/__init__.py b/muk_utils/models/__init__.py deleted file mode 100644 index 7d46e70..0000000 --- a/muk_utils/models/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import model -from . import groups -from . import res_groups -from . import res_users diff --git a/muk_utils/models/groups.py b/muk_utils/models/groups.py deleted file mode 100644 index 4f96b2f..0000000 --- a/muk_utils/models/groups.py +++ /dev/null @@ -1,180 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from odoo import models, fields, api - -class Groups(models.AbstractModel): - - _name = 'muk_utils.groups' - _inherit = 'muk_utils.model' - - _parent_store = True - _parent_name = "parent_group" - _parent_order = 'parent_left' - _order = 'parent_left' - - #---------------------------------------------------------- - # Database - #---------------------------------------------------------- - - name = fields.Char( - string="Group Name", - required=True, - translate=True) - - parent_left = fields.Integer( - string='Left Parent', - index=True) - - parent_right = fields.Integer( - string='Right Parent', - index=True) - - count_users = fields.Integer( - compute='_compute_count_users', - string="Users") - - @api.model - def _add_magic_fields(self): - super(Groups, self)._add_magic_fields() - def add(name, field): - if name not in self._fields: - self._add_field(name, field) - base, model = self._name.split(".") - add('parent_group', fields.Many2one( - _module=base, - comodel_name=self._name, - string='Parent Group', - ondelete='cascade', - auto_join=True, - index=True, - automatic=True)) - add('child_groups', fields.One2many( - _module=base, - comodel_name=self._name, - inverse_name='parent_group', - string='Child Groups', - automatic=True)) - add('groups', fields.Many2many( - _module=base, - comodel_name='res.groups', - relation='%s_groups_rel' % (self._table), - column1='gid', - column2='rid', - string='Groups', - automatic=True)) - add('explicit_users', fields.Many2many( - _module=base, - comodel_name='res.users', - relation='%s_explicit_users_rel' % (self._table), - column1='gid', - column2='uid', - string='Explicit Users', - automatic=True)) - add('users', fields.Many2many( - _module=base, - comodel_name='res.users', - relation='%s_users_rel' % (self._table), - column1='gid', - column2='uid', - string='Users', - compute='_compute_users', - store=True, - automatic=True)) - - _sql_constraints = [ - ('name_uniq', 'unique (name)', 'The name of the group must be unique!') - ] - - #---------------------------------------------------------- - # Functions - #---------------------------------------------------------- - - @api.multi - def trigger_computation_up(self, fields, *largs, **kwargs): - parent_groups = self.mapped('parent_group') - if parent_groups.exists(): - parent_groups.with_context(is_parent=True).trigger_computation(fields) - - @api.multi - def trigger_computation_down(self, fields, *largs, **kwargs): - child_groups = self.mapped('child_groups') - if child_groups.exists(): - child_groups.with_context(is_child=True).trigger_computation(fields) - - @api.multi - def trigger_computation(self, fields, *largs, **kwargs): - super(Groups, self).trigger_computation(fields, *largs, **kwargs) - if "users" in fields: - self.suspend_security()._compute_users() - self.suspend_security().trigger_computation_down(fields) - - @api.model - def check_user_values(self, values): - if any(field in values for field in [ - 'parent_group', 'groups', 'explicit_users']): - return True - return False - - @api.multi - @api.returns('res.users') - def get_users(self): - self.ensure_one() - users = self.env['res.users'] - if self.parent_group: - users |= self.parent_group.users - users |= self.groups.mapped('users') - users |= self.explicit_users - return users - - #---------------------------------------------------------- - # Read, View - #---------------------------------------------------------- - - @api.multi - def _compute_users(self): - for record in self: - record.users = record.get_users() - - @api.depends('users') - def _compute_count_users(self): - for record in self: - record.count_users = len(record.users) - - #---------------------------------------------------------- - # Create, Write, Delete - #---------------------------------------------------------- - - @api.multi - def _check_recomputation(self, vals, olds, *largs, **kwargs): - super(Groups, self)._check_recomputation(vals, olds, *largs, **kwargs) - fields = [] - if self.check_user_values(vals): - fields.extend(['users']) - if fields: - self.trigger_computation(fields) - - #---------------------------------------------------------- - # Cron Job Functions - #---------------------------------------------------------- - - @api.model - def update_groups(self, *args, **kwargs): - self.search([]).trigger_computation(['users']) - \ No newline at end of file diff --git a/muk_utils/models/model.py b/muk_utils/models/model.py deleted file mode 100644 index 32036ec..0000000 --- a/muk_utils/models/model.py +++ /dev/null @@ -1,222 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import models, api - -_logger = logging.getLogger(__name__) - -class BaseModelExtension(models.AbstractModel): - - _name = 'muk_utils.model' - _description = 'MuK Base Model' - - #---------------------------------------------------------- - # Function - #---------------------------------------------------------- - - @api.multi - def notify_change(self, values, *largs, **kwargs): - pass - - @api.multi - def trigger_computation(self, fields, *largs, **kwargs): - pass - - @api.multi - def check_existence(self): - records = self.exists() - if not (len(records) == 0 or (len(records) == 1 and records.id == False)): - return records - else: - return False - - #---------------------------------------------------------- - # Read - #---------------------------------------------------------- - - @api.model - def browse(self, arg=None, prefetch=None): - arg = self._before_browse(arg) - result = super(BaseModelExtension, self).browse(arg, prefetch) - result = self._after_browse(result) - return result - - @api.model - def _before_browse(self, arg, *largs, **kwargs): - return arg - - @api.model - def _after_browse(self, result, *largs, **kwargs): - return result - - @api.multi - def read(self, fields=None, load='_classic_read'): - fields = self._before_read(fields) - result = super(BaseModelExtension, self).read(fields, load) - for index, record in enumerate(self.exists()): - try: - result[index] = record._after_read_record(result[index]) - except IndexError: - _logger.exception("Something went wrong!") - result = self._after_read(result) - return result - - @api.multi - def _before_read(self, fields, *largs, **kwargs): - return fields - - @api.multi - def _after_read_record(self, values, *largs, **kwargs): - return values - - @api.multi - def _after_read(self, result, *largs, **kwargs): - return result - - @api.model - @api.returns('self', - upgrade=lambda self, value, args, offset=0, limit=None, order=None, count=False: value if count else self.browse(value), - downgrade=lambda self, value, args, offset=0, limit=None, order=None, count=False: value if count else value.ids) - def search(self, args, offset=0, limit=None, order=None, count=False): - args, offset, limit, order, count = self._before_search(args, offset, limit, order, count) - result = super(BaseModelExtension, self).search(args, offset, limit, order, count) - result = self._after_search(result) - return result - - @api.model - def _before_search(self, args, offset, limit, order, count, *largs, **kwargs): - return args, offset, limit, order, count - - @api.model - def _after_search(self, result, *largs, **kwargs): - return result - - @api.model - def name_search(self, name='', args=None, operator='ilike', limit=100): - name, args, operator, limit = self._before_name_search(name, args, operator, limit) - result = super(BaseModelExtension, self).name_search(name, args, operator, limit) - result = self._after_name_search(result) - return result - - @api.model - def _before_name_search(self, name, args, operator, limit, *largs, **kwargs): - return name, args, operator, limit - - @api.model - def _after_name_search(self, result, *largs, **kwargs): - return result - - @api.model - def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True): - domain, fields, groupby, offset, limit, orderby, lazy = self._before_read_group(domain, fields, groupby, offset, limit, orderby, lazy) - result = super(BaseModelExtension, self).read_group(domain, fields, groupby, offset, limit, orderby, lazy) - result = self._after_read_group(result) - return result - - @api.model - def _before_read_group(self, domain, fields, groupby, offset, limit, orderby, lazy, *largs, **kwargs): - return domain, fields, groupby, offset, limit, orderby, lazy - - @api.model - def _after_read_group(self, result, *largs, **kwargs): - return result - - #---------------------------------------------------------- - # Create, Update, Delete - #---------------------------------------------------------- - - @api.model - def create(self, vals): - vals = self._before_create(vals) - result = super(BaseModelExtension, self).create(vals) - result = result._after_create(vals) - return result - - @api.model - def _before_create(self, vals, *largs, **kwargs): - return vals - - @api.model - def _after_create(self, vals, *largs, **kwargs): - self._check_recomputation(vals, []) - return self - - @api.multi - def write(self, vals): - olds = [] - vals = self._before_write(vals) - if 'track_old_values' in self.env.context: - olds = [{key: record[key] for key in vals} for record in self] - result = super(BaseModelExtension, self).write(vals) - for record in self: - record._after_write_record(vals) - result = self._after_write(result, vals, olds) - return result - - @api.multi - def _before_write(self, vals, *largs, **kwargs): - return vals - - @api.multi - def _after_write_record(self, vals, *largs, **kwargs): - return vals - - @api.multi - def _after_write(self, result, vals, olds, *largs, **kwargs): - self._check_recomputation(vals, olds) - self._check_notification(vals) - return result - - @api.multi - def unlink(self): - info = self._before_unlink() - infos = [] - for record in self: - infos.append(record._before_unlink_record()) - result = super(BaseModelExtension, self).unlink() - self._after_unlink(result, info, infos) - return result - - @api.multi - def _before_unlink(self, *largs, **kwargs): - return {} - - @api.multi - def _before_unlink_record(self, *largs, **kwargs): - return {} - - @api.multi - def _after_unlink(self, result, info, infos, *largs, **kwargs): - pass - - #---------------------------------------------------------- - # Helper - #---------------------------------------------------------- - - @api.multi - def _check_recomputation(self, vals, olds, *largs, **kwargs): - # self.trigger_computation(fields) - pass - - @api.multi - def _check_notification(self, vals, *largs, **kwargs): - # self.notify_change(change) - pass \ No newline at end of file diff --git a/muk_utils/models/res_groups.py b/muk_utils/models/res_groups.py deleted file mode 100644 index 32298ac..0000000 --- a/muk_utils/models/res_groups.py +++ /dev/null @@ -1,68 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from collections import defaultdict - -from odoo import api, fields, models -from odoo import tools, _ -from odoo.exceptions import ValidationError - -_logger = logging.getLogger(__name__) - -class ResGroups(models.Model): - - _inherit = "res.groups" - - #---------------------------------------------------------- - # Create, Update, Delete - #---------------------------------------------------------- - - @api.multi - def write(self, vals): - model_recs = defaultdict(set) - model_names = self.pool.descendants(['muk_utils.groups'], '_inherit', '_inherits') - if any(field in vals for field in ['users']): - for model_name in model_names: - model = self.env[model_name].sudo() - if not model._abstract: - model_recs[model_name] = model.search([['groups', 'in', self.mapped('id')]]) - result = super(ResGroups, self).write(vals) - if any(field in vals for field in ['users']): - for model_name in model_names: - model = self.env[model_name].sudo() - if not model._abstract: - model_recs[model_name] = model_recs[model_name] | model.search([['groups', 'in', self.mapped('id')]]) - for tuple in model_recs.items(): - tuple[1].trigger_computation(['users']) - return result - - @api.multi - def unlink(self): - model_recs = defaultdict(set) - model_names = self.pool.descendants(['muk_utils.groups'], '_inherit', '_inherits') - for model_name in model_names: - model = self.env[model_name].sudo() - if not model._abstract: - model_recs[model_name] = model.search([['groups', 'in', self.mapped('id')]]) - result = super(ResGroups, self).unlink(vals) - for tuple in model_recs.items(): - tuple[1].trigger_computation(['users']) - return result \ No newline at end of file diff --git a/muk_utils/models/res_users.py b/muk_utils/models/res_users.py deleted file mode 100644 index 4c700f0..0000000 --- a/muk_utils/models/res_users.py +++ /dev/null @@ -1,84 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from collections import defaultdict - -from odoo import api, fields, models -from odoo import tools, _ -from odoo.exceptions import ValidationError - -from odoo.addons.base.res import res_users - -from odoo.addons.muk_security.tools import helper - -_logger = logging.getLogger(__name__) - -class ResUser(models.Model): - - _inherit = 'res.users' - - #---------------------------------------------------------- - # Create, Update, Delete - #---------------------------------------------------------- - - @api.model - def create(self, values): - result = super(ResUser, self).create(values) - model_recs = defaultdict(set) - model_names = self.pool.descendants(['muk_utils.groups'], '_inherit', '_inherits') - for model_name in model_names: - model = self.env[model_name].sudo() - if not model._abstract: - model_recs[model_name] = model.search([['groups', 'in', self.mapped('groups_id.id')]]) - for tuple in model_recs.items(): - tuple[1].trigger_computation(['users']) - return result - - @api.multi - def write(self, vals): - result = super(ResUser, self).write(vals) - vals = self._remove_reified_groups(vals) - if any(field in vals for field in ['groups_id']): - group_ids = [command[1] for command in vals['groups_id'] if command[0] == 4 or command[0] == 3] - group_ids += [id for command in vals['groups_id'] if command[0] == 6 for id in command[2]] - group_ids = list(set(group_ids)) - if group_ids: - model_recs = defaultdict(set) - model_names = self.pool.descendants(['muk_utils.groups'], '_inherit', '_inherits') - for model_name in model_names: - model = self.env[model_name].sudo() - if not model._abstract: - model_recs[model_name] = model.search([['groups', 'in', group_ids]]) - for tuple in model_recs.items(): - tuple[1].trigger_computation(['users']) - return result - - @api.multi - def unlink(self): - model_recs = defaultdict(set) - model_names = self.pool.descendants(['muk_utils.groups'], '_inherit', '_inherits') - for model_name in model_names: - model = self.env[model_name].sudo() - if not model._abstract: - model_recs[model_name] = model.search([['groups', 'in', self.mapped('groups_id.id')]]) - result = super(ResUser, self).unlink() - for tuple in model_recs.items(): - tuple[1].trigger_computation(['users']) \ No newline at end of file diff --git a/muk_utils/static/description/banner.png b/muk_utils/static/description/banner.png deleted file mode 100644 index cf5692b..0000000 Binary files a/muk_utils/static/description/banner.png and /dev/null differ diff --git a/muk_utils/static/description/icon.png b/muk_utils/static/description/icon.png deleted file mode 100644 index 51e2549..0000000 Binary files a/muk_utils/static/description/icon.png and /dev/null differ diff --git a/muk_utils/static/description/index.html b/muk_utils/static/description/index.html deleted file mode 100644 index 53dec41..0000000 --- a/muk_utils/static/description/index.html +++ /dev/null @@ -1,66 +0,0 @@ -
-
-

MuK Utils

-

Utility Features

-

MuK IT GmbH - - www.mukit.at

-
-
- -
-
-
-

Overview

-

Technical module to provide some utility - features. The module is mainly used as a dependency by other modules - and to provide a collection of common libraries. It has no direct - visible effect on the system.

-
-
-
- -
-

Demo

-
-
-
User:
-
-
-
apps
-
-
-
Password:
-
-
-
demo
-
-
- -
- -
-

Help and Support

-
Feel free to - contact us, if you need any help with your Odoo integration or - addiontal features.
- - -
\ No newline at end of file diff --git a/muk_utils/static/description/logo.png b/muk_utils/static/description/logo.png deleted file mode 100644 index 9427ce3..0000000 Binary files a/muk_utils/static/description/logo.png and /dev/null differ diff --git a/muk_utils/tests/__init__.py b/muk_utils/tests/__init__.py deleted file mode 100644 index 3c89730..0000000 --- a/muk_utils/tests/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import test_helper -from . import test_parse_rst \ No newline at end of file diff --git a/muk_utils/tests/test_helper.py b/muk_utils/tests/test_helper.py deleted file mode 100644 index cec5fde..0000000 --- a/muk_utils/tests/test_helper.py +++ /dev/null @@ -1,39 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import logging - -from odoo.tests import common - -from odoo.addons.muk_utils.tools import helper - -_path = os.path.dirname(os.path.dirname(__file__)) -_logger = logging.getLogger(__name__) - -class HelperTestCase(common.HttpCase): - - def setUp(self): - super(HelperTestCase, self).setUp() - - def tearDown(self): - super(HelperTestCase, self).tearDown() - - def test_slugify(self): - self.assertTrue(helper.slugify("Test")) \ No newline at end of file diff --git a/muk_utils/tests/test_parse_rst.py b/muk_utils/tests/test_parse_rst.py deleted file mode 100644 index e2b64bc..0000000 --- a/muk_utils/tests/test_parse_rst.py +++ /dev/null @@ -1,39 +0,0 @@ -################################################################################### -# -# Copyright (C) 2017 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import logging - -from odoo.tests import common - -from odoo.addons.muk_utils.tools import parse_rst - -_path = os.path.dirname(os.path.dirname(__file__)) -_logger = logging.getLogger(__name__) - -class ParseReStructuredTextTestCase(common.HttpCase): - - def setUp(self): - super(ParseReStructuredTextTestCase, self).setUp() - - def tearDown(self): - super(ParseReStructuredTextTestCase, self).tearDown() - - def test_rst2html(self): - self.assertTrue(parse_rst.rst2html("Test")) \ No newline at end of file diff --git a/muk_utils/tools/__init__.py b/muk_utils/tools/__init__.py deleted file mode 100644 index 13a4a72..0000000 --- a/muk_utils/tools/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import helper -from . import patch -from . import parse_rst -from . import utils_os \ No newline at end of file diff --git a/muk_utils/tools/helper.py b/muk_utils/tools/helper.py deleted file mode 100644 index 1810483..0000000 --- a/muk_utils/tools/helper.py +++ /dev/null @@ -1,55 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import re -import sys -import time -import logging -import unicodedata - -_logger = logging.getLogger(__name__) - -#---------------------------------------------------------- -# Functions -#---------------------------------------------------------- - -def slugify(value): - value = str(unicodedata.normalize('NFKD', value)) - if sys.version_info < (3,): - value = str(value.encode('ascii', 'ignore')) - value = str(re.sub('[^\w\s-]', '', value).strip().lower()) - value = str(re.sub('[-\s]+', '-', value)) - return value - -#---------------------------------------------------------- -# Decorators -#---------------------------------------------------------- - -def timeout(func, delay=30): - def wrapper(*args, **kwargs): - if args[0]._name in wrapper.timeouts: - timeout = wrapper.timeouts[args[0]._name] - if time.time() > timeout + delay: - wrapper.timeouts[args[0]._name] = time.time() - return func(*args, **kwargs) - else: - wrapper.timeouts[args[0]._name] = time.time() - return func(*args, **kwargs) - wrapper.timeouts = {} - return wrapper \ No newline at end of file diff --git a/muk_utils/tools/http.py b/muk_utils/tools/http.py deleted file mode 100644 index 8314143..0000000 --- a/muk_utils/tools/http.py +++ /dev/null @@ -1,67 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import urllib -import logging - -import requests -import werkzeug - -from odoo.http import request -from odoo.tools import config - -_logger = logging.getLogger(__name__) - -def get_route(url): - url_parts = url.split('?') - path = url_parts[0] - query_string = url_parts[1] if len(url_parts) > 1 else None - router = request.httprequest.app.get_db_router(request.db).bind('') - match = router.match(path, query_args=query_string) - method = router.match(path, query_args=query_string)[0] - params = dict(urllib.parse.parse_qsl(query_string)) - if len(match) > 1: - params.update(match[1]) - return method, params, path - -def make_error_response(status, message): - exception = werkzeug.exceptions.HTTPException() - exception.code = status - exception.description = message - return exception - -def get_response(url): - if not bool(urllib.parse.urlparse(url).netloc): - base_url = request.env['ir.config_parameter'].sudo().get_param('web.base.url') - method, params, path = get_route(url) - params.update({'csrf_token': request.csrf_token()}) - session = requests.Session() - session.cookies['session_id'] = request.session.sid - try: - response = session.post("%s%s" % (base_url, path), params) - return response.status_code, response.headers, response.content - except requests.exceptions.RequestException as exception: - return exception.response.status_code, exception.response.headers, exception.response.reason - else: - try: - response = requests.get(url) - return response.status_code, response.headers, response.content - except requests.exceptions.RequestException as exception: - return exception.response.status_code, exception.response.headers, exception.response.reason - diff --git a/muk_utils/tools/parse_rst.py b/muk_utils/tools/parse_rst.py deleted file mode 100644 index f3fc18f..0000000 --- a/muk_utils/tools/parse_rst.py +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from docutils import nodes -from docutils.core import publish_string -from docutils.transforms import Transform, writer_aux -from docutils.writers.html4css1 import Writer - -from odoo import tools - -_logger = logging.getLogger(__name__) - -class ReStructuredTextFilterMessages(Transform): - default_priority = 870 - def apply(self): - for node in self.document.traverse(nodes.system_message): - node.parent.remove(node) - -class ReStructuredTextWriter(Writer): - def get_transforms(self): - return [ReStructuredTextFilterMessages, writer_aux.Admonitions] - -def rst2html(content): - overrides = { - 'embed_stylesheet': False, - 'doctitle_xform': False, - 'output_encoding': 'unicode', - 'xml_declaration': False, - } - output = publish_string(content, settings_overrides=overrides, writer=ReStructuredTextWriter()) - return tools.html_sanitize(output) \ No newline at end of file diff --git a/muk_utils/tools/patch.py b/muk_utils/tools/patch.py deleted file mode 100644 index f4e9b00..0000000 --- a/muk_utils/tools/patch.py +++ /dev/null @@ -1,43 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import logging - -from odoo import api - -_logger = logging.getLogger(__name__) - -def monkey_patch(cls): - def decorate(func): - name = func.__name__ - func.super = getattr(cls, name, None) - setattr(cls, name, func) - return func - return decorate - -def monkey_patch_model(cls): - def decorate(func): - name = func.__name__ - super = getattr(cls, name, None) - func.super = super - wrapped = api.guess(api.propagate(name, func)) - wrapped.super = super - setattr(cls, name, wrapped) - return func - return decorate diff --git a/muk_utils/tools/utils_os.py b/muk_utils/tools/utils_os.py deleted file mode 100644 index 1501bf9..0000000 --- a/muk_utils/tools/utils_os.py +++ /dev/null @@ -1,61 +0,0 @@ -################################################################################### -# -# Copyright (C) 2018 MuK IT GmbH -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -################################################################################### - -import os -import io -import base64 -import shutil -import urllib -import logging -import tempfile -import mimetypes - -from odoo.tools import config -from odoo.tools.mimetypes import guess_mimetype - -_logger = logging.getLogger(__name__) - -def unique_name(name, names, escape_suffix=False): - def compute_name(name, suffix, escape_suffix): - if escape_suffix: - name, extension = os.path.splitext(name) - return "%s(%s)%s" % (name, suffix, extension) - else: - return "%s(%s)" % (name, suffix) - if not name in names: - return name - else: - suffix = 1 - name = compute_name(name, suffix, escape_suffix) - while name in names: - suffix += 1 - name = compute_name(name, suffix, escape_suffix) - return name - -def get_extension(binary, filename, mimetype): - extension = None - if not mimetype and not filename: - mimetype = guess_mimetype(binary, default=False) - if not mimetype and filename: - mimetype = mimetypes.guess_type(urllib.request.pathname2url(filename))[0] - if filename: - extension = os.path.splitext(filename)[1][1:].strip().lower() - if not extension and mimetype and mimetype != 'application/octet-stream': - extension = mimetypes.guess_extension(mimetype)[1:].strip().lower() - return extension \ No newline at end of file