[ADD] l10n_ch_payment_slip
[ADD] l10n_ch_zip [ADD] l10n_ch_bank_statement_import_postfinance
17
l10n_ch_bank_statement_import_postfinance/COPYRIGHT
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Most of the files are
|
||||||
|
|
||||||
|
/* Copyright 2014-2017 Compassion CH
|
||||||
|
Copyright 2015 Nicolas Bessi Camptocamp SA
|
||||||
|
Copyright 2017 Emanuel Cino <ecino@compassion.ch>
|
||||||
|
Copyright 2017-2019 Compassion CH
|
||||||
|
Copyright 2018 Flectra Community
|
||||||
|
|
||||||
|
Many files also contain contributions from third
|
||||||
|
parties. In this case the original copyright of
|
||||||
|
the contributions can be traced through the
|
||||||
|
history of the source version control system.
|
||||||
|
|
||||||
|
When that is not the case, the files contain a prominent
|
||||||
|
notice stating the original copyright and applicable
|
||||||
|
license, or come with their own dedicated COPYRIGHT
|
||||||
|
and/or LICENSE file.
|
663
l10n_ch_bank_statement_import_postfinance/LICENSE
Normal file
@ -0,0 +1,663 @@
|
|||||||
|
For copyright information, please see the COPYRIGHT file.
|
||||||
|
|
||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU 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
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published
|
||||||
|
by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for the
|
||||||
|
specific requirements.
|
||||||
|
|
||||||
|
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 AGPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
54
l10n_ch_bank_statement_import_postfinance/README.rst
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
==================================
|
||||||
|
Import Postfinance bank statements
|
||||||
|
==================================
|
||||||
|
|
||||||
|
This module allows you to import Postfinance .tar.gz bank statements
|
||||||
|
including .xml statements and pictures of the ESR payment slips.
|
||||||
|
It currently supports the following file formats :
|
||||||
|
|
||||||
|
* XML format from Postfinance S.A.
|
||||||
|
|
||||||
|
Warning : this module requires the python library 'xlrd'.
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
To install this module, you need to add the statement import module into your
|
||||||
|
addons path, because it's based on the CAMT import module.
|
||||||
|
https://github.com/OCA/bank-statement-import
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
To configure this module, you need to ensure you have a bank account related to
|
||||||
|
your company that corresponds to imported statement.
|
||||||
|
|
||||||
|
|
||||||
|
If the statement is not in the same currency that company please ensure that
|
||||||
|
both journal and account have the currency (or secondary currency) properly
|
||||||
|
set to statement currency.
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
To use this module, you need to:
|
||||||
|
|
||||||
|
#. Go to *Accounting* dashboard.
|
||||||
|
#. Click on *Import statement* from any of the bank journals.
|
||||||
|
#. Select a .tar.gz file from Postfinance.
|
||||||
|
#. Press *Import*.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Nicolas Bessi <nicolas.bessi@camptocamp.com>
|
||||||
|
* Steve Ferry <steve.ferry1992@gmail.com>
|
||||||
|
* Emanuel Cino <ecino@compassion.ch>
|
||||||
|
* Emmanuel Mathier <emmanuel.mathier@gmail.com>
|
2
l10n_ch_bank_statement_import_postfinance/__init__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from . import models
|
||||||
|
from . import wizards
|
27
l10n_ch_bank_statement_import_postfinance/__manifest__.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Copyright 2015 Nicolas Bessi Camptocamp SA
|
||||||
|
# Copyright 2017-2019 Compassion CH
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{'name': "Swiss bank statements import",
|
||||||
|
'version': '2.0.0.0.0',
|
||||||
|
'author': "Compassion CH, Camptocamp, Odoo Community Association (OCA), 2BIT GmbH",
|
||||||
|
'category': 'Finance',
|
||||||
|
'complexity': 'normal',
|
||||||
|
'depends': [
|
||||||
|
'account_bank_statement_import_camt_oca',
|
||||||
|
],
|
||||||
|
'external_dependencies': {
|
||||||
|
'python': ['xlrd'],
|
||||||
|
},
|
||||||
|
'website': 'https://gitlab.com/flectra-community/flectra',
|
||||||
|
'data': [
|
||||||
|
'views/statement_line_view.xml',
|
||||||
|
'views/l10n_ch_account_statement_base_import.xml',
|
||||||
|
'views/account_bank_statement_import_postfinance_view.xml',
|
||||||
|
],
|
||||||
|
'qweb': ['static/src/xml/l10n_ch_statement_line_layout.xml'],
|
||||||
|
'test': [],
|
||||||
|
'installable': True,
|
||||||
|
'images': [],
|
||||||
|
'auto_install': False,
|
||||||
|
'license': 'AGPL-3'}
|
@ -0,0 +1,50 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * l10n_ch_bank_statement_import_postfinance
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 11.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: l10n_ch_bank_statement_import_postfinance
|
||||||
|
#: model:ir.model,name:l10n_ch_bank_statement_import_postfinance.model_account_bank_statement_line
|
||||||
|
msgid "Bank Statement Line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_bank_statement_import_postfinance
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_bank_statement_import_postfinance.field_account_bank_statement_line_datas
|
||||||
|
msgid "File Content"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_bank_statement_import_postfinance
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_bank_statement_import_postfinance.field_account_bank_statement_line_file_ref
|
||||||
|
msgid "File Ref"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_bank_statement_import_postfinance
|
||||||
|
#: model:ir.model,name:l10n_ch_bank_statement_import_postfinance.model_account_bank_statement_import
|
||||||
|
msgid "Import Bank Statement"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_bank_statement_import_postfinance
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_bank_statement_import_postfinance.account_bank_statement_import_view
|
||||||
|
msgid "Postfinance Format (.xml, .tar.gz)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_bank_statement_import_postfinance
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_bank_statement_import_postfinance.field_account_bank_statement_line_related_file
|
||||||
|
msgid "Related file"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_bank_statement_import_postfinance
|
||||||
|
#: model:ir.model,name:l10n_ch_bank_statement_import_postfinance.model_account_bank_statement_import_camt_parser
|
||||||
|
msgid "account.bank.statement.import.camt.parser"
|
||||||
|
msgstr ""
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
from . import postfinance_file_parser
|
||||||
|
from . import account_bank_statement_line
|
@ -0,0 +1,45 @@
|
|||||||
|
# Copyright 2015 Nicolas Bessi Camptocamp SA
|
||||||
|
# Copyright 2017-2019 Compassion CH
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
from flectra import models, api, fields
|
||||||
|
|
||||||
|
|
||||||
|
class AccountBankStatementLine(models.Model):
|
||||||
|
_inherit = 'account.bank.statement.line'
|
||||||
|
|
||||||
|
related_file = fields.Many2one(
|
||||||
|
comodel_name='ir.attachment',
|
||||||
|
string='Related file',
|
||||||
|
readonly=True
|
||||||
|
)
|
||||||
|
datas = fields.Binary(related='related_file.datas')
|
||||||
|
file_ref = fields.Char()
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def get_statement_line_for_reconciliation_widget(self):
|
||||||
|
data = super(AccountBankStatementLine,
|
||||||
|
self).get_statement_line_for_reconciliation_widget()
|
||||||
|
if self.related_file.datas:
|
||||||
|
related_file = self.related_file
|
||||||
|
image = "data:png;base64," + related_file.datas.decode("utf-8")
|
||||||
|
data['img_src'] = ['src', image]
|
||||||
|
data['modal_id'] = ['id', 'img' + str(related_file.id)]
|
||||||
|
data['data_target'] = [
|
||||||
|
'data-target', '#img' + str(related_file.id)]
|
||||||
|
return data
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def click_icon(self):
|
||||||
|
view_id = self.env.ref(
|
||||||
|
'l10n_ch_bank_statement_import_postfinance.'
|
||||||
|
'attachement_form_postfinance879').id
|
||||||
|
return {
|
||||||
|
'type': 'ir.actions.act_window',
|
||||||
|
'name': 'Attachment',
|
||||||
|
'view_type': 'form',
|
||||||
|
'view_mode': 'form',
|
||||||
|
'res_model': 'ir.attachment',
|
||||||
|
'view_id': view_id,
|
||||||
|
'res_id': self.related_file.id,
|
||||||
|
'target': 'new',
|
||||||
|
}
|
@ -0,0 +1,161 @@
|
|||||||
|
# Copyright 2015 Nicolas Bessi Camptocamp SA
|
||||||
|
# Copyright 2017-2019 Compassion CH
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
import logging
|
||||||
|
from PIL import Image
|
||||||
|
from os.path import splitext
|
||||||
|
from tarfile import TarFile, TarError
|
||||||
|
from lxml import etree
|
||||||
|
from xml.etree import ElementTree
|
||||||
|
from io import BytesIO, StringIO
|
||||||
|
from base64 import b64encode
|
||||||
|
|
||||||
|
from flectra import models, fields
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class XMLPFParser(models.AbstractModel):
|
||||||
|
"""
|
||||||
|
Parser for XML Postfinance Statements (can be wrapped in a tar.gz file)
|
||||||
|
"""
|
||||||
|
_inherit = 'account.bank.statement.import.camt.parser'
|
||||||
|
#tar_source = fields.Text(string = "Tar source")
|
||||||
|
#is_tar = fields.Boolean()
|
||||||
|
|
||||||
|
def parse(self, data_file):
|
||||||
|
"""
|
||||||
|
Handle Postfinance images of payment slips.
|
||||||
|
"""
|
||||||
|
self._check_postfinance_attachments(data_file)
|
||||||
|
|
||||||
|
currency, account_number, statements = super(XMLPFParser, self).parse(
|
||||||
|
self.data_file)
|
||||||
|
|
||||||
|
if statements and getattr(self, 'attachments', False):
|
||||||
|
statements[0]['attachments'] = self._parse_attachments()
|
||||||
|
|
||||||
|
return currency, account_number, statements
|
||||||
|
|
||||||
|
def parse_transaction_details(self, ns, node, transaction):
|
||||||
|
"""Add file_reference to find attached image"""
|
||||||
|
# add file_ref to link image to bank statement line
|
||||||
|
self.add_value_from_node(
|
||||||
|
ns, node, './ns:Refs//ns:Prtry/ns:Ref', transaction, 'file_ref')
|
||||||
|
super(XMLPFParser, self).parse_transaction_details(
|
||||||
|
ns, node, transaction)
|
||||||
|
|
||||||
|
def parse_statement(self, ns, node):
|
||||||
|
"""
|
||||||
|
Find currency if not found with base parser
|
||||||
|
"""
|
||||||
|
result = super(XMLPFParser, self).parse_statement(ns, node)
|
||||||
|
if not result.get('currency'):
|
||||||
|
currency_node = node.xpath(
|
||||||
|
'//ns:Bal[1]/ns:Amt/@Ccy', namespaces={'ns': ns})
|
||||||
|
if currency_node and len(currency_node) == 1:
|
||||||
|
result['currency'] = currency_node[0]
|
||||||
|
return result
|
||||||
|
|
||||||
|
def _check_postfinance_attachments(self, data_file):
|
||||||
|
"""
|
||||||
|
Initialize parser and check that data_file can be parsed.
|
||||||
|
:param data_file: file data
|
||||||
|
"""
|
||||||
|
self.tar_source = data_file
|
||||||
|
self.data_file = self._get_content_from_stream()
|
||||||
|
if self.is_tar:
|
||||||
|
self.attachments = self._get_attachments_from_stream(data_file)
|
||||||
|
|
||||||
|
def _get_content_from_stream(self):
|
||||||
|
print(" RUK "*25,self.tar_source)
|
||||||
|
"""Source file can be a raw or tar file. We try to guess the
|
||||||
|
file type and return valid file content
|
||||||
|
|
||||||
|
:return: uncompressed file content
|
||||||
|
:rtype: string
|
||||||
|
"""
|
||||||
|
# https://hg.python.org/cpython/file/6969bac411fa/Lib/tarfile.py#l2605
|
||||||
|
self.is_tar = False
|
||||||
|
if isinstance(self.tar_source, str):
|
||||||
|
try:
|
||||||
|
# If raw string
|
||||||
|
ElementTree.fromstring(self.tar_source)
|
||||||
|
return self.tar_source
|
||||||
|
except ElementTree.ParseError:
|
||||||
|
pf_file = StringIO(self.tar_source)
|
||||||
|
else:
|
||||||
|
pf_file = BytesIO(self.tar_source)
|
||||||
|
try:
|
||||||
|
pf_file.seek(0)
|
||||||
|
with TarFile.open(fileobj=pf_file, mode="r:gz") as tar_file:
|
||||||
|
xmls = [tar_content
|
||||||
|
for tar_content in tar_file.getnames()
|
||||||
|
if tar_content.endswith('.xml')]
|
||||||
|
self.is_tar = True
|
||||||
|
self.file_name = splitext(xmls[0])[0]
|
||||||
|
return tar_file.extractfile(xmls[0]).read()
|
||||||
|
except TarError:
|
||||||
|
return self.tar_source
|
||||||
|
|
||||||
|
def _get_attachments_from_stream(self, data_file):
|
||||||
|
"""Retrieve attachment from tar file.
|
||||||
|
Return a dict containing all attachments ready to be saved
|
||||||
|
in Flectra.
|
||||||
|
|
||||||
|
The key is the name of file without extension
|
||||||
|
The value the PNG content encoded in base64
|
||||||
|
|
||||||
|
:param data_file: raw statement file sent to flectra (not in b64)
|
||||||
|
:type data_file: basestring subclass
|
||||||
|
|
||||||
|
:return: Return a dict containing all attachments ready
|
||||||
|
to be saved in Flectra.
|
||||||
|
"""
|
||||||
|
pf_file = BytesIO(data_file)
|
||||||
|
pf_file.seek(0)
|
||||||
|
try:
|
||||||
|
attachments = {}
|
||||||
|
tar_file = TarFile.open(fileobj=pf_file, mode="r:gz")
|
||||||
|
accepted_formats = ['.png', '.jpeg', '.jpg', '.tiff']
|
||||||
|
for file_name in tar_file.getnames():
|
||||||
|
if True in [file_name.endswith(f) for f in accepted_formats]:
|
||||||
|
key = splitext(file_name)[0]
|
||||||
|
img_data = tar_file.extractfile(file_name).read()
|
||||||
|
if file_name.endswith('.tiff'):
|
||||||
|
# Convert string containing data to tiff image
|
||||||
|
image = Image.open(BytesIO(img_data))
|
||||||
|
|
||||||
|
# Convert to png for viewing the image in Flectra
|
||||||
|
with BytesIO() as png_image:
|
||||||
|
image.save(png_image, format='PNG')
|
||||||
|
img_data = png_image.getvalue()
|
||||||
|
attachments[key] = b64encode(img_data)
|
||||||
|
return attachments
|
||||||
|
except TarError:
|
||||||
|
return {}
|
||||||
|
|
||||||
|
def _parse_attachments(self):
|
||||||
|
"""Parse file statement to get wich attachment to use
|
||||||
|
:return: a list of attachment tuple (name, content)
|
||||||
|
:rtype: list
|
||||||
|
"""
|
||||||
|
attachments = [('Statement File', b64encode(self.tar_source))]
|
||||||
|
if self.is_tar:
|
||||||
|
# Extract XML tree
|
||||||
|
try:
|
||||||
|
tree = etree.fromstring(
|
||||||
|
self.data_file, parser=etree.XMLParser(recover=True))
|
||||||
|
except etree.XMLSyntaxError:
|
||||||
|
return attachments
|
||||||
|
ns = tree.tag[1:tree.tag.index("}")] # namespace
|
||||||
|
transaction_nodes = tree.xpath(
|
||||||
|
'//ns:Stmt//ns:Prtry/ns:Ref/text()',
|
||||||
|
namespaces={'ns': ns})
|
||||||
|
for transaction in transaction_nodes:
|
||||||
|
att_name = self.file_name + '-' + transaction[:23]
|
||||||
|
att = self.attachments.get(att_name)
|
||||||
|
if att:
|
||||||
|
attachments.append((transaction, att))
|
||||||
|
return attachments
|
After Width: | Height: | Size: 8.7 KiB |
@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2014-2017 Compassion CH
|
||||||
|
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
||||||
|
flectra.define('l10n_ch_bank_statement_import_postfinance.reconciliation', function (require) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var core = require('web.core');
|
||||||
|
var qweb = core.qweb;
|
||||||
|
var reconciliation = require('account.ReconciliationRenderer');
|
||||||
|
|
||||||
|
// Extend the class written in module account (bank statement view)
|
||||||
|
reconciliation.LineRenderer.include({
|
||||||
|
start: function(){
|
||||||
|
$('<span class="line_info_button fa fa-picture-o"/>')
|
||||||
|
.appendTo(this.$('thead .cell_info_popover'))
|
||||||
|
.attr("data-content", qweb.render('bank_statement_reconciliation_line_image', {'state': this._initialState}));
|
||||||
|
return this._super();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<templates xml:space="preserve">
|
||||||
|
<t t-extend="account.reconciliation.line">
|
||||||
|
|
||||||
|
<t t-jquery="span.line_info_button" t-operation="after">
|
||||||
|
<t t-if="state.st_line.img_src">
|
||||||
|
<span class="line_info_button fa fa-picture-o" t-att-data-content="line.i_popover"></span>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
|
||||||
|
<t t-name="bank_statement_reconciliation_line_image">
|
||||||
|
<img t-att="state.st_line.img_src" class="img-responsive" width="500px" />
|
||||||
|
</t>
|
||||||
|
</templates>
|
@ -0,0 +1 @@
|
|||||||
|
from . import test_postfinance_xml
|
@ -0,0 +1,141 @@
|
|||||||
|
# Copyright 2015 Nicolas Bessi Camptocamp SA
|
||||||
|
# Copyright 2017-2019 Compassion CH
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
import base64
|
||||||
|
import re
|
||||||
|
from flectra.modules import get_module_resource
|
||||||
|
from flectra.tests import common
|
||||||
|
|
||||||
|
|
||||||
|
def get_file_content(filename):
|
||||||
|
filepath = get_module_resource(
|
||||||
|
'l10n_ch_bank_statement_import_postfinance',
|
||||||
|
'test_files',
|
||||||
|
filename
|
||||||
|
)
|
||||||
|
with open(filepath, 'rb') as data_file:
|
||||||
|
return data_file.read()
|
||||||
|
|
||||||
|
|
||||||
|
class PFXMLParserTest(common.TransactionCase):
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super(PFXMLParserTest, self).setUp()
|
||||||
|
self.data_file = get_file_content('demo_pf_ch.tar.gz')
|
||||||
|
self.parser = self.env['account.bank.statement.import.camt.parser']
|
||||||
|
|
||||||
|
def test_file_uncompress(self):
|
||||||
|
"""Test that tar file is uncompressed correctly"""
|
||||||
|
self.parser._check_postfinance_attachments(self.data_file)
|
||||||
|
self.assertTrue(
|
||||||
|
re.search(r'\<BkToCstmrStmt', self.parser.data_file.decode())
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_parser_can_open_non_tar(self):
|
||||||
|
"""Test that non compressed file can be read"""
|
||||||
|
raw = """<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.04"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:camt.053.001.04
|
||||||
|
camt.053.001.04.xsd">
|
||||||
|
<BkToCstmrStmt><GrpHdr></GrpHdr></BkToCstmrStmt>
|
||||||
|
</Document>
|
||||||
|
"""
|
||||||
|
self.parser._check_postfinance_attachments(raw)
|
||||||
|
self.assertEqual(self.parser.data_file, raw)
|
||||||
|
|
||||||
|
def test_attachments_detection(self):
|
||||||
|
"""Test attachments detection"""
|
||||||
|
self.parser._check_postfinance_attachments(self.data_file)
|
||||||
|
self.assertIsNotNone(self.parser.attachments)
|
||||||
|
|
||||||
|
def test_parse(self):
|
||||||
|
"""Test file is correctly parsed"""
|
||||||
|
currency_code, account_number, statements = self.parser.parse(
|
||||||
|
self.data_file)
|
||||||
|
self.assertEqual('CH0309000000250090342', account_number)
|
||||||
|
self.assertEqual('CHF', currency_code)
|
||||||
|
self.assertIsInstance(statements, list)
|
||||||
|
self.assertEqual(len(statements), 1)
|
||||||
|
self.assertTrue(all(isinstance(x, dict) for x in statements))
|
||||||
|
statement = statements[0]
|
||||||
|
self.assertTrue(
|
||||||
|
all(isinstance(x, dict)for x in statement['transactions']))
|
||||||
|
self.assertEqual(559026015.20, statement['balance_start'])
|
||||||
|
self.assertEqual(559048788.30, statement['balance_end_real'])
|
||||||
|
self.assertEqual(9, len(statement['transactions']))
|
||||||
|
first_transaction = {
|
||||||
|
'file_ref': '20160414001203000300003',
|
||||||
|
'amount': 50.0,
|
||||||
|
'date': '2017-03-30',
|
||||||
|
'ref': 'CLXPMZW000000004'
|
||||||
|
}
|
||||||
|
parsed_transaction = statement['transactions'][0]
|
||||||
|
self.assertDictContainsSubset(first_transaction, parsed_transaction)
|
||||||
|
|
||||||
|
def test_attachement_extraction(self):
|
||||||
|
"""Test if scan are extracted correctly"""
|
||||||
|
attachments = self.parser.parse(self.data_file)[2][0]['attachments']
|
||||||
|
self.assertEqual(
|
||||||
|
set(['Statement File',
|
||||||
|
'20160414001203000300003', '20160414001203000300004',
|
||||||
|
'20160414001203000300005', '20160414001203000300006']),
|
||||||
|
set([a[0] for a in attachments])
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class PostFinanceImportTest(common.TransactionCase):
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super(PostFinanceImportTest, self).setUp()
|
||||||
|
bank = self.env['res.partner.bank'].create({
|
||||||
|
'acc_number': 'CH0309000000250090342',
|
||||||
|
'partner_id': self.env.ref('base.main_partner').id,
|
||||||
|
'company_id': self.env.ref('base.main_company').id,
|
||||||
|
'bank_id': self.env.ref('base.res_bank_1').id,
|
||||||
|
})
|
||||||
|
self.env['account.journal'].create({
|
||||||
|
'name': 'Bank Journal - (test postfinance)',
|
||||||
|
'code': 'TBNKPFNC',
|
||||||
|
'type': 'bank',
|
||||||
|
'bank_account_id': bank.id,
|
||||||
|
})
|
||||||
|
self.company_a = self.env.ref('base.main_company')
|
||||||
|
currency = self.env.ref('base.CHF')
|
||||||
|
currency.active = True
|
||||||
|
self.company_a.write(
|
||||||
|
{'currency_id': currency.id}
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_postfinance_xml_import(self):
|
||||||
|
"""Test if postfinance statement is correct"""
|
||||||
|
action = self.env['account.bank.statement.import'].create({
|
||||||
|
'data_file': base64.b64encode(get_file_content(
|
||||||
|
'demo_pf_ch.tar.gz')),
|
||||||
|
}).import_file()
|
||||||
|
statements = self.env['account.bank.statement'].browse(
|
||||||
|
action['context'].get('statement_ids')
|
||||||
|
)
|
||||||
|
self.assertEqual(len(statements), 1)
|
||||||
|
self.assertEqual(559026015.20, statements.balance_start)
|
||||||
|
self.assertEqual(559048788.30, statements.balance_end_real)
|
||||||
|
self.assertEqual(9, len(statements.line_ids))
|
||||||
|
self.assertTrue(statements.journal_id)
|
||||||
|
self.assertEqual(4, len(statements.mapped('line_ids.related_file')))
|
||||||
|
st_line = statements.line_ids[0]
|
||||||
|
# Read common infos of first line
|
||||||
|
self.assertEqual(st_line.date, "2017-03-31")
|
||||||
|
self.assertEqual(st_line.amount, 500.0)
|
||||||
|
self.assertEqual(st_line.name, "VIREMENT BENEFICE")
|
||||||
|
|
||||||
|
# Test image is in reconcile view
|
||||||
|
lines_with_attach = statements.mapped('line_ids').filtered(
|
||||||
|
'related_file')
|
||||||
|
img_data_key = ['img_src', 'modal_id', 'data_target']
|
||||||
|
for line in lines_with_attach:
|
||||||
|
data = line.get_statement_line_for_reconciliation_widget()
|
||||||
|
for key in img_data_key:
|
||||||
|
self.assertIn(key, data.keys())
|
||||||
|
|
||||||
|
# Test click icon returns an action
|
||||||
|
self.assertIsInstance(lines_with_attach[0].click_icon(), dict)
|
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<flectra>
|
||||||
|
|
||||||
|
<record id="account_bank_statement_import_view" model="ir.ui.view">
|
||||||
|
<field name="model">account.bank.statement.import</field>
|
||||||
|
<field name="inherit_id" ref="account_bank_statement_import.om_account_bank_statement_import_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//ul[@id='statement_format']" position="inside">
|
||||||
|
<li>Postfinance Format (.xml, .tar.gz)</li>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</flectra>
|
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<flectra>
|
||||||
|
<data>
|
||||||
|
<template id="assets_backend" name="account assets" inherit_id="web.assets_backend">
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
<script type="text/javascript" src="/l10n_ch_bank_statement_import_postfinance/static/src/js/account_statement_reconciliation.js"></script>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
</data>
|
||||||
|
</flectra>
|
@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<flectra>
|
||||||
|
<record id="view_bank_statement_form_l10n_ch" model="ir.ui.view">
|
||||||
|
<field name="name">account_statement_l10n_ch.view_form</field>
|
||||||
|
<field name="model">account.bank.statement</field>
|
||||||
|
<field name="inherit_id" ref="account.view_bank_statement_form" />
|
||||||
|
<field eval="16" name="priority"/>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<data>
|
||||||
|
<xpath expr="//sheet/notebook/page/field[@name='line_ids']/tree">
|
||||||
|
<field name="related_file" invisible="1"/>
|
||||||
|
<button name="click_icon" icon="fa-picture-o" type="object" attrs="{'invisible': [('related_file', '=', False)]}"/>
|
||||||
|
</xpath>
|
||||||
|
</data>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="statement_line_form_postfinance" model="ir.ui.view">
|
||||||
|
<field name="name">l10n_ch_bank_statement_line.view_form</field>
|
||||||
|
<field name="model">account.bank.statement.line</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="inherit_id" ref="account.view_bank_statement_line_form" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<group col="4" position="after">
|
||||||
|
<style>
|
||||||
|
.im-attach {
|
||||||
|
text-align: center !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
.im-attach img {
|
||||||
|
max-width: 50% !important;
|
||||||
|
max-height: 100% !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<field name="datas" widget="image" class="im-attach" readonly="1" attrs="{'invisible': [('datas','=',False)]}"/>
|
||||||
|
</group>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Define a view on ir.attachment to see the attached picture -->
|
||||||
|
<record id="attachement_form_postfinance879" model="ir.ui.view">
|
||||||
|
<field name="name">l10n_ch_bank_attachment.view_form</field>
|
||||||
|
<field name="model">ir.attachment</field>
|
||||||
|
<field eval="20" name="priority"/>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form>
|
||||||
|
<style>
|
||||||
|
.im-attach {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
.im-attach img {
|
||||||
|
max-width: 100% !important;
|
||||||
|
max-height: 100% !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<field name="datas" widget="image" class="im-attach" readonly="1"/>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</flectra>
|
@ -0,0 +1 @@
|
|||||||
|
from . import account_bank_statement_import_postfinance
|
@ -0,0 +1,44 @@
|
|||||||
|
# Copyright 2017 Emanuel Cino <ecino@compassion.ch>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from flectra import api, models
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class AccountBankStatementImport(models.TransientModel):
|
||||||
|
_inherit = "account.bank.statement.import"
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _create_bank_statements(self, stmt_vals):
|
||||||
|
"""Override to support attachements. There is always only one
|
||||||
|
statement at a time for Postfinance Imports.
|
||||||
|
"""
|
||||||
|
attachments = list(stmt_vals[0].pop('attachments', list()))
|
||||||
|
|
||||||
|
statement_ids, notifs = super(AccountBankStatementImport,
|
||||||
|
self)._create_bank_statements(stmt_vals)
|
||||||
|
for attachment in attachments:
|
||||||
|
att_data = {
|
||||||
|
'name': attachment[0],
|
||||||
|
'type': 'binary',
|
||||||
|
'datas': attachment[1],
|
||||||
|
}
|
||||||
|
statement_line = self.env[
|
||||||
|
'account.bank.statement.line'].search(
|
||||||
|
[('file_ref', '=', attachment[0]),
|
||||||
|
('statement_id', '=', statement_ids[0])]
|
||||||
|
)
|
||||||
|
if statement_line:
|
||||||
|
# Link directly attachement with the right statement line
|
||||||
|
att_data['res_id'] = statement_line.id
|
||||||
|
att_data['res_model'] = 'account.bank.statement.line'
|
||||||
|
att = self.env['ir.attachment'].create(att_data)
|
||||||
|
statement_line.related_file = att
|
||||||
|
else:
|
||||||
|
att_data['res_id'] = statement_ids[0]
|
||||||
|
att_data['res_model'] = 'account.bank.statement'
|
||||||
|
self.env['ir.attachment'].create(att_data)
|
||||||
|
|
||||||
|
return statement_ids, notifs
|
19
l10n_ch_payment_slip/COPYRIGHT
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Most of the files are
|
||||||
|
|
||||||
|
Copyright 2012-2015 Camptocamp SA
|
||||||
|
Copyright 2012-2016 Camptocamp SA
|
||||||
|
Copyright 2012-2017 Camptocamp SA
|
||||||
|
Copyright 2014-2017 Camptocamp SA
|
||||||
|
Copyright 2017 Camptocamp SA
|
||||||
|
Copyright 2018 Camptocamp SA
|
||||||
|
Copyright 2018 Flectra Community
|
||||||
|
|
||||||
|
Many files also contain contributions from third
|
||||||
|
parties. In this case the original copyright of
|
||||||
|
the contributions can be traced through the
|
||||||
|
history of the source version control system.
|
||||||
|
|
||||||
|
When that is not the case, the files contain a prominent
|
||||||
|
notice stating the original copyright and applicable
|
||||||
|
license, or come with their own dedicated COPYRIGHT
|
||||||
|
and/or LICENSE file.
|
663
l10n_ch_payment_slip/LICENSE
Normal file
@ -0,0 +1,663 @@
|
|||||||
|
For copyright information, please see the COPYRIGHT file.
|
||||||
|
|
||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU 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
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published
|
||||||
|
by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for the
|
||||||
|
specific requirements.
|
||||||
|
|
||||||
|
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 AGPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
79
l10n_ch_payment_slip/README.rst
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||||
|
:target: http://www.gnu.org/licenses/agpl
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
======================================
|
||||||
|
======================================
|
||||||
|
Swiss inpayment slip (ISR/PVR/BVR/ESR)
|
||||||
|
======================================
|
||||||
|
|
||||||
|
|
||||||
|
This addon allows you to print the ISR report Using Qweb report.
|
||||||
|
|
||||||
|
ISR is called:
|
||||||
|
- PVR in italian
|
||||||
|
- BVR in french
|
||||||
|
- ESR in german
|
||||||
|
|
||||||
|
The ISR is grenerated as an image and is availabe in a fields
|
||||||
|
of the `l10n_ch.payment_slip` Model.
|
||||||
|
|
||||||
|
This module also adds transaction_ref field on entries in order to manage
|
||||||
|
reconciliation in multi payment context (unique reference needed on
|
||||||
|
account.move.line). Many ISR can now be printed from one invoice for each
|
||||||
|
payment terms.
|
||||||
|
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
You can adjust the print out of ISR, which depend on each printer,
|
||||||
|
In the General Settings - Invoicing. The settings are specific for every
|
||||||
|
company.
|
||||||
|
|
||||||
|
This is especialy useful when using pre-printed paper.
|
||||||
|
Options also allow you to print the ISR in background when using
|
||||||
|
white paper and printing customer address in the page header.
|
||||||
|
|
||||||
|
This can be change by setting System parameter
|
||||||
|
`isr.address.format`
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
The ISR is created each time an invoice is validated.
|
||||||
|
To modify it you have to cancel it and reconfirm the invoice.
|
||||||
|
|
||||||
|
You can also activate "Save as attachement" for ISR prints your invoice.
|
||||||
|
To do so, edit the ir.actions.report `Payment Slip` with the template
|
||||||
|
name `l10n_ch_payment_slip.one_slip_per_page_from_invoice`.
|
||||||
|
|
||||||
|
To import v11, the feature has been moved in module `l10n_ch_import_isr_v11`
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Jamotion <info@jamotion.ch>
|
||||||
|
* Nicolas Bessi <nicolas.bessi@camptocamp.com>
|
||||||
|
* Vincent Renaville <vincent.renaville@camptocamp.com>
|
||||||
|
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||||
|
* Romain Deheele <romain.deheele@camptocamp.com>
|
||||||
|
* Thomas Winteler <info@win-soft.com>
|
||||||
|
* Joël Grand-Guillaume <joel.grandguillaume@camptocamp.com>
|
||||||
|
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||||
|
* Alex Comba <alex.comba@agilebg.com>
|
||||||
|
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
||||||
|
* Paul Catinean <paulcatinean@gmail.com>
|
||||||
|
* Paulius Sladkevičius <paulius@hbee.eu>
|
||||||
|
* David Coninckx <dco@open-net.ch>
|
||||||
|
* Akim Juillerat <akim.juillerat@camptocamp.com>
|
||||||
|
* Simone Orsi <simone.orsi@camptocamp.com>
|
||||||
|
|
||||||
|
Financial contributors
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Hasa SA, Open Net SA, Prisme Solutions Informatique SA, Quod SA
|
4
l10n_ch_payment_slip/__init__.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
from . import controllers
|
||||||
|
from . import models
|
||||||
|
from . import report
|
||||||
|
from . import wizard
|
36
l10n_ch_payment_slip/__manifest__.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Copyright 2012-2016 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
|
||||||
|
'summary': 'Print inpayment slip from your invoices',
|
||||||
|
'version': '2.0.1.0.0',
|
||||||
|
'author': "Camptocamp,Odoo Community Association (OCA), 2BIT GmbH",
|
||||||
|
'category': 'Localization',
|
||||||
|
'website': 'https://gitlab.com/flectra-community/flectra',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'depends': [
|
||||||
|
'account',
|
||||||
|
'account_accountant',
|
||||||
|
'l10n_ch_base_bank',
|
||||||
|
'base_transaction_id', # OCA/account-reconcile
|
||||||
|
'web',
|
||||||
|
'l10n_ch',
|
||||||
|
],
|
||||||
|
'data': [
|
||||||
|
"views/report_xml_templates.xml",
|
||||||
|
"views/bank.xml",
|
||||||
|
"views/account_invoice.xml",
|
||||||
|
"views/res_config_settings_views.xml",
|
||||||
|
"wizard/isr_batch_print.xml",
|
||||||
|
"report/report_declaration.xml",
|
||||||
|
"security/ir.model.access.csv"
|
||||||
|
],
|
||||||
|
'demo': [],
|
||||||
|
'auto_install': False,
|
||||||
|
'installable': True,
|
||||||
|
'images': [],
|
||||||
|
'external_dependencies': {
|
||||||
|
'python': [
|
||||||
|
'PyPDF2',
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
1
l10n_ch_payment_slip/controllers/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from . import web
|
34
l10n_ch_payment_slip/controllers/web.py
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Copyright 2018 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||||
|
|
||||||
|
|
||||||
|
from flectra.models import _
|
||||||
|
from flectra.addons.web.controllers import main as report
|
||||||
|
from flectra.http import content_disposition, request, route
|
||||||
|
|
||||||
|
|
||||||
|
class ReportController(report.ReportController):
|
||||||
|
@route()
|
||||||
|
def report_routes(self, reportname, docids=None, converter=None, **data):
|
||||||
|
if converter == "reportlab-pdf":
|
||||||
|
report_slip = request.env.ref(
|
||||||
|
'l10n_ch_payment_slip.one_slip_per_page_from_invoice')
|
||||||
|
filename = ''
|
||||||
|
invoice_id = []
|
||||||
|
if docids:
|
||||||
|
invoice_id = [int(i) for i in docids.split(',')]
|
||||||
|
filename = ''.join([
|
||||||
|
_('ISR'),
|
||||||
|
'_multiple_invoices' if len(invoice_id) > 1
|
||||||
|
else '{0:05d}'.format(invoice_id[0]),
|
||||||
|
'.pdf'
|
||||||
|
])
|
||||||
|
data, format_report = report_slip.render(invoice_id)
|
||||||
|
pdfhttpheaders = [
|
||||||
|
('Content-Type', 'application/pdf'),
|
||||||
|
('Content-Disposition', content_disposition(filename)),
|
||||||
|
('Content-Length', len(data)),
|
||||||
|
]
|
||||||
|
return request.make_response(data, headers=pdfhttpheaders)
|
||||||
|
return super(ReportController, self).report_routes(
|
||||||
|
reportname, docids, converter, **data)
|
543
l10n_ch_payment_slip/i18n/de.po
Normal file
@ -0,0 +1,543 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * l10n_ch_payment_slip
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-06-02 00:43+0000\n"
|
||||||
|
"PO-Revision-Date: 2018-11-24 22:12+0000\n"
|
||||||
|
"Last-Translator: chrispi-ch <chris@okc.ch>\n"
|
||||||
|
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 3.2.2\n"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:157
|
||||||
|
#, python-format
|
||||||
|
msgid "- The bank account {} used in invoice has no ISR adherent number."
|
||||||
|
msgstr ""
|
||||||
|
"- Das in der Rechnung verwendete Zahlungskonto {} hat keine ESR "
|
||||||
|
"Teilnehmernummer."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:162
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"- The bank account {} used in invoice needs to be a postal account or have a "
|
||||||
|
"bank CCP."
|
||||||
|
msgstr ""
|
||||||
|
"- Das in der Rechnung verwendete Zahlungskonto {} muss ein Postkonto sein "
|
||||||
|
"oder ein Postkonto der Bank eingetragen haben."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:150
|
||||||
|
#, python-format
|
||||||
|
msgid "- The invoice must be confirmed."
|
||||||
|
msgstr "- Die Rechnung muss bestätigt werden."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:153
|
||||||
|
#, python-format
|
||||||
|
msgid "- The invoice needs a partner bank account."
|
||||||
|
msgstr ""
|
||||||
|
"- Die Rechnung muss ein Zahlungskonto des Geschäftspartners definiert haben."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_partner_bank
|
||||||
|
msgid "Bank Accounts"
|
||||||
|
msgstr "Bankkonten"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Abbrechen"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Unternehmen"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_create_uid
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr "Erstellt von"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_create_date
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr "Erstellt am"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_display_name
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_display_name
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice_display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr "Anzeigename"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_header_partner_address
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_header_partner_address
|
||||||
|
msgid "Enabling this will print partner address top-right on the page header"
|
||||||
|
msgstr ""
|
||||||
|
"Wenn Sie diese Option aktivieren, wird die Adresse des Geschäftspartners "
|
||||||
|
"oben rechts im Seitenkopf gedruckt"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_error_message
|
||||||
|
msgid "Errors"
|
||||||
|
msgstr "Fehler"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_header_partner_address
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_header_partner_address
|
||||||
|
msgid "Header partner address"
|
||||||
|
msgstr "Adresse des Geschäftspartners"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_add_horz
|
||||||
|
msgid "Horiz. position in inch for address"
|
||||||
|
msgstr "Horiz. Adressposition (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_horz
|
||||||
|
msgid "Horiz. position in inch for amount line"
|
||||||
|
msgstr "Horiz. Position der Betragszeile (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_horz
|
||||||
|
msgid "Horiz. position in inch for scan line"
|
||||||
|
msgstr "Horiz. Position der Codierzeile (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_id
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_id
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice_id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr "ID"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/controllers/web.py:21
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.res_config_settings_view_form
|
||||||
|
#, python-format
|
||||||
|
msgid "ISR"
|
||||||
|
msgstr "ESR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.actions.act_window,name:l10n_ch_payment_slip.wizard_isr_batch_print
|
||||||
|
msgid "ISR Batch Print"
|
||||||
|
msgstr "ESR Stapeldruck"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "ISR Batch Print Wizard"
|
||||||
|
msgstr "ESR Stapeldruck Assistent"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_delta_horz
|
||||||
|
msgid "ISR Horz. Delta (inch)"
|
||||||
|
msgstr "ESR horizontal verschieben (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_reference
|
||||||
|
msgid "ISR Ref."
|
||||||
|
msgstr "ESR Ref."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_delta_vert
|
||||||
|
msgid "ISR Vert. Delta (inch)"
|
||||||
|
msgstr "ESR vertikal verschieben (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_add_horz
|
||||||
|
msgid "ISR horiz. position address (inch)"
|
||||||
|
msgstr "ESR horiz. Adressposition (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_horz
|
||||||
|
msgid "ISR horiz. position for amount line (inch)"
|
||||||
|
msgstr "ESR horiz. Position für Betragszeile (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_horz
|
||||||
|
msgid "ISR horiz. position for scan line(inch)"
|
||||||
|
msgstr "ESR horiz. Position der Codierzeile (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.l10n_ch_view_res_partner_bank_from_invoice_slip
|
||||||
|
msgid "ISR options"
|
||||||
|
msgstr "ESR Einstellungen"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_isr_reference
|
||||||
|
msgid "ISR ref"
|
||||||
|
msgstr "ESR Referenznummer"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: sql_constraint:l10n_ch.payment_slip:0
|
||||||
|
msgid "ISR reference must be unique"
|
||||||
|
msgstr "Die ESR Referenznummer muss eindeutig sein"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_font_size
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_font_size
|
||||||
|
msgid "ISR scan line font size (pt)"
|
||||||
|
msgstr "ESR Codierzeile Schriftgrösse (in pt)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_letter_spacing
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_letter_spacing
|
||||||
|
msgid "ISR scan line letter spacing"
|
||||||
|
msgstr "ESR Codierzeile Zeichenabstand"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_add_vert
|
||||||
|
msgid "ISR vert. position for address (inch)"
|
||||||
|
msgstr "ESR vert. Adressposition (in Zoll))"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_vert
|
||||||
|
msgid "ISR vert. position for amount line (inch)"
|
||||||
|
msgstr "ESR vert. Position der Betragszeile (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_vert
|
||||||
|
msgid "ISR vert. position for scan line (inch)"
|
||||||
|
msgstr "ESR vert. Position der Codierzeile (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_background
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_background
|
||||||
|
msgid "Insert ISR background ?"
|
||||||
|
msgstr "ESR Hintergrund einfügen?"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_account_invoice
|
||||||
|
msgid "Invoice"
|
||||||
|
msgstr "Rechnung"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_invoice_ids
|
||||||
|
msgid "Invoices"
|
||||||
|
msgstr "Rechnungen"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_account_move_line
|
||||||
|
msgid "Journal Item"
|
||||||
|
msgstr "Journaleintrag"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard___last_update
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip___last_update
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice___last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr "Zuletzt geändert am"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_write_uid
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr "Zuletzt aktualisiert von"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_write_date
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr "Zuletzt aktualisiert am"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: selection:res.company,merge_mode:0
|
||||||
|
msgid "Merge Slips in Memory, faster but can exhaust memory"
|
||||||
|
msgstr ""
|
||||||
|
"Füge die Einzahlungsscheine im Arbeitsspeicher zusammen. Das ist schneller, "
|
||||||
|
"kann aber den Arbeitsspeicher überlasten"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: selection:res.company,merge_mode:0
|
||||||
|
msgid "Merge Slips on Disk, slower but safer"
|
||||||
|
msgstr ""
|
||||||
|
"Füge die Einzahlungsscheine auf der Festplatte zusammen. Das ist langsamer, "
|
||||||
|
"aber sicherer"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:340
|
||||||
|
#, python-format
|
||||||
|
msgid "No invoice related to move line %s"
|
||||||
|
msgstr "Keine Rechnung bezieht sich auf Buchungszeile %s"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref
|
||||||
|
msgid "Open Payment Slips"
|
||||||
|
msgstr "Offene Einzahlungsscheine"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.actions.act_window,name:l10n_ch_payment_slip.action_slip_all
|
||||||
|
#: model:ir.actions.report,name:l10n_ch_payment_slip.one_slip_per_page_from_invoice
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.pay_slip_form
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.pay_slip_lsit
|
||||||
|
msgid "Payment Slip"
|
||||||
|
msgstr "Einzahlungsschein"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_move_line_payment_slip_ids
|
||||||
|
msgid "Payment Slips"
|
||||||
|
msgstr "Einzahlungsscheine"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_merge_mode
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_merge_mode
|
||||||
|
msgid "Payment Slips Merge Mode"
|
||||||
|
msgstr "Methode zum Zusammenführen der Einzahlungssscheine"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:560
|
||||||
|
#, python-format
|
||||||
|
msgid "Payment slip related to invoice %s due on the %s"
|
||||||
|
msgstr "Einzahlungsschein zur Rechnung %s fällig am %s"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:225
|
||||||
|
#, python-format
|
||||||
|
msgid "Please enter a correct postal number like: 01-23456-1"
|
||||||
|
msgstr "Bitte fügen Sie eine korrekte Postkonto-Nummer ein (z.B. 01-23456-1)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_account
|
||||||
|
msgid "Print Account Number on ISR"
|
||||||
|
msgstr "Kontonummer auf ESR drucken"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_bank
|
||||||
|
msgid "Print Bank on ISR"
|
||||||
|
msgstr "Bank auf ESR drucken"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref
|
||||||
|
msgid "Print CH ISR"
|
||||||
|
msgstr "Schweizer ESR drucken"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_partner
|
||||||
|
msgid "Print Partner Address on ISR"
|
||||||
|
msgstr "Adresse des Geschäftspartners auf ESR drucken"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "Print payment slips"
|
||||||
|
msgstr "Einzahlungsscheine drucken"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_invoice_id
|
||||||
|
msgid "Related invoice"
|
||||||
|
msgstr "Zugehörige Rechnung"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_move_line_id
|
||||||
|
msgid "Related move"
|
||||||
|
msgstr "Zugehörige Buchung"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_slip_ids
|
||||||
|
msgid "Related slip"
|
||||||
|
msgstr "Zugehöriger Einzahlungsschein"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_scan_line
|
||||||
|
msgid "Scan Line"
|
||||||
|
msgstr "Codierzeile"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_a4_pdf
|
||||||
|
msgid "Slip A4 PDF"
|
||||||
|
msgstr "Einzahlungsschein PDF"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_slip_image
|
||||||
|
msgid "Slip Image"
|
||||||
|
msgstr "Einzahlungsschein Bild"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid ""
|
||||||
|
"The payment slip can't be generated for some invoices you selected. Please "
|
||||||
|
"review according to the following messages."
|
||||||
|
msgstr ""
|
||||||
|
"Der Einzahlungsschein kann für einige der von Ihnen ausgewählten Rechnungen "
|
||||||
|
"nicht erstellt werden. Bitte überprüfen Sie die folgenden Mitteilungen."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid ""
|
||||||
|
"These invoices were successfully checked for the payment slip to be printed."
|
||||||
|
msgstr ""
|
||||||
|
"Diese Rechnungen wurden erfolgreich geprüft, damit der Einzahlungsschein "
|
||||||
|
"gedruckt werden kann."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_amount_total
|
||||||
|
msgid "Total amount of ISR"
|
||||||
|
msgstr "Gesamtbetrag des ESR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_add_vert
|
||||||
|
msgid "Vert. position in inch for address"
|
||||||
|
msgstr "Vert. Adressposition (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_vert
|
||||||
|
msgid "Vert. position in inch for amount line"
|
||||||
|
msgstr "Vert. Position der Betragszeile (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_vert
|
||||||
|
msgid "Vert. position in inch for scan line"
|
||||||
|
msgstr "Vert. Position der Codierzeile (in Zoll)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:346
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Your bank ISR number should be of the form 0X-XXX-X! Please check your "
|
||||||
|
"company information for the invoice:\n"
|
||||||
|
"%s"
|
||||||
|
msgstr ""
|
||||||
|
"Die ESR Teilnehmernummer Ihrer Bank sollte in der Form 0X-XXX-X vorliegen. "
|
||||||
|
"Bitte überprüfen Sie Ihre Unternehmenseinstellungen für die Rechnung:\n"
|
||||||
|
"%s"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_delta_horz
|
||||||
|
msgid ""
|
||||||
|
"horiz. delta in inch 1.2 will print the ISR 1.2 inch on the left, negative "
|
||||||
|
"value is possible"
|
||||||
|
msgstr ""
|
||||||
|
"ESR horiz. verschieben. Ein Wert von z.B. 1.2 Zoll sorgt dafür, dass der ESR "
|
||||||
|
"1.2 Zoll weiter links gedruckt wird. Ein negativer Wert ist möglich"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_ir_actions_report
|
||||||
|
#, fuzzy
|
||||||
|
msgid "ir.actions.report"
|
||||||
|
msgstr "ir.actions.report"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_isr_batch_print_wizard
|
||||||
|
#, fuzzy
|
||||||
|
msgid "isr.batch.print.wizard"
|
||||||
|
msgstr "isr.batch.print.wizard"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_l10n_ch_payment_slip
|
||||||
|
#, fuzzy
|
||||||
|
msgid "l10n_ch.payment_slip"
|
||||||
|
msgstr "l10n_ch.payment_slip"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_report_one_slip_per_page_from_invoice
|
||||||
|
#, fuzzy
|
||||||
|
msgid "report.one_slip_per_page_from_invoice"
|
||||||
|
msgstr "report.one_slip_per_page_from_invoice"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_config_settings
|
||||||
|
#, fuzzy
|
||||||
|
msgid "res.config.settings"
|
||||||
|
msgstr "res.config.settings"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_delta_vert
|
||||||
|
msgid ""
|
||||||
|
"vert. delta in inch 1.2 will print the ISR 1.2 inch lower, negative value is "
|
||||||
|
"possible"
|
||||||
|
msgstr ""
|
||||||
|
"ESR vert. verschieben. Ein Wert von z.B. 1.2 Zoll sorgt dafür, dass der ESR "
|
||||||
|
"1.2 Zoll weiter unten gedruckt wird. Ein negativer Wert ist möglich"
|
||||||
|
|
||||||
|
#~ msgid "ISR Data"
|
||||||
|
#~ msgstr "ESR-Daten"
|
||||||
|
|
||||||
|
#~ msgid "Import"
|
||||||
|
#~ msgstr "Import"
|
||||||
|
|
||||||
|
#~ msgid "Import v11"
|
||||||
|
#~ msgstr "Import v11"
|
||||||
|
|
||||||
|
#~ msgid "Inv. no %s"
|
||||||
|
#~ msgstr "Rg Nr. %s"
|
||||||
|
|
||||||
|
#~ msgid "Number of records differ from the computed one"
|
||||||
|
#~ msgstr "Zahl der Datensätze unterscheidet sich von der errechneten Anzahl"
|
||||||
|
|
||||||
|
#~ msgid "Please select a file first!"
|
||||||
|
#~ msgstr "Bitte zuerst eine Datei auswählen!"
|
||||||
|
|
||||||
|
#~ msgid "Record found after total record"
|
||||||
|
#~ msgstr "Weiteren Datensatz nach der Totalzeile gefunden "
|
||||||
|
|
||||||
|
#~ msgid "Recursive mod10 is invalid for reference: %s"
|
||||||
|
#~ msgstr "Rekursiver mod10 ist ungültig für Referenz: %s "
|
||||||
|
|
||||||
|
#~ msgid "Report"
|
||||||
|
#~ msgstr "Bericht"
|
||||||
|
|
||||||
|
#~ msgid "Too many receivable/payable lines for reference %s"
|
||||||
|
#~ msgstr "Zu viele Debitoren-/Kreditoren-Zeilen für Referenz %s"
|
||||||
|
|
||||||
|
#~ msgid "Too many total record found!"
|
||||||
|
#~ msgstr "Zuviele Total-Sätze gefunden!"
|
||||||
|
|
||||||
|
#~ msgid "Total amount differ from the computed amount"
|
||||||
|
#~ msgstr "Gesamtbetrag unterscheidet sich vom errechneten Betrag"
|
||||||
|
|
||||||
|
#~ msgid "Total amount of V11"
|
||||||
|
#~ msgstr "Gesamtbetrag von V11"
|
||||||
|
|
||||||
|
#~ msgid "Total cost differ from the computed amount"
|
||||||
|
#~ msgstr "Totalkosten unterscheiden sich vom errechneten Betrag"
|
||||||
|
|
||||||
|
#~ msgid "Total cost of V11"
|
||||||
|
#~ msgstr "Totalkosten von V11"
|
||||||
|
|
||||||
|
#~ msgid "V11 (ISR) Import"
|
||||||
|
#~ msgstr "V11 (ESR) Import"
|
||||||
|
|
||||||
|
#~ msgid "V11 ISR Import"
|
||||||
|
#~ msgstr "V11 ESR-Import"
|
||||||
|
|
||||||
|
#~ msgid "V11 File"
|
||||||
|
#~ msgstr "V11 File"
|
||||||
|
|
||||||
|
#~ msgid "V11 file can not be decoded, it contains invalid caracter %s"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "V11-Datei kann nicht decodiert werden, sie enthält ungültige Zeichen %s"
|
||||||
|
|
||||||
|
#~ msgid "or"
|
||||||
|
#~ msgstr "oder"
|
||||||
|
|
||||||
|
#~ msgid "v11.import.wizard"
|
||||||
|
#~ msgstr "v11.import.wizard"
|
521
l10n_ch_payment_slip/i18n/fr.po
Normal file
@ -0,0 +1,521 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * l10n_ch_payment_slip
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-06-02 00:43+0000\n"
|
||||||
|
"PO-Revision-Date: 2019-04-29 09:02+0000\n"
|
||||||
|
"Last-Translator: Valaeys Stéphane <svalaeys@fiefmanage.ch>\n"
|
||||||
|
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||||
|
"X-Generator: Weblate 3.5.1\n"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:157
|
||||||
|
#, python-format
|
||||||
|
msgid "- The bank account {} used in invoice has no ISR adherent number."
|
||||||
|
msgstr "- Le compte bancaire {} de la facture n'a pas de numéro d'adhérent BVR."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:162
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"- The bank account {} used in invoice needs to be a postal account or have a "
|
||||||
|
"bank CCP."
|
||||||
|
msgstr ""
|
||||||
|
"- Le compte bancaire {} de la facture doit être un compte postal ou avoir un "
|
||||||
|
"CCP bancaire."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:150
|
||||||
|
#, python-format
|
||||||
|
msgid "- The invoice must be confirmed."
|
||||||
|
msgstr "- La facture doit être confirmée."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:153
|
||||||
|
#, python-format
|
||||||
|
msgid "- The invoice needs a partner bank account."
|
||||||
|
msgstr "- La facture doit référencer un numéro de compte bancaire."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_partner_bank
|
||||||
|
msgid "Bank Accounts"
|
||||||
|
msgstr "Comptes bancaires"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Annuler"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Sociétés"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_create_uid
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr "Créé par"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_create_date
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr "Créé le"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_display_name
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_display_name
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice_display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr "Nom affiché"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_header_partner_address
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_header_partner_address
|
||||||
|
msgid "Enabling this will print partner address top-right on the page header"
|
||||||
|
msgstr ""
|
||||||
|
"L'activation de cette option permettra l'impression de l'adresse du "
|
||||||
|
"partenaire dans la tone supérieure droite de la page"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_error_message
|
||||||
|
msgid "Errors"
|
||||||
|
msgstr "Erreurs"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_header_partner_address
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_header_partner_address
|
||||||
|
msgid "Header partner address"
|
||||||
|
msgstr "Imprimer l'adresse du partenaire sur le BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_add_horz
|
||||||
|
msgid "Horiz. position in inch for address"
|
||||||
|
msgstr "Décalage horizontal de l'addresse en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_horz
|
||||||
|
msgid "Horiz. position in inch for amount line"
|
||||||
|
msgstr "Position horizontal en pouces pour la ligne de montant"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_horz
|
||||||
|
msgid "Horiz. position in inch for scan line"
|
||||||
|
msgstr "Décalage horizontal de la scanline en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_id
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_id
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice_id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr "ID"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/controllers/web.py:21
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.res_config_settings_view_form
|
||||||
|
#, python-format
|
||||||
|
msgid "ISR"
|
||||||
|
msgstr "BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.actions.act_window,name:l10n_ch_payment_slip.wizard_isr_batch_print
|
||||||
|
msgid "ISR Batch Print"
|
||||||
|
msgstr "Imprimer les BVRs par lots"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "ISR Batch Print Wizard"
|
||||||
|
msgstr "Assistant pour l'impression de BVRs par lots"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_delta_horz
|
||||||
|
msgid "ISR Horz. Delta (inch)"
|
||||||
|
msgstr "Décalage horizontal global en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_reference
|
||||||
|
msgid "ISR Ref."
|
||||||
|
msgstr "Réf. BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_delta_vert
|
||||||
|
msgid "ISR Vert. Delta (inch)"
|
||||||
|
msgstr "Décalage vertical global en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_add_horz
|
||||||
|
msgid "ISR horiz. position address (inch)"
|
||||||
|
msgstr "Décalage horizontal de l'adresse en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_horz
|
||||||
|
msgid "ISR horiz. position for amount line (inch)"
|
||||||
|
msgstr "Position horizontale de la ligne de montant du BVR (en pouces)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_horz
|
||||||
|
msgid "ISR horiz. position for scan line(inch)"
|
||||||
|
msgstr "Décalage horizontal de la scanline en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.l10n_ch_view_res_partner_bank_from_invoice_slip
|
||||||
|
msgid "ISR options"
|
||||||
|
msgstr "Options BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_isr_reference
|
||||||
|
msgid "ISR ref"
|
||||||
|
msgstr "Référence du BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: sql_constraint:l10n_ch.payment_slip:0
|
||||||
|
msgid "ISR reference must be unique"
|
||||||
|
msgstr "La référence BVR doit être unique"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_font_size
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_font_size
|
||||||
|
msgid "ISR scan line font size (pt)"
|
||||||
|
msgstr "Taille de la police de la scanline en points"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_letter_spacing
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_letter_spacing
|
||||||
|
msgid "ISR scan line letter spacing"
|
||||||
|
msgstr "Espace entre les caractères de la scanline"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_add_vert
|
||||||
|
msgid "ISR vert. position for address (inch)"
|
||||||
|
msgstr "Décalage vertical de l'adresse en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_vert
|
||||||
|
msgid "ISR vert. position for amount line (inch)"
|
||||||
|
msgstr "Position verticale de la ligne de montant du BVR (en pouces)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_vert
|
||||||
|
msgid "ISR vert. position for scan line (inch)"
|
||||||
|
msgstr "Décalage vertical de la scanline en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_background
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_background
|
||||||
|
msgid "Insert ISR background ?"
|
||||||
|
msgstr "Insérer l'arrière-plan dans le BVR ?"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_account_invoice
|
||||||
|
msgid "Invoice"
|
||||||
|
msgstr "Facture"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_invoice_ids
|
||||||
|
msgid "Invoices"
|
||||||
|
msgstr "Factures"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_account_move_line
|
||||||
|
msgid "Journal Item"
|
||||||
|
msgstr "Écriture comptable"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard___last_update
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip___last_update
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice___last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr "Dernière modification le"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_write_uid
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr "Dernière mise à jour par"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_write_date
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr "Dernière mise à jour le"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: selection:res.company,merge_mode:0
|
||||||
|
msgid "Merge Slips in Memory, faster but can exhaust memory"
|
||||||
|
msgstr ""
|
||||||
|
"Fusionne les rapports BVR en mémoire. Cela est plus rapide mais peut épuiser "
|
||||||
|
"la mémoire"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: selection:res.company,merge_mode:0
|
||||||
|
msgid "Merge Slips on Disk, slower but safer"
|
||||||
|
msgstr "Fuisonne les rapports BVR sur le disque. Plus lent mais plus sûr"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:340
|
||||||
|
#, python-format
|
||||||
|
msgid "No invoice related to move line %s"
|
||||||
|
msgstr "Aucune facture liée à la ligne %s"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref
|
||||||
|
msgid "Open Payment Slips"
|
||||||
|
msgstr "BVR ouverts"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.actions.act_window,name:l10n_ch_payment_slip.action_slip_all
|
||||||
|
#: model:ir.actions.report,name:l10n_ch_payment_slip.one_slip_per_page_from_invoice
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.pay_slip_form
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.pay_slip_lsit
|
||||||
|
msgid "Payment Slip"
|
||||||
|
msgstr "BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_move_line_payment_slip_ids
|
||||||
|
msgid "Payment Slips"
|
||||||
|
msgstr "BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_merge_mode
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_merge_mode
|
||||||
|
msgid "Payment Slips Merge Mode"
|
||||||
|
msgstr "Mode de fusion des rapports BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:560
|
||||||
|
#, python-format
|
||||||
|
msgid "Payment slip related to invoice %s due on the %s"
|
||||||
|
msgstr "Bulletin relatif à la facture %s due le %s"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:225
|
||||||
|
#, python-format
|
||||||
|
msgid "Please enter a correct postal number like: 01-23456-1"
|
||||||
|
msgstr "Veuillez saisir un CCP valide exemple: 01-23456-1"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_account
|
||||||
|
msgid "Print Account Number on ISR"
|
||||||
|
msgstr "Imprimer le CCP sur le BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_bank
|
||||||
|
msgid "Print Bank on ISR"
|
||||||
|
msgstr "Imprimer la banque sur le BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref
|
||||||
|
msgid "Print CH ISR"
|
||||||
|
msgstr "Imprimer BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_partner
|
||||||
|
msgid "Print Partner Address on ISR"
|
||||||
|
msgstr "Imprimer l'adresse sur le BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "Print payment slips"
|
||||||
|
msgstr "Imprimer BVRs"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_invoice_id
|
||||||
|
msgid "Related invoice"
|
||||||
|
msgstr "Facture liée"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_move_line_id
|
||||||
|
msgid "Related move"
|
||||||
|
msgstr "Mouvement lié"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_slip_ids
|
||||||
|
msgid "Related slip"
|
||||||
|
msgstr "BVR lié"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_scan_line
|
||||||
|
msgid "Scan Line"
|
||||||
|
msgstr "Scanner la ligne"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_a4_pdf
|
||||||
|
msgid "Slip A4 PDF"
|
||||||
|
msgstr "BVR format A4 PDF"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_slip_image
|
||||||
|
msgid "Slip Image"
|
||||||
|
msgstr "Image BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid ""
|
||||||
|
"The payment slip can't be generated for some invoices you selected. Please "
|
||||||
|
"review according to the following messages."
|
||||||
|
msgstr ""
|
||||||
|
"Le BVR ne peut pas être généré pour certaines des factures que vous avez "
|
||||||
|
"sélectionnées. Veuillez prendre connaissance des messages suivants."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid ""
|
||||||
|
"These invoices were successfully checked for the payment slip to be printed."
|
||||||
|
msgstr "Ces factures ont été validées pour l'impression BVR."
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_amount_total
|
||||||
|
msgid "Total amount of ISR"
|
||||||
|
msgstr "Montant total du BVR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_add_vert
|
||||||
|
msgid "Vert. position in inch for address"
|
||||||
|
msgstr "Décalage vertical de l'adresse en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_vert
|
||||||
|
msgid "Vert. position in inch for amount line"
|
||||||
|
msgstr "Position verticale en pouces de la ligne de montant"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_vert
|
||||||
|
msgid "Vert. position in inch for scan line"
|
||||||
|
msgstr "Décalage vertical de la scanline en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:346
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Your bank ISR number should be of the form 0X-XXX-X! Please check your "
|
||||||
|
"company information for the invoice:\n"
|
||||||
|
"%s"
|
||||||
|
msgstr ""
|
||||||
|
"Le CCP doit respecter le format suivant 0X-XXX-X pour la facture\n"
|
||||||
|
"%s"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_delta_horz
|
||||||
|
msgid ""
|
||||||
|
"horiz. delta in inch 1.2 will print the ISR 1.2 inch on the left, negative "
|
||||||
|
"value is possible"
|
||||||
|
msgstr "Décalage global horizontal du BVR en pouces"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_ir_actions_report
|
||||||
|
msgid "ir.actions.report"
|
||||||
|
msgstr "ir.actions.report"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_isr_batch_print_wizard
|
||||||
|
msgid "isr.batch.print.wizard"
|
||||||
|
msgstr "isr.batch.print.wizard"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_l10n_ch_payment_slip
|
||||||
|
msgid "l10n_ch.payment_slip"
|
||||||
|
msgstr "l10n_ch.payment_slip"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_report_one_slip_per_page_from_invoice
|
||||||
|
msgid "report.one_slip_per_page_from_invoice"
|
||||||
|
msgstr "report.one_slip_per_page_from_invoice"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_config_settings
|
||||||
|
msgid "res.config.settings"
|
||||||
|
msgstr "res.config.settings"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_delta_vert
|
||||||
|
msgid ""
|
||||||
|
"vert. delta in inch 1.2 will print the ISR 1.2 inch lower, negative value is "
|
||||||
|
"possible"
|
||||||
|
msgstr "Décalage global vertical du BVR en pouces"
|
||||||
|
|
||||||
|
#~ msgid "ISR Data"
|
||||||
|
#~ msgstr "Données BVR"
|
||||||
|
|
||||||
|
#~ msgid "Import"
|
||||||
|
#~ msgstr "Importer"
|
||||||
|
|
||||||
|
#~ msgid "Import v11"
|
||||||
|
#~ msgstr "Importer le fichier V11"
|
||||||
|
|
||||||
|
#~ msgid "Inv. no %s"
|
||||||
|
#~ msgstr "Facture no. %s"
|
||||||
|
|
||||||
|
#~ msgid "Number of records differ from the computed one"
|
||||||
|
#~ msgstr "Le nombre d'entrée diffère du nombre calculé"
|
||||||
|
|
||||||
|
#~ msgid "Please select a file first!"
|
||||||
|
#~ msgstr "Veuillez choisir un fichier"
|
||||||
|
|
||||||
|
#~ msgid "Record found after total record"
|
||||||
|
#~ msgstr "Enregistrement trouvé après la validation du total"
|
||||||
|
|
||||||
|
#~ msgid "Recursive mod10 is invalid for reference: %s"
|
||||||
|
#~ msgstr "La référence %s est invalide"
|
||||||
|
|
||||||
|
#~ msgid "Report"
|
||||||
|
#~ msgstr "Rapport"
|
||||||
|
|
||||||
|
#~ msgid "Too many receivable/payable lines for reference %s"
|
||||||
|
#~ msgstr "Trop de lignes débiteurs & créditeurs pour la référence %s"
|
||||||
|
|
||||||
|
#~ msgid "Too many total record found!"
|
||||||
|
#~ msgstr "Trop d'enregistrements trouvés"
|
||||||
|
|
||||||
|
#~ msgid "Total amount differ from the computed amount"
|
||||||
|
#~ msgstr "Le montant total est différent du montant calculé"
|
||||||
|
|
||||||
|
#~ msgid "Total cost differ from the computed amount"
|
||||||
|
#~ msgstr "Le coût total diffère du total calculé"
|
||||||
|
|
||||||
|
#~ msgid "Total cost of V11"
|
||||||
|
#~ msgstr "Coût total du fichier v11"
|
||||||
|
|
||||||
|
#~ msgid "V11 (ISR) Import"
|
||||||
|
#~ msgstr "Importer le fichier BVR (V11)"
|
||||||
|
|
||||||
|
#~ msgid "V11 ISR Import"
|
||||||
|
#~ msgstr "Import du fichier BVR V11"
|
||||||
|
|
||||||
|
#~ msgid "V11 File"
|
||||||
|
#~ msgstr "Fichier V11"
|
||||||
|
|
||||||
|
#~ msgid "V11 file can not be decoded, it contains invalid caracter %s"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Le fichier V11 ne peut pas être décodé, il contient un caractère invalide "
|
||||||
|
#~ "%s."
|
||||||
|
|
||||||
|
#~ msgid "or"
|
||||||
|
#~ msgstr "ou"
|
505
l10n_ch_payment_slip/i18n/it.po
Normal file
@ -0,0 +1,505 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * l10n_ch_payment_slip
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-06-02 00:43+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-06-02 00:43+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||||
|
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
|
||||||
|
"Language: it\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:157
|
||||||
|
#, python-format
|
||||||
|
msgid "- The bank account {} used in invoice has no ISR adherent number."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:162
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"- The bank account {} used in invoice needs to be a postal account or have a "
|
||||||
|
"bank CCP."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:150
|
||||||
|
#, python-format
|
||||||
|
msgid "- The invoice must be confirmed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:153
|
||||||
|
#, python-format
|
||||||
|
msgid "- The invoice needs a partner bank account."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_partner_bank
|
||||||
|
msgid "Bank Accounts"
|
||||||
|
msgstr "Conti bancari"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Annulla"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Società"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_create_uid
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr "Created by"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_create_date
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr "Created on"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_display_name
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_display_name
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice_display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr "Nome da visualizzare"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_header_partner_address
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_header_partner_address
|
||||||
|
msgid "Enabling this will print partner address top-right on the page header"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_error_message
|
||||||
|
msgid "Errors"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_header_partner_address
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_header_partner_address
|
||||||
|
msgid "Header partner address"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_add_horz
|
||||||
|
msgid "Horiz. position in inch for address"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_horz
|
||||||
|
msgid "Horiz. position in inch for amount line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_horz
|
||||||
|
msgid "Horiz. position in inch for scan line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_id
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_id
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice_id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr "ID"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/controllers/web.py:21
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.res_config_settings_view_form
|
||||||
|
#, python-format
|
||||||
|
msgid "ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.actions.act_window,name:l10n_ch_payment_slip.wizard_isr_batch_print
|
||||||
|
msgid "ISR Batch Print"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "ISR Batch Print Wizard"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_delta_horz
|
||||||
|
msgid "ISR Horz. Delta (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_reference
|
||||||
|
msgid "ISR Ref."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_delta_vert
|
||||||
|
msgid "ISR Vert. Delta (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_add_horz
|
||||||
|
msgid "ISR horiz. position address (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_horz
|
||||||
|
msgid "ISR horiz. position for amount line (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_horz
|
||||||
|
msgid "ISR horiz. position for scan line(inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.l10n_ch_view_res_partner_bank_from_invoice_slip
|
||||||
|
msgid "ISR options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_isr_reference
|
||||||
|
msgid "ISR ref"
|
||||||
|
msgstr "PVR ref"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: sql_constraint:l10n_ch.payment_slip:0
|
||||||
|
msgid "ISR reference must be unique"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_font_size
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_font_size
|
||||||
|
msgid "ISR scan line font size (pt)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_letter_spacing
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_letter_spacing
|
||||||
|
msgid "ISR scan line letter spacing"
|
||||||
|
msgstr "PVR scan line distanza lettere"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_add_vert
|
||||||
|
msgid "ISR vert. position for address (inch)"
|
||||||
|
msgstr "PVR posizione verticale indirizzo (inch)"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_vert
|
||||||
|
msgid "ISR vert. position for amount line (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_vert
|
||||||
|
msgid "ISR vert. position for scan line (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_background
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_background
|
||||||
|
msgid "Insert ISR background ?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_account_invoice
|
||||||
|
msgid "Invoice"
|
||||||
|
msgstr "Fattura"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_invoice_ids
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Invoices"
|
||||||
|
msgstr "Fattura"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_account_move_line
|
||||||
|
msgid "Journal Item"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard___last_update
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip___last_update
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice___last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr "Ultima modifica il"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_write_uid
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr "Ultimo aggiornamento di"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_write_date
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr "Ultimo aggiornamento il"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: selection:res.company,merge_mode:0
|
||||||
|
msgid "Merge Slips in Memory, faster but can exhaust memory"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: selection:res.company,merge_mode:0
|
||||||
|
msgid "Merge Slips on Disk, slower but safer"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:340
|
||||||
|
#, python-format
|
||||||
|
msgid "No invoice related to move line %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref
|
||||||
|
msgid "Open Payment Slips"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.actions.act_window,name:l10n_ch_payment_slip.action_slip_all
|
||||||
|
#: model:ir.actions.report,name:l10n_ch_payment_slip.one_slip_per_page_from_invoice
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.pay_slip_form
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.pay_slip_lsit
|
||||||
|
msgid "Payment Slip"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_move_line_payment_slip_ids
|
||||||
|
msgid "Payment Slips"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_merge_mode
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_merge_mode
|
||||||
|
msgid "Payment Slips Merge Mode"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:560
|
||||||
|
#, python-format
|
||||||
|
msgid "Payment slip related to invoice %s due on the %s"
|
||||||
|
msgstr "Polizza di versamento fattura n. %s scandenza il %s"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:225
|
||||||
|
#, python-format
|
||||||
|
msgid "Please enter a correct postal number like: 01-23456-1"
|
||||||
|
msgstr "Inserire un codice di conto postale corretto es. 01-23456-1"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_account
|
||||||
|
msgid "Print Account Number on ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_bank
|
||||||
|
msgid "Print Bank on ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref
|
||||||
|
msgid "Print CH ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_partner
|
||||||
|
msgid "Print Partner Address on ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "Print payment slips"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_invoice_id
|
||||||
|
msgid "Related invoice"
|
||||||
|
msgstr "Fattura relativa"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_move_line_id
|
||||||
|
msgid "Related move"
|
||||||
|
msgstr "Registrazione relativa"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_slip_ids
|
||||||
|
msgid "Related slip"
|
||||||
|
msgstr "Polizza relativa"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_scan_line
|
||||||
|
msgid "Scan Line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_a4_pdf
|
||||||
|
msgid "Slip A4 PDF"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_slip_image
|
||||||
|
msgid "Slip Image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid ""
|
||||||
|
"The payment slip can't be generated for some invoices you selected. Please "
|
||||||
|
"review according to the following messages."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid ""
|
||||||
|
"These invoices were successfully checked for the payment slip to be printed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_amount_total
|
||||||
|
msgid "Total amount of ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_add_vert
|
||||||
|
msgid "Vert. position in inch for address"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_vert
|
||||||
|
msgid "Vert. position in inch for amount line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_vert
|
||||||
|
msgid "Vert. position in inch for scan line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:346
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Your bank ISR number should be of the form 0X-XXX-X! Please check your "
|
||||||
|
"company information for the invoice:\n"
|
||||||
|
"%s"
|
||||||
|
msgstr ""
|
||||||
|
"Il numero PVR della vostra banca deve essere nel formato 0X-XXX-X! Per "
|
||||||
|
"favore controllate i vostri dati di fatturazione.\n"
|
||||||
|
"%s"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_delta_horz
|
||||||
|
msgid ""
|
||||||
|
"horiz. delta in inch 1.2 will print the ISR 1.2 inch on the left, negative "
|
||||||
|
"value is possible"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_ir_actions_report
|
||||||
|
msgid "ir.actions.report"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_isr_batch_print_wizard
|
||||||
|
msgid "isr.batch.print.wizard"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_l10n_ch_payment_slip
|
||||||
|
msgid "l10n_ch.payment_slip"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_report_one_slip_per_page_from_invoice
|
||||||
|
msgid "report.one_slip_per_page_from_invoice"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_config_settings
|
||||||
|
msgid "res.config.settings"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_delta_vert
|
||||||
|
msgid ""
|
||||||
|
"vert. delta in inch 1.2 will print the ISR 1.2 inch lower, negative value is "
|
||||||
|
"possible"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "Import"
|
||||||
|
#~ msgstr "Importa"
|
||||||
|
|
||||||
|
#~ msgid "Inv. no %s"
|
||||||
|
#~ msgstr "Fatt. n. %s"
|
||||||
|
|
||||||
|
#~ msgid "Number of records differ from the computed one"
|
||||||
|
#~ msgstr "Numero di record diverso da quello calcolato"
|
||||||
|
|
||||||
|
#~ msgid "Please select a file first!"
|
||||||
|
#~ msgstr "Bisogna prima selezionare un file"
|
||||||
|
|
||||||
|
#~ msgid "Report"
|
||||||
|
#~ msgstr "Report"
|
||||||
|
|
||||||
|
#~ msgid "Too many receivable/payable lines for reference %s"
|
||||||
|
#~ msgstr "Troppi incassi / pagamenti riferiti a %s"
|
||||||
|
|
||||||
|
#~ msgid "Too many total record found!"
|
||||||
|
#~ msgstr "Trovati troppi record."
|
||||||
|
|
||||||
|
#~ msgid "Total amount differ from the computed amount"
|
||||||
|
#~ msgstr "L'importo totale differisce da quello calcolato."
|
||||||
|
|
||||||
|
#~ msgid "Total amount of V11"
|
||||||
|
#~ msgstr "Importo totale del V11"
|
||||||
|
|
||||||
|
#~ msgid "Total cost differ from the computed amount"
|
||||||
|
#~ msgstr "Il totale differisce da quello calcolato"
|
||||||
|
|
||||||
|
#~ msgid "Total cost of V11"
|
||||||
|
#~ msgstr "Importo totale del V11"
|
||||||
|
|
||||||
|
#~ msgid "V11 (ISR) Import"
|
||||||
|
#~ msgstr "V11 (PVR) Import"
|
||||||
|
|
||||||
|
#~ msgid "V11 ISR Import"
|
||||||
|
#~ msgstr "V11 PVR import"
|
||||||
|
|
||||||
|
#~ msgid "V11 File"
|
||||||
|
#~ msgstr "V11 File"
|
||||||
|
|
||||||
|
#~ msgid "V11 file can not be decoded, it contains invalid caracter %s"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Il file V11 non può essere decodificato, contiene il carattere non valido "
|
||||||
|
#~ "%s"
|
||||||
|
|
||||||
|
#~ msgid "or"
|
||||||
|
#~ msgstr "o"
|
436
l10n_ch_payment_slip/i18n/l10n_ch_payment_slip.pot
Normal file
@ -0,0 +1,436 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * l10n_ch_payment_slip
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 11.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:157
|
||||||
|
#, python-format
|
||||||
|
msgid "- The bank account {} used in invoice has no ISR adherent number."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:162
|
||||||
|
#, python-format
|
||||||
|
msgid "- The bank account {} used in invoice needs to be a postal account or have a bank CCP."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:150
|
||||||
|
#, python-format
|
||||||
|
msgid "- The invoice must be confirmed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/invoice.py:153
|
||||||
|
#, python-format
|
||||||
|
msgid "- The invoice needs a partner bank account."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_partner_bank
|
||||||
|
msgid "Bank Accounts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_create_uid
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_create_date
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_display_name
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_display_name
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice_display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_header_partner_address
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_header_partner_address
|
||||||
|
msgid "Enabling this will print partner address top-right on the page header"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_error_message
|
||||||
|
msgid "Errors"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_header_partner_address
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_header_partner_address
|
||||||
|
msgid "Header partner address"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_add_horz
|
||||||
|
msgid "Horiz. position in inch for address"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_horz
|
||||||
|
msgid "Horiz. position in inch for amount line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_horz
|
||||||
|
msgid "Horiz. position in inch for scan line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_id
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_id
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice_id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/controllers/web.py:21
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.res_config_settings_view_form
|
||||||
|
#, python-format
|
||||||
|
msgid "ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.actions.act_window,name:l10n_ch_payment_slip.wizard_isr_batch_print
|
||||||
|
msgid "ISR Batch Print"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "ISR Batch Print Wizard"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_delta_horz
|
||||||
|
msgid "ISR Horz. Delta (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_reference
|
||||||
|
msgid "ISR Ref."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_delta_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_delta_vert
|
||||||
|
msgid "ISR Vert. Delta (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_add_horz
|
||||||
|
msgid "ISR horiz. position address (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_horz
|
||||||
|
msgid "ISR horiz. position for amount line (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_horz
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_horz
|
||||||
|
msgid "ISR horiz. position for scan line(inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.l10n_ch_view_res_partner_bank_from_invoice_slip
|
||||||
|
msgid "ISR options"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_isr_reference
|
||||||
|
msgid "ISR ref"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: sql_constraint:l10n_ch.payment_slip:0
|
||||||
|
msgid "ISR reference must be unique"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_font_size
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_font_size
|
||||||
|
msgid "ISR scan line font size (pt)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_letter_spacing
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_letter_spacing
|
||||||
|
msgid "ISR scan line letter spacing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_add_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_add_vert
|
||||||
|
msgid "ISR vert. position for address (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_vert
|
||||||
|
msgid "ISR vert. position for amount line (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_vert
|
||||||
|
msgid "ISR vert. position for scan line (inch)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_isr_background
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_isr_background
|
||||||
|
msgid "Insert ISR background ?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_account_invoice
|
||||||
|
msgid "Invoice"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_invoice_ids
|
||||||
|
msgid "Invoices"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_account_move_line
|
||||||
|
msgid "Journal Item"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard___last_update
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip___last_update
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_report_one_slip_per_page_from_invoice___last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_write_uid
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_isr_batch_print_wizard_write_date
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: selection:res.company,merge_mode:0
|
||||||
|
msgid "Merge Slips in Memory, faster but can exhaust memory"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: selection:res.company,merge_mode:0
|
||||||
|
msgid "Merge Slips on Disk, slower but safer"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:340
|
||||||
|
#, python-format
|
||||||
|
msgid "No invoice related to move line %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref
|
||||||
|
msgid "Open Payment Slips"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.actions.act_window,name:l10n_ch_payment_slip.action_slip_all
|
||||||
|
#: model:ir.actions.report,name:l10n_ch_payment_slip.one_slip_per_page_from_invoice
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.pay_slip_form
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.pay_slip_lsit
|
||||||
|
msgid "Payment Slip"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_move_line_payment_slip_ids
|
||||||
|
msgid "Payment Slips"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_company_merge_mode
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_config_settings_merge_mode
|
||||||
|
msgid "Payment Slips Merge Mode"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:560
|
||||||
|
#, python-format
|
||||||
|
msgid "Payment slip related to invoice %s due on the %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:225
|
||||||
|
#, python-format
|
||||||
|
msgid "Please enter a correct postal number like: 01-23456-1"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_account
|
||||||
|
msgid "Print Account Number on ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_bank
|
||||||
|
msgid "Print Bank on ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.invoice_form_add_isr_ref
|
||||||
|
msgid "Print CH ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_res_partner_bank_print_partner
|
||||||
|
msgid "Print Partner Address on ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "Print payment slips"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_invoice_id
|
||||||
|
msgid "Related invoice"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_move_line_id
|
||||||
|
msgid "Related move"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_account_invoice_slip_ids
|
||||||
|
msgid "Related slip"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_scan_line
|
||||||
|
msgid "Scan Line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_a4_pdf
|
||||||
|
msgid "Slip A4 PDF"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_slip_image
|
||||||
|
msgid "Slip Image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "The payment slip can't be generated for some invoices you selected. Please review according to the following messages."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_payment_slip.isr_batch_print_view
|
||||||
|
msgid "These invoices were successfully checked for the payment slip to be printed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_payment_slip.field_l10n_ch_payment_slip_amount_total
|
||||||
|
msgid "Total amount of ISR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_add_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_add_vert
|
||||||
|
msgid "Vert. position in inch for address"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_amount_line_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_amount_line_vert
|
||||||
|
msgid "Vert. position in inch for amount line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_scan_line_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_scan_line_vert
|
||||||
|
msgid "Vert. position in inch for scan line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: code:addons/l10n_ch_payment_slip/models/payment_slip.py:346
|
||||||
|
#, python-format
|
||||||
|
msgid "Your bank ISR number should be of the form 0X-XXX-X! Please check your company information for the invoice:\n"
|
||||||
|
"%s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_horz
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_delta_horz
|
||||||
|
msgid "horiz. delta in inch 1.2 will print the ISR 1.2 inch on the left, negative value is possible"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_ir_actions_report
|
||||||
|
msgid "ir.actions.report"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_isr_batch_print_wizard
|
||||||
|
msgid "isr.batch.print.wizard"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_l10n_ch_payment_slip
|
||||||
|
msgid "l10n_ch.payment_slip"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_report_one_slip_per_page_from_invoice
|
||||||
|
msgid "report.one_slip_per_page_from_invoice"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model,name:l10n_ch_payment_slip.model_res_config_settings
|
||||||
|
msgid "res.config.settings"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_payment_slip
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_company_isr_delta_vert
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_payment_slip.field_res_config_settings_isr_delta_vert
|
||||||
|
msgid "vert. delta in inch 1.2 will print the ISR 1.2 inch lower, negative value is possible"
|
||||||
|
msgstr ""
|
||||||
|
|
5
l10n_ch_payment_slip/models/__init__.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from . import company
|
||||||
|
from . import payment_slip
|
||||||
|
from . import invoice
|
||||||
|
from . import bank
|
||||||
|
from . import res_config_settings
|
18
l10n_ch_payment_slip/models/bank.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright 2012-2016 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
from flectra import models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class ResPartnerBank(models.Model):
|
||||||
|
"""
|
||||||
|
Inherit res.partner.bank class in order to add swiss specific fields
|
||||||
|
such as:
|
||||||
|
- ISR data
|
||||||
|
- ISR print options for company accounts
|
||||||
|
We leave it here in order
|
||||||
|
"""
|
||||||
|
_inherit = "res.partner.bank"
|
||||||
|
isr_adherent_num = fields.Boolean('Print Bank adherent number') #custom added fields
|
||||||
|
print_bank = fields.Boolean('Print Bank on ISR')
|
||||||
|
print_account = fields.Boolean('Print Account Number on ISR')
|
||||||
|
print_partner = fields.Boolean('Print Partner Address on ISR')
|
90
l10n_ch_payment_slip/models/company.py
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
# Copyright 2012-2015 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
from flectra import models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class ResCompany(models.Model):
|
||||||
|
"""Add ISR vertical/horizontal print delta and functionalities."""
|
||||||
|
_inherit = "res.company"
|
||||||
|
|
||||||
|
isr_delta_horz = fields.Float(
|
||||||
|
'ISR Horz. Delta (inch)',
|
||||||
|
oldname='bvr_delta_horz',
|
||||||
|
help='horiz. delta in inch 1.2 will print the ISR 1.2 inch on the '
|
||||||
|
'left, negative value is possible'
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_delta_vert = fields.Float(
|
||||||
|
'ISR Vert. Delta (inch)',
|
||||||
|
oldname='bvr_delta_vert',
|
||||||
|
help='vert. delta in inch 1.2 will print the ISR 1.2 inch lower,'
|
||||||
|
' negative value is possible'
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_scan_line_vert = fields.Float(
|
||||||
|
'ISR vert. position for scan line (inch)',
|
||||||
|
oldname='bvr_scan_line_vert',
|
||||||
|
help='Vert. position in inch for scan line'
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_scan_line_horz = fields.Float(
|
||||||
|
'ISR horiz. position for scan line(inch)',
|
||||||
|
oldname='bvr_scan_line_horz',
|
||||||
|
help='Horiz. position in inch for scan line'
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_add_vert = fields.Float(
|
||||||
|
'ISR vert. position for address (inch)',
|
||||||
|
oldname='bvr_add_vert',
|
||||||
|
help='Vert. position in inch for address'
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_add_horz = fields.Float(
|
||||||
|
'ISR horiz. position address (inch)',
|
||||||
|
oldname='bvr_add_horz',
|
||||||
|
help='Horiz. position in inch for address'
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_scan_line_font_size = fields.Integer(
|
||||||
|
'ISR scan line font size (pt)',
|
||||||
|
oldname='bvr_scan_line_font_size',
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_scan_line_letter_spacing = fields.Float(
|
||||||
|
'ISR scan line letter spacing',
|
||||||
|
oldname='bvr_scan_line_letter_spacing',
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_amount_line_horz = fields.Float(
|
||||||
|
'ISR horiz. position for amount line (inch)',
|
||||||
|
oldname='bvr_amount_line_horz',
|
||||||
|
help='Horiz. position in inch for amount line',
|
||||||
|
default=0.00
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_amount_line_vert = fields.Float(
|
||||||
|
'ISR vert. position for amount line (inch)',
|
||||||
|
oldname='bvr_amount_line_vert',
|
||||||
|
help='Vert. position in inch for amount line',
|
||||||
|
default=0.00,
|
||||||
|
)
|
||||||
|
|
||||||
|
merge_mode = fields.Selection(
|
||||||
|
[('in_memory', 'Merge Slips in Memory, faster but can exhaust memory'),
|
||||||
|
('on_disk', 'Merge Slips on Disk, slower but safer')],
|
||||||
|
string="Payment Slips Merge Mode",
|
||||||
|
required=True,
|
||||||
|
default="in_memory"
|
||||||
|
)
|
||||||
|
isr_background = fields.Boolean(
|
||||||
|
'Insert ISR background ?',
|
||||||
|
oldname='bvr_background',
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_header_partner_address = fields.Boolean(
|
||||||
|
'Header partner address',
|
||||||
|
oldname='bvr_header_partner_address',
|
||||||
|
default=False,
|
||||||
|
help='Enabling this will print partner address top-right on the '
|
||||||
|
'page header',
|
||||||
|
)
|
194
l10n_ch_payment_slip/models/invoice.py
Normal file
@ -0,0 +1,194 @@
|
|||||||
|
# Copyright 2012-2017 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
from flectra import _, api, exceptions, fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class AccountMoveLine(models.Model):
|
||||||
|
|
||||||
|
_inherit = "account.move.line"
|
||||||
|
|
||||||
|
payment_slip_ids = fields.One2many(comodel_name='l10n_ch.payment_slip',
|
||||||
|
inverse_name='move_line_id',
|
||||||
|
string='Payment Slips',
|
||||||
|
readonly=True)
|
||||||
|
|
||||||
|
# Adding an index on invoice_id for the account.move.line.
|
||||||
|
# The goal is to optimize the related field on payment_slip,
|
||||||
|
# as updating the stored value will trigger a:
|
||||||
|
# self.env['account.move.line'].search([('invoice_id', '=', [xxx])])
|
||||||
|
# for each invoice validation.
|
||||||
|
invoice_id = fields.Many2one(
|
||||||
|
'account.move', oldname="invoice", index=True
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class AccountInvoice(models.Model):
|
||||||
|
"""Add ISR (Swiss payment vector)."""
|
||||||
|
|
||||||
|
_inherit = "account.move"
|
||||||
|
|
||||||
|
reference = fields.Char(copy=False)
|
||||||
|
|
||||||
|
partner_bank_id = fields.Many2one(
|
||||||
|
'res.partner.bank',
|
||||||
|
'Bank Account',
|
||||||
|
help='The partner bank account to pay\n'
|
||||||
|
'Keep empty to use the default'
|
||||||
|
)
|
||||||
|
|
||||||
|
isr_reference = fields.Text(
|
||||||
|
string='ISR ref',
|
||||||
|
compute='_compute_full_isr_name',
|
||||||
|
oldname='bvr_reference',
|
||||||
|
store=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
slip_ids = fields.One2many(
|
||||||
|
string='Related slip',
|
||||||
|
comodel_name='l10n_ch.payment_slip',
|
||||||
|
inverse_name='invoice_id'
|
||||||
|
)
|
||||||
|
|
||||||
|
@api.depends('slip_ids', 'state')
|
||||||
|
def _compute_full_isr_name(self):
|
||||||
|
"""Concatenate related slip references
|
||||||
|
|
||||||
|
:return: reference comma separated
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
for rec in self:
|
||||||
|
if (rec.state not in ('open', 'paid') or
|
||||||
|
not rec.slip_ids):
|
||||||
|
continue
|
||||||
|
rec.isr_reference = ', '.join(x.reference
|
||||||
|
for x in rec.slip_ids
|
||||||
|
if x.reference)
|
||||||
|
|
||||||
|
def get_payment_move_line(self):
|
||||||
|
"""Return the move line related to current invoice slips
|
||||||
|
|
||||||
|
:return: recordset of `account.move.line`
|
||||||
|
:rtype: :py:class:`flectra.model.Models`
|
||||||
|
"""
|
||||||
|
move_line_model = self.env['account.move.line']
|
||||||
|
return move_line_model.search(
|
||||||
|
[('move_id', '=', self.move_id.id),
|
||||||
|
('account_id.user_type_id.type', 'in',
|
||||||
|
['receivable', 'payable'])]
|
||||||
|
)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _update_ref_on_account_analytic_line(self, ref, move_id):
|
||||||
|
"""Propagate reference on analytic line"""
|
||||||
|
self.env.cr.execute(
|
||||||
|
'UPDATE account_analytic_line SET ref=%s'
|
||||||
|
' FROM account_move_line '
|
||||||
|
' WHERE account_move_line.move_id = %s '
|
||||||
|
' AND account_analytic_line.move_id = account_move_line.id',
|
||||||
|
(ref, move_id)
|
||||||
|
)
|
||||||
|
return True
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _action_isr_number_move_line(self, move_line, ref):
|
||||||
|
"""Propagate reference on move lines and analytic lines"""
|
||||||
|
if not ref:
|
||||||
|
return
|
||||||
|
ref = ref.replace(' ', '') # remove formatting
|
||||||
|
self.env.cr.execute('UPDATE account_move_line SET transaction_ref=%s'
|
||||||
|
' WHERE id=%s', (ref, move_line.id))
|
||||||
|
self._update_ref_on_account_analytic_line(ref, move_line.move_id.id)
|
||||||
|
self.env.cache.invalidate()
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def invoice_validate(self):
|
||||||
|
""" Copy the ISR reference in the transaction_ref of move lines.
|
||||||
|
|
||||||
|
For customers invoices: the ISR reference is computed using
|
||||||
|
``get_isr_ref()`` on the invoice or move lines.
|
||||||
|
|
||||||
|
For suppliers invoices: the ISR reference is stored in the reference
|
||||||
|
field of the invoice.
|
||||||
|
|
||||||
|
"""
|
||||||
|
pay_slip = self.env['l10n_ch.payment_slip']
|
||||||
|
for inv in self:
|
||||||
|
if inv.type in ('in_invoice', 'in_refund'):
|
||||||
|
if inv.reference_type == 'isr' and inv._check_isr():
|
||||||
|
ref = inv.reference
|
||||||
|
else:
|
||||||
|
ref = False
|
||||||
|
move_lines = inv.get_payment_move_line()
|
||||||
|
for move_line_id in move_lines:
|
||||||
|
self._action_isr_number_move_line(move_line_id,
|
||||||
|
ref)
|
||||||
|
else:
|
||||||
|
for pay_slip in pay_slip._compute_pay_slips_from_invoices(inv):
|
||||||
|
ref = pay_slip.reference
|
||||||
|
self._action_isr_number_move_line(pay_slip.move_line_id,
|
||||||
|
ref)
|
||||||
|
return super(AccountInvoice, self).invoice_validate()
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def print_isr(self):
|
||||||
|
self._check_isr_generatable()
|
||||||
|
self.write({
|
||||||
|
'sent': True
|
||||||
|
})
|
||||||
|
report_name = 'l10n_ch_payment_slip.one_slip_per_page_from_invoice'
|
||||||
|
docids = self.ids
|
||||||
|
act_report = self.env['ir.actions.report']._get_report_from_name(
|
||||||
|
report_name)
|
||||||
|
return act_report.report_action(docids)
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def _check_isr_generatable(self):
|
||||||
|
errors = []
|
||||||
|
for inv in self:
|
||||||
|
msg = []
|
||||||
|
if inv.state in ('draft', 'cancel'):
|
||||||
|
msg.append(_('- The invoice must be confirmed.'))
|
||||||
|
bank_acc = inv.partner_bank_id
|
||||||
|
if not bank_acc:
|
||||||
|
msg.append(_('- The invoice needs a partner bank account.'))
|
||||||
|
else:
|
||||||
|
if not bank_acc.isr_adherent_num:
|
||||||
|
msg.append(
|
||||||
|
_('- The bank account {} used in invoice has no'
|
||||||
|
' ISR adherent number.'
|
||||||
|
).format(bank_acc.acc_number))
|
||||||
|
if not (bank_acc.acc_type == 'postal' or bank_acc.ccp):
|
||||||
|
msg.append(
|
||||||
|
_('- The bank account {} used in invoice needs to'
|
||||||
|
' be a postal account or have a bank CCP.'
|
||||||
|
).format(bank_acc.acc_number))
|
||||||
|
if msg:
|
||||||
|
if inv.name:
|
||||||
|
invoice = 'Invoice %s :\n' % inv.name
|
||||||
|
else:
|
||||||
|
invoice = 'Invoice (%s) :\n' % inv.partner_id.name
|
||||||
|
|
||||||
|
errors.append(invoice + '\n'.join(msg))
|
||||||
|
if errors:
|
||||||
|
raise exceptions.UserError('\n'.join(errors))
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def action_invoice_draft(self):
|
||||||
|
res = super().action_invoice_draft()
|
||||||
|
# Delete former printed payment slip
|
||||||
|
ActionReport = self.env['ir.actions.report']
|
||||||
|
try:
|
||||||
|
report_payment_slip = ActionReport._get_report_from_name(
|
||||||
|
'l10n_ch_payment_slip.one_slip_per_page_from_invoice')
|
||||||
|
except IndexError:
|
||||||
|
report_payment_slip = False
|
||||||
|
if report_payment_slip and report_payment_slip.attachment:
|
||||||
|
for invoice in self:
|
||||||
|
with invoice.env.do_in_draft():
|
||||||
|
invoice.name, invoice.state = invoice.move_name, 'open'
|
||||||
|
attachment = self.env.ref(
|
||||||
|
'l10n_ch_payment_slip.one_slip_per_page_from_invoice'
|
||||||
|
).retrieve_attachment(invoice)
|
||||||
|
if attachment:
|
||||||
|
attachment.unlink()
|
||||||
|
return res
|
930
l10n_ch_payment_slip/models/payment_slip.py
Normal file
@ -0,0 +1,930 @@
|
|||||||
|
# Copyright 2014-2017 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
import base64
|
||||||
|
import io
|
||||||
|
import contextlib
|
||||||
|
import re
|
||||||
|
import textwrap
|
||||||
|
from collections import namedtuple
|
||||||
|
from reportlab.pdfgen.canvas import Canvas
|
||||||
|
from reportlab.pdfbase import pdfmetrics
|
||||||
|
from reportlab.pdfbase.ttfonts import TTFont
|
||||||
|
from reportlab.lib.units import inch
|
||||||
|
from flectra import models, fields, api, _, exceptions, tools
|
||||||
|
from flectra.modules import get_module_resource
|
||||||
|
from flectra.tools.misc import mod10r, format_date
|
||||||
|
|
||||||
|
FontMeta = namedtuple('FontMeta', ('name', 'size'))
|
||||||
|
|
||||||
|
|
||||||
|
ADDR_FORMAT = "%(street)s\n%(street2)s\n%(zip)s %(city)s"
|
||||||
|
|
||||||
|
|
||||||
|
class PaymentSlipSettings(object):
|
||||||
|
"""Slip report setting container"""
|
||||||
|
|
||||||
|
def __init__(self, report_name, **kwargs):
|
||||||
|
for param, value in list(kwargs.items()):
|
||||||
|
setattr(self, param, value)
|
||||||
|
self.report_name = report_name
|
||||||
|
self.validate()
|
||||||
|
|
||||||
|
def validate(self):
|
||||||
|
"Parameter Validationd hook"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class PaymentSlip(models.Model):
|
||||||
|
"""From Version 8 payment slip are now a
|
||||||
|
new Model related to move line and
|
||||||
|
stored in database. This is done because
|
||||||
|
with previous implementation changing bank data
|
||||||
|
or anything else had as result to modify historical refs.
|
||||||
|
|
||||||
|
Now payment slip is genrated each time a customer invoice is validated
|
||||||
|
If you need to alter a payment slip you will have to cancel
|
||||||
|
and revalidate the related invoice
|
||||||
|
"""
|
||||||
|
_fill_color = (0, 0, 0)
|
||||||
|
_default_font_size = 11
|
||||||
|
_default_scan_font_size = 11
|
||||||
|
_default_amount_font_size = 16
|
||||||
|
_compile_get_ref = re.compile(r'[^0-9]')
|
||||||
|
_compile_check_isr = re.compile(r'[0-9][0-9]-[0-9]{3,6}-[0-9]')
|
||||||
|
|
||||||
|
_name = 'l10n_ch.payment_slip'
|
||||||
|
_rec_name = 'reference'
|
||||||
|
|
||||||
|
reference = fields.Char('ISR Ref.',
|
||||||
|
compute='_compute_ref',
|
||||||
|
index=True,
|
||||||
|
store=True)
|
||||||
|
|
||||||
|
move_line_id = fields.Many2one('account.move.line',
|
||||||
|
string='Related move',
|
||||||
|
readonly=True,
|
||||||
|
ondelete='cascade')
|
||||||
|
|
||||||
|
amount_total = fields.Float('Total amount of ISR',
|
||||||
|
compute='_compute_amount')
|
||||||
|
|
||||||
|
scan_line = fields.Char('Scan Line',
|
||||||
|
compute='_compute_scan_line',
|
||||||
|
readonly=True)
|
||||||
|
|
||||||
|
invoice_id = fields.Many2one(string='Related invoice',
|
||||||
|
related='move_line_id.invoice_id',
|
||||||
|
store=True,
|
||||||
|
readonly=True,
|
||||||
|
comodel_name='account.move',
|
||||||
|
ondelete ='cascade')
|
||||||
|
|
||||||
|
slip_image = fields.Binary('Slip Image',
|
||||||
|
readonly=True,
|
||||||
|
compute="_compute_payment_slip_image")
|
||||||
|
|
||||||
|
a4_pdf = fields.Binary('Slip A4 PDF',
|
||||||
|
readonly=True,
|
||||||
|
compute="_compute_a4_report")
|
||||||
|
|
||||||
|
_sql_constraints = [('unique_reference',
|
||||||
|
'UNIQUE (reference)',
|
||||||
|
'ISR reference must be unique')]
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _can_generate(self, move_line):
|
||||||
|
'''Predicate to determine if payment slip should be generated or not.
|
||||||
|
|
||||||
|
:param move_line: move line reocord
|
||||||
|
:type move_line: :py:class:`flectra.models.Model` record
|
||||||
|
|
||||||
|
:return: True if we can generate a payment slip
|
||||||
|
:rtype: bool
|
||||||
|
'''
|
||||||
|
invoice = move_line.invoice_id
|
||||||
|
if not invoice:
|
||||||
|
return False
|
||||||
|
return (invoice.partner_bank_id and
|
||||||
|
invoice.partner_bank_id.isr_adherent_num and
|
||||||
|
(
|
||||||
|
invoice.partner_bank_id.acc_type == 'postal' or
|
||||||
|
invoice.partner_bank_id.ccp
|
||||||
|
))
|
||||||
|
|
||||||
|
def _get_adherent_number(self):
|
||||||
|
"""Fetch the current slip bank adherent number.
|
||||||
|
|
||||||
|
:return: adherent number
|
||||||
|
:rtype: string
|
||||||
|
"""
|
||||||
|
self.ensure_one()
|
||||||
|
move_line = self.move_line_id
|
||||||
|
ad_number = ''
|
||||||
|
if move_line.invoice_id.partner_bank_id.isr_adherent_num:
|
||||||
|
ad_number = move_line.invoice_id.partner_bank_id.isr_adherent_num
|
||||||
|
return ad_number
|
||||||
|
|
||||||
|
def _compute_amount_hook(self):
|
||||||
|
"""Hook to return the total amount of payment slip
|
||||||
|
|
||||||
|
:return: total amount of payment slip
|
||||||
|
:rtype: float
|
||||||
|
"""
|
||||||
|
return self.move_line_id.debit
|
||||||
|
|
||||||
|
@api.depends('move_line_id',
|
||||||
|
'move_line_id.debit',
|
||||||
|
'move_line_id.credit')
|
||||||
|
def _compute_amount(self):
|
||||||
|
"""Return the total amount of payment slip
|
||||||
|
|
||||||
|
If you need to override please use
|
||||||
|
:py:meth:`_compute_amount_hook`
|
||||||
|
|
||||||
|
:return: total amount of payment slip
|
||||||
|
:rtype: float
|
||||||
|
|
||||||
|
"""
|
||||||
|
for rec in self:
|
||||||
|
amt = rec._compute_amount_hook()
|
||||||
|
rec.amount_total = amt
|
||||||
|
|
||||||
|
@api.depends('move_line_id',
|
||||||
|
'move_line_id.invoice_id.name') # move_line_id.invoice_id.number replcae by move_line_id.invoice_id.name
|
||||||
|
def _compute_ref(self):
|
||||||
|
"""Retrieve ISR reference from move line in order to print it
|
||||||
|
|
||||||
|
Returns False when no ISR reference should be generated. No
|
||||||
|
reference is generated when a transaction reference already
|
||||||
|
exists for the line (likely been generated by a payment service).
|
||||||
|
"""
|
||||||
|
for rec in self:
|
||||||
|
move_line = rec.move_line_id
|
||||||
|
if not rec._can_generate(move_line):
|
||||||
|
continue
|
||||||
|
# We should not use technical id but will keep it for
|
||||||
|
# historical reason
|
||||||
|
move_number = str(move_line.id)
|
||||||
|
ad_number = rec._get_adherent_number()
|
||||||
|
#move_line.invoice_id.number replaced by move_line.invoice_id.name
|
||||||
|
if move_line.invoice_id.name:
|
||||||
|
compound = move_line.invoice_id.name + str(move_line.id)
|
||||||
|
move_number = rec._compile_get_ref.sub('', compound)
|
||||||
|
reference = mod10r(
|
||||||
|
ad_number + move_number.rjust(26 - len(ad_number), '0')
|
||||||
|
)
|
||||||
|
|
||||||
|
rec.reference = rec._space(reference)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _space(self, nbr, nbrspc=5):
|
||||||
|
"""Spaces ref by group of 5 digits.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
AccountInvoice._space('123456789012345')
|
||||||
|
'12 34567 89012 345'
|
||||||
|
|
||||||
|
:param nbr: reference to group
|
||||||
|
:type nbr: int
|
||||||
|
|
||||||
|
:param nbrspc: group length
|
||||||
|
:type nbrspc: int
|
||||||
|
|
||||||
|
:return: grouped reference
|
||||||
|
:rtype: str
|
||||||
|
|
||||||
|
"""
|
||||||
|
return ''.join([' '[(i - 2) % nbrspc:] + c for i, c in enumerate(nbr)])
|
||||||
|
|
||||||
|
def _compute_scan_line_list(self):
|
||||||
|
"""Generate a list containing all element of scan line
|
||||||
|
|
||||||
|
the element are grouped by char or symbol
|
||||||
|
|
||||||
|
This will allows the free placment of each element
|
||||||
|
and enable a fine tuning of spacing
|
||||||
|
|
||||||
|
:return: a list of sting representing the scan bar
|
||||||
|
|
||||||
|
:rtype: list
|
||||||
|
"""
|
||||||
|
self.ensure_one()
|
||||||
|
line = []
|
||||||
|
if not self._can_generate(self.move_line_id):
|
||||||
|
return []
|
||||||
|
justified_amount = '01%s' % ('%.2f' % self.amount_total).replace(
|
||||||
|
'.', '').rjust(10, '0')
|
||||||
|
line += [char for char in mod10r(justified_amount)]
|
||||||
|
line.append('>')
|
||||||
|
line += [char for char in self.reference.replace(" ", "")]
|
||||||
|
line.append('+')
|
||||||
|
line.append(' ')
|
||||||
|
partner_bank = self.move_line_id.invoice_id.partner_bank_id
|
||||||
|
bank = partner_bank.get_account_number()
|
||||||
|
account_components = bank.split('-')
|
||||||
|
if len(account_components) != 3:
|
||||||
|
raise exceptions.UserError(
|
||||||
|
_('Please enter a correct postal number like: '
|
||||||
|
'01-23456-1'))
|
||||||
|
bank_identifier = "%s%s%s" % (
|
||||||
|
account_components[0],
|
||||||
|
account_components[1].rjust(6, '0'),
|
||||||
|
account_components[2]
|
||||||
|
)
|
||||||
|
line += [car for car in bank_identifier]
|
||||||
|
line.append('>')
|
||||||
|
return line
|
||||||
|
|
||||||
|
@api.depends('amount_total',
|
||||||
|
'reference',
|
||||||
|
'move_line_id',
|
||||||
|
'move_line_id.debit',
|
||||||
|
'move_line_id.credit')
|
||||||
|
def _compute_scan_line(self):
|
||||||
|
"""Compute the payment slip scan line to be used
|
||||||
|
by scanners
|
||||||
|
|
||||||
|
:return: scan line
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
for rec in self:
|
||||||
|
scan_line_list = rec._compute_scan_line_list()
|
||||||
|
rec.scan_line = ''.join(scan_line_list)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def get_slip_for_move_line(self, move_line):
|
||||||
|
"""Return pyment slip related to move
|
||||||
|
|
||||||
|
:param move: `account.move.line` record
|
||||||
|
:type move: :py:class:`flectra.models.Model`
|
||||||
|
|
||||||
|
:return: payment slip recordset related to move line
|
||||||
|
:rtype: :py:class:`flectra.models.Model`
|
||||||
|
"""
|
||||||
|
return self.search(
|
||||||
|
[('move_line_id', '=', move_line.id)]
|
||||||
|
)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def create_slip_from_move_line(self, move_line):
|
||||||
|
"""Generate `l10n_ch.payment_slip` from
|
||||||
|
`account.move.line` recordset
|
||||||
|
|
||||||
|
:param move_lines: Record of `account.move.line`
|
||||||
|
:type move_line: :py:class:`flectra.models.Model`
|
||||||
|
|
||||||
|
:return: Recordset of `l10n_ch.payment_slip`
|
||||||
|
:rtype: :py:class:`flectra.models.Model`
|
||||||
|
"""
|
||||||
|
return self.create({'move_line_id': move_line.id})
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _compute_pay_slips_from_move_lines(self, move_lines):
|
||||||
|
"""Get or generate `l10n_ch.payment_slip` from
|
||||||
|
`account.move.line` recordset
|
||||||
|
|
||||||
|
:param move_lines: Recordset of `account.move.line`
|
||||||
|
:type move_lines: :py:class:`flectra.models.Model`
|
||||||
|
|
||||||
|
:return: Recordset of `l10n_ch.payment_slip`
|
||||||
|
:rtype: :py:class:`flectra.models.Model`
|
||||||
|
|
||||||
|
"""
|
||||||
|
pay_slips = self.browse()
|
||||||
|
for move in move_lines:
|
||||||
|
if not self._can_generate(move):
|
||||||
|
continue
|
||||||
|
slip = self.get_slip_for_move_line(move)
|
||||||
|
if not slip:
|
||||||
|
slip = self.create_slip_from_move_line(move)
|
||||||
|
if slip:
|
||||||
|
pay_slips += slip
|
||||||
|
return pay_slips
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _compute_pay_slips_from_invoices(self, invoices):
|
||||||
|
"""Generate ```l10n_ch.payment_slip``` from
|
||||||
|
```account.invoice``` recordset
|
||||||
|
|
||||||
|
:param move_lines: Recordset of `account.invoice`
|
||||||
|
:type move_lines: :py:class:`flectra.models.Model`
|
||||||
|
|
||||||
|
"""
|
||||||
|
move_lines = self.env['account.move.line'].browse()
|
||||||
|
for invoice in invoices:
|
||||||
|
move_lines += invoice.get_payment_move_line()
|
||||||
|
return self._compute_pay_slips_from_move_lines(move_lines)
|
||||||
|
|
||||||
|
def get_comm_partner(self):
|
||||||
|
"""Determine wich partner should be display
|
||||||
|
on the payment slip
|
||||||
|
|
||||||
|
:return: corresponding `res.partner` record
|
||||||
|
:rtype: :py:class:`flectra.models.Model`
|
||||||
|
"""
|
||||||
|
self.ensure_one()
|
||||||
|
invoice = self.move_line_id.invoice_id
|
||||||
|
if hasattr(invoice, 'commercial_partner_id'):
|
||||||
|
return invoice.commercial_partner_id
|
||||||
|
else:
|
||||||
|
return invoice.partner_id
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def _validate(self):
|
||||||
|
"""Check if the payment slip is ready to be printed
|
||||||
|
|
||||||
|
:return: True or raise an exception
|
||||||
|
:rtype: bool"""
|
||||||
|
for rec in self:
|
||||||
|
invoice = rec.move_line_id.invoice_id
|
||||||
|
if not invoice:
|
||||||
|
raise exceptions.ValidationError(
|
||||||
|
_('No invoice related to move line %s'
|
||||||
|
) % rec.move_line_id.ref
|
||||||
|
)
|
||||||
|
if not rec._compile_check_isr.match(
|
||||||
|
invoice.partner_bank_id.get_account_number() or ''):
|
||||||
|
raise exceptions.ValidationError(
|
||||||
|
_('Your bank ISR number should be of the form 0X-XXX-X! '
|
||||||
|
'Please check your company '
|
||||||
|
'information for the invoice:\n%s') % (invoice.name)
|
||||||
|
)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def font_absolute_path(self):
|
||||||
|
"""Will get the ocrb font absolute path
|
||||||
|
|
||||||
|
:return: path to the font
|
||||||
|
"""
|
||||||
|
path = get_module_resource('l10n_ch_payment_slip',
|
||||||
|
'static',
|
||||||
|
'src',
|
||||||
|
'font',
|
||||||
|
'ocrbb.ttf')
|
||||||
|
return path
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def image_absolute_path(self, file_name):
|
||||||
|
"""Will get image absolute path
|
||||||
|
|
||||||
|
:param file_name: name of image
|
||||||
|
|
||||||
|
:return: image path
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
path = get_module_resource('l10n_ch_payment_slip',
|
||||||
|
'static',
|
||||||
|
'src',
|
||||||
|
'img',
|
||||||
|
file_name)
|
||||||
|
return path
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _register_fonts(self):
|
||||||
|
"""Hook to register any font that can be
|
||||||
|
needed in payment slip
|
||||||
|
|
||||||
|
see `pdfmetrics.registerFont` doc for more details
|
||||||
|
"""
|
||||||
|
font_identifier = 'ocrb_font'
|
||||||
|
pdfmetrics.registerFont(TTFont(font_identifier,
|
||||||
|
self.font_absolute_path()))
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_small_text_font(self):
|
||||||
|
"""Register a :py:class:`reportlab.pdfbase.ttfonts.TTFont`
|
||||||
|
for recept reference
|
||||||
|
:return: a :py:class:`FontMeta` with font name and size
|
||||||
|
:rtype: :py:class:`FontMeta`
|
||||||
|
"""
|
||||||
|
font_identifier = 'ocrb_font'
|
||||||
|
return FontMeta(name=font_identifier,
|
||||||
|
size=self._default_font_size * 0.7)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_text_font(self):
|
||||||
|
"""Register a :py:class:`reportlab.pdfbase.ttfonts.TTFont`
|
||||||
|
for addresses and bank
|
||||||
|
:return: a :py:class:`FontMeta` with font name and size
|
||||||
|
:rtype: :py:class:`FontMeta`
|
||||||
|
"""
|
||||||
|
font_identifier = 'ocrb_font'
|
||||||
|
return FontMeta(name=font_identifier,
|
||||||
|
size=self._default_font_size)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_amount_font(self):
|
||||||
|
"""Register a :py:class:`reportlab.pdfbase.ttfonts.TTFont`
|
||||||
|
for amount
|
||||||
|
:return: a :py:class:`FontMeta` with font name and size
|
||||||
|
:rtype: :py:class:`FontMeta`
|
||||||
|
"""
|
||||||
|
font_identifier = 'ocrb_font'
|
||||||
|
return FontMeta(name=font_identifier,
|
||||||
|
size=self._default_amount_font_size)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_scan_line_text_font(self, print_settings):
|
||||||
|
"""Register a :py:class:`reportlab.pdfbase.ttfonts.TTFont`
|
||||||
|
for scan line
|
||||||
|
|
||||||
|
:param print_settings: layouts print setting
|
||||||
|
:type print_settings: :py:class:`PaymentSlipSettings` or subclass
|
||||||
|
|
||||||
|
:return: a :py:class:`FontMeta` with font name and size
|
||||||
|
:rtype: :py:class:`FontMeta`
|
||||||
|
"""
|
||||||
|
font_identifier = 'ocrb_font'
|
||||||
|
# pdfmetrics.registerFont(TTFont(font_identifier,
|
||||||
|
# self.font_absolute_path()))
|
||||||
|
size = (print_settings.isr_scan_line_font_size or
|
||||||
|
self._default_scan_font_size)
|
||||||
|
return FontMeta(name=font_identifier,
|
||||||
|
size=size)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
@tools.ormcache_context('self._uid', 'com_partner_id', keys=('lang',))
|
||||||
|
def _get_address_lines(self, com_partner_id):
|
||||||
|
config_param = self.env['ir.config_parameter'].sudo()
|
||||||
|
isr_address_format = (
|
||||||
|
config_param.get_param('isr.address.format') or ADDR_FORMAT)
|
||||||
|
# clone the partner to not affect real partner
|
||||||
|
com_partner = self.env['res.partner'].browse(com_partner_id)
|
||||||
|
partner = self.env['res.partner'].new(com_partner.copy_data()[0])
|
||||||
|
# use onchange to define our own temporary address format
|
||||||
|
with self.env.do_in_onchange():
|
||||||
|
# assign a fake country in case partner has no country set
|
||||||
|
# NOTE: creating the country BEFORE assigning the format to it
|
||||||
|
# is mandatory. If you create and assign the value at the same time
|
||||||
|
# `address_format` won't be populated properly!
|
||||||
|
partner.country_id = self.env['res.country'].new()
|
||||||
|
partner.country_id.address_format = isr_address_format
|
||||||
|
address_lines = partner._display_address(
|
||||||
|
without_company=True).split("\n")
|
||||||
|
return address_lines
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_address_font_size(self, font_size, address_lines, com_partner):
|
||||||
|
""" Return a font size and if minimun font size the max length
|
||||||
|
|
||||||
|
:param font: font to use
|
||||||
|
:type font: :py:class:`FontMeta`
|
||||||
|
|
||||||
|
:returns: font_size, cutoff_length
|
||||||
|
"""
|
||||||
|
max_line_length = max(len(l) for l in address_lines)
|
||||||
|
if com_partner.name:
|
||||||
|
max_line_length = max(max_line_length, len(com_partner.name))
|
||||||
|
|
||||||
|
cutoff_length = None
|
||||||
|
|
||||||
|
if max_line_length <= 23:
|
||||||
|
font_size = min(11, font_size)
|
||||||
|
elif max_line_length <= 27:
|
||||||
|
font_size = min(10, font_size)
|
||||||
|
elif max_line_length <= 30:
|
||||||
|
font_size = min(9, font_size)
|
||||||
|
else:
|
||||||
|
# now we have smallest font, we cut off if length exceeds 34
|
||||||
|
# characters
|
||||||
|
cutoff_length = 34
|
||||||
|
font_size = min(8, font_size)
|
||||||
|
return font_size, cutoff_length
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _draw_address(self, canvas, print_settings, initial_position, font,
|
||||||
|
com_partner):
|
||||||
|
"""Draw an address on canvas
|
||||||
|
|
||||||
|
Address format can be changed by adding system parameter
|
||||||
|
`isr.address.format`.
|
||||||
|
|
||||||
|
:param canvas: payment slip reportlab component to be drawn
|
||||||
|
:type canvas: :py:class:`reportlab.pdfgen.canvas.Canvas`
|
||||||
|
|
||||||
|
:param print_settings: layouts print setting
|
||||||
|
:type print_settings: :py:class:`PaymentSlipSettings` or subclass
|
||||||
|
|
||||||
|
:para initial_position: tuple of coordinate (x, y)
|
||||||
|
:type initial_position: tuple
|
||||||
|
|
||||||
|
:param font: font to use
|
||||||
|
:type font: :py:class:`FontMeta`
|
||||||
|
|
||||||
|
:param com_partner: commercial partner record for model `res.partner`
|
||||||
|
:type com_partner: :py:class:`flectra.models.Model`
|
||||||
|
|
||||||
|
"""
|
||||||
|
address_lines = self._get_address_lines(com_partner.id)
|
||||||
|
|
||||||
|
font_size, cutoff_length = self._get_address_font_size(
|
||||||
|
font.size, address_lines, com_partner)
|
||||||
|
|
||||||
|
x, y = initial_position
|
||||||
|
x += print_settings.isr_add_horz * inch
|
||||||
|
y += print_settings.isr_add_vert * inch
|
||||||
|
text = canvas.beginText()
|
||||||
|
text.setTextOrigin(x, y)
|
||||||
|
text.setFont(font.name, font_size)
|
||||||
|
if com_partner.name:
|
||||||
|
text.textOut(com_partner.name[:cutoff_length])
|
||||||
|
# we are moving in the original font size to new position
|
||||||
|
text.moveCursor(0.0, font.size)
|
||||||
|
[text.textLine(l[:cutoff_length]) for l in address_lines if l]
|
||||||
|
|
||||||
|
canvas.drawText(text)
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def _draw_description_line(self, canvas, print_settings, initial_position,
|
||||||
|
font):
|
||||||
|
""" Draw a line above the payment slip
|
||||||
|
|
||||||
|
The line shows the invoice number and payment term.
|
||||||
|
|
||||||
|
:param canvas: payment slip reportlab component to be drawn
|
||||||
|
:type canvas: :py:class:`reportlab.pdfgen.canvas.Canvas`
|
||||||
|
|
||||||
|
:param print_settings: layouts print setting
|
||||||
|
:type print_settings: :py:class:`PaymentSlipSettings` or subclass
|
||||||
|
|
||||||
|
:para initial_position: tuple of coordinate (x, y)
|
||||||
|
:type initial_position: tuple
|
||||||
|
|
||||||
|
:param font: font to use
|
||||||
|
:type font: :py:class:`FontMeta`
|
||||||
|
|
||||||
|
"""
|
||||||
|
x, y = initial_position
|
||||||
|
# align with the address
|
||||||
|
x += print_settings.isr_add_horz * inch
|
||||||
|
invoice = self.move_line_id.invoice_id
|
||||||
|
date_maturity = self.move_line_id.date_maturity
|
||||||
|
message = _('Payment slip related to invoice %s '
|
||||||
|
'due on the %s')
|
||||||
|
fmt_date = format_date(self.env, date_maturity)
|
||||||
|
canvas.setFont(font.name, font.size)
|
||||||
|
canvas.drawString(x, y,
|
||||||
|
message % (invoice.name, fmt_date)) # invoice.number replaced by invoice.name
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _draw_bank(self, canvas, print_settings, initial_position, font, bank):
|
||||||
|
"""Draw bank name, NPA and location on canvas
|
||||||
|
|
||||||
|
:param canvas: payment slip reportlab component to be drawn
|
||||||
|
:type canvas: :py:class:`reportlab.pdfgen.canvas.Canvas`
|
||||||
|
|
||||||
|
:param print_settings: layouts print setting
|
||||||
|
:type print_settings: :py:class:`PaymentSlipSettings` or subclass
|
||||||
|
|
||||||
|
:para initial_position: tuple of coordinate (x, y)
|
||||||
|
:type initial_position: tuple
|
||||||
|
|
||||||
|
:param font: font to use
|
||||||
|
:type font: :py:class:`FontMeta`
|
||||||
|
|
||||||
|
:param bank: bank record
|
||||||
|
:type bank: :py:class:`flectra.model.Models`
|
||||||
|
|
||||||
|
"""
|
||||||
|
x, y = initial_position
|
||||||
|
x += print_settings.isr_delta_horz * inch
|
||||||
|
y += print_settings.isr_delta_vert * inch
|
||||||
|
text = canvas.beginText()
|
||||||
|
text.setTextOrigin(x, y)
|
||||||
|
text.setFont(font.name, font.size)
|
||||||
|
bank_name = textwrap.fill(bank.name, 26)
|
||||||
|
lines = bank_name.split("\n")
|
||||||
|
lines.append(" ".join([bank.zip or '', bank.city or '']))
|
||||||
|
text.textOut(lines.pop(0))
|
||||||
|
text.moveCursor(0.0, font.size)
|
||||||
|
for line in lines:
|
||||||
|
if not line:
|
||||||
|
continue
|
||||||
|
text.textLine(line)
|
||||||
|
|
||||||
|
canvas.drawText(text)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _draw_bank_account(self, canvas, print_settings, initial_position,
|
||||||
|
font, acc):
|
||||||
|
"""Draw bank account on canvas
|
||||||
|
|
||||||
|
|
||||||
|
:param canvas: payment slip reportlab component to be drawn
|
||||||
|
:type canvas: :py:class:`reportlab.pdfgen.canvas.Canvas`
|
||||||
|
|
||||||
|
:param print_settings: layouts print setting
|
||||||
|
:type print_settings: :py:class:`PaymentSlipSettings` or subclass
|
||||||
|
|
||||||
|
:para initial_position: tuple of coordinate (x, y)
|
||||||
|
:type initial_position: tuple
|
||||||
|
|
||||||
|
:param font: font to use
|
||||||
|
:type font: :py:class:`FontMeta`
|
||||||
|
|
||||||
|
:param acc: acc number
|
||||||
|
:type acc: str
|
||||||
|
|
||||||
|
:para initial_position: tuple of coordinate (x, y)
|
||||||
|
:type initial_position: tuple
|
||||||
|
|
||||||
|
"""
|
||||||
|
x, y = initial_position
|
||||||
|
x += print_settings.isr_delta_horz * inch
|
||||||
|
y += print_settings.isr_delta_vert * inch
|
||||||
|
canvas.setFont(font.name, font.size)
|
||||||
|
canvas.drawString(x, y, acc)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _draw_ref(self, canvas, print_settings, initial_position, font, ref):
|
||||||
|
"""Draw reference on canvas
|
||||||
|
|
||||||
|
:param canvas: payment slip reportlab component to be drawn
|
||||||
|
:type canvas: :py:class:`reportlab.pdfgen.canvas.Canvas`
|
||||||
|
|
||||||
|
:param print_settings: layouts print setting
|
||||||
|
:type print_settings: :py:class:`PaymentSlipSettings` or subclass
|
||||||
|
|
||||||
|
:para initial_position: tuple of coordinate (x, y)
|
||||||
|
:type initial_position: tuple
|
||||||
|
|
||||||
|
:param font: font to use
|
||||||
|
:type font: :py:class:`FontMeta`
|
||||||
|
|
||||||
|
:param ref: ref number
|
||||||
|
:type ref: str
|
||||||
|
|
||||||
|
"""
|
||||||
|
x, y = initial_position
|
||||||
|
x += print_settings.isr_delta_horz * inch
|
||||||
|
y += print_settings.isr_delta_vert * inch
|
||||||
|
canvas.setFont(font.name, font.size)
|
||||||
|
canvas.drawString(x, y, ref)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _draw_recipe_ref(self, canvas, print_settings, initial_position,
|
||||||
|
font, ref):
|
||||||
|
"""Draw recipe reference on canvas
|
||||||
|
|
||||||
|
:param canvas: payment slip reportlab component to be drawn
|
||||||
|
:type canvas: :py:class:`reportlab.pdfgen.canvas.Canvas`
|
||||||
|
|
||||||
|
:param print_settings: layouts print setting
|
||||||
|
:type print_settings: :py:class:`PaymentSlipSettings` or subclass
|
||||||
|
|
||||||
|
:para initial_position: tuple of coordinate (x, y)
|
||||||
|
:type initial_position: tuple
|
||||||
|
|
||||||
|
:param font: font to use
|
||||||
|
:type font: :py:class:`FontMeta`
|
||||||
|
|
||||||
|
:param ref: ref number
|
||||||
|
:type ref: str
|
||||||
|
|
||||||
|
"""
|
||||||
|
x, y = initial_position
|
||||||
|
x += print_settings.isr_add_horz * inch
|
||||||
|
y += print_settings.isr_add_vert * inch
|
||||||
|
canvas.setFont(font.name, font.size)
|
||||||
|
canvas.drawString(x, y, ref)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _draw_amount(self, canvas, print_settings, initial_position,
|
||||||
|
font, amount):
|
||||||
|
"""Draw reference on canvas
|
||||||
|
|
||||||
|
:param canvas: payment slip reportlab component to be drawn
|
||||||
|
:type canvas: :py:class:`reportlab.pdfgen.canvas.Canvas`
|
||||||
|
|
||||||
|
:param print_settings: layouts print setting
|
||||||
|
:type print_settings: :py:class:`PaymentSlipSettings` or subclass
|
||||||
|
|
||||||
|
:para initial_position: tuple of coordinate (x, y)
|
||||||
|
:type initial_position: tuple
|
||||||
|
|
||||||
|
:param font: font to use
|
||||||
|
:type font: :py:class:`FontMeta`
|
||||||
|
|
||||||
|
:param amount: amount to print
|
||||||
|
:type amount: str
|
||||||
|
|
||||||
|
"""
|
||||||
|
x, y = initial_position
|
||||||
|
x += (print_settings.isr_delta_horz * inch +
|
||||||
|
print_settings.isr_amount_line_horz * inch)
|
||||||
|
y += (print_settings.isr_delta_vert * inch +
|
||||||
|
print_settings.isr_amount_line_vert * inch)
|
||||||
|
indice = 0
|
||||||
|
canvas.setFont(font.name, font.size)
|
||||||
|
for car in amount[::-1]:
|
||||||
|
width = canvas.stringWidth(car, font.name, font.size)
|
||||||
|
if indice:
|
||||||
|
# some font type return non numerical
|
||||||
|
x -= float(width) / 2.0
|
||||||
|
canvas.drawString(x, y, car)
|
||||||
|
x -= 0.06 * inch + float(width) / 2.0
|
||||||
|
indice += 1
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _draw_scan_line(self, canvas, print_settings, initial_position, font):
|
||||||
|
"""Draw reference on canvas
|
||||||
|
|
||||||
|
|
||||||
|
:param canvas: payment slip reportlab component to be drawn
|
||||||
|
:type canvas: :py:class:`reportlab.pdfgen.canvas.Canvas`
|
||||||
|
|
||||||
|
:param print_settings: layouts print setting
|
||||||
|
:type print_settings: :py:class:`PaymentSlipSettings` or subclass
|
||||||
|
|
||||||
|
:para initial_position: tuple of coordinate (x, y)
|
||||||
|
:type initial_position: tuple
|
||||||
|
|
||||||
|
:param font: font to use
|
||||||
|
:type font: :py:class:`FontMeta`
|
||||||
|
|
||||||
|
"""
|
||||||
|
x, y = initial_position
|
||||||
|
x += print_settings.isr_scan_line_horz * inch
|
||||||
|
y += print_settings.isr_scan_line_vert * inch
|
||||||
|
canvas.setFont(font.name, font.size)
|
||||||
|
for car in self._compute_scan_line_list()[::-1]:
|
||||||
|
canvas.drawString(x, y, car)
|
||||||
|
# some font type return non numerical
|
||||||
|
x -= 0.1 * inch
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _draw_background(self, canvas, print_settings):
|
||||||
|
"""Draw payment slip background based on company setting
|
||||||
|
|
||||||
|
:param canvas: payment slip reportlab component to be drawn
|
||||||
|
:type canvas: :py:class:`reportlab.pdfgen.canvas.Canvas`
|
||||||
|
|
||||||
|
:param print_settings: layouts print setting
|
||||||
|
:type print_settings: :py:class:`PaymentSlipSettings` or subclass
|
||||||
|
|
||||||
|
"""
|
||||||
|
if print_settings.isr_background:
|
||||||
|
canvas.drawImage(self.image_absolute_path('isr.png'),
|
||||||
|
0, 0, 8.271 * inch, 4.174 * inch)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _draw_hook(self, draw, print_settings):
|
||||||
|
"""Hook to add your own content on canvas"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_settings(self, report_name):
|
||||||
|
company = self.env.user.company_id
|
||||||
|
company_settings = {
|
||||||
|
col: getattr(company, col) for col in company._fields if
|
||||||
|
col.startswith('isr_')
|
||||||
|
}
|
||||||
|
return PaymentSlipSettings(report_name, **company_settings)
|
||||||
|
|
||||||
|
def _draw_payment_slip(self, a4=False, out_format='PDF', scale=None,
|
||||||
|
b64=False, report_name=None):
|
||||||
|
"""Generate the payment slip image
|
||||||
|
:param a4: If set to True will print on slip on a A4 paper format
|
||||||
|
:type a4: bool
|
||||||
|
|
||||||
|
:param out_format: output format at current time only PDF is supported
|
||||||
|
:type out_format: str
|
||||||
|
|
||||||
|
:param scale: scale quadratic ration
|
||||||
|
:type scale: float
|
||||||
|
|
||||||
|
:param b64: If set to True the output image string
|
||||||
|
will be encoded to base64
|
||||||
|
|
||||||
|
:return: slip image string
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
if out_format != 'PDF':
|
||||||
|
raise NotImplementedError(
|
||||||
|
'Only PDF payment slip are supported'
|
||||||
|
)
|
||||||
|
self.ensure_one()
|
||||||
|
lang = self.invoice_id.partner_id.lang
|
||||||
|
self = self.with_context(lang=lang)
|
||||||
|
company = self.env.user.company_id
|
||||||
|
print_settings = self._get_settings(report_name)
|
||||||
|
self._register_fonts()
|
||||||
|
default_font = self._get_text_font()
|
||||||
|
small_font = self._get_small_text_font()
|
||||||
|
amount_font = self._get_amount_font()
|
||||||
|
invoice = self.move_line_id.invoice_id
|
||||||
|
scan_font = self._get_scan_line_text_font(company)
|
||||||
|
bank_acc = self.move_line_id.invoice_id.partner_bank_id
|
||||||
|
if a4:
|
||||||
|
canvas_size = (595.27, 841.89)
|
||||||
|
else:
|
||||||
|
canvas_size = (595.27, 286.81)
|
||||||
|
with contextlib.closing(io.BytesIO()) as buff:
|
||||||
|
canvas = Canvas(buff,
|
||||||
|
pagesize=canvas_size,
|
||||||
|
pageCompression=None)
|
||||||
|
self._draw_background(canvas, print_settings)
|
||||||
|
canvas.setFillColorRGB(*self._fill_color)
|
||||||
|
if a4:
|
||||||
|
initial_position = (0.05 * inch, 4.50 * inch)
|
||||||
|
self._draw_description_line(canvas,
|
||||||
|
print_settings,
|
||||||
|
initial_position,
|
||||||
|
default_font)
|
||||||
|
if invoice.partner_bank_id.print_partner:
|
||||||
|
if (invoice.partner_bank_id.print_account or
|
||||||
|
invoice.partner_bank_id.isr_adherent_num):
|
||||||
|
initial_position = (0.05 * inch, 3.30 * inch)
|
||||||
|
else:
|
||||||
|
initial_position = (0.05 * inch, 3.75 * inch)
|
||||||
|
self._draw_address(canvas, print_settings, initial_position,
|
||||||
|
default_font, company.partner_id)
|
||||||
|
if (invoice.partner_bank_id.print_account or
|
||||||
|
invoice.partner_bank_id.isr_adherent_num):
|
||||||
|
initial_position = (2.45 * inch, 3.30 * inch)
|
||||||
|
else:
|
||||||
|
initial_position = (2.45 * inch, 3.75 * inch)
|
||||||
|
self._draw_address(canvas, print_settings, initial_position,
|
||||||
|
default_font, company.partner_id)
|
||||||
|
com_partner = self.get_comm_partner()
|
||||||
|
initial_position = (0.05 * inch, 1.4 * inch)
|
||||||
|
self._draw_address(canvas, print_settings, initial_position,
|
||||||
|
default_font, com_partner)
|
||||||
|
initial_position = (4.86 * inch, 2.2 * inch)
|
||||||
|
self._draw_address(canvas, print_settings, initial_position,
|
||||||
|
default_font, com_partner)
|
||||||
|
num_car, frac_car = ("%.2f" % self.amount_total).split('.')
|
||||||
|
self._draw_amount(canvas, print_settings,
|
||||||
|
(1.48 * inch, 2.0 * inch),
|
||||||
|
amount_font, num_car)
|
||||||
|
self._draw_amount(canvas, print_settings,
|
||||||
|
(2.14 * inch, 2.0 * inch),
|
||||||
|
amount_font, frac_car)
|
||||||
|
self._draw_amount(canvas, print_settings,
|
||||||
|
(3.88 * inch, 2.0 * inch),
|
||||||
|
amount_font, num_car)
|
||||||
|
self._draw_amount(canvas, print_settings,
|
||||||
|
(4.50 * inch, 2.0 * inch),
|
||||||
|
amount_font, frac_car)
|
||||||
|
if invoice.partner_bank_id.print_bank:
|
||||||
|
self._draw_bank(canvas,
|
||||||
|
print_settings,
|
||||||
|
(0.05 * inch, 3.75 * inch),
|
||||||
|
default_font,
|
||||||
|
bank_acc.bank_id)
|
||||||
|
self._draw_bank(canvas,
|
||||||
|
print_settings,
|
||||||
|
(2.45 * inch, 3.75 * inch),
|
||||||
|
default_font,
|
||||||
|
bank_acc.bank_id)
|
||||||
|
if invoice.partner_bank_id.print_account:
|
||||||
|
self._draw_bank_account(canvas,
|
||||||
|
print_settings,
|
||||||
|
(1 * inch, 2.35 * inch),
|
||||||
|
default_font,
|
||||||
|
bank_acc.get_account_number())
|
||||||
|
self._draw_bank_account(canvas,
|
||||||
|
print_settings,
|
||||||
|
(3.4 * inch, 2.35 * inch),
|
||||||
|
default_font,
|
||||||
|
bank_acc.get_account_number())
|
||||||
|
|
||||||
|
if print_settings.isr_header_partner_address:
|
||||||
|
self._draw_address(canvas, print_settings,
|
||||||
|
(4.9 * inch, 9.0 * inch),
|
||||||
|
default_font, com_partner)
|
||||||
|
|
||||||
|
self._draw_ref(canvas,
|
||||||
|
print_settings,
|
||||||
|
(4.9 * inch, 2.70 * inch),
|
||||||
|
default_font,
|
||||||
|
self.reference)
|
||||||
|
self._draw_recipe_ref(canvas,
|
||||||
|
print_settings,
|
||||||
|
(0.05 * inch, 1.6 * inch),
|
||||||
|
small_font,
|
||||||
|
self.reference)
|
||||||
|
self._draw_scan_line(canvas,
|
||||||
|
print_settings,
|
||||||
|
(8.26 * inch - 4 / 10 * inch, 4 / 6 * inch),
|
||||||
|
scan_font)
|
||||||
|
self._draw_hook(canvas, print_settings)
|
||||||
|
canvas.showPage()
|
||||||
|
canvas.save()
|
||||||
|
img_stream = buff.getvalue()
|
||||||
|
if b64:
|
||||||
|
img_stream = base64.encodestring(img_stream)
|
||||||
|
return img_stream
|
||||||
|
|
||||||
|
def _compute_payment_slip_image(self):
|
||||||
|
"""Draw an us letter format slip in PNG"""
|
||||||
|
img = self._draw_payment_slip()
|
||||||
|
self.slip_image = base64.encodestring(img)
|
||||||
|
return img
|
||||||
|
|
||||||
|
def _compute_a4_report(self):
|
||||||
|
"""Draw an a4 format slip in PDF"""
|
||||||
|
img = self._draw_payment_slip(a4=True, out_format='PDF')
|
||||||
|
self.a4_pdf = base64.encodestring(img)
|
||||||
|
return img
|
48
l10n_ch_payment_slip/models/res_config_settings.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# Copyright 2018 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||||
|
|
||||||
|
from flectra import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class ResConfigSettings(models.TransientModel):
|
||||||
|
_inherit = 'res.config.settings'
|
||||||
|
|
||||||
|
isr_delta_horz = fields.Float(
|
||||||
|
related='company_id.isr_delta_horz',
|
||||||
|
)
|
||||||
|
isr_delta_vert = fields.Float(
|
||||||
|
related='company_id.isr_delta_vert',
|
||||||
|
)
|
||||||
|
isr_scan_line_vert = fields.Float(
|
||||||
|
related='company_id.isr_scan_line_vert',
|
||||||
|
)
|
||||||
|
isr_scan_line_horz = fields.Float(
|
||||||
|
related='company_id.isr_scan_line_horz',
|
||||||
|
)
|
||||||
|
isr_add_vert = fields.Float(
|
||||||
|
related='company_id.isr_add_vert',
|
||||||
|
)
|
||||||
|
isr_add_horz = fields.Float(
|
||||||
|
related='company_id.isr_add_horz',
|
||||||
|
)
|
||||||
|
isr_scan_line_font_size = fields.Integer(
|
||||||
|
related='company_id.isr_scan_line_font_size',
|
||||||
|
)
|
||||||
|
isr_scan_line_letter_spacing = fields.Float(
|
||||||
|
related='company_id.isr_scan_line_letter_spacing',
|
||||||
|
)
|
||||||
|
isr_amount_line_horz = fields.Float(
|
||||||
|
related='company_id.isr_amount_line_horz',
|
||||||
|
)
|
||||||
|
isr_amount_line_vert = fields.Float(
|
||||||
|
related='company_id.isr_amount_line_vert',
|
||||||
|
)
|
||||||
|
merge_mode = fields.Selection(
|
||||||
|
related='company_id.merge_mode'
|
||||||
|
)
|
||||||
|
isr_background = fields.Boolean(
|
||||||
|
related='company_id.isr_background',
|
||||||
|
)
|
||||||
|
isr_header_partner_address = fields.Boolean(
|
||||||
|
related='company_id.isr_header_partner_address',
|
||||||
|
)
|
2
l10n_ch_payment_slip/report/__init__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from . import ir_action
|
||||||
|
from . import report
|
172
l10n_ch_payment_slip/report/ir_action.py
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
# Copyright 2012-2017 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
import os
|
||||||
|
import tempfile
|
||||||
|
import io
|
||||||
|
import logging
|
||||||
|
from contextlib import closing
|
||||||
|
|
||||||
|
from flectra import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
import PyPDF2
|
||||||
|
except (ImportError, IOError) as err:
|
||||||
|
_logger.debug(err)
|
||||||
|
|
||||||
|
|
||||||
|
class IrActionsReportReportlab(models.Model):
|
||||||
|
|
||||||
|
_inherit = 'ir.actions.report'
|
||||||
|
|
||||||
|
report_type = fields.Selection(selection_add=[('reportlab-pdf',
|
||||||
|
'Report renderer')],ondelete={'reportlab-pdf': 'cascade'})
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def _generate_one_slip_per_page_from_invoice_pdf(self, res_ids):
|
||||||
|
"""Generate payment slip PDF(s) from report model.
|
||||||
|
|
||||||
|
If there are many pdf they are merged in memory or on
|
||||||
|
file system based on company settings
|
||||||
|
|
||||||
|
:return: the generated PDF content
|
||||||
|
"""
|
||||||
|
user_model = self.env['res.users']
|
||||||
|
slip_model = self.env['l10n_ch.payment_slip']
|
||||||
|
invoice_model = self.env['account.move']
|
||||||
|
company = user_model.browse(self.env.uid).company_id
|
||||||
|
invoices = invoice_model.browse(res_ids)
|
||||||
|
|
||||||
|
docs = slip_model._compute_pay_slips_from_invoices(invoices)
|
||||||
|
|
||||||
|
pdfdocuments = []
|
||||||
|
temporary_files = []
|
||||||
|
|
||||||
|
for doc in docs:
|
||||||
|
pdfreport_fd, pdfreport_path = tempfile.mkstemp(
|
||||||
|
suffix='.pdf', prefix='report.tmp.')
|
||||||
|
temporary_files.append(pdfreport_path)
|
||||||
|
|
||||||
|
with closing(os.fdopen(pdfreport_fd, 'wb')) as pdfreport:
|
||||||
|
pdf = doc._draw_payment_slip(a4=True, b64=False,
|
||||||
|
out_format='PDF',
|
||||||
|
report_name=self.report_name)
|
||||||
|
pdfreport.write(pdf)
|
||||||
|
|
||||||
|
pdfdocuments.append(pdfreport_path)
|
||||||
|
|
||||||
|
# Return the entire document
|
||||||
|
if len(pdfdocuments) == 1:
|
||||||
|
entire_report_path = pdfdocuments[0]
|
||||||
|
else:
|
||||||
|
if company.merge_mode == 'in_memory':
|
||||||
|
content = self.merge_pdf_in_memory(pdfdocuments)
|
||||||
|
entire_report_path = False
|
||||||
|
else:
|
||||||
|
entire_report_path = self.merge_pdf_on_disk(pdfdocuments)
|
||||||
|
|
||||||
|
if entire_report_path:
|
||||||
|
with open(entire_report_path, 'rb') as pdfdocument:
|
||||||
|
content = pdfdocument.read()
|
||||||
|
if entire_report_path not in temporary_files:
|
||||||
|
temporary_files.append(entire_report_path)
|
||||||
|
|
||||||
|
# Manual cleanup of the temporary files
|
||||||
|
for temporary_file in temporary_files:
|
||||||
|
try:
|
||||||
|
os.unlink(temporary_file)
|
||||||
|
except (OSError, IOError):
|
||||||
|
_logger.error(
|
||||||
|
'Error when trying to remove file %s' % temporary_file)
|
||||||
|
|
||||||
|
return content
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_report_from_name(self, report_name):
|
||||||
|
"""Return also report of report_type reportlab-pdf and not only qweb
|
||||||
|
"""
|
||||||
|
report = super()._get_report_from_name(report_name)
|
||||||
|
if not report:
|
||||||
|
report = self.search([
|
||||||
|
('report_type', '=', 'reportlab-pdf'),
|
||||||
|
('report_name', '=', report_name)],
|
||||||
|
limit=1
|
||||||
|
)
|
||||||
|
return report
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def render_reportlab_pdf(self, res_ids=None, data=None):
|
||||||
|
if (self.report_name != 'l10n_ch_payment_slip.'
|
||||||
|
'one_slip_per_page_from_invoice') or not res_ids:
|
||||||
|
return
|
||||||
|
|
||||||
|
save_in_attachment = {}
|
||||||
|
|
||||||
|
# Dispatch the records by ones having an attachment and ones
|
||||||
|
# requesting a call to reportlab. (copied from render_qweb_pdf)
|
||||||
|
Model = self.env[self.model]
|
||||||
|
records = Model.browse(res_ids)
|
||||||
|
rl_records = Model
|
||||||
|
if self.attachment:
|
||||||
|
for rec in records:
|
||||||
|
attachment_id = self.retrieve_attachment(rec)
|
||||||
|
if attachment_id:
|
||||||
|
save_in_attachment[rec.id] = attachment_id
|
||||||
|
if not self.attachment_use or not attachment_id:
|
||||||
|
rl_records += rec
|
||||||
|
else:
|
||||||
|
rl_records = records
|
||||||
|
res_ids = rl_records.ids
|
||||||
|
|
||||||
|
if save_in_attachment and not res_ids:
|
||||||
|
_logger.info('The PDF report has been generated from attachments.')
|
||||||
|
return self._post_pdf(save_in_attachment), 'pdf'
|
||||||
|
|
||||||
|
pdf_content = self._generate_one_slip_per_page_from_invoice_pdf(
|
||||||
|
res_ids)
|
||||||
|
if res_ids:
|
||||||
|
_logger.info(
|
||||||
|
'The PDF report has been generated for records %s.' % (
|
||||||
|
str(res_ids))
|
||||||
|
)
|
||||||
|
return self._post_pdf(save_in_attachment, pdf_content=pdf_content,
|
||||||
|
res_ids=res_ids), 'pdf'
|
||||||
|
return pdf_content, 'pdf'
|
||||||
|
|
||||||
|
# TODO consider https://github.com/OCA/reporting-engine/issues/241
|
||||||
|
|
||||||
|
def merge_pdf_in_memory(self, docs):
|
||||||
|
merger = PyPDF2.PdfFileMerger()
|
||||||
|
for doc in docs:
|
||||||
|
merger.append(doc)
|
||||||
|
buff = io.BytesIO()
|
||||||
|
try:
|
||||||
|
# The writer close the reader file here
|
||||||
|
merger.write(buff)
|
||||||
|
return buff.getvalue()
|
||||||
|
except IOError:
|
||||||
|
raise
|
||||||
|
finally:
|
||||||
|
buff.close()
|
||||||
|
|
||||||
|
def merge_pdf_on_disk(self, docs):
|
||||||
|
merger = PyPDF2.PdfFileMerger()
|
||||||
|
for doc in docs:
|
||||||
|
merger.append(doc)
|
||||||
|
buff, buff_path = tempfile.mkstemp(
|
||||||
|
suffix='.pdf',
|
||||||
|
prefix='credit_control_slip_merged')
|
||||||
|
try:
|
||||||
|
buff = os.fdopen(buff, 'w+b')
|
||||||
|
# The writer close the reader file here
|
||||||
|
buff.seek(0)
|
||||||
|
merger.write(buff)
|
||||||
|
buff.seek(0)
|
||||||
|
return buff_path
|
||||||
|
except IOError:
|
||||||
|
raise
|
||||||
|
finally:
|
||||||
|
buff.close()
|
7
l10n_ch_payment_slip/report/report.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Copyright 2014-2017 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
from flectra import models
|
||||||
|
|
||||||
|
|
||||||
|
class ISRFromInvoice(models.AbstractModel):
|
||||||
|
_name = 'report.one_slip_per_page_from_invoice'
|
32
l10n_ch_payment_slip/report/report_declaration.xml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<flectra>
|
||||||
|
<data>
|
||||||
|
<record id="paperformat_paymentslip" model="report.paperformat">
|
||||||
|
<field name="name">A4 no margin payment slip</field>
|
||||||
|
<field name="default" eval="True" />
|
||||||
|
<field name="format">A4</field>
|
||||||
|
<field name="orientation">Portrait</field>
|
||||||
|
<field name="margin_top">0</field>
|
||||||
|
<field name="margin_bottom">0</field>
|
||||||
|
<field name="margin_left">0</field>
|
||||||
|
<field name="margin_right">0</field>
|
||||||
|
<field name="header_line" eval="False" />
|
||||||
|
<field name="header_spacing">0</field>
|
||||||
|
<field name="dpi">144</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<report
|
||||||
|
id="one_slip_per_page_from_invoice"
|
||||||
|
model="account.invoice"
|
||||||
|
string="Payment Slip"
|
||||||
|
report_type="reportlab-pdf"
|
||||||
|
name="l10n_ch_payment_slip.one_slip_per_page_from_invoice"
|
||||||
|
file="l10n_ch_payment_slip.one_slip_per_page"
|
||||||
|
menu="False"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<record id="one_slip_per_page_from_invoice" model="ir.actions.report">
|
||||||
|
<field name="paperformat_id" ref="l10n_ch_payment_slip.paperformat_paymentslip"/>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</flectra>
|
12
l10n_ch_payment_slip/sample/README
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
The v11 sample file contain the data below :
|
||||||
|
|
||||||
|
date_comptable : 061017
|
||||||
|
date_remise : 221017
|
||||||
|
date_valeur : 061017
|
||||||
|
frais_encaissement : 0000
|
||||||
|
internal_ref : 0000000001
|
||||||
|
amount : 0000541500
|
||||||
|
n_postal : 010121627
|
||||||
|
n_ref : 005095000000000000000000013
|
||||||
|
reserve : 0001 0001
|
||||||
|
reserve2 : 000000000
|
BIN
l10n_ch_payment_slip/sample/zvr_besrtechdok_fr.pdf
Normal file
3
l10n_ch_payment_slip/security/ir.model.access.csv
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
l10n_ch_pay_slip_manager,slip_manager,model_l10n_ch_payment_slip,account.group_account_manager,1,1,1,1
|
||||||
|
l10n_ch_pay_slip_invoice,slip_invoice,model_l10n_ch_payment_slip,account.group_account_invoice,1,1,1,1
|
|
BIN
l10n_ch_payment_slip/static/description/icon.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
l10n_ch_payment_slip/static/src/font/ocrbb.ttf
Normal file
BIN
l10n_ch_payment_slip/static/src/img/a4.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
l10n_ch_payment_slip/static/src/img/a4bvr.png
Normal file
After Width: | Height: | Size: 144 KiB |
BIN
l10n_ch_payment_slip/static/src/img/isr.jpg
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
l10n_ch_payment_slip/static/src/img/isr.png
Normal file
After Width: | Height: | Size: 2.1 MiB |
BIN
l10n_ch_payment_slip/static/src/img/white.png
Normal file
After Width: | Height: | Size: 2.1 MiB |
37
l10n_ch_payment_slip/static/src/js/qwebactionmanager.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
flectra.define('l10n_ch_payment_slip.report', function (require) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var ActionManager= require('web.ActionManager');
|
||||||
|
var crash_manager = require('web.crash_manager');
|
||||||
|
var framework = require('web.framework');
|
||||||
|
|
||||||
|
|
||||||
|
ActionManager.include({
|
||||||
|
ir_actions_report: function (action, options) {
|
||||||
|
var report_url = '';
|
||||||
|
|
||||||
|
if (action.report_type !== 'reportlab-pdf') {
|
||||||
|
return this._super(action, options);
|
||||||
|
}
|
||||||
|
framework.blockUI();
|
||||||
|
report_url = '/report/reportlab-pdf/'.concat(
|
||||||
|
action.report_name, '/',
|
||||||
|
action.context.active_ids.join(',')
|
||||||
|
);
|
||||||
|
this.getSession().get_file({
|
||||||
|
url: report_url,
|
||||||
|
data: {data: JSON.stringify([report_url,
|
||||||
|
action.report_type,
|
||||||
|
])},
|
||||||
|
error: crash_manager.rpc_error.bind (crash_manager),
|
||||||
|
success: function() {
|
||||||
|
if (action && options && !action.dialog) {
|
||||||
|
options.on_close();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
framework.unblockUI();
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
1
l10n_ch_payment_slip/tests/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from . import test_payment_slip
|
359
l10n_ch_payment_slip/tests/test_payment_slip.py
Normal file
@ -0,0 +1,359 @@
|
|||||||
|
# Copyright 2014-2017 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
import time
|
||||||
|
import re
|
||||||
|
import io
|
||||||
|
import logging
|
||||||
|
import flectra.tests.common as test_common
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
try:
|
||||||
|
import PyPDF2
|
||||||
|
except (ImportError, IOError) as err:
|
||||||
|
_logger.debug(err)
|
||||||
|
|
||||||
|
|
||||||
|
class TestPaymentSlip(test_common.TransactionCase):
|
||||||
|
_compile_get_ref = re.compile(r'[^0-9]')
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super(TestPaymentSlip, self).setUp()
|
||||||
|
self.report1slip_from_inv = self.env.ref(
|
||||||
|
'l10n_ch_payment_slip.one_slip_per_page_from_invoice',
|
||||||
|
)
|
||||||
|
|
||||||
|
def make_bank(self):
|
||||||
|
company = self.env.ref('base.main_company')
|
||||||
|
self.assertTrue(company)
|
||||||
|
partner = self.env.ref('base.main_partner')
|
||||||
|
self.assertTrue(partner)
|
||||||
|
bank = self.env['res.bank'].create(
|
||||||
|
{
|
||||||
|
'name': 'BCV',
|
||||||
|
'ccp': '01-1234-1',
|
||||||
|
'bic': '23452345',
|
||||||
|
'clearing': '234234',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
bank_account = self.env['res.partner.bank'].create(
|
||||||
|
{
|
||||||
|
'partner_id': partner.id,
|
||||||
|
'bank_id': bank.id,
|
||||||
|
'bank_bic': bank.bic,
|
||||||
|
'acc_number': '01-1234-1',
|
||||||
|
'isr_adherent_num': '1234567',
|
||||||
|
'print_bank': True,
|
||||||
|
'print_account': True,
|
||||||
|
'print_partner': True,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
bank_account.onchange_acc_number_set_swiss_bank()
|
||||||
|
self.assertEqual(bank_account.ccp, '01-1234-1')
|
||||||
|
return bank_account
|
||||||
|
|
||||||
|
def make_invoice(self):
|
||||||
|
if not hasattr(self, 'bank_account'):
|
||||||
|
self.bank_account = self.make_bank()
|
||||||
|
account_model = self.env['account.account']
|
||||||
|
account_debtor = account_model.search([('code', '=', '1100')])
|
||||||
|
if not account_debtor:
|
||||||
|
account_debtor = account_model.create({
|
||||||
|
'code': 1100,
|
||||||
|
'name': 'Debitors',
|
||||||
|
'user_type_id':
|
||||||
|
self.env.ref('account.data_account_type_receivable').id,
|
||||||
|
'reconcile': True,
|
||||||
|
})
|
||||||
|
account_sale = account_model.search([('code', '=', '3200')])
|
||||||
|
if not account_sale:
|
||||||
|
account_sale = account_model.create({
|
||||||
|
'code': 3200,
|
||||||
|
'name': 'Goods sales',
|
||||||
|
'user_type_id':
|
||||||
|
self.env.ref('account.data_account_type_revenue').id,
|
||||||
|
'reconcile': False,
|
||||||
|
})
|
||||||
|
|
||||||
|
invoice = self.env['account.invoice'].create({
|
||||||
|
'partner_id': self.env.ref('base.res_partner_12').id,
|
||||||
|
'reference_type': 'none',
|
||||||
|
'name': 'A customer invoice',
|
||||||
|
'account_id': account_debtor.id,
|
||||||
|
'type': 'out_invoice',
|
||||||
|
'partner_bank_id': self.bank_account.id
|
||||||
|
})
|
||||||
|
|
||||||
|
self.env['account.invoice.line'].create({
|
||||||
|
'account_id': account_sale.id,
|
||||||
|
'product_id': False,
|
||||||
|
'quantity': 1,
|
||||||
|
'price_unit': 862.50,
|
||||||
|
'invoice_id': invoice.id,
|
||||||
|
'name': 'product that cost 862.50 all tax included',
|
||||||
|
})
|
||||||
|
invoice.action_invoice_open()
|
||||||
|
# waiting for the cache to refresh
|
||||||
|
attempt = 0
|
||||||
|
while not invoice.move_id:
|
||||||
|
invoice.refresh()
|
||||||
|
time.sleep(0.1)
|
||||||
|
attempt += 1
|
||||||
|
if attempt > 20:
|
||||||
|
break
|
||||||
|
return invoice
|
||||||
|
|
||||||
|
def test_invoice_confirmation(self):
|
||||||
|
"""Test that confirming an invoice generate slips correctly"""
|
||||||
|
invoice = self.make_invoice()
|
||||||
|
self.assertTrue(invoice.move_id)
|
||||||
|
for line in invoice.move_id.line_ids:
|
||||||
|
if line.account_id.user_type_id.type in ('payable', 'receivable'):
|
||||||
|
self.assertTrue(line.transaction_ref)
|
||||||
|
else:
|
||||||
|
self.assertFalse(line.transaction_ref)
|
||||||
|
for line in invoice.move_id.line_ids:
|
||||||
|
slip = self.env['l10n_ch.payment_slip'].search(
|
||||||
|
[('move_line_id', '=', line.id)]
|
||||||
|
)
|
||||||
|
if line.account_id.user_type_id.type in ('payable', 'receivable'):
|
||||||
|
self.assertTrue(slip)
|
||||||
|
self.assertEqual(slip.amount_total, 862.50)
|
||||||
|
self.assertEqual(slip.invoice_id.id, invoice.id)
|
||||||
|
else:
|
||||||
|
self.assertFalse(slip)
|
||||||
|
|
||||||
|
def test_slip_validity(self):
|
||||||
|
"""Test that confirming slip are valid"""
|
||||||
|
invoice = self.make_invoice()
|
||||||
|
self.assertTrue(invoice.move_id)
|
||||||
|
for line in invoice.move_id.line_ids:
|
||||||
|
slip = self.env['l10n_ch.payment_slip'].search(
|
||||||
|
[('move_line_id', '=', line.id)]
|
||||||
|
)
|
||||||
|
if line.account_id.user_type_id.type in ('payable', 'receivable'):
|
||||||
|
self.assertTrue(slip.reference)
|
||||||
|
self.assertTrue(slip.scan_line)
|
||||||
|
self.assertTrue(slip.slip_image)
|
||||||
|
self.assertTrue(slip.a4_pdf)
|
||||||
|
inv_num = line.invoice_id.number
|
||||||
|
line_ident = self._compile_get_ref.sub(
|
||||||
|
'', "%s%s" % (inv_num, line.id)
|
||||||
|
)
|
||||||
|
self.assertIn(line_ident, slip.reference.replace(' ', ''))
|
||||||
|
|
||||||
|
def test_print_report(self):
|
||||||
|
invoice = self.make_invoice()
|
||||||
|
data, format_report = self.report1slip_from_inv.render(invoice.id)
|
||||||
|
self.assertTrue(data)
|
||||||
|
self.assertEqual(format_report, 'pdf')
|
||||||
|
|
||||||
|
def test_print_multi_report_merge_in_memory(self):
|
||||||
|
# default value as in memory
|
||||||
|
self.assertEqual(self.env.user.company_id.merge_mode, 'in_memory')
|
||||||
|
invoice1 = self.make_invoice()
|
||||||
|
invoice2 = self.make_invoice()
|
||||||
|
data, format_report = self.report1slip_from_inv.render(
|
||||||
|
[invoice1.id, invoice2.id])
|
||||||
|
self.assertTrue(data)
|
||||||
|
self.assertEqual(format_report, 'pdf')
|
||||||
|
|
||||||
|
def test_print_multi_report_merge_on_disk(self):
|
||||||
|
self.env.user.company_id.merge_mode = 'on_disk'
|
||||||
|
invoice1 = self.make_invoice()
|
||||||
|
invoice2 = self.make_invoice()
|
||||||
|
data, format_report = self.report1slip_from_inv.render(
|
||||||
|
[invoice1.id, invoice2.id])
|
||||||
|
self.assertTrue(data)
|
||||||
|
self.assertEqual(format_report, 'pdf')
|
||||||
|
|
||||||
|
def test_address_format(self):
|
||||||
|
invoice = self.make_invoice()
|
||||||
|
self.assertTrue(invoice.move_id)
|
||||||
|
line = invoice.move_id.line_ids[0]
|
||||||
|
slip = self.env['l10n_ch.payment_slip'].search(
|
||||||
|
[('move_line_id', '=', line.id)]
|
||||||
|
)
|
||||||
|
com_partner = slip.get_comm_partner()
|
||||||
|
address_lines = slip._get_address_lines(com_partner.id)
|
||||||
|
self.assertEqual(
|
||||||
|
address_lines,
|
||||||
|
['93, Press Avenue', '', '73377 Le Bourget du Lac']
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_address_format_user_demo(self):
|
||||||
|
invoice = self.make_invoice()
|
||||||
|
self.assertTrue(invoice.move_id)
|
||||||
|
line = invoice.move_id.line_ids[0]
|
||||||
|
slip = self.env['l10n_ch.payment_slip'].search(
|
||||||
|
[('move_line_id', '=', line.id)]
|
||||||
|
)
|
||||||
|
com_partner = slip.get_comm_partner()
|
||||||
|
demo_user = self.env.ref('base.user_demo')
|
||||||
|
address_lines = slip.sudo(demo_user)._get_address_lines(com_partner.id)
|
||||||
|
self.assertEqual(
|
||||||
|
address_lines,
|
||||||
|
[u'93, Press Avenue', u'', u'73377 Le Bourget du Lac']
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_address_format_no_country(self):
|
||||||
|
invoice = self.make_invoice()
|
||||||
|
self.assertTrue(invoice.move_id)
|
||||||
|
line = invoice.move_id.line_ids[0]
|
||||||
|
slip = self.env['l10n_ch.payment_slip'].search(
|
||||||
|
[('move_line_id', '=', line.id)]
|
||||||
|
)
|
||||||
|
com_partner = slip.get_comm_partner()
|
||||||
|
com_partner.country_id = False
|
||||||
|
address_lines = slip._get_address_lines(com_partner.id)
|
||||||
|
self.assertEqual(
|
||||||
|
address_lines,
|
||||||
|
['93, Press Avenue', '', '73377 Le Bourget du Lac']
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_address_format_special_format(self):
|
||||||
|
""" Test special formating without street2 """
|
||||||
|
|
||||||
|
ICP = self.env['ir.config_parameter']
|
||||||
|
ICP.set_param(
|
||||||
|
'isr.address.format',
|
||||||
|
"%(street)s\n%(zip)s %(city)s"
|
||||||
|
)
|
||||||
|
invoice = self.make_invoice()
|
||||||
|
self.assertTrue(invoice.move_id)
|
||||||
|
line = invoice.move_id.line_ids[0]
|
||||||
|
slip = self.env['l10n_ch.payment_slip'].search(
|
||||||
|
[('move_line_id', '=', line.id)]
|
||||||
|
)
|
||||||
|
com_partner = slip.get_comm_partner()
|
||||||
|
com_partner.country_id = False
|
||||||
|
address_lines = slip._get_address_lines(com_partner.id)
|
||||||
|
self.assertEqual(
|
||||||
|
address_lines,
|
||||||
|
['93, Press Avenue', '73377 Le Bourget du Lac']
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_address_length(self):
|
||||||
|
invoice = self.make_invoice()
|
||||||
|
self.assertTrue(invoice.move_id)
|
||||||
|
line = invoice.move_id.line_ids[0]
|
||||||
|
slip = self.env['l10n_ch.payment_slip'].search(
|
||||||
|
[('move_line_id', '=', line.id)]
|
||||||
|
)
|
||||||
|
com_partner = slip.get_comm_partner()
|
||||||
|
address_lines = slip._get_address_lines(com_partner.id)
|
||||||
|
f_size = 11
|
||||||
|
|
||||||
|
len_tests = [
|
||||||
|
(15, (11, None)),
|
||||||
|
(23, (11, None)),
|
||||||
|
(26, (10, None)),
|
||||||
|
(27, (10, None)),
|
||||||
|
(30, (9, None)),
|
||||||
|
(32, (8, 34)),
|
||||||
|
(34, (8, 34)),
|
||||||
|
(40, (8, 34))]
|
||||||
|
|
||||||
|
for text_len, result in len_tests:
|
||||||
|
com_partner.name = 'x' * text_len
|
||||||
|
res = slip._get_address_font_size(
|
||||||
|
f_size, address_lines, com_partner)
|
||||||
|
|
||||||
|
self.assertEqual(res, result, "Wrong result for len %s" % text_len)
|
||||||
|
|
||||||
|
def test_print_isr(self):
|
||||||
|
invoice = self.make_invoice()
|
||||||
|
isr = invoice.print_isr()
|
||||||
|
self.assertEqual(isr['report_name'],
|
||||||
|
'l10n_ch_payment_slip.one_slip_per_page_from_invoice')
|
||||||
|
self.assertEqual(isr['report_file'],
|
||||||
|
'l10n_ch_payment_slip.one_slip_per_page')
|
||||||
|
|
||||||
|
def test_reload_from_attachment(self):
|
||||||
|
|
||||||
|
def _find_invoice_attachment(self, invoice):
|
||||||
|
return self.env['ir.attachment'].search([
|
||||||
|
('res_model', '=', invoice._name),
|
||||||
|
('res_id', '=', invoice.id)
|
||||||
|
])
|
||||||
|
|
||||||
|
ActionReport = self.env['ir.actions.report']
|
||||||
|
invoice = self.make_invoice()
|
||||||
|
report_name = 'l10n_ch_payment_slip.one_slip_per_page_from_invoice'
|
||||||
|
report_payment_slip = ActionReport._get_report_from_name(report_name)
|
||||||
|
bvr_action = invoice.print_isr()
|
||||||
|
# Print the report a first time
|
||||||
|
act_report = report_payment_slip.with_context(bvr_action['context'])
|
||||||
|
pdf = act_report.render_reportlab_pdf(res_ids=invoice.ids)
|
||||||
|
# Ensure no attachment was stored
|
||||||
|
attachment = _find_invoice_attachment(self, invoice)
|
||||||
|
self.assertEqual(len(attachment), 0)
|
||||||
|
# Set the report to store and reload from attachment
|
||||||
|
report_payment_slip.write({
|
||||||
|
'attachment_use': True,
|
||||||
|
'attachment':
|
||||||
|
"('ESR'+(object.number or '').replace('/','')+'.pdf')"
|
||||||
|
})
|
||||||
|
# Print the report again
|
||||||
|
pdf1 = act_report.render_reportlab_pdf(res_ids=invoice.ids)
|
||||||
|
# Ensure pdf is the same
|
||||||
|
self.assertEqual(pdf, pdf1)
|
||||||
|
# Ensure attachment was stored
|
||||||
|
attachment1 = _find_invoice_attachment(self, invoice)
|
||||||
|
self.assertEqual(len(attachment1), 1)
|
||||||
|
# Print the report another time
|
||||||
|
pdf2 = act_report.render_reportlab_pdf(res_ids=invoice.ids)
|
||||||
|
# Ensure pdf and attachment are the same as before
|
||||||
|
attachment2 = _find_invoice_attachment(self, invoice)
|
||||||
|
self.assertEqual(len(attachment2), 1)
|
||||||
|
# We can't assert pdf1==pdf2, as pdf2 is not postprocessed the same way
|
||||||
|
# since it's the only report to be reloaded from an attachment and
|
||||||
|
# flectra returns directly the content of the attachment instead of
|
||||||
|
# merging as it does when generating only one report which is not
|
||||||
|
# saved in an attachment. Therefore we mimic what happens in
|
||||||
|
# https://github.com/flectra/flectra/blob/11.0/flectra/addons/base/ir/ir_actions_report.py#L548 # noqa
|
||||||
|
# to ensure pdf1 is the same as pdf2
|
||||||
|
self.assertEqual(pdf1, self._mimic_post_pdf_final_build(pdf2))
|
||||||
|
self.assertEqual(attachment1, attachment2)
|
||||||
|
# Allow cancelling entries on the journal
|
||||||
|
invoice.journal_id.update_posted = True
|
||||||
|
# Cancel the invoice and set back to draft
|
||||||
|
invoice.action_invoice_cancel()
|
||||||
|
invoice.action_invoice_draft()
|
||||||
|
# Ensure attachment was unlinked
|
||||||
|
attachment = _find_invoice_attachment(self, invoice)
|
||||||
|
self.assertEqual(len(attachment), 0)
|
||||||
|
|
||||||
|
def _mimic_post_pdf_final_build(self, pdf_tuple):
|
||||||
|
"""Adaptation of _post_pdf to manually check results are the same
|
||||||
|
|
||||||
|
Copied from flectra with only what's needed left herein.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def close_streams(streams):
|
||||||
|
for stream in streams:
|
||||||
|
try:
|
||||||
|
stream.close()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
pdf_content, extension = pdf_tuple
|
||||||
|
|
||||||
|
streams = []
|
||||||
|
if pdf_content:
|
||||||
|
pdf_content_stream = io.BytesIO(pdf_content)
|
||||||
|
streams.append(pdf_content_stream)
|
||||||
|
|
||||||
|
# Build the final pdf.
|
||||||
|
writer = PyPDF2.PdfFileWriter()
|
||||||
|
for stream in streams:
|
||||||
|
reader = PyPDF2.PdfFileReader(stream)
|
||||||
|
writer.appendPagesFromReader(reader)
|
||||||
|
result_stream = io.BytesIO()
|
||||||
|
streams.append(result_stream)
|
||||||
|
writer.write(result_stream)
|
||||||
|
result = result_stream.getvalue()
|
||||||
|
|
||||||
|
# We have to close the streams after PdfFileWriter's call to write()
|
||||||
|
close_streams(streams)
|
||||||
|
return result, extension
|
66
l10n_ch_payment_slip/views/account_invoice.xml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<flectra>
|
||||||
|
<data>
|
||||||
|
<record id="action_slip_all" model="ir.actions.act_window">
|
||||||
|
<field name="name">Payment Slip</field>
|
||||||
|
<field name="res_model">l10n_ch.payment_slip</field>
|
||||||
|
<field name="domain">[('invoice_id', '=', active_id)]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="invoice_form_add_isr_ref">
|
||||||
|
<field name="name">account.invoice.form.isr.ref</field>
|
||||||
|
<field name="model">account.move</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="inherit_id" ref="l10n_ch.isr_invoice_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form>
|
||||||
|
<xpath expr="//button[@name='action_invoice_sent']" position="after">
|
||||||
|
<button type="object" string="Print CH ISR" name="print_isr" attrs="{'invisible': ['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight"/>
|
||||||
|
<button type="object" string="Print CH ISR" name="print_isr" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}"/>
|
||||||
|
</xpath>
|
||||||
|
|
||||||
|
<xpath expr="//button[@name='isr_print']" position="attributes">
|
||||||
|
<attribute name="invisible">1</attribute>
|
||||||
|
</xpath>
|
||||||
|
|
||||||
|
<xpath expr="field[@name='tax_line_id']" position="before">
|
||||||
|
<group colspan="4">
|
||||||
|
<field name="isr_reference" colspan="4"/>
|
||||||
|
<button type="action" string="Open Payment Slips" groups="base.group_system" name="%(l10n_ch_payment_slip.action_slip_all)d" attrs="{'invisible': ['|', ('type', '!=', 'out_invoice'), ('isr_reference', '=', False)]}"/>
|
||||||
|
</group>
|
||||||
|
</xpath>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="pay_slip_form" model="ir.ui.view">
|
||||||
|
<field name="name">pay slip form</field>
|
||||||
|
<field name="model">l10n_ch.payment_slip</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Payment Slip">
|
||||||
|
<group>
|
||||||
|
<field name="reference"/>
|
||||||
|
<field name="move_line_id"/>
|
||||||
|
<field name="amount_total"/>
|
||||||
|
<field name="scan_line"/>
|
||||||
|
<field name="slip_image"/>
|
||||||
|
<field name="a4_pdf"/>
|
||||||
|
</group>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="pay_slip_lsit" model="ir.ui.view">
|
||||||
|
<field name="name">pay slip lsit</field>
|
||||||
|
<field name="model">l10n_ch.payment_slip</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="Payment Slip">
|
||||||
|
<field name="reference"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
|
||||||
|
</flectra>
|
20
l10n_ch_payment_slip/views/bank.xml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<flectra>
|
||||||
|
<data>
|
||||||
|
<record model="ir.ui.view" id="l10n_ch_view_res_partner_bank_from_invoice_slip">
|
||||||
|
<field name="name">res.partner_bank.form.l10n_ch</field>
|
||||||
|
<field name="model">res.partner.bank</field>
|
||||||
|
<field name="inherit_id" ref="base.view_partner_bank_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//group/field[@name='acc_number']/.." position="after">
|
||||||
|
<group string="ISR options" attrs="{'invisible': [('company_id' ,'=', False)]}" >
|
||||||
|
<field name="isr_adherent_num"/>
|
||||||
|
<field name="print_bank"/>
|
||||||
|
<field name="print_account"/>
|
||||||
|
<field name="print_partner"/>
|
||||||
|
</group>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</flectra>
|
9
l10n_ch_payment_slip/views/report_xml_templates.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<flectra>
|
||||||
|
<template id="assets_backend" inherit_id="web.assets_backend">
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
<script type="text/javascript" src="/l10n_ch_payment_slip/static/src/js/qwebactionmanager.js"/>
|
||||||
|
</xpath>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</flectra>
|
78
l10n_ch_payment_slip/views/res_config_settings_views.xml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<flectra>
|
||||||
|
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||||
|
<field name="name">res.config.settings.view.form.inherit.payment_slip</field>
|
||||||
|
<field name="model">res.config.settings</field>
|
||||||
|
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//div[@data-key='account']" position="inside">
|
||||||
|
<h2>ISR</h2>
|
||||||
|
<div class="row mt16 o_settings_container" id="isr">
|
||||||
|
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||||
|
|
||||||
|
<div class="o_setting_left_pane"/>
|
||||||
|
<div class="o_setting_right_pane">
|
||||||
|
<div class="content-group">
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_delta_horz" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_delta_horz"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_delta_vert" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_delta_vert"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_scan_line_vert" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_scan_line_vert"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_scan_line_horz" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_scan_line_horz"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_add_vert" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_add_vert"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_add_horz" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_add_horz"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_scan_line_font_size" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_scan_line_font_size"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_scan_line_letter_spacing" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_scan_line_letter_spacing"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_amount_line_horz" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_amount_line_horz"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_amount_line_vert" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_amount_line_vert"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="merge_mode" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="merge_mode"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_background" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_background"/>
|
||||||
|
</div>
|
||||||
|
<div class="row mt16">
|
||||||
|
<label for="isr_header_partner_address" class="col-md-5 o_light_label"/>
|
||||||
|
<field name="isr_header_partner_address"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</flectra>
|
1
l10n_ch_payment_slip/wizard/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from . import isr_batch_print
|
39
l10n_ch_payment_slip/wizard/isr_batch_print.py
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Copyright 2017 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from flectra import models, fields, api
|
||||||
|
from flectra.exceptions import UserError
|
||||||
|
|
||||||
|
|
||||||
|
class ISRBatchPrintWizard(models.TransientModel):
|
||||||
|
|
||||||
|
_name = 'isr.batch.print.wizard'
|
||||||
|
|
||||||
|
invoice_ids = fields.Many2many(comodel_name='account.move',string='Invoices',ondelete ='cascade')
|
||||||
|
error_message = fields.Text('Errors', readonly=True)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def default_get(self, fields):
|
||||||
|
res = super(ISRBatchPrintWizard, self).default_get(fields)
|
||||||
|
active_ids = self.env.context.get('active_ids')
|
||||||
|
if active_ids:
|
||||||
|
invoices = self.env['account.invoice'].browse(active_ids)
|
||||||
|
msg = self.check_generatable(invoices)
|
||||||
|
if msg:
|
||||||
|
res['error_message'] = msg
|
||||||
|
res['invoice_ids'] = active_ids
|
||||||
|
return res
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def check_generatable(self, invoices):
|
||||||
|
try:
|
||||||
|
invoices._check_isr_generatable()
|
||||||
|
except UserError as e:
|
||||||
|
return e.name
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def print_payment_slips(self):
|
||||||
|
if self.invoice_ids:
|
||||||
|
return self.invoice_ids.print_isr()
|
||||||
|
else:
|
||||||
|
return {'type': 'ir.actions.act_window_close'}
|
34
l10n_ch_payment_slip/wizard/isr_batch_print.xml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<flectra>
|
||||||
|
<record id="isr_batch_print_view" model="ir.ui.view">
|
||||||
|
<field name="name">ISR Batch Print Wizard</field>
|
||||||
|
<field name="model">isr.batch.print.wizard</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="ISR Batch Print Wizard">
|
||||||
|
<div attrs="{'invisible': [('error_message', '!=', False)]}">
|
||||||
|
<p>These invoices were successfully checked for the payment slip to be printed.</p>
|
||||||
|
<field name="invoice_ids" readonly="True" />
|
||||||
|
</div>
|
||||||
|
<div attrs="{'invisible': [('error_message', '=', False)]}">
|
||||||
|
<p>The payment slip can't be generated for some invoices you selected. Please review according to the following messages.</p>
|
||||||
|
<field name="error_message"/>
|
||||||
|
</div>
|
||||||
|
<footer>
|
||||||
|
<button string="Print payment slips" name="print_payment_slips" type="object" default_focus="1" class="btn-primary" attrs="{'invisible': [('error_message', '!=', False)]}"/>
|
||||||
|
<button string="Cancel" class="btn-default" special="cancel"/>
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<act_window id="wizard_isr_batch_print"
|
||||||
|
multi="True"
|
||||||
|
key2="client_action_multi"
|
||||||
|
name="ISR Batch Print"
|
||||||
|
res_model="isr.batch.print.wizard"
|
||||||
|
src_model="account.move"
|
||||||
|
view_mode="form"
|
||||||
|
target="new"/>
|
||||||
|
|
||||||
|
</flectra>
|
16
l10n_ch_qr_bill/COPYRIGHT
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Most of the files are
|
||||||
|
|
||||||
|
Copyright 2019-TODAY Camptocamp SA
|
||||||
|
Copyright 2019-TODAY Flectra
|
||||||
|
Part of Flectra. See LICENSE file for full copyright and licensing details.
|
||||||
|
Copyright 2018 Flectra Community
|
||||||
|
|
||||||
|
Many files also contain contributions from third
|
||||||
|
parties. In this case the original copyright of
|
||||||
|
the contributions can be traced through the
|
||||||
|
history of the source version control system.
|
||||||
|
|
||||||
|
When that is not the case, the files contain a prominent
|
||||||
|
notice stating the original copyright and applicable
|
||||||
|
license, or come with their own dedicated COPYRIGHT
|
||||||
|
and/or LICENSE file.
|
663
l10n_ch_qr_bill/LICENSE
Normal file
@ -0,0 +1,663 @@
|
|||||||
|
For copyright information, please see the COPYRIGHT file.
|
||||||
|
|
||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU 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
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published
|
||||||
|
by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for the
|
||||||
|
specific requirements.
|
||||||
|
|
||||||
|
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 AGPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
30
l10n_ch_qr_bill/README.rst
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
|
||||||
|
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
|
||||||
|
:alt: License: LGPL-3
|
||||||
|
|
||||||
|
=====================
|
||||||
|
Switzerland - QR bill
|
||||||
|
=====================
|
||||||
|
|
||||||
|
This is a backport of the QR bill of Odoo 13.0
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
Setup a company bank account with a QR-IBAN and use it on your customer invoices.
|
||||||
|
You will be able to generate the QR-bill once configured with the button Print QR-bill.
|
||||||
|
|
||||||
|
It supports both QRR references and no structured references.
|
||||||
|
|
||||||
|
Creditor References implemented now!
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Jamotion <info@jamotion.ch>
|
||||||
|
* Odoo SA
|
||||||
|
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||||
|
* Flectra Community
|
2
l10n_ch_qr_bill/__init__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from . import models
|
||||||
|
from . import controllers
|
23
l10n_ch_qr_bill/__manifest__.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Copyright 2019-TODAY Flectra
|
||||||
|
# Copyright 2019-TODAY Camptocamp SA
|
||||||
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Switzerland - QR-bill',
|
||||||
|
'summary': 'Print QR-bill for your invoices',
|
||||||
|
'version': '2.0.1.1.1',
|
||||||
|
'author': "Camptocamp, Odoo Community Association (OCA), Flectra Community, 2BIT GmbH",
|
||||||
|
'category': 'Localization',
|
||||||
|
'website': 'https://gitlab.com/flectra-community/flectra',
|
||||||
|
'license': 'LGPL-3',
|
||||||
|
'depends': ['base', 'account', 'base_iban', 'web', 'l10n_ch_base_bank'],
|
||||||
|
'data': [
|
||||||
|
'data/paperformat.xml',
|
||||||
|
'views/account_invoice_view.xml',
|
||||||
|
'views/res_bank.xml',
|
||||||
|
'report/swissqr_report.xml',
|
||||||
|
'security/ir.model.access.csv'
|
||||||
|
],
|
||||||
|
'auto_install': False,
|
||||||
|
'installable': True,
|
||||||
|
}
|
1
l10n_ch_qr_bill/controllers/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from . import main
|
43
l10n_ch_qr_bill/controllers/main.py
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# Copyright 2019-TODAY Flectra
|
||||||
|
# Copyright 2019-TODAY Camptocamp SA
|
||||||
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
||||||
|
|
||||||
|
from werkzeug import exceptions
|
||||||
|
|
||||||
|
from flectra.http import Controller, route, request
|
||||||
|
|
||||||
|
|
||||||
|
class ReportController(Controller):
|
||||||
|
|
||||||
|
# ------------------------------------------------------
|
||||||
|
# Misc. route utils
|
||||||
|
# ------------------------------------------------------
|
||||||
|
@route(
|
||||||
|
['/report/qrcode', '/report/qrcode/<path:value>'],
|
||||||
|
type='http',
|
||||||
|
auth="public",
|
||||||
|
)
|
||||||
|
def report_qrcode(self, value, width=600, height=100, bar_border=4):
|
||||||
|
"""Contoller able to render barcode images thanks to reportlab.
|
||||||
|
|
||||||
|
This adds `bar_border` capability.
|
||||||
|
|
||||||
|
Samples:
|
||||||
|
<img t-att-src="'/report/qrcode/%s' % o.name"/>
|
||||||
|
<img t-att-src="'/report/qrcode/?value=%s&width=%s&height=%s' %
|
||||||
|
(o.name, 200, 200)"/>
|
||||||
|
|
||||||
|
:param bar_border: Size of blank border, use 0 to remove border.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
qrcode = request.env['l10n_ch_qr_bill.swiss_qr_bill'].qrcode(
|
||||||
|
value, width=width, height=height, bar_border=bar_border
|
||||||
|
)
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
raise exceptions.HTTPException(
|
||||||
|
description='Cannot convert into qrcode.'
|
||||||
|
)
|
||||||
|
|
||||||
|
return request.make_response(
|
||||||
|
qrcode, headers=[('Content-Type', 'image/png')]
|
||||||
|
)
|
19
l10n_ch_qr_bill/data/paperformat.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<flectra>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<record id="paperformat_euro_no_margin" model="report.paperformat">
|
||||||
|
<field name="name">QR-Bill European A4 without borders</field>
|
||||||
|
<field name="default" eval="False" />
|
||||||
|
<field name="format">A4</field>
|
||||||
|
<field name="orientation">Portrait</field>
|
||||||
|
<field name="margin_top">0</field>
|
||||||
|
<field name="margin_bottom">0</field>
|
||||||
|
<field name="margin_left">0</field>
|
||||||
|
<field name="margin_right">0</field>
|
||||||
|
<field name="header_line" eval="False" />
|
||||||
|
<field name="header_spacing">0</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</flectra>
|
222
l10n_ch_qr_bill/i18n/de.po
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
# Translation of Flectra Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * l10n_ch_qr_bill
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Flectra Server 1.7\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2021-01-08 09:09+0000\n"
|
||||||
|
"PO-Revision-Date: 2021-01-08 10:13+0100\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
"Language: de_CH\n"
|
||||||
|
"X-Generator: Poedit 2.0.6\n"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:19
|
||||||
|
#, python-format
|
||||||
|
msgid "- Company address is incomplete, it must contain name, street, zip, city and country. Country must be Switzerland"
|
||||||
|
msgstr "- Die Firmenadresse ist unvollständig und muss Name, Straße, Postleitzahl, Stadt und Land enthalten. Land muss die Schweiz sein"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:24
|
||||||
|
#, python-format
|
||||||
|
msgid "- Invoice's 'Bank Account' is empty. You need to create or select a valid IBAN or QR-IBAN account"
|
||||||
|
msgstr "- Das 'Bankkonto' der Rechnung ist leer. Sie müssen ein gültiges IBAN- oder QR-IBAN-Konto erstellen oder auswählen"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:14
|
||||||
|
#, python-format
|
||||||
|
msgid "- Partner address is incomplete, it must contain name, street, zip, city and country. Country must be Switzerland"
|
||||||
|
msgstr "- Die Partneradresse ist unvollständig und muss Name, Straße, Postleitzahl, Stadt und Land enthalten. Land muss die Schweiz sein"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:29
|
||||||
|
#, python-format
|
||||||
|
msgid "- With a QR-IBAN a valid QRR must be used."
|
||||||
|
msgstr "- Bei einer QR-IBAN muss eine gültige QRR verwendet werden."
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Acceptance point</span>"
|
||||||
|
msgstr "<span class=\"title\">Annahmestelle</span>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Account / Payable to</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Konto / zahlbar an</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Additional information</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Zusätzliche Informationen</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Amount</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Betrag</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Currency</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Währung</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Payable by</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Zahlbar durch</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Reference</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Referenz</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span>Payment Part</span>"
|
||||||
|
msgstr "<span>Zahlungsteil</span>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span>Receipt</span>"
|
||||||
|
msgstr "<span>Quittung</span>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_res_partner_bank
|
||||||
|
msgid "Bank Accounts"
|
||||||
|
msgstr "Bankkonten"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_sent
|
||||||
|
msgid "Boolean value telling whether or not the QRR corresponding to this invoice has already been printed or sent by mail."
|
||||||
|
msgstr "Boolescher Wert, der angibt, ob der dieser Rechnung entsprechende QRR bereits gedruckt oder per Post gesendet wurde."
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_l10n_ch_qr_bill_swiss_qr_bill_create_uid
|
||||||
|
msgid "Created by"
|
||||||
|
msgstr "Erstellt von"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_l10n_ch_qr_bill_swiss_qr_bill_create_date
|
||||||
|
msgid "Created on"
|
||||||
|
msgstr "Erstellt am"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_l10n_ch_qr_bill_swiss_qr_bill_display_name
|
||||||
|
msgid "Display Name"
|
||||||
|
msgstr "Anzeigename"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_l10n_ch_qr_bill_swiss_qr_bill_id
|
||||||
|
msgid "ID"
|
||||||
|
msgstr "ID"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_account_invoice
|
||||||
|
msgid "Invoice"
|
||||||
|
msgstr "Rechnung"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr
|
||||||
|
msgid "L10N Ch Qrr"
|
||||||
|
msgstr "L10N Ch Qrr"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_sent
|
||||||
|
msgid "L10N Ch Qrr Sent"
|
||||||
|
msgstr "L10N Ch Qrr Gesendet"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_spaced
|
||||||
|
msgid "L10N Ch Qrr Spaced"
|
||||||
|
msgstr "L10N Ch Qrr beabstandet"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_l10n_ch_qr_bill_swiss_qr_bill___last_update
|
||||||
|
msgid "Last Modified on"
|
||||||
|
msgstr "Zuletzt geändert am"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_l10n_ch_qr_bill_swiss_qr_bill_write_uid
|
||||||
|
msgid "Last Updated by"
|
||||||
|
msgstr "Zuletzt aktualisiert durch"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_l10n_ch_qr_bill_swiss_qr_bill_write_date
|
||||||
|
msgid "Last Updated on"
|
||||||
|
msgstr "Zuletzt aktualisiert am"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.qrr_invoice_form
|
||||||
|
msgid "Print QR-bill"
|
||||||
|
msgstr "QR-Rechnung drucken"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_res_partner_bank_l10n_ch_qr_iban
|
||||||
|
msgid "Put the QR-IBAN here for your own bank accounts. That way, you can still use the main IBAN in the Account Number while you will see the QR-IBAN for the barcode."
|
||||||
|
msgstr "Stellen Sie die QR-IBAN hier für Ihre eigenen Bankkonten ein. Auf diese Weise können Sie weiterhin die Haupt-IBAN in der Kontonummer verwenden, während die QR-IBAN für den Barcode angezeigt wird."
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_res_partner_bank_l10n_ch_qr_iban
|
||||||
|
msgid "QR-IBAN"
|
||||||
|
msgstr "QR-IBAN"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/res_bank.py:44
|
||||||
|
#, python-format
|
||||||
|
msgid "QR-IBAN '%s' is invalid."
|
||||||
|
msgstr "QR-IBAN '%s' ist ungültig."
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.actions.report,name:l10n_ch_qr_bill.l10n_ch_qr_report
|
||||||
|
msgid "QR-bill"
|
||||||
|
msgstr "QR-Rechnung"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "QR-bill for invoice"
|
||||||
|
msgstr "QR-Rechnung für Rechnung"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_spaced
|
||||||
|
msgid "Reference QRR split in blocks of 5 characters (right-justified),to generate QR-bill report."
|
||||||
|
msgstr "Referenz-QRR, aufgeteilt in Blöcke mit 5 Zeichen (rechtsbündig), um einen QR-Rechnungsbericht zu erstellen."
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:75
|
||||||
|
#, python-format
|
||||||
|
msgid "Swiss Reference QRR"
|
||||||
|
msgstr "Schweizer Referenz QRR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:326
|
||||||
|
#, python-format
|
||||||
|
msgid "The payment reference is not a valid QR Reference."
|
||||||
|
msgstr "Die Zahlungsreferenz ist keine gültige QR-Referenz."
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr
|
||||||
|
msgid "The reference QRR associated with this invoice"
|
||||||
|
msgstr "Die dieser Rechnung zugeordnete Referenz-QRR"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:308
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"You cannot generate the QR-bill.\n"
|
||||||
|
"Here is what is blocking:\n"
|
||||||
|
"{}"
|
||||||
|
msgstr ""
|
||||||
|
"Sie können die QR-Rechnung nicht generieren.\n"
|
||||||
|
"Folgendes blockiert:\n"
|
||||||
|
"{}"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_l10n_ch_qr_bill_swiss_qr_bill
|
||||||
|
msgid "l10n_ch_qr_bill.swiss_qr_bill"
|
||||||
|
msgstr "l10n_ch_qr_bill.swiss_qr_bill"
|
223
l10n_ch_qr_bill/i18n/fr.po
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * l10n_ch_qr_bill
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2020-05-28 09:52+0000\n"
|
||||||
|
"PO-Revision-Date: 2020-08-25 11:59+0000\n"
|
||||||
|
"Last-Translator: Alexandre Fayolle <alexandre.fayolle@camptocamp.com>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||||
|
"X-Generator: Weblate 3.10\n"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"- Company address is incomplete, it must contain name, street, zip, city and "
|
||||||
|
"country. Country must be Switzerland"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:25
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"- Invoice's 'Bank Account' is empty. You need to create or select a valid "
|
||||||
|
"IBAN or QR-IBAN account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:15
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"- Partner address is incomplete, it must contain name, street, zip, city and "
|
||||||
|
"country. Country must be Switzerland"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:30
|
||||||
|
#, python-format
|
||||||
|
msgid "- With a QR-IBAN a valid QRR must be used."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Acceptance point</span>"
|
||||||
|
msgstr "<span class=\"title\">Point de dépôt</span>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Account / Payable to</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Compte / Payable à</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Additional information</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Informations supplémentaires</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Amount</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Montant</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Currency</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Monnaie</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Payable by</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Payable par</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Reference</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Référence</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span>Payment Part</span>"
|
||||||
|
msgstr "<span>Section paiement</span>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span>Receipt</span>"
|
||||||
|
msgstr "<span>Récépissé</span>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_res_partner_bank
|
||||||
|
msgid "Bank Accounts"
|
||||||
|
msgstr "Comptes bancaires"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_sent
|
||||||
|
msgid ""
|
||||||
|
"Boolean value telling whether or not the QRR corresponding to this invoice "
|
||||||
|
"has already been printed or sent by mail."
|
||||||
|
msgstr ""
|
||||||
|
"Valeur booléenne définissant si le QRR correspondant à cette facture à déjà "
|
||||||
|
"été imprimé ou envoyé par e-mail."
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_currency_name
|
||||||
|
msgid "Currency Name"
|
||||||
|
msgstr "Devise"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_account_invoice
|
||||||
|
msgid "Invoice"
|
||||||
|
msgstr "Facture"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr
|
||||||
|
msgid "L10n ch qrr"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_sent
|
||||||
|
msgid "L10n ch qrr sent"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_spaced
|
||||||
|
msgid "L10n ch qrr spaced"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.qrr_invoice_form
|
||||||
|
msgid "Print QR-bill"
|
||||||
|
msgstr "Imprimer QR-facture"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_res_partner_bank_l10n_ch_qr_iban
|
||||||
|
msgid ""
|
||||||
|
"Put the QR-IBAN here for your own bank accounts. That way, you can still "
|
||||||
|
"use the main IBAN in the Account Number while you will see the QR-IBAN for "
|
||||||
|
"the barcode."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_res_partner_bank_l10n_ch_qr_iban
|
||||||
|
msgid "QR-IBAN"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/res_bank.py:45
|
||||||
|
#, python-format
|
||||||
|
msgid "QR-IBAN '%s' is invalid."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.actions.report,name:l10n_ch_qr_bill.l10n_ch_qr_report
|
||||||
|
#, fuzzy
|
||||||
|
msgid "QR-bill"
|
||||||
|
msgstr "Imprimer QR-facture"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "QR-bill for invoice"
|
||||||
|
msgstr "QR-facture"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_spaced
|
||||||
|
msgid ""
|
||||||
|
"Reference QRR split in blocks of 5 characters (right-justified),to generate "
|
||||||
|
"QR-bill report."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_report
|
||||||
|
msgid "Report"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:76
|
||||||
|
#, python-format
|
||||||
|
msgid "Swiss Reference QRR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_currency_name
|
||||||
|
msgid "The name of this invoice's currency"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:329
|
||||||
|
#, python-format
|
||||||
|
msgid "The payment reference is not a valid QR Reference."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr
|
||||||
|
msgid "The reference QRR associated with this invoice"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:309
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"You cannot generate the QR-bill.\n"
|
||||||
|
"Here is what is blocking:\n"
|
||||||
|
"{}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "Cannot generate the QR-bill. Please check you have configured the address "
|
||||||
|
#~ "of your company and debtor. If you are using a QR-IBAN, also check the "
|
||||||
|
#~ "invoice's payment reference is a QR reference."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Impossible de générer la QR-facture. Veuillez vérifier que les adresses "
|
||||||
|
#~ "sont bien configurées sur votre compagnie et sur le débiteur. Si vous "
|
||||||
|
#~ "utiliser un QR-IBAN, vérifiez aussi que la référence de payement est bien "
|
||||||
|
#~ "une référence QR."
|
||||||
|
|
||||||
|
#~ msgid "'QR-bill-%s' % object.name"
|
||||||
|
#~ msgstr "'QR-facture-%s' % object.name"
|
218
l10n_ch_qr_bill/i18n/it.po
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * l10n_ch_qr_bill
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2020-05-28 09:52+0000\n"
|
||||||
|
"PO-Revision-Date: 2020-08-14 11:59+0000\n"
|
||||||
|
"Last-Translator: stevech091 <stefano.sforzi@agilebg.com>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: it\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 3.10\n"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"- Company address is incomplete, it must contain name, street, zip, city and "
|
||||||
|
"country. Country must be Switzerland"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:25
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"- Invoice's 'Bank Account' is empty. You need to create or select a valid "
|
||||||
|
"IBAN or QR-IBAN account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:15
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"- Partner address is incomplete, it must contain name, street, zip, city and "
|
||||||
|
"country. Country must be Switzerland"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:30
|
||||||
|
#, python-format
|
||||||
|
msgid "- With a QR-IBAN a valid QRR must be used."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Acceptance point</span>"
|
||||||
|
msgstr "<span class=\"title\">Punto di accettazione</span>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Account / Payable to</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Conto / Pagabile a</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Additional information</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Informazioni supplementari</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Amount</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Importo</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Currency</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Valuta</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Payable by</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Pagabile da</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Reference</span><br/>"
|
||||||
|
msgstr "<span class=\"title\">Riferimento</span><br/>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span>Payment Part</span>"
|
||||||
|
msgstr "<span>Sezione pagamento</span>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span>Receipt</span>"
|
||||||
|
msgstr "<span>Ricevuta</span>"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_res_partner_bank
|
||||||
|
msgid "Bank Accounts"
|
||||||
|
msgstr "Conto Bancario"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_sent
|
||||||
|
msgid ""
|
||||||
|
"Boolean value telling whether or not the QRR corresponding to this invoice "
|
||||||
|
"has already been printed or sent by mail."
|
||||||
|
msgstr ""
|
||||||
|
"Il flag indica se il QRR di questa fattura è già stato stampato o inviato "
|
||||||
|
"per mail."
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_currency_name
|
||||||
|
msgid "Currency Name"
|
||||||
|
msgstr "Valuta"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_account_invoice
|
||||||
|
msgid "Invoice"
|
||||||
|
msgstr "Fattura"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr
|
||||||
|
msgid "L10n ch qrr"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_sent
|
||||||
|
msgid "L10n ch qrr sent"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_spaced
|
||||||
|
msgid "L10n ch qrr spaced"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.qrr_invoice_form
|
||||||
|
msgid "Print QR-bill"
|
||||||
|
msgstr "Stampa QR-Fattura"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_res_partner_bank_l10n_ch_qr_iban
|
||||||
|
msgid ""
|
||||||
|
"Put the QR-IBAN here for your own bank accounts. That way, you can still "
|
||||||
|
"use the main IBAN in the Account Number while you will see the QR-IBAN for "
|
||||||
|
"the barcode."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_res_partner_bank_l10n_ch_qr_iban
|
||||||
|
msgid "QR-IBAN"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/res_bank.py:45
|
||||||
|
#, python-format
|
||||||
|
msgid "QR-IBAN '%s' is invalid."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.actions.report,name:l10n_ch_qr_bill.l10n_ch_qr_report
|
||||||
|
msgid "QR-bill"
|
||||||
|
msgstr "QR-Fattura"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "QR-bill for invoice"
|
||||||
|
msgstr "QR-Fattura n:"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_spaced
|
||||||
|
msgid ""
|
||||||
|
"Reference QRR split in blocks of 5 characters (right-justified),to generate "
|
||||||
|
"QR-bill report."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_report
|
||||||
|
msgid "Report"
|
||||||
|
msgstr "Report"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:76
|
||||||
|
#, python-format
|
||||||
|
msgid "Swiss Reference QRR"
|
||||||
|
msgstr "QRR Svizzera"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_currency_name
|
||||||
|
msgid "The name of this invoice's currency"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:329
|
||||||
|
#, python-format
|
||||||
|
msgid "The payment reference is not a valid QR Reference."
|
||||||
|
msgstr "Il riferimento di pagamento non ha un QR-riferimento valido."
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr
|
||||||
|
msgid "The reference QRR associated with this invoice"
|
||||||
|
msgstr "Il riferimento QRR associato a questa fattura"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:309
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"You cannot generate the QR-bill.\n"
|
||||||
|
"Here is what is blocking:\n"
|
||||||
|
"{}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "Cannot generate the QR-bill. Please check you have configured the address "
|
||||||
|
#~ "of your company and debtor. If you are using a QR-IBAN, also check the "
|
||||||
|
#~ "invoice's payment reference is a QR reference."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Non è possibile creare una QR-Bill. Controllare che siano configurati gli "
|
||||||
|
#~ "indirizzi della company e del cliente. Se state usando un QR-IBAN, "
|
||||||
|
#~ "controllare anche che il tipo di riferimento di pagamento sia QRR."
|
190
l10n_ch_qr_bill/i18n/l10n_ch_qr_bill.pot
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * l10n_ch_qr_bill
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "- Company address is incomplete, it must contain name, street, zip, city and country. Country must be Switzerland"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:25
|
||||||
|
#, python-format
|
||||||
|
msgid "- Invoice's 'Bank Account' is empty. You need to create or select a valid IBAN or QR-IBAN account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:15
|
||||||
|
#, python-format
|
||||||
|
msgid "- Partner address is incomplete, it must contain name, street, zip, city and country. Country must be Switzerland"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:30
|
||||||
|
#, python-format
|
||||||
|
msgid "- With a QR-IBAN a valid QRR must be used."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Acceptance point</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Account / Payable to</span><br/>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Additional information</span><br/>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Amount</span><br/>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Currency</span><br/>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Payable by</span><br/>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span class=\"title\">Reference</span><br/>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span>Payment Part</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "<span>Receipt</span>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_res_partner_bank
|
||||||
|
msgid "Bank Accounts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_sent
|
||||||
|
msgid "Boolean value telling whether or not the QRR corresponding to this invoice has already been printed or sent by mail."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_currency_name
|
||||||
|
msgid "Currency Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_account_invoice
|
||||||
|
msgid "Invoice"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr
|
||||||
|
msgid "L10n ch qrr"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_sent
|
||||||
|
msgid "L10n ch qrr sent"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_spaced
|
||||||
|
msgid "L10n ch qrr spaced"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.qrr_invoice_form
|
||||||
|
msgid "Print QR-bill"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_res_partner_bank_l10n_ch_qr_iban
|
||||||
|
msgid "Put the QR-IBAN here for your own bank accounts. That way, you can still use the main IBAN in the Account Number while you will see the QR-IBAN for the barcode."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,field_description:l10n_ch_qr_bill.field_res_partner_bank_l10n_ch_qr_iban
|
||||||
|
msgid "QR-IBAN"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/res_bank.py:45
|
||||||
|
#, python-format
|
||||||
|
msgid "QR-IBAN '%s' is invalid."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.actions.report,name:l10n_ch_qr_bill.l10n_ch_qr_report
|
||||||
|
msgid "QR-bill"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.ui.view,arch_db:l10n_ch_qr_bill.l10n_ch_swissqr_template
|
||||||
|
msgid "QR-bill for invoice"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr_spaced
|
||||||
|
msgid "Reference QRR split in blocks of 5 characters (right-justified),to generate QR-bill report."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model,name:l10n_ch_qr_bill.model_report
|
||||||
|
msgid "Report"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:76
|
||||||
|
#, python-format
|
||||||
|
msgid "Swiss Reference QRR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_currency_name
|
||||||
|
msgid "The name of this invoice's currency"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:329
|
||||||
|
#, python-format
|
||||||
|
msgid "The payment reference is not a valid QR Reference."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: model:ir.model.fields,help:l10n_ch_qr_bill.field_account_invoice_l10n_ch_qrr
|
||||||
|
msgid "The reference QRR associated with this invoice"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: l10n_ch_qr_bill
|
||||||
|
#: code:addons/l10n_ch_qr_bill/models/account_invoice.py:309
|
||||||
|
#, python-format
|
||||||
|
msgid "You cannot generate the QR-bill.\n"
|
||||||
|
"Here is what is blocking:\n"
|
||||||
|
"{}"
|
||||||
|
msgstr ""
|
||||||
|
|
3
l10n_ch_qr_bill/models/__init__.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from . import swissqr_report
|
||||||
|
from . import account_invoice
|
||||||
|
from . import res_bank
|
343
l10n_ch_qr_bill/models/account_invoice.py
Normal file
@ -0,0 +1,343 @@
|
|||||||
|
# Copyright 2019-TODAY Flectra
|
||||||
|
# Copyright 2019-TODAY Camptocamp SA
|
||||||
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
import werkzeug.urls
|
||||||
|
|
||||||
|
from flectra import _, api, fields, models
|
||||||
|
from flectra.exceptions import ValidationError, UserError
|
||||||
|
from flectra.tools.misc import mod10r
|
||||||
|
from flectra.addons.base.models.res_bank import sanitize_account_number
|
||||||
|
|
||||||
|
|
||||||
|
MSG_INCOMPLETE_PARTNER_ADDR = _(
|
||||||
|
"- Partner address is incomplete, it must contain name, street, zip, city"
|
||||||
|
" and country. Country must be Switzerland"
|
||||||
|
)
|
||||||
|
|
||||||
|
MSG_INCOMPLETE_COMPANY_ADDR = _(
|
||||||
|
"- Company address is incomplete, it must contain name, street, zip, city"
|
||||||
|
" and country. Country must be Switzerland"
|
||||||
|
)
|
||||||
|
|
||||||
|
MSG_NO_BANK_ACCOUNT = _(
|
||||||
|
"- Invoice's 'Bank Account' is empty. You need to create or select a valid"
|
||||||
|
" IBAN or QR-IBAN account"
|
||||||
|
)
|
||||||
|
|
||||||
|
MSG_BAD_QRR = _(
|
||||||
|
"- With a QR-IBAN a valid QRR must be used."
|
||||||
|
)
|
||||||
|
|
||||||
|
ERROR_MESSAGES = {
|
||||||
|
"incomplete_partner_address": MSG_INCOMPLETE_PARTNER_ADDR,
|
||||||
|
"incomplete_company_address": MSG_INCOMPLETE_COMPANY_ADDR,
|
||||||
|
"no_bank_account": MSG_NO_BANK_ACCOUNT,
|
||||||
|
"bad_qrr": MSG_BAD_QRR,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class AccountInvoice(models.Model):
|
||||||
|
_inherit = 'account.move'
|
||||||
|
|
||||||
|
l10n_ch_qrr_name = fields.Char(
|
||||||
|
"QR Reference Number",
|
||||||
|
copy=False,
|
||||||
|
help="Automatic generated QR Reference Number")
|
||||||
|
|
||||||
|
l10n_ch_qrr = fields.Char(
|
||||||
|
compute='_compute_l10n_ch_qrr',
|
||||||
|
store=True,
|
||||||
|
help='The reference QRR associated with this invoice',
|
||||||
|
)
|
||||||
|
|
||||||
|
l10n_ch_qrr_spaced = fields.Char(
|
||||||
|
compute='_compute_l10n_ch_qrr_spaced',
|
||||||
|
help=(
|
||||||
|
"Reference QRR split in blocks of 5 characters (right-justified),"
|
||||||
|
"to generate QR-bill report."
|
||||||
|
),
|
||||||
|
)
|
||||||
|
# This field is used in the "invisible" condition field of the 'Print QRR' button.
|
||||||
|
l10n_ch_currency_name = fields.Char(
|
||||||
|
related='currency_id.name',
|
||||||
|
readonly=True,
|
||||||
|
string="Currency Name",
|
||||||
|
help="The name of this invoice's currency",
|
||||||
|
)
|
||||||
|
l10n_ch_qrr_sent = fields.Boolean(
|
||||||
|
default=False,
|
||||||
|
help=(
|
||||||
|
"Boolean value telling whether or not the QRR corresponding to"
|
||||||
|
" this invoice has already been printed or sent by mail.",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
def _get_qrr_prefix(self):
|
||||||
|
"""Hook to add a customized prefix"""
|
||||||
|
self.ensure_one()
|
||||||
|
return ''
|
||||||
|
|
||||||
|
#@api.depends('number', 'name')
|
||||||
|
@api.depends('name') # To be add number in depends or not sure
|
||||||
|
def _compute_l10n_ch_qrr(self):
|
||||||
|
r""" Compute a QRR reference
|
||||||
|
|
||||||
|
QRR is the replacement of ISR
|
||||||
|
The QRR reference number is 27 characters long.
|
||||||
|
|
||||||
|
To generate the QRR reference, the we use the invoice sequence number,
|
||||||
|
removing each of its non-digit characters, and pad the unused spaces on
|
||||||
|
the left of this number with zeros.
|
||||||
|
The last digit is a checksum (mod10r).
|
||||||
|
|
||||||
|
The reference is free but for the last
|
||||||
|
digit which is a checksum.
|
||||||
|
If shorter than 27 digits, it is filled with zeros on the left.
|
||||||
|
|
||||||
|
e.g.
|
||||||
|
|
||||||
|
120000000000234478943216899
|
||||||
|
\________________________/|
|
||||||
|
1 2
|
||||||
|
(1) 12000000000023447894321689 | reference
|
||||||
|
(2) 9: control digit for identification number and reference
|
||||||
|
|
||||||
|
"""
|
||||||
|
for record in self:
|
||||||
|
if record.has_qrr():
|
||||||
|
record.l10n_ch_qrr = record.l10n_ch_qrr_name
|
||||||
|
elif record.name:
|
||||||
|
prefix = record._get_qrr_prefix()
|
||||||
|
invoice_ref = re.sub(r'[^\d]', '', record.name)
|
||||||
|
# keep only the last digits if it exceed boundaries
|
||||||
|
full_len = len(prefix) + len(invoice_ref)
|
||||||
|
extra = full_len - 26
|
||||||
|
if extra > 0:
|
||||||
|
invoice_ref = invoice_ref[extra:]
|
||||||
|
internal_ref = invoice_ref.zfill(26 - len(prefix))
|
||||||
|
record.l10n_ch_qrr = mod10r(prefix + internal_ref)
|
||||||
|
else:
|
||||||
|
record.l10n_ch_qrr = False
|
||||||
|
|
||||||
|
@api.depends('l10n_ch_qrr')
|
||||||
|
def _compute_l10n_ch_qrr_spaced(self):
|
||||||
|
def _space_qrr(ref):
|
||||||
|
to_treat = ref
|
||||||
|
res = ''
|
||||||
|
while to_treat:
|
||||||
|
res = to_treat[-5:] + res
|
||||||
|
to_treat = to_treat[:-5]
|
||||||
|
if to_treat:
|
||||||
|
res = ' ' + res
|
||||||
|
return res
|
||||||
|
|
||||||
|
for record in self:
|
||||||
|
spaced_qrr = False
|
||||||
|
if record.l10n_ch_qrr:
|
||||||
|
spaced_qrr = _space_qrr(record.l10n_ch_qrr)
|
||||||
|
record.l10n_ch_qrr_spaced = spaced_qrr
|
||||||
|
|
||||||
|
def _get_communications(self):
|
||||||
|
if self.has_qrr():
|
||||||
|
structured_communication = self.l10n_ch_qrr
|
||||||
|
free_communication = ''
|
||||||
|
else:
|
||||||
|
structured_communication = ''
|
||||||
|
free_communication = self.name
|
||||||
|
free_communication = free_communication or self.name # to be replace self.number not sure
|
||||||
|
|
||||||
|
additional_info = ""
|
||||||
|
if free_communication:
|
||||||
|
additional_info = (
|
||||||
|
(free_communication[:137] + '...')
|
||||||
|
if len(free_communication) > 140
|
||||||
|
else free_communication
|
||||||
|
)
|
||||||
|
|
||||||
|
# Compute reference type (empty by default, only mandatory for QR-IBAN,
|
||||||
|
# and must then be 27 characters-long, with mod10r check digit as the 27th one,
|
||||||
|
# just like ISR number for invoices)
|
||||||
|
reference_type = 'NON'
|
||||||
|
reference = ''
|
||||||
|
if self.has_qrr():
|
||||||
|
# _check_for_qr_code_errors ensures we can't have a QR-IBAN
|
||||||
|
# without a QR-reference here
|
||||||
|
reference_type = 'QRR'
|
||||||
|
reference = structured_communication
|
||||||
|
return reference_type, reference, additional_info
|
||||||
|
|
||||||
|
def _prepare_swiss_code_url_vals(self):
|
||||||
|
|
||||||
|
reference_type, reference, additional_info = self._get_communications()
|
||||||
|
|
||||||
|
creditor = self.company_id.partner_id
|
||||||
|
debtor = self.commercial_partner_id
|
||||||
|
|
||||||
|
creditor_addr_1, creditor_addr_2 = self._get_partner_address_lines(
|
||||||
|
creditor
|
||||||
|
)
|
||||||
|
debtor_addr_1, debtor_addr_2 = self._get_partner_address_lines(debtor)
|
||||||
|
|
||||||
|
amount = '{:.2f}'.format(self.amount_residual)
|
||||||
|
acc_number = self.partner_bank_id.sanitized_acc_number
|
||||||
|
|
||||||
|
# If there is a QR IBAN we use it for the barcode instead of the
|
||||||
|
# account number
|
||||||
|
qr_iban = self.partner_bank_id.l10n_ch_qr_iban
|
||||||
|
if qr_iban:
|
||||||
|
acc_number = sanitize_account_number(qr_iban)
|
||||||
|
|
||||||
|
# fmt: off
|
||||||
|
qr_code_vals = [
|
||||||
|
'SPC', # QR Type
|
||||||
|
'0200', # Version
|
||||||
|
'1', # Coding Type
|
||||||
|
acc_number, # IBAN
|
||||||
|
# Creditor
|
||||||
|
'K', # - Address Type
|
||||||
|
creditor.name[:70], # - Name
|
||||||
|
creditor_addr_1, # - Address Line 1
|
||||||
|
creditor_addr_2, # - Address Line 2
|
||||||
|
'', # - Postal Code (not used in type K)
|
||||||
|
'', # - City (not used in type K)
|
||||||
|
creditor.country_id.code, # - Country
|
||||||
|
# Ultimate Creditor
|
||||||
|
'', # - Address Type
|
||||||
|
'', # - Name
|
||||||
|
'', # - Address Line 1
|
||||||
|
'', # - Address Line 2
|
||||||
|
'', # - Postal Code
|
||||||
|
'', # - Town
|
||||||
|
'', # - Country
|
||||||
|
amount, # Amount
|
||||||
|
self.currency_id.name, # Currency
|
||||||
|
# Ultimate Debtor
|
||||||
|
'K', # - Address Type
|
||||||
|
debtor.name[:70], # - Name
|
||||||
|
debtor_addr_1, # - Address Line 1
|
||||||
|
debtor_addr_2, # - Address Line 2
|
||||||
|
'', # - Postal Code (not used in type K)
|
||||||
|
'', # - City (not used in type K)
|
||||||
|
debtor.country_id.code, # - Country
|
||||||
|
reference_type, # Reference Type
|
||||||
|
reference, # Reference
|
||||||
|
additional_info, # Unstructured Message
|
||||||
|
'EPD', # Mandatory trailer part
|
||||||
|
'', # Bill information
|
||||||
|
]
|
||||||
|
# fmt: on
|
||||||
|
return qr_code_vals
|
||||||
|
|
||||||
|
#@api.multi
|
||||||
|
def build_swiss_code_url(self):
|
||||||
|
|
||||||
|
self.ensure_one()
|
||||||
|
|
||||||
|
qr_code_vals = self._prepare_swiss_code_url_vals()
|
||||||
|
|
||||||
|
# use quiet to remove blank around the QR and make it easier to place it
|
||||||
|
return '/report/qrcode/?value=%s&width=%s&height=%s&bar_border=0' % (
|
||||||
|
werkzeug.urls.url_quote_plus('\n'.join(qr_code_vals)),
|
||||||
|
256,
|
||||||
|
256,
|
||||||
|
)
|
||||||
|
|
||||||
|
def _get_partner_address_lines(self, partner):
|
||||||
|
""" Returns a tuple of two elements containing the address lines to use
|
||||||
|
for this partner. Line 1 contains the street and number, line 2 contains
|
||||||
|
zip and city. Those two lines are limited to 70 characters
|
||||||
|
"""
|
||||||
|
streets = [partner.street, partner.street2]
|
||||||
|
line_1 = ' '.join(filter(None, streets))
|
||||||
|
line_2 = partner.zip + ' ' + partner.city
|
||||||
|
return line_1[:70], line_2[:70]
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _is_qrr(self, reference):
|
||||||
|
""" Checks whether the given reference is a QR-reference, i.e. it is
|
||||||
|
made of 27 digits, the 27th being a mod10r check on the 26 previous ones.
|
||||||
|
"""
|
||||||
|
return (
|
||||||
|
reference
|
||||||
|
and len(reference) == 27
|
||||||
|
and re.match(r'\d+$', reference)
|
||||||
|
and reference == mod10r(reference[:-1])
|
||||||
|
)
|
||||||
|
|
||||||
|
def validate_swiss_code_arguments(self):
|
||||||
|
# TODO do checks separately
|
||||||
|
reference_to_check = self.l10n_ch_qrr_name
|
||||||
|
|
||||||
|
def _partner_fields_set(partner):
|
||||||
|
return (
|
||||||
|
partner.zip
|
||||||
|
and partner.city
|
||||||
|
and partner.country_id.code
|
||||||
|
and (partner.street or partner.street2)
|
||||||
|
)
|
||||||
|
|
||||||
|
errors = []
|
||||||
|
if not _partner_fields_set(self.partner_id):
|
||||||
|
errors.append(_("incomplete_partner_address"))
|
||||||
|
if not self.partner_bank_id:
|
||||||
|
errors.append(_("no_bank_account"))
|
||||||
|
elif not _partner_fields_set(self.partner_bank_id.partner_id):
|
||||||
|
errors.append(_("incomplete_company_address"))
|
||||||
|
if (reference_to_check
|
||||||
|
and self.partner_bank_id._is_qr_iban()
|
||||||
|
and not self._is_qrr(reference_to_check)):
|
||||||
|
errors.append(_("bad_qrr"))
|
||||||
|
|
||||||
|
if len(errors) > 0:
|
||||||
|
raise UserError(errors)
|
||||||
|
|
||||||
|
return not errors
|
||||||
|
|
||||||
|
def can_generate_qr_bill(self, returned_errors=None):
|
||||||
|
""" Returns True if the invoice can be used to generate a QR-bill.
|
||||||
|
"""
|
||||||
|
self.ensure_one()
|
||||||
|
return self.validate_swiss_code_arguments()
|
||||||
|
|
||||||
|
def print_ch_qr_bill(self):
|
||||||
|
""" Triggered by the 'Print QR-bill' button.
|
||||||
|
"""
|
||||||
|
self.ensure_one()
|
||||||
|
|
||||||
|
if not self.can_generate_qr_bill():
|
||||||
|
msg_error_list = "\n".join(ERROR_MESSAGES[e] for e in self.errors)
|
||||||
|
raise ValidationError(
|
||||||
|
_("You cannot generate the QR-bill.\n"
|
||||||
|
"Here is what is blocking:\n"
|
||||||
|
"{}").format(msg_error_list)
|
||||||
|
)
|
||||||
|
|
||||||
|
self.l10n_ch_qrr_sent = True
|
||||||
|
return self.env.ref('l10n_ch_qr_bill.l10n_ch_qr_report').report_action(self)
|
||||||
|
|
||||||
|
def has_qrr(self):
|
||||||
|
"""Check if this invoice has a valid QRR reference (for Switzerland)
|
||||||
|
|
||||||
|
"""
|
||||||
|
return self._is_qrr(self.l10n_ch_qrr_name)
|
||||||
|
|
||||||
|
def _validate_qrr(self):
|
||||||
|
partner_bank = self.partner_bank_id
|
||||||
|
if partner_bank._is_qr_iban() and not self.has_qrr():
|
||||||
|
raise ValidationError(
|
||||||
|
_("""The payment reference is not a valid QR Reference.""")
|
||||||
|
)
|
||||||
|
return True
|
||||||
|
|
||||||
|
def action_invoice_open(self):
|
||||||
|
res = super(AccountInvoice, self).action_invoice_open()
|
||||||
|
for rec in self:
|
||||||
|
# Define reference once number has been generated
|
||||||
|
if rec.type == "out_invoice":
|
||||||
|
if not rec.l10n_ch_qrr_name and rec.partner_bank_id._is_qr_iban():
|
||||||
|
rec.l10n_ch_qrr_name = rec.l10n_ch_qrr
|
||||||
|
rec._validate_qrr()
|
||||||
|
return res
|
73
l10n_ch_qr_bill/models/res_bank.py
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Copyright 2019-TODAY Flectra
|
||||||
|
# Copyright 2019-TODAY Camptocamp SA
|
||||||
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
||||||
|
import re
|
||||||
|
|
||||||
|
from flectra import api, fields, models, _
|
||||||
|
from flectra.addons.base_iban.models.res_partner_bank import (
|
||||||
|
normalize_iban, pretty_iban, validate_iban
|
||||||
|
)
|
||||||
|
from flectra.addons.base.models.res_bank import sanitize_account_number
|
||||||
|
from flectra.exceptions import ValidationError
|
||||||
|
|
||||||
|
|
||||||
|
class ResPartnerBank(models.Model):
|
||||||
|
_inherit = 'res.partner.bank'
|
||||||
|
|
||||||
|
l10n_ch_qr_iban = fields.Char(
|
||||||
|
string='QR-IBAN',
|
||||||
|
help=(
|
||||||
|
"Put the QR-IBAN here for your own bank accounts. That way, you"
|
||||||
|
" can still use the main IBAN in the Account Number while you will"
|
||||||
|
" see the QR-IBAN for the barcode."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
def _check_qr_iban_range(self, iban):
|
||||||
|
if not iban or len(iban) < 9:
|
||||||
|
return False
|
||||||
|
iid_start_index = 4
|
||||||
|
iid_end_index = 8
|
||||||
|
iid = iban[iid_start_index : iid_end_index + 1]
|
||||||
|
# Those iid between 30000 and 31999 are reserved for QR-IBANs only
|
||||||
|
return (re.match(r'\d+', iid)
|
||||||
|
and 30000 <= int(iid) <= 31999)
|
||||||
|
|
||||||
|
def _validate_qr_iban(self, qr_iban):
|
||||||
|
# Check first if it's a valid IBAN.
|
||||||
|
validate_iban(qr_iban)
|
||||||
|
# We sanitize first so that _check_qr_iban_range()
|
||||||
|
# can extract correct IID from IBAN to validate it.
|
||||||
|
sanitized_qr_iban = sanitize_account_number(qr_iban)
|
||||||
|
# Now, check if it's valid QR-IBAN (based on its IID).
|
||||||
|
if not self._check_qr_iban_range(sanitized_qr_iban):
|
||||||
|
raise ValidationError(_("QR-IBAN '%s' is invalid.") % qr_iban)
|
||||||
|
return True
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def create(self, vals):
|
||||||
|
if vals.get('l10n_ch_qr_iban'):
|
||||||
|
self._validate_qr_iban(vals['l10n_ch_qr_iban'])
|
||||||
|
iban = pretty_iban(normalize_iban(vals['l10n_ch_qr_iban']))
|
||||||
|
vals['l10n_ch_qr_iban'] = iban
|
||||||
|
return super(ResPartnerBank, self).create(vals)
|
||||||
|
|
||||||
|
def write(self, vals):
|
||||||
|
if vals.get('l10n_ch_qr_iban'):
|
||||||
|
self._validate_qr_iban(vals['l10n_ch_qr_iban'])
|
||||||
|
iban = pretty_iban(normalize_iban(vals['l10n_ch_qr_iban']))
|
||||||
|
vals['l10n_ch_qr_iban'] = iban
|
||||||
|
return super(ResPartnerBank, self).write(vals)
|
||||||
|
|
||||||
|
def _is_qr_iban(self):
|
||||||
|
""" Tells whether or not this bank account has a QR-IBAN account number.
|
||||||
|
QR-IBANs are specific identifiers used in Switzerland as references in
|
||||||
|
QR-codes. They are formed like regular IBANs, but are actually something
|
||||||
|
different.
|
||||||
|
|
||||||
|
"""
|
||||||
|
return (
|
||||||
|
self.acc_type == "iban"
|
||||||
|
and self._check_qr_iban_range(self.sanitized_acc_number)
|
||||||
|
or self.l10n_ch_qr_iban
|
||||||
|
)
|
29
l10n_ch_qr_bill/models/swissqr_report.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Part of Flectra. See LICENSE file for full copyright and licensing details.
|
||||||
|
from flectra import api, models
|
||||||
|
|
||||||
|
from reportlab.graphics.barcode import createBarcodeDrawing
|
||||||
|
|
||||||
|
|
||||||
|
class SwissQrBill(models.Model):
|
||||||
|
_name = 'l10n_ch_qr_bill.swiss_qr_bill'
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def qrcode(self, value, width=600, height=100, bar_border=4):
|
||||||
|
try:
|
||||||
|
width, height, bar_border = (
|
||||||
|
int(width),
|
||||||
|
int(height),
|
||||||
|
int(bar_border),
|
||||||
|
)
|
||||||
|
|
||||||
|
qrcode = createBarcodeDrawing(
|
||||||
|
"QR",
|
||||||
|
value=value,
|
||||||
|
format='png',
|
||||||
|
width=width,
|
||||||
|
height=height,
|
||||||
|
barBorder=bar_border,
|
||||||
|
)
|
||||||
|
return qrcode.asString('png')
|
||||||
|
except (ValueError, AttributeError):
|
||||||
|
raise ValueError("Cannot convert into QR code.")
|
166
l10n_ch_qr_bill/report/swissqr_report.xml
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<flectra>
|
||||||
|
<data>
|
||||||
|
<report
|
||||||
|
id="l10n_ch_qr_report"
|
||||||
|
model="account.move"
|
||||||
|
report_type="qweb-pdf"
|
||||||
|
string="QR-bill"
|
||||||
|
name="l10n_ch_qr_bill.qr_report_main"
|
||||||
|
file="l10n_ch_qr_bill.qr_report_main"
|
||||||
|
attachment="'QR-bill-' + object.name + '.pdf'"
|
||||||
|
menu="False"/>
|
||||||
|
|
||||||
|
<record id="l10n_ch_qr_report" model="ir.actions.report">
|
||||||
|
<field name="print_report_name">'QR-bill-%s.pdf' % object.name</field>
|
||||||
|
<field name="paperformat_id" ref="l10n_ch_qr_bill.paperformat_euro_no_margin"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<template id="l10n_ch_swissqr_template">
|
||||||
|
<t t-call="web.external_layout">
|
||||||
|
<t t-set="o" t-value="o.with_context(lang=o.partner_id.lang)" />
|
||||||
|
<!-- add class to body tag -->
|
||||||
|
<!--<script>document.body.className += " l10n_ch_qr";</script>-->
|
||||||
|
<div class="page l10n_ch_qr">
|
||||||
|
<link type="text/css" rel="stylesheet" href="/l10n_ch_qr_bill/static/src/css/report_swissqr.css"/>
|
||||||
|
|
||||||
|
<t t-set="formated_amount" t-value="'{:,.2f}'.format(o.amount_residual).replace(',',' ')"/>
|
||||||
|
|
||||||
|
<div class="swissqr_title">
|
||||||
|
<h1>QR-bill for invoice <t t-esc="o.name"/></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="swissqr_content">
|
||||||
|
|
||||||
|
<div class="swissqr_receipt" t-if="o.validate_swiss_code_arguments()">
|
||||||
|
<div id="receipt_title_zone" class="main_title swissqr_column_left">
|
||||||
|
<span>Receipt</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="receipt_indication_zone" class="swissqr_column_left receipt_indication_zone">
|
||||||
|
<div class="swissqr_text">
|
||||||
|
<span class="title">Account / Payable to</span><br/>
|
||||||
|
<span class="content" t-field="o.partner_bank_id.acc_number" t-if="not o.partner_bank_id.l10n_ch_qr_iban"/>
|
||||||
|
<span class="content" t-field="o.partner_bank_id.l10n_ch_qr_iban" t-if="o.partner_bank_id.l10n_ch_qr_iban"/><br/>
|
||||||
|
<span class="content" t-field="o.company_id.name"/><br/>
|
||||||
|
<span class="content" t-field="o.company_id.street"/><br/>
|
||||||
|
<span class="content" t-field="o.company_id.country_id.code"/>
|
||||||
|
<span class="content" t-field="o.company_id.zip"/>
|
||||||
|
<span class="content" t-field="o.company_id.city"/><br/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<t t-if="o.partner_bank_id._is_qr_iban()">
|
||||||
|
<div class="swissqr_text">
|
||||||
|
<span class="title">Reference</span><br/>
|
||||||
|
<span class="content" t-field="o.l10n_ch_qrr_spaced"/><br/>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
|
||||||
|
<div class="swissqr_text">
|
||||||
|
<span class="title">Payable by</span><br/>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.name"/><br/>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.street"> </span>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.street2"/><br/>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.country_id.code"/>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.zip"/>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.city"/><br/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="receipt_amount_zone" class="swissqr_column_left receipt_amount_zone">
|
||||||
|
<div class="swissqr_text">
|
||||||
|
<div class="column">
|
||||||
|
<span class="title">Currency</span><br/>
|
||||||
|
<span class="content" t-field="o.currency_id.name"/>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<span class="title">Amount</span><br/>
|
||||||
|
<span class="content" t-esc="formated_amount"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="receipt_acceptance_point_zone" class="receipt_acceptance_point_zone">
|
||||||
|
<div class="swissqr_text content">
|
||||||
|
<span class="title">Acceptance point</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="swissqr_body" t-if="o.validate_swiss_code_arguments()">
|
||||||
|
<div class="main_title swissqr_column_left">
|
||||||
|
<span>Payment Part</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<img class="swissqr" t-att-src="o.build_swiss_code_url()"/>
|
||||||
|
<img class="ch_cross" src="/l10n_ch_qr_bill/static/src/img/CH-Cross_7mm.png"/>
|
||||||
|
|
||||||
|
<div id="indications_zone" class="swissqr_column_right indication_zone">
|
||||||
|
<div class="swissqr_text">
|
||||||
|
<span class="title">Account / Payable to</span><br/>
|
||||||
|
<span class="content" t-field="o.partner_bank_id.acc_number" t-if="not o.partner_bank_id.l10n_ch_qr_iban"/>
|
||||||
|
<span class="content" t-field="o.partner_bank_id.l10n_ch_qr_iban" t-if="o.partner_bank_id.l10n_ch_qr_iban"/><br/>
|
||||||
|
<span class="content" t-field="o.company_id.name"/><br/>
|
||||||
|
<span class="content" t-field="o.company_id.street"/><br/>
|
||||||
|
<span class="content" t-field="o.company_id.country_id.code"/>
|
||||||
|
<span class="content" t-field="o.company_id.zip"/>
|
||||||
|
<span class="content" t-field="o.company_id.city"/><br/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<t t-if="o.partner_bank_id._is_qr_iban()">
|
||||||
|
<div class="swissqr_text">
|
||||||
|
<span class="title">Reference</span><br/>
|
||||||
|
<span class="content" t-field="o.l10n_ch_qrr_spaced"/><br/>
|
||||||
|
</div>
|
||||||
|
<div class="swissqr_text">
|
||||||
|
<span class="title">Additional information</span><br/>
|
||||||
|
<span class="content" t-field="o.name"/><br/>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
|
||||||
|
<t t-if="not o.partner_bank_id._is_qr_iban()">
|
||||||
|
<div class="swissqr_text">
|
||||||
|
<span class="title">Additional information</span><br/>
|
||||||
|
<span class="content" t-raw="o.name"/><br/>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
|
||||||
|
<div class="swissqr_text">
|
||||||
|
<span class="title">Payable by</span><br/>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.name"/><br/>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.street"> </span>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.street2"/><br/>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.country_id.code"/>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.zip"/>
|
||||||
|
<span class="content" t-field="o.commercial_partner_id.city"/><br/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="amount_zone" class="swissqr_column_left amount_zone">
|
||||||
|
<div class="swissqr_text">
|
||||||
|
<div class="column">
|
||||||
|
<span class="title">Currency</span><br/>
|
||||||
|
<span class="content" t-field="o.currency_id.name"/>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<span class="title">Amount</span><br/>
|
||||||
|
<span class="content" t-esc="formated_amount"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template id="qr_report_main">
|
||||||
|
<t t-call="web.html_container">
|
||||||
|
<t t-foreach="docs" t-as="o">
|
||||||
|
<t t-call="l10n_ch_qr_bill.l10n_ch_swissqr_template" t-lang="o.partner_id.lang"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
</data>
|
||||||
|
</flectra>
|
2
l10n_ch_qr_bill/security/ir.model.access.csv
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
access_l10n_ch_qr_bill_swiss_qr_bill,access_l10n_ch_qr_bill_swiss_qr_bill,model_l10n_ch_qr_bill_swiss_qr_bill,base.group_user,1,1,1,1
|
|
BIN
l10n_ch_qr_bill/static/description/icon.png
Normal file
After Width: | Height: | Size: 10 KiB |
155
l10n_ch_qr_bill/static/src/css/report_swissqr.css
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
.page.l10n_ch_qr {
|
||||||
|
padding: 0;
|
||||||
|
/* Disable custom bakground */;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .o_report_layout_background {
|
||||||
|
background: none;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .swissqr_title {
|
||||||
|
position: absolute;
|
||||||
|
padding: 15px;
|
||||||
|
padding-top: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .swissqr_content {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .swissqr_receipt {
|
||||||
|
position: absolute;
|
||||||
|
background-color: white;
|
||||||
|
border-color: black;
|
||||||
|
border-width: 1pt 1pt 1pt 1pt;
|
||||||
|
border-style: solid;
|
||||||
|
height: 131mm;
|
||||||
|
/* 105 * 1.25 - 0.25 mm to cope for rendering issues due to header (probably a rounding issue) */
|
||||||
|
width: 77.5mm;
|
||||||
|
/* 62 * 1.25 */
|
||||||
|
top: 240mm;
|
||||||
|
/* 192 * 1.25 */
|
||||||
|
left: 0mm;
|
||||||
|
/*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .swissqr_body {
|
||||||
|
position: absolute;
|
||||||
|
background-color: white;
|
||||||
|
border-color: black;
|
||||||
|
border-width: 1pt 1pt 1pt 1pt;
|
||||||
|
border-style: solid;
|
||||||
|
height: 131mm;
|
||||||
|
/* 105 * 1.25 - 0.25mm to cope for rendering issues due to header (probably a rounding issue)*/
|
||||||
|
width: 185mm;
|
||||||
|
/* 148 * 1.25 */
|
||||||
|
top: 240mm;
|
||||||
|
/* 192 * 1.25 */
|
||||||
|
left: 77.5mm;
|
||||||
|
/* 62 * 1.25 */
|
||||||
|
/*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .swissqr {
|
||||||
|
position: absolute;
|
||||||
|
height: 57.5mm;
|
||||||
|
/* 46 * 1.25 */
|
||||||
|
width: 57.5mm;
|
||||||
|
/* 46 * 1.25 */
|
||||||
|
top: 20mm;
|
||||||
|
/* 16 * 1.25 */
|
||||||
|
left: 6.25mm;
|
||||||
|
/* 5 * 1.25 min readability margin for QR */
|
||||||
|
/*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .ch_cross {
|
||||||
|
position: absolute;
|
||||||
|
background-color: white;
|
||||||
|
height: 8.75mm;
|
||||||
|
/* 7 * 1.25 */
|
||||||
|
width: 8.75mm;
|
||||||
|
/* 7 * 1.25 */
|
||||||
|
top: 44.375mm;
|
||||||
|
/* (16 + 23 - 7/2) * 1.25 = 41.5 * 1.25 */
|
||||||
|
left: 30.625mm;
|
||||||
|
/* (5 + 23 - 7/2) * 1.25 = 24.5 * 1.25 */
|
||||||
|
/*These measures are multiplied by 1.25 here to fit the canvas size used by our reporting engine (1.25 times bigger than A4)*/;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .swissqr_text {
|
||||||
|
font-family: Arial, Frutiger, Helvetica;
|
||||||
|
color: black;
|
||||||
|
line-height: 1;
|
||||||
|
padding-top: 1em;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .title {
|
||||||
|
font-size: 8pt;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 2mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .swissqr_text .content {
|
||||||
|
font-size: 10pt;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .main_title {
|
||||||
|
margin-top: 5mm;
|
||||||
|
font-size: 11pt;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .swissqr_column_left {
|
||||||
|
position: absolute;
|
||||||
|
left: 5mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .swissqr_column_right {
|
||||||
|
position: absolute;
|
||||||
|
left: 70mm;
|
||||||
|
/* (5 + 46 + 5) * 1.25 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .procedure_zone {
|
||||||
|
top: 15mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .receipt_indication_zone {
|
||||||
|
top: 10mm;
|
||||||
|
max-width: 70mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .indication_zone {
|
||||||
|
top: 10mm;
|
||||||
|
max-width: 100mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .receipt_amount_zone {
|
||||||
|
position: absolute;
|
||||||
|
top: 86mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .receipt_acceptance_point_zone {
|
||||||
|
position: relative;
|
||||||
|
top: 100mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .receipt_acceptance_point_zone .content {
|
||||||
|
float: right;
|
||||||
|
padding-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .amount_zone {
|
||||||
|
position: absolute;
|
||||||
|
top: 86mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page.l10n_ch_qr .column {
|
||||||
|
margin-right: 5mm;
|
||||||
|
float: left;
|
||||||
|
}
|
BIN
l10n_ch_qr_bill/static/src/img/CH-Cross_7mm.png
Normal file
After Width: | Height: | Size: 14 KiB |
1
l10n_ch_qr_bill/tests/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from . import test_swissqr
|
166
l10n_ch_qr_bill/tests/test_swissqr.py
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
# Part of Flectra. See LICENSE file for full copyright and licensing details.
|
||||||
|
import time
|
||||||
|
|
||||||
|
from flectra.addons.account.tests.account_test_classes import AccountingTestCase
|
||||||
|
|
||||||
|
CH_IBAN = 'CH15 3881 5158 3845 3843 7'
|
||||||
|
QR_IBAN = 'CH21 3080 8001 2345 6782 7'
|
||||||
|
|
||||||
|
|
||||||
|
class TestSwissQR(AccountingTestCase):
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super(TestSwissQR, self).setUp()
|
||||||
|
# Activate SwissQR in Swiss invoices
|
||||||
|
self.env['ir.config_parameter'].create(
|
||||||
|
{'key': 'l10n_ch.print_qrcode', 'value': '1'}
|
||||||
|
)
|
||||||
|
self.customer = self.env['res.partner'].create(
|
||||||
|
{
|
||||||
|
"name": "Partner",
|
||||||
|
"street": "Route de Berne 41",
|
||||||
|
"street2": "",
|
||||||
|
"zip": "1000",
|
||||||
|
"city": "Lausanne",
|
||||||
|
"country_id": self.env.ref("base.ch").id,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
self.env.user.company_id.partner_id.write(
|
||||||
|
{
|
||||||
|
"street": "Route de Berne 88",
|
||||||
|
"street2": "",
|
||||||
|
"zip": "2000",
|
||||||
|
"city": "Neuchâtel",
|
||||||
|
"country_id": self.env.ref('base.ch').id,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
self.invoice1 = self.create_invoice('base.CHF')
|
||||||
|
|
||||||
|
def create_invoice(self, currency_to_use='base.CHF'):
|
||||||
|
""" Generates a test invoice """
|
||||||
|
|
||||||
|
product = self.env.ref("product.product_product_4")
|
||||||
|
acc_type = self.env.ref('account.data_account_type_current_assets')
|
||||||
|
account = self.env['account.account'].search(
|
||||||
|
[('user_type_id', '=', acc_type.id)], limit=1
|
||||||
|
)
|
||||||
|
invoice = (
|
||||||
|
self.env['account.move']
|
||||||
|
.with_context(default_type='out_invoice')
|
||||||
|
.create(
|
||||||
|
{
|
||||||
|
'type': 'out_invoice',
|
||||||
|
'partner_id': self.customer.id,
|
||||||
|
'currency_id': self.env.ref(currency_to_use).id,
|
||||||
|
'date': time.strftime('%Y') + '-12-22',
|
||||||
|
'invoice_line_ids': [
|
||||||
|
(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
{
|
||||||
|
'name': product.name,
|
||||||
|
'product_id': product.id,
|
||||||
|
'account_id': account.id,
|
||||||
|
'quantity': 1,
|
||||||
|
'price_unit': 42.0,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return invoice
|
||||||
|
|
||||||
|
def create_account(self, number):
|
||||||
|
""" Generates a test res.partner.bank. """
|
||||||
|
return self.env['res.partner.bank'].create(
|
||||||
|
{
|
||||||
|
'acc_number': number,
|
||||||
|
'partner_id': self.env.user.company_id.partner_id.id,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
def swissqr_not_generated(self, invoice):
|
||||||
|
"""Prints the given invoice and tests that no Swiss QR generation is triggered.
|
||||||
|
|
||||||
|
"""
|
||||||
|
self.assertFalse(
|
||||||
|
invoice.can_generate_qr_bill(),
|
||||||
|
'No Swiss QR should be generated for this invoice',
|
||||||
|
)
|
||||||
|
|
||||||
|
def swissqr_generated(self, invoice, ref_type='NON'):
|
||||||
|
"""Prints the given invoice and tests that a Swiss QR generation is triggered.
|
||||||
|
|
||||||
|
"""
|
||||||
|
self.assertTrue(
|
||||||
|
invoice.can_generate_qr_bill(), 'A Swiss QR can be generated'
|
||||||
|
)
|
||||||
|
if ref_type == 'QRR':
|
||||||
|
self.assertTrue(invoice.name)
|
||||||
|
struct_ref = invoice.name
|
||||||
|
unstr_msg = ''
|
||||||
|
else:
|
||||||
|
struct_ref = ''
|
||||||
|
unstr_msg = invoice.name or ''
|
||||||
|
unstr_msg = (unstr_msg or invoice.number).replace('/', '%2F')
|
||||||
|
payload = (
|
||||||
|
"SPC%0A"
|
||||||
|
"0200%0A"
|
||||||
|
"1%0A"
|
||||||
|
"{iban}%0A"
|
||||||
|
"K%0A"
|
||||||
|
"YourCompany%0A"
|
||||||
|
"Route+de+Berne+88%0A"
|
||||||
|
"2000+Neuch%C3%A2tel%0A"
|
||||||
|
"%0A%0A"
|
||||||
|
"CH%0A"
|
||||||
|
"%0A%0A%0A%0A%0A%0A%0A"
|
||||||
|
"42.00%0A"
|
||||||
|
"CHF%0A"
|
||||||
|
"K%0A"
|
||||||
|
"Partner%0A"
|
||||||
|
"Route+de+Berne+41%0A"
|
||||||
|
"1000+Lausanne%0A"
|
||||||
|
"%0A%0A"
|
||||||
|
"CH%0A"
|
||||||
|
"{ref_type}%0A"
|
||||||
|
"{struct_ref}%0A"
|
||||||
|
"{unstr_msg}%0A"
|
||||||
|
"EPD%0A"
|
||||||
|
).format(
|
||||||
|
iban=invoice.partner_bank_id.sanitized_acc_number,
|
||||||
|
ref_type=ref_type,
|
||||||
|
struct_ref=struct_ref,
|
||||||
|
unstr_msg=unstr_msg,
|
||||||
|
)
|
||||||
|
|
||||||
|
expected_url = ("/report/qrcode/?value={}"
|
||||||
|
"&width=256&height=256&bar_border=0").format(payload)
|
||||||
|
|
||||||
|
url = invoice.build_swiss_code_url()
|
||||||
|
self.assertEqual(url, expected_url)
|
||||||
|
|
||||||
|
def test_swissQR_missing_bank(self):
|
||||||
|
# Let us test the generation of a SwissQR for an invoice, first by showing an
|
||||||
|
# QR is included in the invoice is only generated when Flectra has all the data
|
||||||
|
# it needs.
|
||||||
|
self.invoice1.action_invoice_open()
|
||||||
|
self.swissqr_not_generated(self.invoice1)
|
||||||
|
|
||||||
|
def test_swissQR_iban(self):
|
||||||
|
# Now we add an account for payment to our invoice
|
||||||
|
# Here we don't use a structured reference
|
||||||
|
iban_account = self.create_account(CH_IBAN)
|
||||||
|
self.invoice1.partner_bank_id = iban_account
|
||||||
|
self.invoice1.action_invoice_open()
|
||||||
|
|
||||||
|
self.swissqr_generated(self.invoice1, ref_type="NON")
|
||||||
|
|
||||||
|
def test_swissQR_qriban(self):
|
||||||
|
# Now use a proper QR-IBAN, we are good to print a QR Bill
|
||||||
|
qriban_account = self.create_account(QR_IBAN)
|
||||||
|
self.assertTrue(qriban_account.acc_type, 'qr-iban')
|
||||||
|
self.invoice1.partner_bank_id = qriban_account
|
||||||
|
self.invoice1.action_invoice_open()
|
||||||
|
self.swissqr_generated(self.invoice1, ref_type="QRR")
|
49
l10n_ch_qr_bill/views/account_invoice_view.xml
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<flectra>
|
||||||
|
<data>
|
||||||
|
<record id="qrr_invoice_form" model="ir.ui.view">
|
||||||
|
<field name="name">l10n_ch.account.move.form</field>
|
||||||
|
<field name="model">account.move</field>
|
||||||
|
<field name="inherit_id" ref="account.view_move_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
|
||||||
|
<xpath expr="//field[@name='invoice_has_outstanding']" position="after">
|
||||||
|
<field name="l10n_ch_qrr_sent" invisible="1"/>
|
||||||
|
<field name="l10n_ch_currency_name" invisible="1" readonly="1"/>
|
||||||
|
</xpath>
|
||||||
|
|
||||||
|
<xpath expr="//page[@name='other_info']//field[@name='partner_bank_id']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('state', 'not in', ['draft', 'open'])]}</attribute>
|
||||||
|
<attribute name="invisible">0</attribute>
|
||||||
|
</xpath>
|
||||||
|
|
||||||
|
<xpath expr="//page[@name='other_info']//field[@name='ref']" position="after">
|
||||||
|
<field name="l10n_ch_qrr_name" readonly="1" />
|
||||||
|
</xpath>
|
||||||
|
|
||||||
|
<xpath expr="//button[@name='action_register_payment']" position="before">
|
||||||
|
<button
|
||||||
|
name="print_ch_qr_bill"
|
||||||
|
string="Print QR-bill"
|
||||||
|
type="object"
|
||||||
|
attrs="{'invisible':['|', ('state', '!=', 'open'),
|
||||||
|
'|', ('l10n_ch_qrr_sent', '=', True),
|
||||||
|
('l10n_ch_currency_name', 'not in', ['EUR', 'CHF'])]}"
|
||||||
|
groups="base.group_user"
|
||||||
|
class="oe_highlight"
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
name="print_ch_qr_bill"
|
||||||
|
string="Print QR-bill"
|
||||||
|
type="object"
|
||||||
|
attrs="{'invisible':['|', ('state', '!=', 'open'),
|
||||||
|
'|', ('l10n_ch_qrr_sent', '=', False),
|
||||||
|
('l10n_ch_currency_name', 'not in', ['EUR', 'CHF'])]}"
|
||||||
|
groups="base.group_user"
|
||||||
|
/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</flectra>
|
13
l10n_ch_qr_bill/views/res_bank.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<flectra>
|
||||||
|
<record id="view_partner_bank_form" model="ir.ui.view">
|
||||||
|
<field name="name">l10n_ch_qr.res.partner.bank.form</field>
|
||||||
|
<field name="model">res.partner.bank</field>
|
||||||
|
<field name="inherit_id" ref="base.view_partner_bank_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="acc_number" position="after">
|
||||||
|
<field name="l10n_ch_qr_iban"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</flectra>
|
18
l10n_ch_zip/COPYRIGHT
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Most of the files are
|
||||||
|
|
||||||
|
:Copyright: This stylesheet has been placed in the public domain.
|
||||||
|
Copyright 2011-2017 Camptocamp SA
|
||||||
|
Copyright 2011-2019 Camptocamp SA
|
||||||
|
Copyright 2014 Olivier Jossen (brain-tec AG)
|
||||||
|
Copyright 2019 Camptocamp SA
|
||||||
|
Copyright 2018 Flectra Community
|
||||||
|
|
||||||
|
Many files also contain contributions from third
|
||||||
|
parties. In this case the original copyright of
|
||||||
|
the contributions can be traced through the
|
||||||
|
history of the source version control system.
|
||||||
|
|
||||||
|
When that is not the case, the files contain a prominent
|
||||||
|
notice stating the original copyright and applicable
|
||||||
|
license, or come with their own dedicated COPYRIGHT
|
||||||
|
and/or LICENSE file.
|
663
l10n_ch_zip/LICENSE
Normal file
@ -0,0 +1,663 @@
|
|||||||
|
For copyright information, please see the COPYRIGHT file.
|
||||||
|
|
||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU 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
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published
|
||||||
|
by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for the
|
||||||
|
specific requirements.
|
||||||
|
|
||||||
|
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 AGPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
64
l10n_ch_zip/README.rst
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
=====================================
|
||||||
|
Switzerland - Postal codes (ZIP) list
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
This module will load all the Swiss postal codes (ZIP) to ease the input
|
||||||
|
of partners.
|
||||||
|
|
||||||
|
It is not mandatory to use them in Odoo in Switzerland, but can improve
|
||||||
|
the user experience.
|
||||||
|
|
||||||
|
**Table of contents**
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
To install this module, you need to:
|
||||||
|
|
||||||
|
* download and install manually
|
||||||
|
* or directly install it over Odoo-Apps
|
||||||
|
|
||||||
|
The module ``base_location`` is required. It is available in
|
||||||
|
https://github.com/OCA/partner-contact/
|
||||||
|
|
||||||
|
Since Version 8.0.2.0 the module ``l10n_ch_states`` is required.
|
||||||
|
It is also available in https://github.com/OCA/l10n-switzerland
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
To use this module, you need to:
|
||||||
|
|
||||||
|
* Fill the new field in the partner form with a zip or a city from Switzerland
|
||||||
|
* Then you get a list with possible entries.
|
||||||
|
* The one you select is auto-filled in the zip-, city-, state- and country-field.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Authors
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
* Camptocamp
|
||||||
|
* brain-tec AG
|
||||||
|
* copadoMEDIA UG
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Jamotion <info@jamotion.ch>
|
||||||
|
* Nicolas Bessi (Camptocamp)
|
||||||
|
* Olivier Jossen (Brain Tec)
|
||||||
|
* Guewen Baconnier (Camptocamp)
|
||||||
|
* Mathias Neef (copadoMEDIA)
|
||||||
|
* Yannick Vaucher (Camptocamp)
|
4
l10n_ch_zip/__init__.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Copyright 2011-2017 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
from . import models
|
||||||
|
from .hooks import post_init
|
27
l10n_ch_zip/__manifest__.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Copyright 2011-2019 Camptocamp SA
|
||||||
|
# Copyright 2014 Olivier Jossen (brain-tec AG)
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
{
|
||||||
|
'name': 'Switzerland - Postal codes (ZIP) list',
|
||||||
|
'version': '2.0.1.0.0',
|
||||||
|
'author': '''
|
||||||
|
Camptocamp,
|
||||||
|
brain-tec AG,
|
||||||
|
copadoMEDIA UG,
|
||||||
|
Odoo Community Association (OCA)
|
||||||
|
, 2BIT GmbH''',
|
||||||
|
'category': 'Localisation',
|
||||||
|
'website': 'https://gitlab.com/flectra-community/flectra',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'summary': 'Provides all Swiss postal codes for auto-completion',
|
||||||
|
'depends': [
|
||||||
|
'base',
|
||||||
|
'base_location', # in https://github.com/OCA/partner-contact/
|
||||||
|
'l10n_ch_states', # in https://github.com/OCA/l10n-switzerland/
|
||||||
|
],
|
||||||
|
# We use csv file as xml is too slow
|
||||||
|
# unfortunately it doesn't work with noupdate thus we use a post_init hook
|
||||||
|
# 'init': ['data/res.better.zip.csv'],
|
||||||
|
'post_init_hook': 'post_init',
|
||||||
|
'application': True,
|
||||||
|
}
|
5029
l10n_ch_zip/data/res.city.csv
Normal file
5323
l10n_ch_zip/data/res.city.zip.csv
Normal file
20
l10n_ch_zip/hooks.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Copyright 2019 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
|
from flectra.tools import convert_file
|
||||||
|
|
||||||
|
|
||||||
|
def import_csv_data(cr, registry):
|
||||||
|
"""Import CSV data as it is faster than xml and because we can't use
|
||||||
|
noupdate anymore with csv"""
|
||||||
|
filenames = ['data/res.city.csv', 'data/res.city.zip.csv']
|
||||||
|
for filename in filenames:
|
||||||
|
convert_file(
|
||||||
|
cr, 'l10n_ch_zip',
|
||||||
|
filename, None, mode='init', noupdate=True,
|
||||||
|
kind='init', report=None,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def post_init(cr, registry):
|
||||||
|
import_csv_data(cr, registry)
|
25272
l10n_ch_zip/i18n/de.po
Normal file
25259
l10n_ch_zip/i18n/fr.po
Normal file
25257
l10n_ch_zip/i18n/it.po
Normal file
25242
l10n_ch_zip/i18n/l10n_ch_zip.pot
Normal file
1
l10n_ch_zip/models/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from . import city_zip
|
73
l10n_ch_zip/models/city_zip.py
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Copyright 2011-2019 Camptocamp SA
|
||||||
|
# Copyright 2014 Olivier Jossen (brain-tec AG)
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
from flectra import models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class ResCityZip(models.Model):
|
||||||
|
""" Inherit res.city.zip class in order to add swiss specific fields
|
||||||
|
|
||||||
|
Fields from the original file downloaded from here:
|
||||||
|
https://match.post.ch/downloadCenter?product=2 -> File "PLZ Plus 1"
|
||||||
|
|
||||||
|
Documentation:
|
||||||
|
http://www.swisspost.ch/post-startseite/post-adress-services-match/post-direct-marketing-datengrundlage/post-match-zip-factsheet.pdf
|
||||||
|
"""
|
||||||
|
|
||||||
|
_inherit = 'res.city.zip'
|
||||||
|
|
||||||
|
active = fields.Boolean(
|
||||||
|
string='Active',
|
||||||
|
default=True,
|
||||||
|
)
|
||||||
|
onrp = fields.Char(
|
||||||
|
string='Swiss Post classification no. (ONRP)',
|
||||||
|
size=5,
|
||||||
|
help="Primary Key",
|
||||||
|
)
|
||||||
|
zip_type = fields.Char(
|
||||||
|
string='Postcode type',
|
||||||
|
size=2,
|
||||||
|
)
|
||||||
|
additional_digit = fields.Char(
|
||||||
|
string='Additional poscode digits',
|
||||||
|
size=2,
|
||||||
|
)
|
||||||
|
lang = fields.Char(
|
||||||
|
string='Language code',
|
||||||
|
size=1,
|
||||||
|
help="Language (language majority) within a postcode area. "
|
||||||
|
"1 = German, 2 = French, 3 = Italian, 4 = Romansh. "
|
||||||
|
"For multi-lingual localities, the main language is indicated.",
|
||||||
|
)
|
||||||
|
lang2 = fields.Char(
|
||||||
|
'Alternative language code',
|
||||||
|
size=1,
|
||||||
|
help="Additional language within a postcode.\n"
|
||||||
|
"One alternative language code may appear for each postcode.\n"
|
||||||
|
"1 = German, 2 = French, 3 = Italian, 4 = Romansh.",
|
||||||
|
)
|
||||||
|
sort = fields.Boolean(
|
||||||
|
string='Present in sort file',
|
||||||
|
help="Indicates if the postcode is included in the «sort file»"
|
||||||
|
"(MAT[CH]sort): 0 = not included, 1 = included. "
|
||||||
|
"Delivery information with addresses (only postcode and "
|
||||||
|
"streets) are published in the sort file.",
|
||||||
|
)
|
||||||
|
post_delivery_through = fields.Integer(
|
||||||
|
string='Mail delivery by',
|
||||||
|
size=5,
|
||||||
|
help="Indicates the post office (ONRP) that delivers most of the "
|
||||||
|
"letters to the postcode addresses. This information can be "
|
||||||
|
"used for bag addresses too."
|
||||||
|
)
|
||||||
|
communitynumber_bfs = fields.Integer(
|
||||||
|
string='FSO municipality number (BFSNR)',
|
||||||
|
size=5,
|
||||||
|
help="Numbering used by the Federal Statistical Office for "
|
||||||
|
"municipalities in Switzerland and the Principality of "
|
||||||
|
"Liechtenstein",
|
||||||
|
)
|
||||||
|
valid_from = fields.Date(
|
||||||
|
string='Valid from',
|
||||||
|
)
|