From 7b3afa0ffd9b79d482a472d210926c61aa4ef8c3 Mon Sep 17 00:00:00 2001 From: Juliana Date: Thu, 16 Jul 2020 10:02:22 +0200 Subject: [PATCH] Init module V2 --- LICENSE | 619 +++++++++++++++ README.rst | 30 + __init__.py | 3 + __manifest__.py | 24 + controllers/__init__.py | 4 + controllers/main.py | 35 + models/__init__.py | 5 + models/__pycache__/__init__.cpython-35.pyc | Bin 0 -> 240 bytes models/__pycache__/pos_config.cpython-35.pyc | Bin 0 -> 754 bytes .../pos_transaction.cpython-35.pyc | Bin 0 -> 1844 bytes models/pos_config.py | 14 + models/pos_transaction.py | 49 ++ security/ir.model.access.csv | 3 + static/description/icon.png | Bin 0 -> 9161 bytes static/src/css/style.css | 355 +++++++++ static/src/img/logo-scan.png | Bin 0 -> 24891 bytes static/src/img/logo-vracoop.png | Bin 0 -> 6387 bytes static/src/img/picto-confirm.png | Bin 0 -> 2880 bytes static/src/js/container.js | 705 ++++++++++++++++++ static/src/js/custo_header.js | 43 ++ static/src/js/devices.js | 81 ++ static/src/js/models_and_db.js | 294 ++++++++ static/src/xml/pos.xml | 289 +++++++ views/assets.xml | 16 + views/pos_config_views.xml | 44 ++ views/pos_transaction.xml | 60 ++ 26 files changed, 2673 insertions(+) create mode 100644 LICENSE create mode 100644 README.rst create mode 100644 __init__.py create mode 100644 __manifest__.py create mode 100644 controllers/__init__.py create mode 100644 controllers/main.py create mode 100644 models/__init__.py create mode 100644 models/__pycache__/__init__.cpython-35.pyc create mode 100644 models/__pycache__/pos_config.cpython-35.pyc create mode 100644 models/__pycache__/pos_transaction.cpython-35.pyc create mode 100644 models/pos_config.py create mode 100644 models/pos_transaction.py create mode 100644 security/ir.model.access.csv create mode 100644 static/description/icon.png create mode 100644 static/src/css/style.css create mode 100644 static/src/img/logo-scan.png create mode 100644 static/src/img/logo-vracoop.png create mode 100644 static/src/img/picto-confirm.png create mode 100644 static/src/js/container.js create mode 100644 static/src/js/custo_header.js create mode 100644 static/src/js/devices.js create mode 100644 static/src/js/models_and_db.js create mode 100644 static/src/xml/pos.xml create mode 100644 views/assets.xml create mode 100644 views/pos_config_views.xml create mode 100644 views/pos_transaction.xml diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..eb37caf --- /dev/null +++ b/LICENSE @@ -0,0 +1,619 @@ +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 diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..c586091 --- /dev/null +++ b/README.rst @@ -0,0 +1,30 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + + +=============================== +VRACOOP - POS Free Balance V2 +=============================== + +Modifie le module POS: + - ajout configuration pour les balances libre service + - modification de l'interface POS +=> Design V2 + +Credits +======= + +Contributors +------------ + +* Juliana Poudou + +Maintainer +---------- + +.. image:: https://le-filament.com/images/logo-lefilament.png + :alt: Le Filament + :target: https://le-filament.com + +This module is maintained by Le Filament diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..a466ab6 --- /dev/null +++ b/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models \ No newline at end of file diff --git a/__manifest__.py b/__manifest__.py new file mode 100644 index 0000000..b1c2cea --- /dev/null +++ b/__manifest__.py @@ -0,0 +1,24 @@ +{ + "name": "VRACOOP - POS Free Balance V2", + "summary": "VRACOOP - POS Free Balance V2", + "version": "12.0.1.0.1", + "development_status": "Beta", + "author": "Le Filament", + "maintainers": ["remi-filament"], + "license": "AGPL-3", + "application": False, + "installable": True, + "category": 'Point of Sale', + "depends": [ + "point_of_sale", "pos_container", + ], + "data": [ + 'security/ir.model.access.csv', + 'views/assets.xml', + 'views/pos_config_views.xml', + 'views/pos_transaction.xml', + ], + 'qweb': [ + 'static/src/xml/pos.xml', + ], +} diff --git a/controllers/__init__.py b/controllers/__init__.py new file mode 100644 index 0000000..13d3f41 --- /dev/null +++ b/controllers/__init__.py @@ -0,0 +1,4 @@ +# © 2019 Le Filament () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import main diff --git a/controllers/main.py b/controllers/main.py new file mode 100644 index 0000000..10be326 --- /dev/null +++ b/controllers/main.py @@ -0,0 +1,35 @@ +# © 2019 Le Filament () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +import json + +from odoo import http +from odoo.http import request +from odoo.http import Response +from datetime import datetime + + +class Main(http.Controller): + + @http.route("/transactions", auth='none', type='http',method=['GET']) + def check_method_get(self,**post): + headers = {'Content-Type': 'application/json'} + pos_sessions = request.env['pos.session'].sudo().search([ + ('state', '=', 'opened'), + ('rescue', '=', False)], limit=1) + if post.get('datetime', ''): + date_get = post.get('datetime', '') + transaction_ids = request.env[ + 'pos.transaction'].sudo().search([('create_date', '>=', date_get)]) + else: + transaction_ids = request.env[ + 'pos.transaction'].sudo().search([]) + balance_id = pos_sessions.config_id.balance_id + if hasattr(datetime.today(), 'isoformat'): + date = datetime.today().isoformat() + data = { + 'balance_id': balance_id, + 'date': date, + 'transactions': transaction_ids.read( + ['qrcode', 'balance_id', 'ean13', 'ean13_verif']) + } + return Response(json.dumps(data), headers=headers) \ No newline at end of file diff --git a/models/__init__.py b/models/__init__.py new file mode 100644 index 0000000..0cd9cee --- /dev/null +++ b/models/__init__.py @@ -0,0 +1,5 @@ +# © 2019 Le Filament () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import pos_config +from . import pos_transaction \ No newline at end of file diff --git a/models/__pycache__/__init__.cpython-35.pyc b/models/__pycache__/__init__.cpython-35.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76538067756fbba9a2cb06705e643efa90d22264 GIT binary patch literal 240 zcmX|)!3x4K42IKff+(UVpTNs57Cnpj0OG~l4wl+gEo{wbH$i+NkG{^Xo_qyQrUMPh zpL`+wnT|$-;rxDh0>F#v9}!I(DnBF1DH#+1C4-Cs3mkPEK^76muuqdWqtleNg9^P+ zXiw%$G!9fdX}wgnLAy)i7F@7*G06j5FU&zcTYkY(bIcJtSuD9~e2pc)I;jw=Ul+mj m`*oZ zmSB-%JHAlnOw~)V+D;l}PD-EK*tA;ItL@V{m9#E-CdH-Znc@0Ilzf|hQY)41x#Hmb zMp zRr!skrBY4*CD=`0N^hQbzdm<(*X5JuRu55mgwv!L(jXoj2i@bD#Vodw^U`=r!Jk>X e`)P-t-97Sa9*XO-BgZH2x(2>?tBu?IGW-u%vc-1* literal 0 HcmV?d00001 diff --git a/models/__pycache__/pos_transaction.cpython-35.pyc b/models/__pycache__/pos_transaction.cpython-35.pyc new file mode 100644 index 0000000000000000000000000000000000000000..df3de380e8ebf5088bd5dce6ab37b617cd327087 GIT binary patch literal 1844 zcmZuyOK;pZ5FS1E{qQq!niR@$QNRl)hhB<4VAq8Y-nwy+00I($7P+=Ik|3<#1*=LyqQ~p|%Hu?tS^^`{NeC-_Uq$4x5R1K1`kwt#K|-BQ_9FS4zb zkAQ9~ks|ZBUV0342lM+x4o`UgT97m+VG;4P9A!M;EgFjL*W@f_9%Z@Lu*=KdD>nB| z1gFcWD91+>Exed`XCx+R$fWz*t9?YN-1_;a+1^X@YWrN;c~r880fMyLL9#M> z^VcU4&7+X0NLDUo`v3vtNQ}0>fVGq8*Xh72XG6pFcgn4EKFsFjFGPE1?{F5Z0%se z!l_J+%K^N-RefO1q#4n}i7Ty)XVN_r{3>VCxe^g3#0>?*Oo$;yC0&wbETt0%bIjto z>^H#7<)|SA2#M@96mr-QaP<=i1Ab0y_?<0;VNh}=Si@Po~pEtk$~lz19RPQjUA+GM)~Z^3f=wEPj+<< zbSZ?`;rdaSea7k#h3g+wst?|M3wH(-pddp)@CHDXM5_`J8HJm^AMh&p!-O5Q3oN*7 z!CSmDPAB$EcCg&$TqLBB#_NX-+lLOesVx|mdLPE4_>w2u@~>0FT~ zit8i!21o890druj8zt6#vmtl?Q|zrGo$OXfA>6)uDMIX7=`fP+z4Uu}3O+JyO7R>W{ZUvqSfJOW za~N|{_}wcOonI6|$_l@ei6~^69jw^8yV}Pjy?KH6v+PzXJX9#Gq@(LZe5LpnWvYO4 zot;L;bnbN8@WTW>9QoHs`lf5R=EzXLt?E}v=GF+oMT9!iR>iB&(kT$CI;5T56s1s& iEffIKIac2l?ec%;%Jz4wRDZ9$^EQ&FM&BG8W9wh&C(z3P literal 0 HcmV?d00001 diff --git a/models/pos_config.py b/models/pos_config.py new file mode 100644 index 0000000..f9afc8f --- /dev/null +++ b/models/pos_config.py @@ -0,0 +1,14 @@ +# © 2020 Le Filament () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models + + +class PosConfig(models.Model): + _inherit = 'pos.config' + + is_balance_free = fields.Boolean(string='Balance libre service') + logo_balance = fields.Binary(string='Logo Balance') + explication_header = fields.Char(string='Explication') + weight_default = fields.Char(string='Poids par défault (kg)') + balance_id = fields.Char("Identifiant de la balance") diff --git a/models/pos_transaction.py b/models/pos_transaction.py new file mode 100644 index 0000000..a0765fa --- /dev/null +++ b/models/pos_transaction.py @@ -0,0 +1,49 @@ +# © 2020 Le Filament () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models +import pytz + +from datetime import datetime +from pytz import timezone + + +class PosTransaction(models.Model): + + _name = 'pos.transaction' + _description = 'Table des Transactions' + + name = fields.Char('Ref Produit') + balance_id = fields.Char('Id de la balance') + qrcode = fields.Char("QRCode") + ean13 = fields.Char('EAN13 Poids Produits', size=13) + ean13_verif = fields.Char('EAN13 Vérification Poids', size=13) + date_iso = fields.Char('Date ISO', compute="_compute_date_iso") + container_ean13 = fields.Char('EAN13 Container', size=13) + weight_net = fields.Float('Poids Net') + price_net = fields.Float('Prix total') + price_product = fields.Float('Prix au kilo') + product_id = fields.Many2one('product.product', string='Produit ID') + + @api.model + def create_from_ui(self, transactions): + # retourne la liste des ids dans le même ordre que la liste fournie + transaction_ids = [] + + for transaction in transactions: + + transaction_id = transaction.pop('id', False) + if transaction_id: + self.browse(transaction_id).write(transaction) + else: + transaction_id = self.create(transaction).id + transaction_ids.append(transaction_id) + return transaction_ids + + @api.depends('write_date') + def _compute_date_iso(self): + for transaction in self: + # date_iso = pytz.utc.localize(transaction.write_date).astimezone(timezone('Europe/Berlin')) + # print("---date_iso ---", str(date_iso)) + if hasattr(transaction.write_date, 'isoformat'): + transaction.date_iso = transaction.write_date.isoformat('T')[:19] diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv new file mode 100644 index 0000000..f0d5a14 --- /dev/null +++ b/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_pos_transaction_pos_user,access_pos_transaction_pos_user,model_pos_transaction,point_of_sale.group_pos_user,1,1,1,1 +access_pos_transaction_pos_manager,access_pos_transaction_pos_manager,model_pos_transaction,point_of_sale.group_pos_manager,1,1,1,1 diff --git a/static/description/icon.png b/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..82ef47760a441cf229b5009f0a18ccf3842fbfa5 GIT binary patch literal 9161 zcmdVAg)Q3~C)Qeft@Z46-y5c_sZ4-NjSBz(2vi^nI>__Dza1MBd8{_9$w!{h z?PN7%0f4$hya!7R2ArSz;9a0ps2LO2T0{{mW0DxE~06^iI+xAKV z`2fci^2Qwiz$5*)qX4pVDFFbKHx7D+9)=p~V%9EDUP~JnD_dS4s4G$%0FdwzLta8{ zJuE>!(09)6Vm^|L|IrXbUjGyGF@pZ1;^8F8XsDqLl6QG;3wp^5=H+LU!Ucgq67Ox^ zis>jQ{kJ*tPLk2y!^2gKkI&oNo7Y>A*X6w(pMa>SC?Ed|z85cekQzMhzRn(&K0MCu zO#kKN|MR0@>u&wt!PUdT#ToR^uceiXr-vjX^$*nX+Y2O4{Cjwgg;GCbU&a=MVW2-FN-GR0M8#cg^1k1>ALAJr5fv2w_Oz{-DZ9N`;~%1M0%>0irTlgaZU)2t;y! zV)KWe33g%6Bjr|Tgmwa`BcKO-epDf(d_LsIn-2g%Y-zL)Ap}Ud(7G!*6ViMf@PEBI zI`p>)7al6y?Oxt>j~x=!L_)%~I;fNVHI5kNZIXm?^+Uu(!9f}xAWU|EnUu&k08=49 zKiSU7r1~3Um+of?C02wtk=}FfQVYV$6TGMbt2G- z>pI|y9e*3Dz$YZhUa>Jd^&yJ)R- zrhk>Rrzk7aS0l15cXoZ$zV+TMqvl~i*E=_3o>&mlftIf+@6jFi9x5$slxt1|eds32 zcMS>9%9@NP8^dRmCQRTsXSragb1s1g1e{9@fSrXAu^YV}8dMita0=J1n7z4H(brZr71MMZDs-NEw)?tjR zUFtCKhqpZ6zns-T`220;HQwJmV4vdn0^Va#R3 z;5E(@ow&*~E48(-n@L}i_B8AfPziXE{5spAGGkUJ%Lkuvd>I&$LtK*U6RST|wB~iX zPX?9@z`J>n!j7i|?njBmNC@MlI7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cZ z9*;uy`S)ag(!L!@8X515k@S(oWigz_*O~mTv#nxXazYG=X^~caTwl{^urz0}3b#?m zG{!h>iJ(S0jp$C`382fq1BMQfjyLJ)dIwN7(0+f?y`=ohTG`M^P;s?4-`$YlwoFbj z5{rDxuVZkv0dwfd{ii+6_hRhQcOKXTYl3!4#7o^szHdHf9Pg#qlPZ~o$#Zabn<1eL zr#eyoG`-2$%NuQ))k>~BThH9vcm z%!hZ8H$|+KeBUSPOL~V`5H|y~Ne><{TdJ`=L*xJ!BR5}~{l}!#qa`K}uZuDL-el^D z6R+j7@exby!Jo{s&$+|Z5;bZicktUeCGx!-FP#ine1`o+(bAwmGq8{}3USt6yh`e1 zAail#&mu%ObN_RUc}ze-2$6#_^Ce8E#y~sJYzMXJh`p z4J=bn#pPO56ml|7nSFJV+d~$E!Yp=9>e;}hEK_%LLZWr385YRXhS(^nOvvSEfVTxo zfqh0cjNxN4bC3K~^9lZNOK6IuH8)WuY7PRCjqqK%FCdzi$O6+1h0fqg3fZkz>8(5D zDUix7fW#_4dX%?Br-=erQ)Cv{d=%Ib_dq7T7`(HV%4=lyIe((Oply>uD*wM)EW-X5N|p9h literal 0 HcmV?d00001 diff --git a/static/src/css/style.css b/static/src/css/style.css new file mode 100644 index 0000000..83a6075 --- /dev/null +++ b/static/src/css/style.css @@ -0,0 +1,355 @@ +.pos .pos-header-custo{ + position: fixed; + display: table-cell; + left:0; + top:0; + width:100%; + height:45px; + margin:0; + padding:0; + border-right: 1px solid #373737; + text-align:left; + line-height:normal; + vertical-align: middle; + display: flex; + align-items: center; + background-color: #f1eeef; + margin-top: 65px; +} + +.pos .pos-topheader{ + height: auto !important; + background-color: #f1eeef; + z-index: 100; +} + +.pos .pos-topheader-title{ + background-color: #195a69; + color: #fff; + display: flex; + align-items: center; + justify-content: center; + text-transform: uppercase; + height: 65px; + position: relative; +} + +.pos .pos-topheader-title h1{ + margin: 0; +} + +.pos .pos-topheader-title, .pos .pos-topheader{ + position: relative; +} + +.pos .pos-topheader-title{ + width: 100%; +} + +.pos .pos-text { + text-align: center; + height: 45px; + font-size: 30px; +} + +.pos .pos-content{ + top: 65px; +} + +.pos .pos-logo { + position: absolute; + float: right; + right: 0; + top: 0; + height: 35px; + margin: 7px; +} + +.logo-scan{ + width: 150px; +} + +.pos .shop-name{ + +} + +.pos .leftpane .btn-container { + display: flex; + justify-content: center; + align-items: center; + min-height: 300px; + border-top: solid 3px rgb(110, 200, 155); +} + +.pos .scale-screen{ + position: fixed; + bottom: 0; + top: inherit; + z-index: 100; +} + +.pos .scale-screen .weight-brut, .pos .scale-screen .label-scale, +.pos .scale-screen .label-scale-cont { + font-size: 25px; + margin: 35px 16px 0px 16px; + text-align: left; + display: inline-block; + /*width: 40%;*/ +} + +.pos .scale-screen .label-scale.margin-top{ + /*margin: 50px 16px 0px 16px;*/ + margin: 16px; +} + +.pos .scale-screen .label-scale-cont { + margin: 0px 16px 0px 16px; +} + +.pos .scale-screen .add-transaction{ + margin: 0 auto; + text-align: center; + font-size: 32px; + background: #195a69; + color: white; + border-radius: 0; + padding: 16px; + width: 200px; + margin: 0 auto; + cursor: pointer; +} + +.page-first { + -webkit-flex: 1; + flex: 1; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + position: relative; + width: auto; + height: 100%; + box-shadow: 0px 6px 0px -3px rgba(0, 0, 0, 0.07) inset; + background: #D8D7D7; + background-repeat: no-repeat; + overflow: hidden; + background-size: cover; + transition: all 300ms ease-in-out; + background: rgba(216,215,215,0.9); + z-index: 99; +} + +.page-first .pos-text { + font-size: 40px; + font-weight: bold; + margin-bottom: 30px; + margin-top: -190px; +} + +.pos-footer{ + background: rgba(216,215,215,0.9); + padding: 30px 0px; +} + +.pos .rightpane{ + left: 0; + top: 45px; +} + +.pos .product-screen .leftpane{ + display: none; +} + +.screen .screen-content-flexbox { + margin: 0px auto; + text-align: left; + height: 100%; + overflow: hidden; + position: relative; + display: -webkit-flex; + -webkit-flex-flow: column nowrap; + flex-flow: column nowrap; +} + +h1.product-name { + font-size: 30px; + margin: 0; + color: #555555; +} + +.pos-confirm{ + padding: 20px; + background-color: rgba(226, 240, 217, 0.5); +} + +.pos .scale-screen .computed-price{ + text-align: right; + margin: 16px; + background: white; + padding: 20px; + padding-right: 30px; + font-size: 56px; + border-radius: 3px; + font-family: Inconsolata; + text-shadow: 0px 2px 0px rgb(210, 210, 210); + box-shadow: 0px 2px 0px rgb(225,225,225) inset; + font-weight: normal; +} + +.pos .scale-screen .product-price { + font-size: 25px; + margin: 10px; + text-align: center; + display: inline-block; + width: 30%; +} + +.pos .popup .confirm-center .button { + float: initial; + margin: 0 auto; + margin-top: 10px; +} + +.pos .pos-text ul{ + display: flex; + height: 45px; +} + +.pos .pos-text li{ + background-color: #bfbfbf; + text-align: center; + display: inline-block; + list-style-type: none; + font-size: 20px; + color: #fff; + padding: 10px 20px; + margin: 0px 5px; +} + +.pos .pos-text .li-active{ + background-color: #fba353; + color: #fff; + text-align: center; +} + +.pos .rightpane-header{ + height: 48px; +} + +.text-foot{ + font-size: 20px; + font-weight: bold; + margin-top: 50px; +} + +.doublon-body { + text-align: left; + font-size: 20px; + padding: 0px 75px; +} + +.pos .popup.popup-barcode .footer { + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 10px; +} + +.pos .popup.popup-barcode .body{ + margin-top: 50px; +} + +.screen .rightpane .top-content { + position: relative; +} +/* +.pos-bottom { + width: 100%; + position: absolute; + bottom: 0; +}*/ + +.centered-content-flex { + font-size: 22px; + display: flex; + background-color: #e5e5e5; + align-items: center; + justify-content: space-around; +} + +.pos .centered-content-flex .computed-price{ + text-align: right; + margin: 16px; + background: white; + padding: 20px; + padding-right: 30px; + font-size: 56px; + border-radius: 3px; + font-family: Inconsolata; + text-shadow: 0px 2px 0px #d2d2d2; + box-shadow: 0px 2px 0px #e1e1e1 inset; + width: 100%; + font-weight: normal; +} + +.pos .centered-content-flex .weight { + text-align: right; + margin: 16px; + background: white; + padding: 20px; + padding-right: 30px; + font-size: 56px; + border-radius: 3px; + font-family: Inconsolata; + text-shadow: 0px 2px 0px rgb(210, 210, 210); + box-shadow: 0px 2px 0px rgb(225,225,225) inset; +} + +.pos-header-custo .button{ + left: 0px; + margin-left: 16px; + /*position: absolute;*/ + top: 0px; + line-height: 32px; + padding: 3px 13px; + font-size: 20px; + background: rgb(230, 230, 230); + margin: 12px; + border-radius: 3px; + border: solid 1px rgb(209, 209, 209); + cursor: pointer; + transition: all 150ms linear; +} + +.flex-poids{ + display: flex; + flex-direction: column; +} + +.screen .top-content{ + position: relative; + height: 45px; + border-bottom: none; +} + +.screen .top-content .button{ + position: relative; +} + +.pos-confirm-screen { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + position: relative; + flex-direction: column; + background-color: rgba(226, 240, 217, 0.5); +} + +.pos-confirm-screen h1{ + margin-top: 15px; +} + +.pos-bottom.pos-bottom-confirm{ + height: 100%; +} \ No newline at end of file diff --git a/static/src/img/logo-scan.png b/static/src/img/logo-scan.png new file mode 100644 index 0000000000000000000000000000000000000000..4fe7f485802d028c3b89d5aa50887e52ad9bcc19 GIT binary patch literal 24891 zcmY&<1yI#Z)b}N&L`jkEk`htrl9ra1R9af;1_1%-?(S|BkWxZgKt!Ykln%*DyocwV zcfR>%{xTq!yL)%fp7V>dp{mNVH*v^u5D3Igc{wR{1OnwAe7}!{313N;me&vnT75!opUt>8IY_TvF#X#` zp)SUJ>|vU^ZN8Fx+E`)Pql~(-@^3ah@!^@9N(Bu{Mb?GHObPS}DSK;Kw3jp?LcgdS zj7f))OJmqR^Z|GQ?_CFf?b2cKBYO88UNZX`dfCLV6d>?^xK(4C7;>nemXZMlMTH_Nr0#VvlZtK%NkAsf-Xcj+6vcZ90A2&!+kCnJIM3Rn^5`U_>eX`1^ z-Oy7c>!)c4OP|6*t+BK7!zF&@c9eF76$99hIli~4@;Vtmv zV+Nv}U5GN|EIPbfbm*%*_>Jy&alu-Ps_z7YZ8pMmk10B}%d3f=V zovZPXO`!Vwkz%2jw>_0{@fR1z#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w!8x z^_@JVMe?yxqVGrqzY81E>%~iV!ancuw7q}zbKV^?z3kVkW8Lz(A1_yw)9qSTrxk}# z6^FTKs`mR~{(U`EVAZEpEd^6GxO?Q=%j%!K5yjFIKo55N0*qoz*gg`+oWvm8dy*rC z^E)M5ss;=ro#Z!GZU$`ErgbV+kGY@m`ZY~XEg9QnAtpWQI*R@{Tbn%R?cB=X3V$_n z-~XhYtbOCW2`lD+g9p1z%G$0E+$|~Pj(4jarJcsBpu`*ky&5K`%V1%?*eq-p+!#yc z&cnFm78#1$EUewl5`=k{s%;2SzpwkKtutbWY}kmzs_NCxB&{H6hv=9t&tsMJ9r+5p(Sj? zzsM{T3g#}4jK<%d_0SX@pEQnb?C%1z{J`D)7M!H(c-8KV3m0if%e0FG4fIJa;@`i| zZH}53SA&7ifsLhU${B)%S~m7m;0pkNcp*@vunSOl4{chvh2R}p{12WJ32p*GXM}yK W;j=+MF~)GF2u)Qzl_DjJ!2ba;A0@f~ literal 0 HcmV?d00001 diff --git a/static/src/img/logo-vracoop.png b/static/src/img/logo-vracoop.png new file mode 100644 index 0000000000000000000000000000000000000000..1bd32e01e438667e47d4dc6309daeb58cf81722f GIT binary patch literal 6387 zcmV40{{R3YHcGc00033P)t-s{{H^| z|Nj6003L0C`imz2%O(5!`|M z>yna^W@cu(y1LNN(A?bI!NI{RD=Vm|sIs!MARr)hb#)~rCCtpsH8nMgii$cqI#W|q zTU%R$gM(jRUrI_!eSLiz8X9nLaR1RJ6B83KFfczqKMM;B#i1R1WD@_@C*!#yPb>@+ zOIT<+5FBK65kN~ASZ4+o8(ByV|J*2MR1dC=8cIA19~cDdzaudx2NVtinS2(~b|BZT zAYe5QJTC|fCobxPB)VuEdPEbQR~QT{Gdv*)!fqbFn;hSLBBNXxDHjHdP8GU97bgG! z7pzG{K~#90?VXFC8n^Ml(c0z>#~Ti~2OJ!C7!Eg0W5?+$P3<;K(qGyp|Np=8(@2_; zRu9=XOq=91F|!AKYLZpM>~?1Gh)-A^-#V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deq@F1=2cKR!x37@Scimt+*l|U#`vR9Iv)VpV zhrRq*EVjz*@!*we@A+*}R?49j$?S=t}yX9{YVqxw1pbW>T7Y#UtU@2lk%+&HK-7L0{ZrZ9;wIyi9*}Ga#g=!YN?dZ&te1l4m@j_|8W3z6p zR-+F~{Jj1H=bU8Wb@WAS?Q(;IkcHHXZSPM2P%tAZ zHB--M9ZP9Ymk>?^EMhQzk~;k1hCg{f^gMud4U(WSL=yf9ru`+-mjYx`&9vRVHkp*& zW)DX~6Xprgf&h4X>YOod5T7uKTp+?H=umHnhd=xMQ(L^^Ykp zZGUkrd$+7Y9=`4#sV1&Yhxp`i(XQGfZ!FiOHOMvZ*+YTJ_fh+E@z{5j9R77c@*yj) z<5#yg5Ld_UwlXe@M!^JuBrft8V*;f&&E5}duKOYSftR*X=AV0+KHOlnre>u_5wTm zX7i;R>Dr#*;goVV`+xBeX|Zld!PQcT;0uOC8tAPALE93?)(mIL_4(sltr*Oo4|&IszX0 zr-zc$uUH%UjD{2OL$?xE6hp~w#9XJK6}1F?&e;~i`1G+klJ!eVm3J(bP)jaAx|l); z^bINHQ@Om7Fac!q#>-hmG%X)p`rTdjAgg)B%QmVqGEa^^=Gj-Jcci2mmV_p7K5Q zA;>#*bmp-2I1}MUY1k>L*B?kj*a#3d&B8j~gAz8W{XCY{({*jLegxvF4&k*5c}M5q zBs2Gz9WwZeP-{mWm&4hqD=G{d2`zrBiM=E28A}mtCS@Ri2X<%A`5kD~OBhRl_z6Y9is(BX z)l6U$QLuT^K(s{Ko}MrpUBMA3+b~SKHa?F?)Bxe1L#zgh1&ZDL zz47@O<}sZ7L&!|(O14&uK)Nzyn;ba#X0rpda|?_};+m@6lb15hXsOovi(@YcQApigX literal 0 HcmV?d00001 diff --git a/static/src/js/container.js b/static/src/js/container.js new file mode 100644 index 0000000..e041998 --- /dev/null +++ b/static/src/js/container.js @@ -0,0 +1,705 @@ +/* + © 2020 Le Filament () + License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +*/ + + +odoo.define('vracoop_pos_free_balance_V2.container_balance', function (require) { + "use strict"; + + var chrome = require('point_of_sale.chrome'); + var gui = require('point_of_sale.gui'); + var models = require('point_of_sale.models'); + var screens = require('point_of_sale.screens'); + var popups = require('point_of_sale.popups'); + var container = require('pos_container.container'); + + var models_and_db = require('pos_container.models_and_db'); + + var core = require('web.core'); + var rpc = require('web.rpc'); + var utils = require('web.utils'); + var QWeb = core.qweb; + var _t = core._t; + + var round_pr = utils.round_precision; + + + var ConfirmPopupWidgetPesee = popups.extend({ + template: 'ConfirmPopupWidgetPesee', + }); + gui.define_popup({name:'confirm-pesee', widget: ConfirmPopupWidgetPesee}); + + // The initial screen that allows you to scan container + var PresentationScreenWidget = screens.ScreenWidget.extend({ + template: 'PresentationScreenWidget', + + // Ignore products, discounts, and client barcodes + // barcode_product_action: function(code){}, + barcode_discount_action: function(code){}, + barcode_client_action: function(code){}, + + init: function(parent, options) { + this._super(parent, options); + this.transactions = []; + this.editing = false; + }, + + // this method shows the screen and sets up all the widget related to this screen. Extend this method + // if you want to alter the behavior of the screen. + show: function(){ + this._super(); + + var scale_screen = this.gui.screen_instances['balancescale']; + scale_screen.$el.removeClass('oe_hidden'); + + var screen = this.gui.screen_instances['products']; + screen.$el.removeClass('oe_hidden'); + $("#pos-header-text-selec").removeClass('oe_hidden'); + $("#validation-bloc").addClass('oe_hidden'); + $("#pos-topheader-scale").addClass('oe_hidden'); + $("#pos-header-text-confirm").addClass('oe_hidden'); + }, + + // this methods hides the screen. It's not a good place to put your cleanup stuff as it is called on the + // POS initialization. + hide: function(){ + this._super(); + var screen = this.gui.screen_instances['products']; + screen.$el.addClass('oe_hidden'); + $("#pos-header-text-selec").addClass('oe_hidden'); + $("#pos-topheader-scale").addClass('oe_hidden'); + }, + + }); + + gui.define_screen({ + 'name': 'presentation', + 'widget': PresentationScreenWidget, + 'condition': function(){ + return this.pos.config.balance_id; + }, + }); + + // Screen confirmation de la pesée + var ConfirmationScreen = screens.ScreenWidget.extend({ + template: 'ConfirmationScreen', + + next_screen: 'presentation', + previous_screen: 'products', + + init: function(parent, options) { + this._super(parent, options); + + }, + + show: function(){ + this._super(); + var self = this; + + this.renderElement(); + var scale_screen = this.gui.screen_instances['balancescale']; + scale_screen.$el.removeClass('oe_hidden'); + + this.$('.next,.back-presentation').click(function(){ + self.gui.show_screen('presentation'); + }); + + $("#pos-header-text-confirm").removeClass('oe_hidden'); + $("#validation-bloc").addClass('oe_hidden'); + $("#pos-topheader-scale").addClass('oe_hidden'); + }, + + hide: function(){ + this._super(); + $("#pos-topheader-scale").addClass('oe_hidden'); + }, + + get_product_name: function(){ + var product = this.gui.get_current_screen_param('product'); + + return (product ? product.display_name : undefined) || 'Unnamed Product'; + }, + // get_product_price: function(){ + // var product = this.gui.get_current_screen_param('product'); + // return (product ? product.get_price(pricelist, 2) : 0) || 0; + // }, + // get_product_uom: function(){ + // var product = this.gui.get_current_screen_param('product'); + + // if(product){ + // return this.pos.units_by_id[product.uom_id[0]].name; + // }else{ + // return ''; + // } + // }, + + }); + + gui.define_screen({ + 'name': 'confirmation', + 'widget': ConfirmationScreen, + }); + + // Add the FloorScreen to the GUI, and set it as the default screen + chrome.Chrome.include({ + build_widgets: function(){ + this._super(); + if (this.pos.config.balance_id) { + this.gui.set_startup_screen('presentation'); + } + }, + }); + + gui.Gui.include({ + show_saved_screen: function(order,options) { + this._super(); + options = options || {}; + this.close_popup(); + this.show_screen(this.startup_screen); + }, + }); + + // We need to modify the OrderSelector to hide itself when we're on + // the floor plan + chrome.OrderSelectorWidget.include({ + + hide: function(){ + this.$el.addClass('oe_invisible'); + }, + show: function(){ + this.$el.removeClass('oe_invisible'); + }, + renderElement: function(){ + var self = this; + this._super(); + if (this.pos.config.balance_id) { + if (this.pos.get_order()) { + this.$el.removeClass('oe_invisible'); + } else { + this.$el.addClass('oe_invisible'); + } + } + }, + }); + + screens.ProductScreenWidget.include({ + + previous_screen: 'presentation', + + hide: function(){ + this._super(); + $("#pos-header-text-prod").addClass('oe_hidden'); + $("#pos-topheader-scale").addClass('oe_hidden'); + + var screen = this.gui.screen_instances['products']; + // screen.$el.removeClass('oe_hidden'); + }, + + show: function(){ + this._super(); + var self = this; + + this.product_categories_widget.reset_category(); + this.numpad.state.reset(); + + this.$('.back').click(function(){ + self.gui.show_screen('presentation'); + }); + + $("#pos-header-text-prod").removeClass('oe_hidden'); + $("#pos-topheader-scale").addClass('oe_hidden'); + + var container = this.gui.get_current_screen_param('container'); + if (container) { + this.pos.proxy.reset_tare(); + } + }, + + renderElement: function(){ + this._super(); + + var self = this; + this.$('.back').click(function () { + self.gui.show_screen('presentation'); + }); + }, + + click_product: function(product) { + if (this.pos.config.is_balance_free){ + var order = this.pos.get_order(); + var selected_orderline = order.get_selected_orderline(); + if (product.to_weight && selected_orderline && + selected_orderline.product === this.pos.get_container_product()){ + var container = selected_orderline.get_container(); + this.gui.show_screen( + 'balancescale', + {product: product, + container: container, + old_orderline: selected_orderline}); + } else { + this._super(product); + } + } + else{ + this._super(product); + } + $("#validation-bloc").removeClass('oe_hidden'); + + }, + + close: function(){ + this._super(); + + this.pos.proxy_queue.clear(); + }, + + }); + + screens.ScreenWidget.include({ + + barcode_container_action: function(code){ + var self = this; + + if (self.pos.scan_container(code)) { + + // Vérfification: est-ce qu'un container vient d'être utilisé dans l'heure + if (self.pos.scan_container_check(code)){ + var transaction = self.pos.scan_container_check(code); + this.gui.show_popup('doublon-barcode',{ + title: _t('Contenu déjà enregistré récemment:'), + transaction: transaction, + confirm: function(){ + var transaction = self.pos.scan_container_check(code) + self.delete_selected_transaction(transaction, code); + self.gui.show_screen('products'); + }, + }); + + } else { + self.gui.show_screen('products'); + } + + } else { + self.gui.show_screen('balancecontainerscale', {barcode: code.base_code}); + } + }, + + delete_selected_transaction: function(transaction, barcode){ + var self = this; + + if (!transaction.id){ + self.deleted_transaction(transaction.container_ean13) + } + else { + rpc.query({ + model: 'pos.transaction', + method: 'unlink', + args: [transaction.id], + }).then(function(){ + self.deleted_transaction(transaction.container_ean13); + },function(err,ev){ + ev.preventDefault(); + var error_body = _t('Your Internet connection is probably down.'); + if (err.data) { + var except = err.data; + error_body = except.arguments && except.arguments[0] || except.message || error_body; + } + self.gui.show_popup('error',{ + 'title': _t('Error: Could not Save Changes'), + 'body': error_body, + }); + } + ); + } + }, + deleted_transaction: function(barcode){ + var self = this; + this.pos.db.remove_transactions([barcode]); + }, + + }); + + var BalanceScaleScreenWidget = screens.ScaleScreenWidget.extend({ + template: 'BalanceScaleScreenWidget', + + next_screen: 'confirmation', + previous_screen: 'products', + + init: function(parent, options){ + this._super(parent, options); + this.weight_container = 0; + this.weight_brut = 0; + this.weight = 0; + }, + + + show: function(){ + // $("#validation-bloc").removeClass('oe_hidden'); + // this._super(); + var self = this; + var queue = this.pos.proxy_queue; + + this.set_weight(0); + this.renderElement(); + + var container = this.gui.get_current_screen_param('container'); + + queue.schedule(function () { + return self.pos.proxy.reset_weight().then(function () { + self.set_weight(0); + self.set_price(0); + }); + }, {duration: 500}); + + // format price + var price = this.format_price(this.get_product_price()); + + if (container) { + // format tare + var tare = this.format_tare(container); + queue.schedule(function () { + return self.pos.proxy.scale_read_data_price_tare(price, tare).then(function (scale_answer) { + self.set_weight(scale_answer.weight); + self.set_price(scale_answer.price); + if ((scale_answer.error === '30' || scale_answer.error === '31') && scale_answer.weight !== 0) { + self.gui.show_screen(self.next_screen); + // add product *after* switching screen to scroll properly + self.order_product(); + self.pos.proxy.reset_tare(); + } + }); + }, {duration: 500, repeat: true}); + + } else { + queue.schedule(function () { + return self.pos.proxy.scale_read_data_price(price).then(function (scale_answer) { + self.set_weight(scale_answer.weight); + self.set_price(scale_answer.price); + if ((scale_answer.error === '30' || scale_answer.error === '31') && scale_answer.weight !== 0) { + self.gui.show_screen(self.next_screen); + // add product *after* switching screen to scroll properly + self.order_product(); + } + }); + }, {duration: 500, repeat: true}); + } + this._super(); + + var self = this; + + this.$('.next,.add-transaction').click(function(){ + self.create_transaction(); + }); + $("#pos-topheader-scale").removeClass('oe_hidden'); + $("#pos-header-text-peser").removeClass('oe_hidden'); + + }, + + + get_container: function(){ + return this.gui.get_current_screen_param('container'); + }, + + set_weight: function(weight){ + var container = this.get_container(); + this.weight = weight; + this.weight_container = container.weight; + this.weight_brut = container.weight + this.weight; + this.$('.weight').text(this.get_product_weight_string()); + this.$('.computed-price').text(this.get_computed_price_string()); + this.$('.weight-brut').text(this.get_product_weight_string_brut()); + }, + + ////////////////////////////// + // Ajout fonction Toledo? + set_price: function (price) { + if (!price) { + this.$('.computed-price').text(this.get_computed_price_string()); + } else { + this.price = price; + //this.$('.price').text(this.format_currency(price)); + this.$('.computed-price').text(this.format_currency(price)); + } + }, + + get_price: function () { + return this.price; + }, + + format_tare: function (container) { + var tare = (Math.abs(container.weight) * 1000).toString(); + tare = ("0000" + tare).slice(-4); + return tare; + }, + + format_price: function (product_price) { + var price = (product_price * 1000).toString(); + price = ("000000" + price).slice(-6); + return price; + }, + + // FIN + ////////////////////////////// + + + get_current_container_weight: function(){ + var container = this.get_container(); + if (container){ + return (this.weight_container || 0).toFixed(3) + ' kg'; + } + else{ + '' + } + }, + + get_current_container_name: function(){ + var container = this.get_container(); + if (container){ + return container.name; + } + else{ + '' + } + }, + + get_product_weight_string_brut: function(){ + var product = this.get_product(); + var defaultstr = (this.weight + this.weight_container || 0).toFixed(3) + ' Kg'; + if(!product || !this.pos){ + return defaultstr; + } + var unit_id = product.uom_id; + if(!unit_id){ + return defaultstr; + } + var unit = this.pos.units_by_id[unit_id[0]]; + var weight = round_pr(this.weight + this.weight_container || 0, unit.rounding); + var weightstr = weight.toFixed(Math.ceil(Math.log(1.0/unit.rounding) / Math.log(10) )); + weightstr += ' ' + unit.name; + return weightstr; + }, + + hide: function(){ + this._super(); + $("#pos-topheader-scale").addClass('oe_hidden'); + $("#pos-header-text-peser").addClass('oe_hidden'); + }, + + create_transaction: function(){ + var self = this; + var fields = {}; + var container = this.get_container(); + var product = this.get_product(); + + var qrcode = ''; + var ean13 = ''; + var ean13_verif = ''; + fields['qrcode'] = qrcode.concat('https://qr.mayam.fr/', container.barcode); + fields['container_ean13'] = container.barcode; + + fields['product_id'] = this.get_product().id; + // var product_id = (this.get_product().id).toString(); + var product_id = ("00000" + product.default_code.toString()).slice(-5); + + var weight_str = (this.weight * 1000).toString(); + weight_str = ("00000" + weight_str).slice(-5); + + ean13 = ean13.concat(26,product_id,weight_str,4); + + var weight_brut_str = (this.weight_brut * 1000).toString(); + weight_brut_str = ("00000" + weight_brut_str).slice(-5); + + ean13_verif = ean13_verif.concat(26,'00999',weight_brut_str,4); + + var ean13_digit = this.pos.barcode_reader.barcode_parser.sanitize_ean(ean13); + var ean13_verif_digit = this.pos.barcode_reader.barcode_parser.sanitize_ean(ean13_verif); + + fields['ean13'] = ean13_digit; + fields['ean13_verif'] = ean13_verif_digit; + fields['balance_id'] = this.pos.get_balance_id(); + var today = new Date(); + var date = today.getFullYear() + '-' + (today.getMonth()+1) + '-' + today.getDate(); + var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds(); + var date_time = date + ' ' + time; + fields['write_date'] = date_time; + + fields['weight_net'] = this.weight; + + var pricelist = this._get_active_pricelist(); + fields['price_product'] = (product ? product.get_price(pricelist, this.weight) : 0) || 0; + + fields['price_net'] = fields['weight_net'] * fields['price_product']; + + fields.name = product.display_name; + + this.pos.push_transaction(fields).then( + this.pushed_transaction(fields["ean13"]) + ); + }, + + pushed_transaction: function(barcode){ + var self = this; + + var product = this.get_product(); + console.log(product); + this.gui.show_screen('confirmation',{product: product}); + // self.gui.show_screen(self.next_screen); + // self.gui.show_popup('confirm-pesee',{ + // 'title': _t('Merci'), + // 'body': _t('La pesée est validée'), + // confirm: function(){ + // self.gui.show_screen(self.next_screen); + // }, + // }); + }, + + }); + + gui.define_screen({ + name:'balancescale', + widget: BalanceScaleScreenWidget, + }); + + + +/*--------------------------------------*\ + | THE SCALE SCREEN FREE | + | BALANCE CONTAINER | +\*======================================*/ + +// The free balance container scale screen +// displays the weight of +// a new container on the electronic scale. + + var BalanceContainerScaleScreenWidget = screens.ScaleScreenWidget.extend({ + template: 'BalanceContainerScaleScreenWidget', + + next_screen: 'presentation', + previous_screen: 'presentation', + + init: function(parent, options){ + this._super(parent, options); + }, + + show: function(){ + + var self = this; + var queue = this.pos.proxy_queue; + var priceStr = '001000'; // bizerba doesn't accept '000000' as unit price + + queue.schedule(function () { + return self.pos.proxy.reset_weight().then(function () { + self.set_weight(0); + }); + }, {duration: 500}); + + queue.schedule(function () { + return self.pos.proxy.scale_read_data_price(priceStr).then(function (scale_answer) { + self.set_weight(scale_answer.weight); + if ((scale_answer.error === '30' || scale_answer.error === '31') && scale_answer.weight !== 0) { + self.gui.show_screen(self.next_screen); + self.create_container(); + } + }); + }, {duration: 500, repeat: true}); + + this._super(); + var self = this; + + this.$('.next,.add-container').click(function(){ + self.create_container(); + }); + + if(this.pos.config.iface_vkeyboard && this.chrome.widget.keyboard){ + this.chrome.widget.keyboard.connect($(this.el.querySelector('.container-name input'))); + } + + $("#pos-header-text-peser").removeClass('oe_hidden'); + + }, + + + hide: function(){ + this._super(); + $("#pos-header-text-peser").addClass('oe_hidden'); + }, + + get_product: function(){ + return this.pos.get_container_product(); + }, + create_container: function(){ + var self = this; + var fields = {}; + + fields['weight'] = this.weight; + + fields.barcode = this.gui.get_current_screen_param('barcode') || false; + fields.name = fields.name || _t('Container'); + + this.pos.push_container(fields).then( + this.pushed_container(fields["barcode"],fields) + ); + }, + pushed_container: function(barcode,container){ + var self = this; + + var selected_order = this.pos.get_order(); + + selected_order.add_container(container); + + self.gui.show_popup('confirm-pesee',{ + 'title': _t('Merci'), + 'body': _t('La pesée est validée'), + confirm: function(){ + self.gui.show_screen(self.next_screen); + }, + }); + + }, + close: function(){ + this._super(); + if (this.pos.config.iface_vkeyboard && this.chrome.widget.keyboard) { + this.chrome.widget.keyboard.hide(); + } + }, + }); + + gui.define_screen({ + name:'balancecontainerscale', + widget: BalanceContainerScaleScreenWidget, + }); + + var CheckBarcodePopupDoublon = popups.extend({ + + template:'CheckBarcodePopupDoublon', + show: function(options){ + + var self = this; + options = options || {}; + + this.name = options.transaction.name ; + this.weight_net = options.transaction.weight_net ; + this.price_product = options.transaction.price_product.toFixed(2); ; + this.price_net = options.transaction.price_net.toFixed(2); + + this._super(options); + + this.renderElement(); + + }, + }); + + gui.define_popup({name:'doublon-barcode', widget: CheckBarcodePopupDoublon}); + + return { + BalanceContainerScaleScreenWidget: BalanceContainerScaleScreenWidget, + PresentationScreenWidget: PresentationScreenWidget, + BalanceScaleScreenWidget: BalanceScaleScreenWidget, + CheckBarcodePopupDoublon: CheckBarcodePopupDoublon, + ConfirmPopupWidgetPesee: ConfirmPopupWidgetPesee, + ConfirmationScreen: ConfirmationScreen, + }; + +}); diff --git a/static/src/js/custo_header.js b/static/src/js/custo_header.js new file mode 100644 index 0000000..323ffe1 --- /dev/null +++ b/static/src/js/custo_header.js @@ -0,0 +1,43 @@ +// © 2020 Le Filament () +// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +odoo.define('vracoop_pos_free_balance_V2.custo_header', function (require) { +"use strict"; + +var chrome = require("point_of_sale.chrome"); +var PosBaseWidget = require('point_of_sale.BaseWidget'); + +chrome.Chrome.include({ + build_widgets: function(){ + this.widgets.push({ + 'name': 'shopname', + 'widget': ShopnameWidget, + 'replace': '.placeholder-ShopnameWidget'}); + this._super(); + }, + +}); + +var ShopnameWidget = PosBaseWidget.extend({ + template: 'ShopnameWidget', + init: function(parent, options){ + options = options || {}; + this._super(parent,options); + }, + renderElement: function(){ + var self = this; + this._super(); + }, + get_shopname: function(){ + var header_text = this.pos.get_name_header(); + if(header_text){ + return header_text; + }else{ + return ""; + } + }, +}); +return { + 'ShopnameWidget': ShopnameWidget, + }; +}); diff --git a/static/src/js/devices.js b/static/src/js/devices.js new file mode 100644 index 0000000..58fdfc0 --- /dev/null +++ b/static/src/js/devices.js @@ -0,0 +1,81 @@ +// © 2020 Le Filament () +// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +odoo.define('vracoop_pos_free_balance_V2.devices', function (require) { + "use strict"; + + var devices = require('point_of_sale.devices'); + + devices.ProxyDevice.include({ + reset_weight: function () { + var ret = new $.Deferred(); + this.message('reset_weight').then(function (status) { + ret.resolve(status) + }, function () { + ret.resolve({weight: 0.0, price: 0.0, unit: 'kg', info: 'ko'}) + }); + return ret; + }, + + reset_tare: function () { + var price = '001000'; // bizerba doesn't accept '000000' as unit price + var ret = new $.Deferred(); + this.message('scale_price', {price: price}).then(function (weight) { + ret.resolve(weight); + }, function () { + ret.resolve({weight: 0.0, price: 0.0, unit: 'kg', info: 'ko'}) + }); + return ret; + }, + + scale_read_data_price: function (price) { + var self = this; + var ret = new $.Deferred(); + if (self.use_debug_weight) { + return (new $.Deferred()).resolve({ + weight: this.debug_weight, + price: this.debug_price, + unit: 'kg', + info: 'ok' + }); + } + this.message('scale_price', {price: price}) + .then(function (weight) { + ret.resolve(weight); + }, function () { + ret.resolve({weight: 0.0, price: 0.0, unit: 'kg', info: 'ko'}); + }); + return ret; + }, + + scale_read_data_price_tare: function (price, tare) { + var self = this; + var ret = new $.Deferred(); + if (self.use_debug_weight) { + return (new $.Deferred()).resolve({ + weight: this.debug_weight, + price: this.debug_price, + unit: 'kg', + info: 'ok' + }); + } + this.message('scale_price_tare', {price: price, tare: tare}) + .then(function (weight) { + ret.resolve(weight); + }, function () { + ret.resolve({weight: 0.0, price: 0.0, unit: 'kg', info: 'ko'}); + }); + return ret; + }, + + debug_set_weight: function (kg) { + this._super(kg); + this.debug_price = NaN; + }, + + debug_reset_weight: function () { + this._super(); + this.debug_price = 0.0; + }, + }); +}); diff --git a/static/src/js/models_and_db.js b/static/src/js/models_and_db.js new file mode 100644 index 0000000..85c4ac5 --- /dev/null +++ b/static/src/js/models_and_db.js @@ -0,0 +1,294 @@ +/* + © 2020 Le Filament () + License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +*/ + +odoo.define('vracoop_pos_free_balance_V2.models_and_db_balance', function (require) { + "use strict"; + + var PosDB = require('point_of_sale.DB'); + var models = require('point_of_sale.models'); + var rpc = require('web.rpc'); + var config = require('web.config'); + var config = require('web.config'); + + var core = require('web.core'); + var QWeb = core.qweb; + + var utils = require('web.utils'); + var field_utils = require('web.field_utils'); + var round_di = utils.round_decimals; + var round_pr = utils.round_precision; + + + // include not available => extend + models.PosModel = models.PosModel.extend({ + + scan_container_check: function(parsed_code){ + var transactions = this.db.get_transactions_sorted(1000); + var container = this.db.get_container_by_barcode( + parsed_code.base_code); + + var selected_order = this.get_order(); + + selected_order.add_container(container); + + var today = new Date(); + var date = today.getFullYear() + '-' + (today.getMonth()+1) + '-' + today.getDate(); + + // var isostring = today.toISOString(); + // var localestring = today.toLocaleString(); + // var dateUTC = today.toUTCString(); + var min = today.getMinutes(); + if (min < 10) { + min = "0" + today.getMinutes(); + } + + var hour = today.getHours()-1; + if (hour < 10) { + hour = "0" + hour; + } + var time = (hour) + ":" + min + ":" + today.getSeconds(); + var date_time = date + ' ' + time; + + for(var i = 0, len = transactions.length; i < len; i++) { + var transaction = transactions[i]; + if ( + (transaction.container_ean13 == parsed_code.base_code) && + transaction.write_date > date_time ) { + return transaction; + } + } + + return false; + }, + + // saves the transaction locally and try to send it to the backend. + // it returns a deferred that succeeds after having tried to send + // the container and all the other pending containers. + push_transaction: function(transaction, opts) { + opts = opts || {}; + var self = this; + + if(transaction){ + this.db.add_transactions([transaction]); + } + + var pushed = new $.Deferred(); + + this.flush_mutex.exec(function(){ + var flushed = self._save_transactions_to_server(self.db.get_transactions_sorted(), opts); + + flushed.always(function(ids){ + pushed.resolve(); + }); + + return flushed; + }); + return pushed; + }, + + // send an array of containers to the server + // available options: + // - timeout: timeout for the rpc call in ms + // returns a deferred that resolves with the list of + // server generated ids for the sent containers + _save_transactions_to_server: function (transactions, options) { + var self = this; + var transactions= transactions.filter(transaction => !( "id" in transaction)) + if (!transactions || !transactions.length) { + var result = $.Deferred(); + result.resolve([]); + return result; + } + + options = options || {}; + var timeout = typeof options.timeout === 'number' ? options.timeout : 7500 * transactions.length; + + return rpc.query({ + model: 'pos.transaction', + method: 'create_from_ui', + args: [transactions], + }, { + timeout: timeout, + }) + .then(function (server_ids) { + _.each(transactions, function(transaction, key){ + transaction["id"] = server_ids[key] + }); + self.set('failed',false); + return server_ids; + }).fail(function (type, error){ + if(error.code === 200 ){ // Business Logic Error, not a connection problem + //if warning do not need to display traceback!! + if (error.data.exception_type == 'warning') { + delete error.data.debug; + } + + // Hide error if already shown before ... + if ((!self.get('failed') || options.show_error) && !options.to_invoice) { + self.gui.show_popup('error-traceback',{ + 'title': error.data.message, + 'body': error.data.debug + }); + } + self.set('failed',error); + } + console.error('Failed to send transactions:', transactions); + }); + }, + + // returns the header text from config + get_name_header: function(){ + if (this.config.explication_header) { + return this.config.explication_header; + } + }, + + // returns the header text from config + get_balance_id: function(){ + if (this.config.balance_id) { + return this.config.balance_id; + } + }, + + // load_placeholder_transactions: function(){ + // var self = this; + // var fields = _.find(this.models,function(model){ + // return model.model === 'pos.transaction'; + // }).fields; + + // var domain = [['barcode', '=', 'CONTAINER']]; + // // no need to load it when active because it is already done in standard + // return rpc.query({ + // model: 'product.product', + // method: 'search_read', + // args: [domain, fields], + // }).then(function(products){ + // self.db.add_products(_.map(products, function (product) { + // return new models.Product({}, product); + // })); + // }); + // }, + + }); + + + PosDB.include({ + init: function(parent, options) { + this._super(parent, options); + + this.transaction_sorted = []; + this.transaction_by_barcode = {}; + this.transaction_by_id = {}; + this.transaction_write_date = null; + + this.header_text = ""; + }, + + // returns the header text from config + get_name_header: function(){ + return this.db.get_name_header(); + }, + + add_transactions: function(transactions) { + var updated_count = 0; + var new_write_date = ''; + for(var i = 0, len = transactions.length; i < len; i++) { + var transaction = transactions[i]; + + if (this.transaction_write_date && + new Date(this.transaction_write_date).getTime() + 1000 >= + new Date(transaction.write_date).getTime() ) { + continue; + } else if ( new_write_date < transaction.write_date ) { + new_write_date = transaction.write_date; + } + + if (!this.transaction_by_barcode[transaction.container_ean13]) { + this.transaction_sorted.push(transaction.container_ean13); + } + this.transaction_by_barcode[transaction.container_ean13] = transaction; + + updated_count += 1; + } + + this.transaction_write_date = new_write_date || this.transaction_write_date; + + if (updated_count) { + // If there were updates, we need to completely + // rebuild the search string and the id indexing + + // this.container_search_string = ""; + this.transaction_by_id = {}; + + for (var barcode in this.transaction_by_barcode) { + var transaction = this.transaction_by_barcode[barcode]; + + if(transaction.id){ + this.transaction_by_id[transaction.id] = transaction; + } + // this.container_search_string += this._container_search_string(container); + } + } + + return updated_count; + }, + + get_orders: function(){ + return this.load('transactions',[]); + }, + + get_transaction_by_id: function(id){ + return this.transaction_by_id[id]; + }, + + get_transactions_sorted: function(max_count){ + max_count = max_count ? Math.min(this.transaction_sorted.length, max_count) : this.transaction_sorted.length; + var transactions = []; + for (var i = 0; i < max_count; i++) { + transactions.push(this.transaction_by_barcode[this.transaction_sorted[i]]); + } + + return transactions; + }, + + remove_transactions: function(barcodes){ + for(var i = 0; i < barcodes.length; i++) { + var transaction = this.transaction_by_barcode[barcodes[i]]; + if (transaction){ + var index_s = this.transaction_sorted.indexOf(transaction.container_ean13); + this.transaction_sorted.splice(index_s, 1); + delete this.transaction_by_id[transaction.id]; + delete this.transaction_by_barcode[transaction.container_ean13]; + } + } + }, + + transaction_by_barcode: function(barcode){ + return this.transaction_by_barcode[barcode]; + }, + + get_product_name: function(transaction){ + return transaction.name; + }, + + get_today_date: function(){ + var today = new Date(); + var date = today.getFullYear() + '-' + (today.getMonth()+1) + '-' + today.getDate(); + return date; + }, + + }); + + models.load_models({ + model: 'pos.transaction', + fields: ['product_id', 'name', 'balance_id', 'ean13', 'write_date', 'container_ean13', 'weight_net', 'price_product', 'price_net'], + domain: function(self){ return [['write_date','>',self.db.get_today_date()]]; }, + loaded: function(self, transactions){ + self.db.add_transactions(transactions); + // return self.load_placeholder_transactions(); + }, + }); + +}); \ No newline at end of file diff --git a/static/src/xml/pos.xml b/static/src/xml/pos.xml new file mode 100644 index 0000000..596325d --- /dev/null +++ b/static/src/xml/pos.xml @@ -0,0 +1,289 @@ + + + + + +

+ + +
+ + + +
+
+
+
+ + + Retour + +
+
+
    +
  • 1. Scanner l'étiquette
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
  • 5
  • +
+
+
+
+
+
+
+ 1. Scanner l'étiquette
+
+
+ +
+
+
+
+
+ + +

+ +

+
+ + +
+
+
+
+ + + Retour + +
+
+
    +
  • 1
  • +
  • 2. Peser le contenant et valider
  • +
  • 3
  • +
  • 4
  • +
  • 5
  • +
+
+
+
+
+
+ + + Retour + +

Ajouter un contenant

+
+
+
+ +
+
+ Sauvegarder + +
+
+
+
+
+ + +
+
+
+ + + Retour + +
+
+
    +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4. Peser et valider
  • +
  • 5
  • +
+
+
+
+
+
+
+

+
+ à +
+
+ Valider + +
+
+
+
+
Poids Net
+
+ +
+
+ +
+
Prix
+
+ 0.00 € +
+
+ +
+
+
Poids Brut total:
+
+ 1 +
+
+ +
+
Tare contenant:
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ + + Retour + +
+
+
    +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
  • 5. Pesée confirmée
  • +
+
+
+
+
+
+
+ +
+

+ +
+
+
+
+ + + + + + + + + + + + + + + + + +
+
+
+ + + Retour + +
+
+
    +
  • 1
  • +
  • 2
  • +
  • 3. Sélectionner un produit
  • +
  • 4
  • +
  • 5
  • +
+
+
+
+
+ + +
+ diff --git a/views/assets.xml b/views/assets.xml new file mode 100644 index 0000000..89bd64a --- /dev/null +++ b/views/assets.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/views/pos_config_views.xml b/views/pos_config_views.xml new file mode 100644 index 0000000..33c293d --- /dev/null +++ b/views/pos_config_views.xml @@ -0,0 +1,44 @@ + + + + + pos.config.form.inherit.balance + pos.config + + +
+ +
+
+ +
+
+
+
+
+
+
+ +
diff --git a/views/pos_transaction.xml b/views/pos_transaction.xml new file mode 100644 index 0000000..46ff045 --- /dev/null +++ b/views/pos_transaction.xml @@ -0,0 +1,60 @@ + + + pos.transaction.tree + pos.transaction + + + + + + + + + + + + + + + + pos.transaction.form + pos.transaction + +
+ + + + + + + + + + + + + + + + + + + +
+
+
+ + + transactions + pos.transaction + tree,form + + + +