From a89a70f6f316b2c190bc776ff5594f58fbc45e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 15 Sep 2026 08:32:03 +0200 Subject: [PATCH] Add Factur-X format to invoice report --- .gitlab-ci-modules.yml | 17 + doc/account.rst | 3 + modules/account_invoice/exceptions.py | 4 + modules/account_invoice_factur_x/CHANGELOG | 0 modules/account_invoice_factur_x/COPYRIGHT | 15 + modules/account_invoice_factur_x/LICENSE | 674 ++++++++++++++++++ modules/account_invoice_factur_x/README.rst | 1 + modules/account_invoice_factur_x/__init__.py | 2 + modules/account_invoice_factur_x/account.py | 111 +++ modules/account_invoice_factur_x/account.xml | 12 + modules/account_invoice_factur_x/doc/conf.py | 111 +++ .../account_invoice_factur_x/doc/design.rst | 32 + .../account_invoice_factur_x/doc/index.rst | 13 + .../account_invoice_factur_x/doc/releases.rst | 7 + .../doc/requirements-doc.txt | 3 + .../account_invoice_factur_x/doc/usage.rst | 14 + modules/account_invoice_factur_x/message.xml | 10 + modules/account_invoice_factur_x/party.py | 35 + modules/account_invoice_factur_x/party.xml | 12 + .../account_invoice_factur_x/pyproject.toml | 61 ++ .../tests/__init__.py | 2 + .../tests/invoice.pdf | Bin 0 -> 44197 bytes .../scenario_account_invoice_factur_x.json | 7 + .../scenario_account_invoice_factur_x.rst | 114 +++ .../tests/test_module.py | 11 + .../tests/test_scenario.py | 8 + modules/account_invoice_factur_x/tox.ini | 24 + modules/account_invoice_factur_x/tryton.cfg | 25 + .../view/account_configuration_form.xml | 11 + .../view/party_party_form.xml | 10 + modules/edocument_uncefact/edocument.py | 3 +- .../template/16B-CII/CrossIndustryInvoice.xml | 206 +++--- 32 files changed, 1466 insertions(+), 92 deletions(-) create mode 100644 modules/account_invoice_factur_x/CHANGELOG create mode 100644 modules/account_invoice_factur_x/COPYRIGHT create mode 100644 modules/account_invoice_factur_x/LICENSE create mode 120000 modules/account_invoice_factur_x/README.rst create mode 100644 modules/account_invoice_factur_x/__init__.py create mode 100644 modules/account_invoice_factur_x/account.py create mode 100644 modules/account_invoice_factur_x/account.xml create mode 100644 modules/account_invoice_factur_x/doc/conf.py create mode 100644 modules/account_invoice_factur_x/doc/design.rst create mode 100644 modules/account_invoice_factur_x/doc/index.rst create mode 100644 modules/account_invoice_factur_x/doc/releases.rst create mode 100644 modules/account_invoice_factur_x/doc/requirements-doc.txt create mode 100644 modules/account_invoice_factur_x/doc/usage.rst create mode 100644 modules/account_invoice_factur_x/message.xml create mode 100644 modules/account_invoice_factur_x/party.py create mode 100644 modules/account_invoice_factur_x/party.xml create mode 100644 modules/account_invoice_factur_x/pyproject.toml create mode 100644 modules/account_invoice_factur_x/tests/__init__.py create mode 100644 modules/account_invoice_factur_x/tests/invoice.pdf create mode 100644 modules/account_invoice_factur_x/tests/scenario_account_invoice_factur_x.json create mode 100644 modules/account_invoice_factur_x/tests/scenario_account_invoice_factur_x.rst create mode 100644 modules/account_invoice_factur_x/tests/test_module.py create mode 100644 modules/account_invoice_factur_x/tests/test_scenario.py create mode 100644 modules/account_invoice_factur_x/tox.ini create mode 100644 modules/account_invoice_factur_x/tryton.cfg create mode 100644 modules/account_invoice_factur_x/view/account_configuration_form.xml create mode 100644 modules/account_invoice_factur_x/view/party_party_form.xml diff --git a/.gitlab-ci-modules.yml b/.gitlab-ci-modules.yml index 3db7a05ef5..07c870f37a 100644 --- a/.gitlab-ci-modules.yml +++ b/.gitlab-ci-modules.yml @@ -341,6 +341,23 @@ test-modules-account_invoice_defer-postgresql: PACKAGE: modules/account_invoice_defer TAG_PATTERN: '/^account_invoice_defer-.*/' +check-doc-modules-account_invoice_factur_x: + extends: .check-doc + variables: + PACKAGE: modules/account_invoice_factur_x + +test-modules-account_invoice_factur_x-sqlite: + extends: .test-sqlite + variables: + PACKAGE: modules/account_invoice_factur_x + TAG_PATTERN: '/^account_invoice_factur_x-.*/' + +test-modules-account_invoice_factur_x-postgresql: + extends: .test-postgresql + variables: + PACKAGE: modules/account_invoice_factur_x + TAG_PATTERN: '/^account_invoice_factur_x-.*/' + check-doc-modules-account_invoice_history: extends: .check-doc variables: diff --git a/doc/account.rst b/doc/account.rst index 72101c9633..13d4a0edaf 100644 --- a/doc/account.rst +++ b/doc/account.rst @@ -65,6 +65,9 @@ Accounting :doc:`Invoice Defer ` Defer expense and revenue. +:doc:`Invoice Factur-X ` + Generate Factur-X. + :doc:`Invoice History ` Historize invoice. diff --git a/modules/account_invoice/exceptions.py b/modules/account_invoice/exceptions.py index be89eb8d47..ec0ff39c3f 100644 --- a/modules/account_invoice/exceptions.py +++ b/modules/account_invoice/exceptions.py @@ -59,3 +59,7 @@ class InvoiceTaxIdentifierWarning(UserWarning): class InvoiceTaxIdentifierError(ValidationError): pass + + +class InvoiceReportError(UserError): + pass diff --git a/modules/account_invoice_factur_x/CHANGELOG b/modules/account_invoice_factur_x/CHANGELOG new file mode 100644 index 0000000000..e69de29bb2 diff --git a/modules/account_invoice_factur_x/COPYRIGHT b/modules/account_invoice_factur_x/COPYRIGHT new file mode 100644 index 0000000000..eda794e720 --- /dev/null +++ b/modules/account_invoice_factur_x/COPYRIGHT @@ -0,0 +1,15 @@ +Copyright (C) 2026 B2CK +Copyright (C) 2026 Cédric Krier + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/modules/account_invoice_factur_x/LICENSE b/modules/account_invoice_factur_x/LICENSE new file mode 100644 index 0000000000..94a9ed024d --- /dev/null +++ b/modules/account_invoice_factur_x/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 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 General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/modules/account_invoice_factur_x/README.rst b/modules/account_invoice_factur_x/README.rst new file mode 120000 index 0000000000..176d9c2695 --- /dev/null +++ b/modules/account_invoice_factur_x/README.rst @@ -0,0 +1 @@ +doc/index.rst \ No newline at end of file diff --git a/modules/account_invoice_factur_x/__init__.py b/modules/account_invoice_factur_x/__init__.py new file mode 100644 index 0000000000..4effdfa4a2 --- /dev/null +++ b/modules/account_invoice_factur_x/__init__.py @@ -0,0 +1,2 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. diff --git a/modules/account_invoice_factur_x/account.py b/modules/account_invoice_factur_x/account.py new file mode 100644 index 0000000000..37b3655289 --- /dev/null +++ b/modules/account_invoice_factur_x/account.py @@ -0,0 +1,111 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +from io import BytesIO + +import facturx +from lxml import etree + +from trytond.i18n import gettext +from trytond.model import ModelSQL, fields +from trytond.modules.account_invoice.exceptions import InvoiceReportError +from trytond.modules.company.model import CompanyValueMixin +from trytond.pool import Pool, PoolMeta + +PROFILES = [ + (None, ""), + ('urn:cen.eu:en16931:2017', "EN 16931"), + ('urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended', + "EXTENDED"), + ('urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic', + "BASIC"), + ('urn:factur-x.eu:1p0:basicwl', "BASIC WL"), + ('urn:factur-x.eu:1p0:minimum', "Minimum"), + ] + + +class Configuration(metaclass=PoolMeta): + __name__ = 'account.configuration' + + default_factur_x_profile = fields.MultiValue(fields.Selection( + PROFILES, "Default Factur-X Profile", sort=False, + help="Leave this field empty if you do want to include Factur-X.")) + + @classmethod + def multivalue_model(cls, field): + pool = Pool() + if field == 'default_factur_x_profile': + return pool.get('account.configuration.factur_x') + return super().multivalue_model(field) + + +class ConfigurationFacturX(ModelSQL, CompanyValueMixin): + __name__ = 'account.configuration.factur_x' + + default_factur_x_profile = fields.Selection( + PROFILES, "Default Factur-X Profile") + + +class InvoiceReport(metaclass=PoolMeta): + __name__ = 'account.invoice' + + @classmethod + def store(cls, invoice, format_, data): + profile = invoice.party.get_multivalue( + 'factur_x_profile', company=invoice.company.id) + if profile: + if format_ != 'pdf': + raise InvoiceReportError(gettext( + 'account_invoice_factur_x.msg_invoice_pdf_factur_x', + invoice=invoice.rec_name)) + data = cls.add_factur_x(invoice, profile, data) + return super().store(invoice, format_, data) + + @classmethod + def add_factur_x(cls, invoice, profile, pdf): + "Add Factur-X objects to PDF" + pool = Pool() + EInvoice = pool.get('edocument.uncefact.invoice') + + pdf = BytesIO(pdf) + level = profile.split(':')[-1] + einvoice = EInvoice(invoice).render( + '16B-CII', exchange_context=profile) + tree = etree.parse( + BytesIO(einvoice), + etree.XMLParser(remove_blank_text=True)) + for elem in tree.iter('*'): + if elem.text is not None: + elem.text = elem.text.strip() + if elem.tail is not None: + elem.tail = elem.tail.strip() + einvoice = etree.tostring( + tree, encoding='utf-8', xml_declaration=True, + pretty_print=True) + facturx.generate_from_file( + pdf, + einvoice, + flavor='factur-x', + level=level, + check_xsd=True, + check_schematron=False, # requires a running saxon-server + pdf_metadata=cls.factur_x_metadata(invoice), + lang=invoice.party.lang.code if invoice.party.lang else None, + attachments={ + n: {'filedata': v} + for n, v in cls.factur_x_attachments(invoice)}, + ) + return pdf.getvalue() + + @classmethod + def factur_x_metadata(cls, invoice): + return { + 'author': invoice.company.party.name, + 'keywords': ', '.join([invoice.type_name, 'Factur-X']), + 'title': invoice.rec_name, + 'subject': invoice.description, + } + + @classmethod + def factur_x_attachments(cls, invoice): + yield from () diff --git a/modules/account_invoice_factur_x/account.xml b/modules/account_invoice_factur_x/account.xml new file mode 100644 index 0000000000..df4776f018 --- /dev/null +++ b/modules/account_invoice_factur_x/account.xml @@ -0,0 +1,12 @@ + + + + + + account.configuration + + account_configuration_form + + + diff --git a/modules/account_invoice_factur_x/doc/conf.py b/modules/account_invoice_factur_x/doc/conf.py new file mode 100644 index 0000000000..f5f96106dc --- /dev/null +++ b/modules/account_invoice_factur_x/doc/conf.py @@ -0,0 +1,111 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/{series}/modules-{module}/') + trytond_url = 'https://docs.tryton.org/{series}/server/' + + +def get_info(): + import configparser + import json + import subprocess + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + metadata_cmd = 'python3 -m build -qq --metadata' + if os.environ.get('DOC_NO_ISOLATION'): + metadata_cmd += ' --no-isolation' + metadata = subprocess.check_output( + metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip() + metadata = json.loads(metadata) + info['name'] = metadata['name'] + info['description'] = metadata['summary'] + major_version, minor_version, _ = metadata['version'].split('.', 2) + major_version = int(major_version) + minor_version = int(minor_version) + if minor_version % 2: + info['series'] = 'latest' + info['branch'] = 'branch/default' + else: + info['series'] = '.'.join(metadata['version'].split('.', 2)[:2]) + info['branch'] = 'branch/' + info['series'] + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +html_theme = 'sphinx_book_theme' +html_theme_options = { + 'logo': { + 'alt_text': "Tryton Documentation", + 'image_light': 'https://docs.tryton.org/logo-light.svg', + 'image_dark': 'https://docs.tryton.org/logo-dark.svg', + 'link': base_url, + }, + 'home_page_in_toc': True, + 'repository_provider': 'gitlab', + 'repository_url': 'https://code.tryton.org/tryton', + 'repository_branch': info['branch'], + 'use_source_button': True, + 'use_edit_page_button': True, + 'use_repository_button': True, + 'use_download_button': False, + 'path_to_docs': 'modules/account_invoice_factur_x/doc', + } +html_title = info['description'] +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +exclude_patterns = ['**/*.inc.rst'] +extensions = [ + 'sphinx_copybutton', + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] +linkcheck_request_headers = { + 'User-Agent': ( + 'TrytonBot/0.0 (https://www.tryton.org/foundation) ' + 'sphinx-linkcheck/0.0'), + 'Accept-Encoding': 'gzip', + } +linkcheck_workers = 1 + +try: + with open(os.path.join( + os.path.dirname(__file__), + 'linkcheck_ignore.json'), 'r') as f: + import json + linkcheck_ignore.extend(json.load(f)) + del json +except FileNotFoundError: + pass + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_invoice_factur_x/doc/design.rst b/modules/account_invoice_factur_x/doc/design.rst new file mode 100644 index 0000000000..9d7d978fd1 --- /dev/null +++ b/modules/account_invoice_factur_x/doc/design.rst @@ -0,0 +1,32 @@ +****** +Design +****** + +The *Account Invoice Factur-X Module* adds some new or extends some concepts. + +.. _model-account.configuration: + +Account Configuration +===================== + +When the *Account Invoice Factur-X Module* is activated, the *Account +Configuration* gains a new property to store the default Factur-X profile. + +.. seealso:: + + The `Account Configuration ` concept is + introduced by the :doc:`Account Module `. + + +.. _model-party.party: + +Party +===== + +When the *Account Invoice Factur-X Module* is activated, the *Party* gains a +new property to store the preferred Factur-X profile. + +.. seealso:: + + The `Party ` concept is introduced by the + :doc:`Party Module `. diff --git a/modules/account_invoice_factur_x/doc/index.rst b/modules/account_invoice_factur_x/doc/index.rst new file mode 100644 index 0000000000..9c2c563b1c --- /dev/null +++ b/modules/account_invoice_factur_x/doc/index.rst @@ -0,0 +1,13 @@ +############################### +Account Invoice Factur-X Module +############################### + +The *Account Invoice Factur-X Module* allows to generate invoices in `Factur-X +`_ format. + +.. toctree:: + :maxdepth: 2 + + usage + design + releases diff --git a/modules/account_invoice_factur_x/doc/releases.rst b/modules/account_invoice_factur_x/doc/releases.rst new file mode 100644 index 0000000000..21b13c4745 --- /dev/null +++ b/modules/account_invoice_factur_x/doc/releases.rst @@ -0,0 +1,7 @@ +.. _releases-index: + +============= +Release notes +============= + +.. include:: ../CHANGELOG diff --git a/modules/account_invoice_factur_x/doc/requirements-doc.txt b/modules/account_invoice_factur_x/doc/requirements-doc.txt new file mode 100644 index 0000000000..06b8565f6b --- /dev/null +++ b/modules/account_invoice_factur_x/doc/requirements-doc.txt @@ -0,0 +1,3 @@ +build +sphinx_book_theme +sphinx_copybutton diff --git a/modules/account_invoice_factur_x/doc/usage.rst b/modules/account_invoice_factur_x/doc/usage.rst new file mode 100644 index 0000000000..7819c4195f --- /dev/null +++ b/modules/account_invoice_factur_x/doc/usage.rst @@ -0,0 +1,14 @@ +***** +Usage +***** + +.. _Setting Factur-X format for a customer: + +Setting Factur-X format for a customer +====================================== + +To let Tryton render invoice in Factur-X format, you must set the extension of +the `Invoice Report ` to :abbr:`PDF +(Portable Document Format)`. +Then on the `Party ` form, you must select one of the +:guilabel:`Factur-X Profile` (usually :guilabel:`EN 16931`). diff --git a/modules/account_invoice_factur_x/message.xml b/modules/account_invoice_factur_x/message.xml new file mode 100644 index 0000000000..8dbc13d7a3 --- /dev/null +++ b/modules/account_invoice_factur_x/message.xml @@ -0,0 +1,10 @@ + + + + + + To generate a Factur-X document for the invoice "%(invoice)s", you must set the report output to PDF. + + + diff --git a/modules/account_invoice_factur_x/party.py b/modules/account_invoice_factur_x/party.py new file mode 100644 index 0000000000..58517bb952 --- /dev/null +++ b/modules/account_invoice_factur_x/party.py @@ -0,0 +1,35 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +from trytond.model import ModelSQL, ValueMixin, fields +from trytond.pool import Pool, PoolMeta + +from .account import PROFILES + + +class Party(metaclass=PoolMeta): + __name__ = 'party.party' + + factur_x_profile = fields.MultiValue(fields.Selection( + PROFILES, "Factur-X Profile", sort=False, + help="Leave this field empty if you do want to include Factur-X.")) + + @classmethod + def multivalue_model(cls, field): + pool = Pool() + if field == 'factur_x_profile': + return pool.get('party.party.factur_x') + return super().multivalue_model(field) + + @classmethod + def default_factur_x_profile(cls, **pattern): + pool = Pool() + Configuration = pool.get('account.configuration') + config = Configuration(1) + return config.get_multivalue('default_factur_x_profile', **pattern) + + +class PartyFacturX(ModelSQL, ValueMixin): + __name__ = 'party.party.factur_x' + + factur_x_profile = fields.Selection(PROFILES, "Factur-X Profile") diff --git a/modules/account_invoice_factur_x/party.xml b/modules/account_invoice_factur_x/party.xml new file mode 100644 index 0000000000..7f167c4b48 --- /dev/null +++ b/modules/account_invoice_factur_x/party.xml @@ -0,0 +1,12 @@ + + + + + + party.party + + party_party_form + + + diff --git a/modules/account_invoice_factur_x/pyproject.toml b/modules/account_invoice_factur_x/pyproject.toml new file mode 100644 index 0000000000..1cf066e7ff --- /dev/null +++ b/modules/account_invoice_factur_x/pyproject.toml @@ -0,0 +1,61 @@ +[build-system] +requires = ['hatchling >= 1', 'hatch-tryton'] +build-backend = 'hatchling.build' + +[project] +name = 'trytond_account_invoice_factur_x' +dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme'] +requires-python = '>=3.10' +maintainers = [ + {name = "Tryton", email = "foundation@tryton.org"}, + ] +description = "Factur-X for Tryton" +license = 'GPL-3.0-or-later' +license-files = ['LICENSE', 'icons/LICENSE', 'COPYRIGHT'] +keywords = ["tryton", "accounting", "invoice", "factur-x"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Plugins", + "Framework :: Tryton", + "Topic :: Office/Business", + "Topic :: Office/Business :: Financial :: Accounting", + "Topic :: Software Development :: Libraries :: Python Modules", + ] + +[project.entry-points.'trytond.modules'] +account_invoice_factur_x = 'trytond.modules.account_invoice_factur_x' + +[project.urls] +homepage = "https://www.tryton.org/" +documentation = "https://docs.tryton.org/modules-account-invoice-factur-x/" +changelog = "https://docs.tryton.org/modules-account-invoice-factur-x/releases.html" +forum = "https://www.tryton.org/forum" +issues = "https://bugs.tryton.org/tryton" +repository = "https://code.tryton.org/tryton" +funding = "https://www.tryton.org/donate" + +[tool.hatch.build] +include = [ + '**/tryton.cfg', + '**/*.py', + '**/*.xml', + 'view/**/*.xml', + 'locale/**/*.po', + '**/*.fodt', + 'icons/**/*.svg', + 'tests/**/*.rst', + 'tests/**/*.json', + 'tests/**/*.pdf', + ] +exclude = ['doc'] + +[tool.hatch.build.targets.wheel.sources] +"" = "trytond/modules/account_invoice_factur_x" + +[tool.hatch.metadata.hooks.tryton] +dependencies = ['factur-x >= 4'] +copyright = 'COPYRIGHT' +readme = 'README.rst' + +[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies] +test = ['proteus'] diff --git a/modules/account_invoice_factur_x/tests/__init__.py b/modules/account_invoice_factur_x/tests/__init__.py new file mode 100644 index 0000000000..4effdfa4a2 --- /dev/null +++ b/modules/account_invoice_factur_x/tests/__init__.py @@ -0,0 +1,2 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. diff --git a/modules/account_invoice_factur_x/tests/invoice.pdf b/modules/account_invoice_factur_x/tests/invoice.pdf new file mode 100644 index 0000000000000000000000000000000000000000..50de5604ee243f60ae43efe6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&ax}j&(_d6bP~&6%QRnvENI@a`GPq2q%tuG$;)p z;$9LbR#XBfeSpO|c!SC*?}0Sn#DIq9KMlOcPS{a!o`@&T}y5wIK>;0buh+GeXq#8NocB@s*G=!1wO zK+m?Y--{y+AFq#>jgu>QDi;`c#!j1{T?hqiKp4P2g>6z`bV8;d_yjPAOi*n#uq{vo z4^?Xruxi8=SPfMIeg%m{!-3VLMkT4>fz`G`738BEwF+bkgRPmWBi+`;+t&?+!PC^q y>Kb6hfCWb)lPRh+tg0$rl|oU&6Y(TfEVO;`hMw()O(P->=zYFLi_{G?`2G*T;G>2B literal 0 HcmV?d00001 diff --git a/modules/account_invoice_factur_x/tests/scenario_account_invoice_factur_x.json b/modules/account_invoice_factur_x/tests/scenario_account_invoice_factur_x.json new file mode 100644 index 0000000000..e780c35de4 --- /dev/null +++ b/modules/account_invoice_factur_x/tests/scenario_account_invoice_factur_x.json @@ -0,0 +1,7 @@ +[ + {"profile": "urn:cen.eu:en16931:2017"} + ,{"profile": "urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended"} + ,{"profile": "urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic"} + ,{"profile": "urn:factur-x.eu:1p0:basicwl"} + ,{"profile": "urn:factur-x.eu:1p0:minimum"} +] diff --git a/modules/account_invoice_factur_x/tests/scenario_account_invoice_factur_x.rst b/modules/account_invoice_factur_x/tests/scenario_account_invoice_factur_x.rst new file mode 100644 index 0000000000..d31b9ecd7f --- /dev/null +++ b/modules/account_invoice_factur_x/tests/scenario_account_invoice_factur_x.rst @@ -0,0 +1,114 @@ +================================= +Account Invoice Factur X Scenario +================================= + +Imports:: + + >>> from decimal import Decimal + >>> from io import BytesIO + >>> from unittest.mock import patch + + >>> import facturx + + >>> from proteus import Model, Report + >>> from trytond.modules.account.tests.tools import ( + ... create_chart, create_fiscalyear, create_tax, get_accounts) + >>> from trytond.modules.account_invoice.invoice import InvoiceReport + >>> from trytond.modules.account_invoice.tests.tools import ( + ... set_fiscalyear_invoice_sequences) + >>> from trytond.modules.company.tests.tools import create_company, get_company + >>> from trytond.tests.tools import activate_modules + >>> from trytond.tools import file_open + + >>> profile = globals().get('profile', 'urn:cen.eu:en16931:2017') + +Activate modules:: + + >>> config = activate_modules( + ... 'account_invoice_factur_x', create_company, create_chart) + + >>> ActionReport = Model.get('ir.action.report') + >>> Country = Model.get('country.country') + >>> Invoice = Model.get('account.invoice') + >>> Party = Model.get('party.party') + >>> UoM = Model.get('product.uom') + +Patch invoice report convert:: + + >>> with file_open('account_invoice_factur_x/tests/invoice.pdf', 'rb') as fp: + ... _ = patch.object( + ... InvoiceReport, 'convert', return_value=('pdf', fp.read())).start() + +Set invoice report to PDF:: + + >>> invoice_report, = ActionReport.find([ + ... ('report_name', '=', 'account.invoice'), + ... ]) + >>> invoice_report.extension = 'pdf' + >>> invoice_report.save() + +Create country:: + + >>> france = Country(name="France", code="FR") + >>> france.save() + +Setup company:: + + >>> company = get_company() + >>> address, = company.party.addresses + >>> address.country = france + >>> address.save() + >>> identifier = company.party.identifiers.new(type='eu_vat') + >>> identifier.code = "FR40303265045" + >>> identifier.save() + +Create fiscal year:: + + >>> fiscalyear = set_fiscalyear_invoice_sequences(create_fiscalyear()) + >>> fiscalyear.click('create_period') + +Get accounts:: + + >>> accounts = get_accounts() + +Create tax:: + + >>> tax = create_tax(Decimal('.20')) + >>> tax.unece_code = 'VAT' + >>> tax.unece_category_code = 'S' + >>> tax.save() + +Create party:: + + >>> party = Party(name="Party") + >>> party.factur_x_profile = profile + >>> address, = party.addresses + >>> address.country = france + >>> party.save() + +Create invoice:: + + >>> unit, = UoM.find([('name', '=', "Unit")]) + + >>> invoice = Invoice(type='out') + >>> invoice.party = party + >>> line = invoice.lines.new() + >>> line.description = "Service" + >>> line.quantity = 1 + >>> line.unit = unit + >>> line.unit_price = Decimal('50.0000') + >>> line.account = accounts['revenue'] + >>> line.taxes.append(tax) + >>> invoice.click('post') + >>> invoice.state + 'posted' + +Print invoice:: + + >>> pdf = Report('account.invoice').execute([invoice])[1] + >>> filename, xml = facturx.get_facturx_xml_from_pdf( + ... BytesIO(pdf), check_schematron=False) + >>> filename + 'factur-x.xml' + >>> bool(xml) + True diff --git a/modules/account_invoice_factur_x/tests/test_module.py b/modules/account_invoice_factur_x/tests/test_module.py new file mode 100644 index 0000000000..940402faaa --- /dev/null +++ b/modules/account_invoice_factur_x/tests/test_module.py @@ -0,0 +1,11 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. +from trytond.tests.test_tryton import ModuleTestCase + + +class AccountInvoiceFacturXTestCase(ModuleTestCase): + "Test Account Invoice Factur X module" + module = 'account_invoice_factur_x' + + +del ModuleTestCase diff --git a/modules/account_invoice_factur_x/tests/test_scenario.py b/modules/account_invoice_factur_x/tests/test_scenario.py new file mode 100644 index 0000000000..dc1d23e7e5 --- /dev/null +++ b/modules/account_invoice_factur_x/tests/test_scenario.py @@ -0,0 +1,8 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +from trytond.tests.test_tryton import load_doc_tests + + +def load_tests(*args, **kwargs): + return load_doc_tests(__name__, __file__, *args, **kwargs) diff --git a/modules/account_invoice_factur_x/tox.ini b/modules/account_invoice_factur_x/tox.ini new file mode 100644 index 0000000000..b62ac265b2 --- /dev/null +++ b/modules/account_invoice_factur_x/tox.ini @@ -0,0 +1,24 @@ +[tox] +envlist = {py310,py311,py312,py313,py314}-{sqlite,postgresql} + +[testenv] +changedir = {env_site_packages_dir} +extras = test +commands = + coverage run --rcfile={toxinidir}/tox.ini --source=trytond.modules.account_invoice_factur_x --omit=*/tests/* -m xmlrunner discover -s trytond.modules.account_invoice_factur_x {posargs} +commands_post = + coverage report --rcfile={toxinidir}/tox.ini + coverage xml --rcfile={toxinidir}/tox.ini -o {package_root}/coverage.xml +deps = + coverage + unittest-xml-reporting + postgresql: psycopg[pool,binary] >= 3 +passenv = * +setenv = + sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} + postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} + +[coverage:run] +relative_files = true diff --git a/modules/account_invoice_factur_x/tryton.cfg b/modules/account_invoice_factur_x/tryton.cfg new file mode 100644 index 0000000000..0a843b4676 --- /dev/null +++ b/modules/account_invoice_factur_x/tryton.cfg @@ -0,0 +1,25 @@ +[tryton] +version=8.1.0 +depends: + account + account_invoice + company + edocument_uncefact + ir + party +xml: + account.xml + party.xml + message.xml + +[register] +model: + account.Configuration + account.ConfigurationFacturX + party.Party + party.PartyFacturX + +wizard: + +report: + account.InvoiceReport diff --git a/modules/account_invoice_factur_x/view/account_configuration_form.xml b/modules/account_invoice_factur_x/view/account_configuration_form.xml new file mode 100644 index 0000000000..f1f1c1c3ac --- /dev/null +++ b/modules/account_invoice_factur_x/view/account_configuration_form.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/modules/account_invoice_factur_x/view/party_party_form.xml b/modules/account_invoice_factur_x/view/party_party_form.xml new file mode 100644 index 0000000000..3f70fac382 --- /dev/null +++ b/modules/account_invoice_factur_x/view/party_party_form.xml @@ -0,0 +1,10 @@ + + + + + + diff --git a/modules/edocument_uncefact/edocument.py b/modules/edocument_uncefact/edocument.py index 6bd27bf427..30b46cb508 100644 --- a/modules/edocument_uncefact/edocument.py +++ b/modules/edocument_uncefact/edocument.py @@ -73,7 +73,7 @@ class Invoice(Model): else: self.invoice = invoice - def render(self, template): + def render(self, template, exchange_context=None): if self.invoice.state not in {'posted', 'paid'}: raise ValueError("Invoice must be posted") tmpl = self._get_template(template) @@ -81,6 +81,7 @@ class Invoice(Model): raise NotImplementedError return (tmpl.generate( this=self, + exchange_context=exchange_context, Decimal=Decimal) .filter(remove_comment) .render() diff --git a/modules/edocument_uncefact/template/16B-CII/CrossIndustryInvoice.xml b/modules/edocument_uncefact/template/16B-CII/CrossIndustryInvoice.xml index 87ce726702..84790ed7d4 100644 --- a/modules/edocument_uncefact/template/16B-CII/CrossIndustryInvoice.xml +++ b/modules/edocument_uncefact/template/16B-CII/CrossIndustryInvoice.xml @@ -11,40 +11,55 @@ this repository contains the full copyright notices and license terms. --> ${value.strftime('%Y%m%d')} - + ${party.name} - + ${id} - ${TradeAddress(address)} + ${TradeAddress(address, exchange_context=exchange_context)} ${tax_identifier.code_compact} - - ${address.postal_code} - ${address.post_box} - ${address.building_name} - - ${lines[0]} - ${lines[1]} - ${lines[2]} - ${lines[3]} - ${lines[4]} - - ${address.street_name} - ${address.city} - ${address.country.code} - ${address.country.name} - ${address.subdivision.code} - ${address.subdivision.name} - ${address.building_number} + + + + ${address.postal_code} + + ${lines[0]} + ${lines[1]} + ${lines[2]} + + ${address.city} + ${address.country.code} + ${address.subdivision.name} + + + ${address.postal_code} + ${address.post_box} + ${address.building_name} + + ${lines[0]} + ${lines[1]} + ${lines[2]} + ${lines[3]} + ${lines[4]} + + ${address.street_name} + ${address.city} + ${address.country.code} + ${address.country.name} + ${address.subdivision.code} + ${address.subdivision.name} + ${address.building_number} + + - ${format((amount * this.type_sign).normalize(), 'f')} + ${format((amount * this.type_sign).normalize(), 'f')} ${tax.unece_code} ${tax.vatex_code} ${tax.legal_notice} @@ -54,6 +69,9 @@ this repository contains the full copyright notices and license terms. --> + + ${exchange_context} + ${this.invoice.number} @@ -63,18 +81,18 @@ this repository contains the full copyright notices and license terms. --> - + ${line_id} - - ${line.product.code} - ${line.product.name} - ${line.description} + + ${line.product.code} + ${line.product.name if line.product else line.summary} + ${line.description} - ${format(this.invoice.currency.round(line.unit_price).normalize(), 'f')} + ${format(this.invoice.currency.round(line.unit_price).normalize(), 'f')} @@ -85,87 +103,93 @@ this repository contains the full copyright notices and license terms. --> ${TradeTax(tax.tax)} - ${format((line.amount * this.type_sign).normalize(), 'f')} + ${format((line.amount * this.type_sign).normalize(), 'f')} - ${TradeParty(this.seller_trade_party, this.seller_trade_address, this.seller_trade_tax_identifier)} + ${TradeParty(this.seller_trade_party, this.seller_trade_address, this.seller_trade_tax_identifier, exchange_context=exchange_context)} - ${TradeParty(this.buyer_trade_party, this.buyer_trade_address, this.buyer_trade_tax_identifier)} + ${TradeParty(this.buyer_trade_party, this.buyer_trade_address if (exchange_context or '') != 'urn:factur-x.eu:1p0:minimum' else None, this.buyer_trade_tax_identifier, exchange_context=exchange_context)} - - ${this.invoice.reference} - - - ${this.invoice.reference} - + + + ${this.invoice.reference} + + + ${this.invoice.reference} + + - - ${TradeParty(this.ship_to_trade_party, this.ship_to_trade_address)} - - - ${TradeParty(this.ship_from_trade_party, this.ship_from_trade_address)} - + + + ${TradeParty(this.ship_to_trade_party, this.ship_to_trade_address, exchange_context=exchange_context)} + + + ${TradeParty(this.ship_from_trade_party, this.ship_from_trade_address, exchange_context=exchange_context)} + + - ${this.payment_reference} + ${this.payment_reference} ${this.invoice.currency.code} - + ${DateTime(this.invoice.invoice_date)} - - - - 1 - - - - - - ${payment_mean.unece_code} - ${this.invoice.customer_payment_reference} - - - - ${payment_mean.instrument.iban} - - - ${payment_mean.instrument.bank.bic} - - - - - ${payment_mean.instrument.account_number.number} - - ${payment_mean.instrument.account_number.account.bank.bic} - - - - + + + + + 1 - - - - - ${TradeTax(tax.tax, tax.amount, tax.base)} - - - ${this.invoice.payment_term.description} - - ${DateTime(line.maturity_date)} - - ${format(((line.amount_second_currency or (line.debit - line.credit)) * this.type_sign).normalize(), 'f')} - + + + + + ${payment_mean.unece_code} + ${this.invoice.customer_payment_reference} + + + + ${payment_mean.instrument.iban} + + + ${payment_mean.instrument.bank.bic} + + + + + ${payment_mean.instrument.account_number.number} + + ${payment_mean.instrument.account_number.account.bank.bic} + + + + + + + + + + ${TradeTax(tax.tax, tax.amount, tax.base)} + + + ${this.invoice.payment_term.description} + + ${DateTime(line.maturity_date)} + + ${format(((line.amount_second_currency or (line.debit - line.credit)) * this.type_sign).normalize(), 'f')} + + - ${format((this.invoice.untaxed_amount * this.type_sign).normalize(), 'f')} - ${format((this.invoice.untaxed_amount * this.type_sign).normalize(), 'f')} + ${format((this.invoice.untaxed_amount * this.type_sign).normalize(), 'f')} + ${format((this.invoice.untaxed_amount * this.type_sign).normalize(), 'f')} ${format((this.invoice.tax_amount * this.type_sign).normalize(), 'f')} - ${format((this.invoice.total_amount * this.type_sign).normalize(), 'f')} - ${format((this.invoice.amount_to_pay * this.type_sign).normalize(), 'f')} + ${format((this.invoice.total_amount * this.type_sign).normalize(), 'f')} + ${format((this.invoice.amount_to_pay * this.type_sign).normalize(), 'f')}