Merge new root

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier
2022-12-16 18:11:07 +01:00
5881 changed files with 982716 additions and 0 deletions
+4644
View File
File diff suppressed because it is too large Load Diff
+68
View File
@@ -0,0 +1,68 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
DATABASE: sqlite
- IMAGE: python:3.7
TOXENV: py37
DATABASE: postgresql
- IMAGE: python:3.8
TOXENV: py38
DATABASE: sqlite
- IMAGE: python:3.8
TOXENV: py38
DATABASE: postgresql
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
+2
View File
@@ -0,0 +1,2 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+15
View File
@@ -0,0 +1,15 @@
Version 6.0.0 - 2021-05-03
* Bug fixes (see mercurial logs for details)
Version 5.8.0 - 2020-11-02
* Bug fixes (see mercurial logs for details)
* Remove support for Python 3.5
Version 5.6.0 - 2020-05-04
* Bug fixes (see mercurial logs for details)
Version 5.4.0 - 2019-11-04
* Bug fixes (see mercurial logs for details)
Version 5.2.0 - 2019-05-06
* Initial release
+15
View File
@@ -0,0 +1,15 @@
Copyright (C) 2018-2021 B2CK
Copyright (C) 2018-2021 Cédric Krier
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+6
View File
@@ -0,0 +1,6 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include doc/*
include icons/LICENSE
+1
View File
@@ -0,0 +1 @@
doc/index.rst
+15
View File
@@ -0,0 +1,15 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool
__all__ = ['register']
def register():
Pool.register(
module='marketing', type_='model')
Pool.register(
module='marketing', type_='wizard')
Pool.register(
module='marketing', type_='report')
+4
View File
@@ -0,0 +1,4 @@
Marketing Module
################
The marketing module defines the fundamentals for marketing modules.
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 241 B

+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr "Màrqueting"
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr "Màrqueting"
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr "Marketing"
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr "Marketing"
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr "Márketing"
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr "Márketing"
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr "Turundus"
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr "Turundus"
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr "Marketing"
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr "Marketing"
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr "Marketing"
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr "Marketing"
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr "Marketing"
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr "Marketing"
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr "Marketing"
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr "Marketing"
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr "Publicitate"
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr "Publicitate"
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+11
View File
@@ -0,0 +1,11 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.ui.menu,name:menu_marketing"
msgid "Marketing"
msgstr ""
msgctxt "model:res.group,name:group_marketing"
msgid "Marketing"
msgstr ""
+29
View File
@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="res.group" id="group_marketing">
<field name="name">Marketing</field>
</record>
<record model="res.user-res.group" id="user_admin_group_marketing">
<field name="user" ref="res.user_admin"/>
<field name="group" ref="group_marketing"/>
</record>
<record model="ir.ui.icon" id="marketing_icon">
<field name="name">tryton-marketing</field>
<field name="path">icons/tryton-marketing.svg</field>
</record>
<menuitem
name="Marketing"
id="menu_marketing"
sequence="100"
icon="tryton-marketing"/>
<record model="ir.ui.menu-res.group" id="menu_marketing_group_marketing">
<field name="menu" ref="menu_marketing"/>
<field name="group" ref="group_marketing"/>
</record>
</data>
</tryton>
+149
View File
@@ -0,0 +1,149 @@
#!/usr/bin/env python3
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import io
import os
import re
from configparser import ConfigParser
from setuptools import setup, find_packages
def read(fname):
return io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
def get_require_version(name):
if minor_version % 2:
require = '%s >= %s.%s.dev0, < %s.%s'
else:
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_marketing'
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
if minor_version % 2:
version = '%s.%s.dev0' % (major_version, minor_version)
download_url = (
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
if os.environ.get('CI_JOB_ID'):
local_version.append(os.environ['CI_JOB_ID'])
else:
for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']:
if os.environ.get(build):
local_version.append(os.environ[build])
else:
local_version = []
break
if local_version:
version += '+' + '.'.join(local_version)
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = []
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
description='Tryton module to group marketing features',
long_description=read('README.rst'),
author='Tryton',
author_email='bugs@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": 'https://docs.tryton.org/',
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://hg.tryton.org/modules/marketing',
},
keywords='tryton marketing',
package_dir={'trytond.modules.marketing': '.'},
packages=(
['trytond.modules.marketing']
+ ['trytond.modules.marketing.%s' % p for p in find_packages()]
),
package_data={
'trytond.modules.marketing': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
'icons/*.svg', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
],
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
marketing = trytond.modules.marketing
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
tests_require=tests_require,
)
+9
View File
@@ -0,0 +1,9 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
try:
from trytond.modules.marketing.tests.test_marketing import suite
except ImportError:
from .test_marketing import suite
__all__ = ['suite']
+20
View File
@@ -0,0 +1,20 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import unittest
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import suite as test_suite
class MarketingTestCase(ModuleTestCase):
'Test Marketing module'
module = 'marketing'
def suite():
suite = test_suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
MarketingTestCase))
return suite
+15
View File
@@ -0,0 +1,15 @@
[tox]
envlist = {py36,py37,py38,py39}-{sqlite,postgresql},pypy3-{sqlite,postgresql}
[testenv]
commands = {envpython} setup.py test
deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
sqlite: DB_NAME={env:SQLITE_NAME::memory:}
postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
+7
View File
@@ -0,0 +1,7 @@
[tryton]
version=6.0.1
depends:
ir
res
xml:
marketing.xml
+68
View File
@@ -0,0 +1,68 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
DATABASE: sqlite
- IMAGE: python:3.7
TOXENV: py37
DATABASE: postgresql
- IMAGE: python:3.8
TOXENV: py38
DATABASE: sqlite
- IMAGE: python:3.8
TOXENV: py38
DATABASE: postgresql
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
+2
View File
@@ -0,0 +1,2 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+42
View File
@@ -0,0 +1,42 @@
Version 6.0.3 - 2022-06-15
* Bug fixes (see mercurial logs for details)
Version 6.0.2 - 2021-11-04
* Bug fixes (see mercurial logs for details)
Version 6.0.1 - 2021-09-01
* Bug fixes (see mercurial logs for details)
Version 6.0.0 - 2021-05-03
* Bug fixes (see mercurial logs for details)
* Allow different FROM per language
Version 5.8.0 - 2020-11-02
* Bug fixes (see mercurial logs for details)
* Remove support for Python 3.5
* Add resource relate on notification log
* Add optional subject to notifications
Version 5.6.0 - 2020-05-04
* Bug fixes (see mercurial logs for details)
* Add commission agent as a recipient
Version 5.4.0 - 2019-11-04
* Bug fixes (see mercurial logs for details)
* Use party language for employees notifications
Version 5.2.0 - 2019-05-06
* Bug fixes (see mercurial logs for details)
* Add employee as recipients
Version 5.0.0 - 2018-10-01
* Bug fixes (see mercurial logs for details)
* Remove support for Python 2.7
Version 4.8.0 - 2018-04-23
* Bug fixes (see mercurial logs for details)
* Add fallback users for recipients
* Add contact mechanism usage
Version 4.6.0 - 2017-10-30
* Initial release
+16
View File
@@ -0,0 +1,16 @@
Copyright (C) 2016-2022 Sergi Almacellas Abellana
Copyright (C) 2017-2022 Cédric Krier
Copyright (C) 2017-2022 B2CK
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+5
View File
@@ -0,0 +1,5 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include doc/*
+1
View File
@@ -0,0 +1 @@
doc/index.rst
+14
View File
@@ -0,0 +1,14 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool
from . import notification
from . import ir
def register():
Pool.register(
ir.Trigger,
notification.Email,
notification.EmailAttachment,
notification.EmailLog,
module='notification_email', type_='model')
+16
View File
@@ -0,0 +1,16 @@
Notification Email Module
#########################
The notification email module allows to define email templates which will be
sent to a list of recipients when a trigger is fired on a record event.
Extra reports from the same record can be attached to the email.
Configuration
*************
The notification_email module uses parameters from the section:
- `[notification_email]`:
- `from`: The default `From` for the email.
+8
View File
@@ -0,0 +1,8 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model.exceptions import ValidationError
class TemplateError(ValidationError):
pass
+46
View File
@@ -0,0 +1,46 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import fields
from trytond.pool import Pool, PoolMeta
from trytond.pyson import Eval
class Trigger(metaclass=PoolMeta):
__name__ = 'ir.trigger'
notification_email = fields.Many2One(
'notification.email', "Email Notification", readonly=True,
states={
'required': Eval('notification_email_required', False),
'invisible': ~Eval('notification_email_required', False),
},
depends=['notification_email_required'])
notification_email_required = fields.Function(
fields.Boolean("Notification Email Required"),
'on_change_with_notification_email_required')
@classmethod
def __setup__(cls):
super().__setup__()
cls.action.selection.append(
('notification.email|trigger', "Email Notification"),
)
@fields.depends('action')
def on_change_with_notification_email_required(self, name=None):
return self.action == 'notification.email|trigger'
@fields.depends('notification_email', '_parent_notification_email.model')
def on_change_notification_email(self):
pool = Pool()
Model = pool.get('ir.model')
if self.notification_email:
try:
trigger_model, = Model.search([
('model', '=', self.notification_email.model),
])
except ValueError:
pass
else:
self.model = trigger_model
self.action = 'notification.email|trigger'
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="trigger_view_form">
<field name="model">ir.trigger</field>
<field name="inherit" ref="ir.trigger_view_form"/>
<field name="name">trigger_form</field>
</record>
</data>
</tryton>
+201
View File
@@ -0,0 +1,201 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notification Emails"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr ""
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr ""
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notification Emails"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notification Emails"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Notification Emails"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+208
View File
@@ -0,0 +1,208 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "Notificació per correu electrònic"
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notificacions per correu electrònic obligatòria"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "Adjunts"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "Mitjà de contacte"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Contingut"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr "Usuari enviament fallada destinataris"
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr "Usuari enviament fallada destinataris ocults"
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr "Usuari enviament fallada destinataris secundaris"
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "De"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "Model"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "Destinataris"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Destinataris ocults"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Destinataris secundaris"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr "Asumpte"
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr "Disparadors"
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "Model"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "Notificació"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "Informe"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Data"
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notificació"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "Destinataris"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Destinataris ocults"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Destinataris secundaris"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr "Recurs"
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr "Disparador"
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "El informes que s'utilitzaran com a adjunts."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
"Defineix quin correu electrònic dels mitjans de contacte del tercer "
"s'utilitzarà"
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr "El informes utilitzat com a plantilla del correu electrònic."
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
"El usuari que es notificarà quan no es trobi un correu electrònic pels "
"destinataris"
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
"El usuari que es notificarà quan no es trobi un correu electrònic pels "
"destinataris ocults"
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
"El usuari que es notificarà quan no es trobi un correu electrònic pels "
"destinataris secundaris"
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
"Deixeu en blanc per a utilitzar el valor definit al fitxer de configuració."
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "El camp que conté el recipient(s)."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "El camp que conté el recipient(s) ocults."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "El camp que conté el recipient(s) secundaris."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
"Es pot utilitzar la sintàxis Gensih amb 'record' al context d'evaluació.\n"
"En blanc s'utiltizarà el nom de l'informe."
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr "Afegir un disparador per la notificació."
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notificacions per correu electrònic"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Registres"
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notificacions per correu electrònic"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
"El asumpte del correu electrónic de la notificació \"%(notification)s\" és "
"invàlid amb l'excepció: \"%(exception)s\"."
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notificacions per correu electrònic"
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notificació per correu electrònic"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "Adjunts notificacions per correu electrònic"
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Registre notificacions per correu electrònic"
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notificació per correu electrònic"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "Hora"
+201
View File
@@ -0,0 +1,201 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notification Emails"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr ""
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr ""
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notification Emails"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notification Emails"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Notification Emails"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+207
View File
@@ -0,0 +1,207 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "E-Mail-Benachrichtigung"
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "E-Mail Benachrichtigung Erforderlich"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "Anhänge"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "Kontaktinformation"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Inhalt"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr "Empfänger im Ausweichfall"
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr "Versteckte Emfänger im Ausweichfall"
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr "Sekundäre Empfänger im Ausweichfall"
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "Von"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "Modell"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "Empfänger"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Versteckte Empfänger"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Sekundäre Empfänger"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr "Betreff"
# https://de.wikipedia.org/wiki/Datenbanktrigger
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr "Trigger"
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "Modell"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "Benachrichtigung"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "Bericht"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Datum"
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Benachrichtigung"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "Empfänger"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Versteckte Empfänger"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Sekundäre Empfänger"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr "Ressource"
# https://de.wikipedia.org/wiki/Datenbanktrigger
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr "Trigger"
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "Der als Anhang genutzte Bericht."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr "Auswahl der E-Mail-Adresse aus den Kontaktinformationen der Partei"
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr "Der als E-Mail-Vorlage genutzte Bericht."
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
"Zu benachrichtigender Benutzer wenn keine E-Mail-Adresse vorhanden ist"
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
"Zu benachrichtigender Benutzer wenn keine versteckte E-Mail-Adresse "
"vorhanden ist"
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
"Zu benachrichtigender Benutzer wenn keine sekundäre E-Mail-Adresse vorhanden"
" ist"
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr "Leer lassen, um den Wert aus der Konfigurationsdatei zu verwenden."
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "Das Feld das den/die Empfänger enthält."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "Das Feld das den/die versteckten Empfänger enthält."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "Das Feld das den/die sekundären Empfänger enthält."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
"Die Genshi Syntax kann mit 'record' im Evaluierungskontext verwendet werden.\n"
"Sofern nicht angegeben wird die Bezeichnung des Datensatzes verwendet."
# https://de.wikipedia.org/wiki/Datenbanktrigger
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr "Einen Trigger für die Benachrichtigung hinzufügen."
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "E-Mail Benachrichtigungen"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "E-Mail Benachrichtigungen"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
"Ungültiger E-Mail-Betreff in Benachrichtigung \"%(notification)s\" mit "
"Fehler \"%(exception)s\"."
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "E-Mail Benachrichtigungen"
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "E-Mail-Benachrichtigung"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "Anhang für die E-Mail-Benachrichtigung"
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Log der E-Mail-Benachrichtigung"
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "E-Mail-Benachrichtigung"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "Zeit"
+209
View File
@@ -0,0 +1,209 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "Notificación por correo electrónico"
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notificaciones por correo electrónico obligatoria"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "Adjuntos"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "Medio de contacto"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Contenido"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr "Usuario envío fallo destinatarios"
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr "Usuario envío fallo destinatarios ocultos"
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr "Usuario envío fallo destinatarios secundarios"
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "De"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "Modelo"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "Destinatarios"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Destinatarios ocultos"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Destinatarios secundarios"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr "Asunto"
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr "Disparadores"
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "Modelo"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "Notificación"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "Informe"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Fecha"
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notificación"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "Destinatarios"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Destinatarios ocultos"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Destinatarios secundarios"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr "Recurso"
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr "Disparador"
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "Los informes que se van a utilizar como adjuntos."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
"Define que correo electrónico de los medios de contacto del tercero se "
"utilizará"
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr "El informe a utilizar como plantilla de correo electrónico."
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
"El usuario que se notificará cuando no se encuentre un correo para los "
"destinatarios"
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
"El usuario que se notificará cuando no se encuentre un correo para los "
"destinatarios ocultos"
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
"El usuario que se notificará cuando no se encuentre un correo para los "
"destinatarios secundarios"
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
"Dejar en blanco para utilizar el valor definido en el fichero de "
"configuración."
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "El campo que contiene los recipientes(s)."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "El campo que contiene los recipiente(s) ocultos."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "El campo que contiene los recipientes(s) secundarios."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
"La sintaxis Genshi puede ser utilizada con 'record' en el contexto de evaluación.\n"
"En blanco usará el nombre del informe."
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr "Añade un disparador para la notificación."
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notificaciones por correo electrónico"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Registros"
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notificaciones por correo electrónico"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
"Asunto de correo electrónico inválido en la notificación "
"\"%(notification)s\" con la excepción \"%(exception)s\"."
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notificaciones por correo electrónico"
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notificación por correo electrónico"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "Adjuntos de notificaciones por correo electrónico"
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Registro de notificaciones por correo electrónico"
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notificación por correo electrónico"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "Hora"
+195
View File
@@ -0,0 +1,195 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr ""
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr ""
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr ""
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr ""
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr ""
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr ""
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr ""
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr ""
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr ""
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr ""
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+201
View File
@@ -0,0 +1,201 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "E-kirja teatis"
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "E-kirja teavitused"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "Manudes"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "Kontakteerumise viis"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Sisu"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "Saatja"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "Mudel"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "Saajad"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Peidetud saajad"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Teised saajad"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "Mudel"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "Teavitus"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "Aruanne"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Kuupäev"
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Teavitus"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "Saajad"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Peidetud saajad"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Teised saajad"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "Aruanded, mida kasutatakse manusena."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "Väli, mis sisaldab saajat."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "Väli, mis sisaldab peidetud saajat."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "Väli, mis sisaldab teist saajat."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "E-kirja teavitused"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logid"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "E-kirja teavitused"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "E-kirja teavitused"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "E-kirja teatis"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "E-kirja teavituse manus"
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Teavituskirja logi"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "E-kirja teatis"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "Aeg"
+203
View File
@@ -0,0 +1,203 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "ایمیل اطلاعیه"
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "ایمیل‌های اطلاعیه"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "پیوست ها"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "مکانیسم های تماس"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "محتوا"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr "کاربردریافت کننده پاسخگو"
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr "کاربردریافت کننده پاسخگو پنهان"
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr "کاربردریافت کننده پاسخگو ثانویه"
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "از"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "مدل"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "گیرندگان"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "گیرنده گان پنهان"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "گیرندگان ثانویه"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr "ماشه ها"
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "مدل"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "اطلاعیه"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "گزارش"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "تاریخ"
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "اطلاعیه"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "گیرندگان"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "گیرنده گان پنهان"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "گیرندگان ثانویه"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr "ماشه"
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "استفاده از گزارش ها بعنوان پیوست ها."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
"تعیین کنید کدام ایمیل برای استفاده از مکانیزم های تماس نهاد/سازمان استفاده "
"شود"
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr "استفاده از گزارش بعنوان الگوی ایمیل."
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr "ابلاغ به کاربر هنگامی که هیچ گیرنده ایمیلی یافت نشد"
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr "ابلاغ به کاربر هنگامی که هیچ گیرنده پنهان ایمیلی یافت نشد"
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr "ابلاغ به کاربر هنگامی که هیچ گیرنده ثانویه ایمیلی یافت نشد"
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr "برای مقدار تعریف شده در فایل پیکربندی خالی بگذارید."
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "فیلد حاوی گیرنده (ها)."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "فیلد حاوی گیرنده (ها) پنهان."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "فیلد حاوی گیرنده (ها) ثانویه."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr "یک ماشه برای اعلان اضافه کنید."
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "ایمیل‌های اطلاعیه"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "گزارش ها"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "ایمیل‌های اطلاعیه"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "ایمیل‌های اطلاعیه"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "ایمیل اطلاعیه"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "پیوست ایمیل اطلاعیه"
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "گزارش ایمیل اطلاعیه"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "ایمیل اطلاعیه"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "زمان"
+201
View File
@@ -0,0 +1,201 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notification Emails"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr ""
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr ""
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notification Emails"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notification Emails"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Notification Emails"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+202
View File
@@ -0,0 +1,202 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "Notification par e-mail"
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "E-mail de notification requis"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "Attachements"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "Moyen de contact"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Contenu"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr "Destinataire de secours"
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr "Destinataire caché de secours"
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr "Destinataire secondaire de secours"
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "De"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "Modèle"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "Destinataires"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Destinataires cachés"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Destinataires secondaires"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr "Objet"
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr "Déclencheurs"
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "Modèle"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "Notification"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "Rapport"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Date"
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notification"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "Destinataires"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Destinataires cachés"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Destinataires secondaires"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr "Ressource"
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr "Déclencheur"
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "Les rapports utilisés comme attachements."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr "Définit quel e-mail utiliser des mécanismes de contact du tiers"
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr "Le rapport utilisé comme modèle d'e-mail."
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr "Utilisateur notifié quand l'e-mail du destinataire n'est pas trouvé"
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
"Utilisateur notifié quand l'e-mail du destinataire caché ne peut être trouvé"
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
"Utilisateur notifié quand l'e-mail du destinataire secondaire ne peut être "
"trouvé"
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr "Laisser vide pour la valeur définie dans le fichier de configuration."
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "Le champ qui contient le(s) destinataire(s)."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "Le champ qui contient le(s) destinataire(s) caché(s)."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "Le champ qui contient le(s) destinataire(s) secondaire(s)."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
"La syntaxe Genshi peut être utilisée avec « record » dans le contexte d'évaluation.\n"
"S'il est vide, le nom du rapport sera utilisé."
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr "Ajouter un déclencheur pour la notification."
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "E-mails de notification"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Journaux"
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "E-mails de notification"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
"Objet de l'e-mail non valide dans la notification « %(notification)s » avec "
"l'exception « %(exception)s »."
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "E-mails de notification"
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notification par e-mail"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "Attachement d'e-mail de notification"
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Journal d'e-mail de notification"
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notification par e-mail"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "Heure"
+201
View File
@@ -0,0 +1,201 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notification Emails"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr ""
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr ""
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notification Emails"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notification Emails"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Notification Emails"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+199
View File
@@ -0,0 +1,199 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "Pemberitahuan Email"
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr ""
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "Lampiran"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Kandungan"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "Model"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "Penerima"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "Model"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "Laporan"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Tanggal"
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Pemberitahuan Email"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr ""
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr ""
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Pemberitahuan Email"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr ""
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Pemberitahuan Email"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr ""
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Pemberitahuan Email"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "Waktu"
+204
View File
@@ -0,0 +1,204 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "Notifica email"
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Email di notifica obbligatoria"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "Allegati"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "Meccanismi di contatto"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Contenuto"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr "Utenti destinatari di ripiego"
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr "Utenti destinatari di ripiego nascosti"
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr "Utenti destinatari secondari di ripiego"
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "Da"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "Modello"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "Destinatari"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Destinatari nascosti"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Destinatari secondari"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr "Oggetto"
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr "Trigger"
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "Modello"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "Notifica"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "Segnala"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Data"
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notifica"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "Destinatari"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Destinatari nascosti"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Destinatari secondari"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr "Risorsa"
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr "Trigger"
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "I report utilizzati da usare come allegati."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
"Definire quale e-mail utilizzare fra i meccanismi di contatto della "
"controparte"
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr "Il report utilizzato come template della E-mail."
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
"Utente notificato quando nessun destinatario nella E-mail viene trovato"
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
"Utente notificato quando nessun destinatario nascosto nella E-mail viene "
"trovato"
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
"Utente notificato quando nessun destinatario secondario nella E-mail viene "
"trovato"
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr "Lasciare vuoto per il valore definito nel file di configurazione."
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "Il campo che contiene il destinatario o i destinatari."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "Il campo che contiene i destinatari nascosti."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "Campo che contiene i destinatari secondari."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr "Aggiungi un trigger per la notifica."
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Email di notifica"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "E-mail di notifica"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Email di notifica"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notifica email"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "Allegato E-mail di notifica"
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Log E-mail di notifica"
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notifica email"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "Orario"
+201
View File
@@ -0,0 +1,201 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notification Emails"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr ""
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr ""
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notification Emails"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notification Emails"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Notification Emails"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+201
View File
@@ -0,0 +1,201 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notification Emails"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr ""
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr ""
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notification Emails"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notification Emails"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Notification Emails"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+203
View File
@@ -0,0 +1,203 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "E-mail notificatie"
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "E-mailmelding vereist"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "Bijlagen"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "Contactmogelijkheid"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Inhoud"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr "Ontvanger in geval van nood"
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr "Verborgen ontvangers in geval van nood"
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr "Secundaire ontvanger in geval van nood"
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "Van"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "Model"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "ontvangers"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Verborgen ontvangers"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Secundaire ontvangers"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr "Onderwerp"
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr "triggers"
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "Model"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "Kennisgeving"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "Verslag"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Datum"
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Kennisgeving"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "ontvangers"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Verborgen ontvangers"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Secundaire ontvangers"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr "hulpbron (resource)"
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr "Trigger"
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "De rapporten die als bijlagen worden gebruikt."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
"Bepaal welke e-mail u wilt gebruiken van de contactmechanismen van de "
"relatie"
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr "Het rapport gebruikt als e-mailsjabloon."
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr "Te verwittigen gebruiker als er geen e-mail adres is"
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr "Gebruiker op de hoogte stellen als er geen verborgen e-mailadres is"
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
"Gebruiker wordt op de hoogte gesteld als er geen secundair e-mailadres is"
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
"Laat leeg voor de waarde die is gedefinieerd in het configuratiebestand."
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "Het veld dat de ontvanger (s) bevat."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "Het veld dat de verborgen ontvanger (s) bevat."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "Het veld dat de secundaire ontvanger (s) bevat."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
"De Genshi-syntaxis kan worden gebruikt met 'record' in de evaluatiecontext.\n"
"Indien leeg wordt de rapportnaam gebruikt."
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr "Voeg een trigger toe voor de melding."
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "E-mailmeldingen"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "E-mailmeldingen"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
"Ongeldig e-mailonderwerp in melding \"%(notification)s\" met uitzondering "
"\"%(exception)s\"."
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "E-mailmeldingen"
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "E-mail notificatie"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "Bijlage bij e-mailmelding"
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Kennisgeving e-maillogboek"
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "E-mail notificatie"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "Tijd"
+204
View File
@@ -0,0 +1,204 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "Powiadomienie e-mailowe"
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "E-maile z powiadomieniami"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "Załączniki"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "Sposób kontaktu"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Treść"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr "Zastępczy użytkownik odbiorców"
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr "Ukryty zastępczy użytkownik odbiorców"
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr "Dodatkowy zastępczy użytkownik odbiorców"
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "Od"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "Model"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "Odbiorcy"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Ukryci odbiorcy"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Dodatkowi odbiorcy"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr "Temat"
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr "Wyzwalacze"
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "Model"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "Powiadomienie"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "Raport"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Data"
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Powiadomienie"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "Odbiorcy"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Ukryci odbiorcy"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Dodatkowi odbiorcy"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr "Zasób"
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr "Wyzwalacz"
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "Raporty użyte jako załączniki."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr "Określ, którego e-maila ze sposobów kontaktu użyć dla strony"
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr "Raport użyty jako szablon wiadomości."
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
"Użytkownik zostanie powiadomiony, jeśli adres e-mail nie jest dostępny"
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
"Użytkownik zostanie powiadomiony, jeśli żaden ukryty adres e-mail nie jest "
"dostępny"
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
"Użytkownik zostanie powiadomiony, jeśli żaden dodatkowy adres e-mail nie "
"jest dostępny"
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr "Pozostaw puste dla wartości zdefiniowanej w pliku konfiguracyjnym."
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "Pole zawierające odbiorcę(ów)."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "Pole zawierające ukrytego odbiorcę(ów)."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "Pole zawierające dodatkowego odbiorcę(ów)."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
"Składnia Genshi może być używana z „rekordem” w kontekście oceny.\n"
"Jeśli jest pusta, zostanie użyta nazwa raportu."
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr "Dodaj wyzwalacz powiadomienia."
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "E-maile z powiadomieniami"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Dzienniki zdarzeń"
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "E-maile z powiadomieniami"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
"Nieprawidłowy temat wiadomości e-mail w powiadomieniu „% (notification) s” "
"generujący wyjątek „% (exception) s”."
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "E-maile z powiadomieniami"
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "E-mail z powiadomieniami"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "Załącznik z powiadomieniem e-mailowym"
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Log o powiadomieniu e-mailowym"
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Powiadomienie e-mailowe"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "Czas"
+206
View File
@@ -0,0 +1,206 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "Email de Notificação"
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Emails de Notificação"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "Anexos"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "Formas de Contato"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Conteúdo"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr "Usuário Substituto de Destinatários"
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr "Usuário Substituto de Destinatários Ocultos"
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr "Segundo Usuário Substituto de Destinatários Ocultos"
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "De"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "Modelo"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "Destinatários"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Destinatários Ocultos"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Destinatários Secundários"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr "Gatilhos"
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "Modelo"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "Notificação"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "Relatório"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Data"
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notificação"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "Destinatários"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "Destinatários Ocultos"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "Destinatários Secundários"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr "Gatilho"
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "Os relatórios usados como anexos."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr "Escolha qual email da pessoa será usado"
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr "O relatório utilizado como modelo para o email."
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
"Usuário a ser notificado quando o email de nenhum destinatário for "
"encontrado"
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
"Usuário a ser notificado quando nenhum destinatário oculto for encontrado"
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
"Usuário a ser notificado quando nenhum destinatário secundário for "
"encontrado"
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr "Deixe vazio para usar o valor definido no arquivo de configuração."
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "O campo que contém o(s) destinatário(s)."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "O campo que contém o(s) destinatário(s) oculto(s)."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "O campo que contém o(s) destinatário(s) secundário(s)."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr "Adicionar um gatilho para a notificação."
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Emails de Notificação"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Emails de Notificação"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Emails de Notificação"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Email de Notificação"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "Anexo do Email de Notificação"
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Log do Email de Notificação"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Email de Notificação"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "Hora"
+195
View File
@@ -0,0 +1,195 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr ""
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "Conţinut"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "Data"
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr ""
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr ""
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr ""
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr ""
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr ""
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr ""
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr ""
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+201
View File
@@ -0,0 +1,201 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notification Emails"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr ""
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr ""
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notification Emails"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notification Emails"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Notification Emails"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+201
View File
@@ -0,0 +1,201 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notification Emails"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr ""
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr ""
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notification Emails"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notification Emails"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Notification Emails"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+201
View File
@@ -0,0 +1,201 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr ""
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "Notification Emails"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr ""
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr ""
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr ""
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr ""
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr ""
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr ""
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr ""
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr ""
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr ""
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr ""
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr ""
#, fuzzy
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "Notification Emails"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr ""
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr ""
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr ""
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr ""
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr ""
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr ""
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr ""
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr ""
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr ""
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr ""
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr ""
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr ""
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "Logs"
#, fuzzy
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "Notification Emails"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "Notification Emails"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr ""
#, fuzzy
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "Notification Emails"
#, fuzzy
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "Notification Emails"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr ""
+199
View File
@@ -0,0 +1,199 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:ir.trigger,notification_email:"
msgid "Email Notification"
msgstr "电子邮件通知"
#, fuzzy
msgctxt "field:ir.trigger,notification_email_required:"
msgid "Notification Email Required"
msgstr "电子邮件通知"
msgctxt "field:notification.email,attachments:"
msgid "Attachments"
msgstr "附件"
msgctxt "field:notification.email,contact_mechanism:"
msgid "Contact Mechanism"
msgstr "联系方式"
msgctxt "field:notification.email,content:"
msgid "Content"
msgstr "内容"
msgctxt "field:notification.email,fallback_recipients:"
msgid "Recipients Fallback User"
msgstr "收件人回退用户"
msgctxt "field:notification.email,fallback_recipients_hidden:"
msgid "Hidden Recipients Fallback User"
msgstr "隐藏的收件人回退用户"
msgctxt "field:notification.email,fallback_recipients_secondary:"
msgid "Secondary Recipients Fallback User"
msgstr "第二收件人回退用户"
msgctxt "field:notification.email,from_:"
msgid "From"
msgstr "发件人"
msgctxt "field:notification.email,model:"
msgid "Model"
msgstr "模型"
msgctxt "field:notification.email,recipients:"
msgid "Recipients"
msgstr "收件人"
msgctxt "field:notification.email,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "隐藏的收件人"
msgctxt "field:notification.email,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "第二收件人"
msgctxt "field:notification.email,subject:"
msgid "Subject"
msgstr "主题"
msgctxt "field:notification.email,triggers:"
msgid "Triggers"
msgstr "触发器"
msgctxt "field:notification.email.attachment,model:"
msgid "Model"
msgstr "模型"
msgctxt "field:notification.email.attachment,notification:"
msgid "Notification"
msgstr "通知"
msgctxt "field:notification.email.attachment,report:"
msgid "Report"
msgstr "报告"
msgctxt "field:notification.email.log,date:"
msgid "Date"
msgstr "日期"
msgctxt "field:notification.email.log,notification:"
msgid "Notification"
msgstr "通知"
msgctxt "field:notification.email.log,recipients:"
msgid "Recipients"
msgstr "收件人"
msgctxt "field:notification.email.log,recipients_hidden:"
msgid "Hidden Recipients"
msgstr "隐藏的收件人"
msgctxt "field:notification.email.log,recipients_secondary:"
msgid "Secondary Recipients"
msgstr "第二收件人"
msgctxt "field:notification.email.log,resource:"
msgid "Resource"
msgstr "资源"
msgctxt "field:notification.email.log,trigger:"
msgid "Trigger"
msgstr "触发器"
msgctxt "help:notification.email,attachments:"
msgid "The reports used as attachments."
msgstr "作为附件的报告."
msgctxt "help:notification.email,contact_mechanism:"
msgid "Define which email to use from the party's contact mechanisms"
msgstr "定义从参与者联系方式中使用哪个电子邮件"
msgctxt "help:notification.email,content:"
msgid "The report used as email template."
msgstr "作为电子邮件模板的报告."
msgctxt "help:notification.email,fallback_recipients:"
msgid "User notified when no recipients e-mail is found"
msgstr "当找不到收件人电子邮件时通知用户"
msgctxt "help:notification.email,fallback_recipients_hidden:"
msgid "User notified when no hidden recipients e-mail is found"
msgstr "当找不到隐藏的收件人电子邮件时通知用户"
msgctxt "help:notification.email,fallback_recipients_secondary:"
msgid "User notified when no secondary recipients e-mail is found"
msgstr "当找不到第二收件人电子邮件时通知用户"
msgctxt "help:notification.email,from_:"
msgid "Leave empty for the value defined in the configuration file."
msgstr "配置文件中取值留空。"
msgctxt "help:notification.email,recipients:"
msgid "The field that contains the recipient(s)."
msgstr "包含收件人的字段."
msgctxt "help:notification.email,recipients_hidden:"
msgid "The field that contains the hidden recipient(s)."
msgstr "包含隐藏收件人的字段."
msgctxt "help:notification.email,recipients_secondary:"
msgid "The field that contains the secondary recipient(s)."
msgstr "包含次要收件人的字段."
msgctxt "help:notification.email,subject:"
msgid ""
"The Genshi syntax can be used with 'record' in the evaluation context.\n"
"If empty the report name will be used."
msgstr ""
"Genshi 语法可以与 'record' 一起使用.\n"
"如果为空,则使用报告名称。"
msgctxt "help:notification.email,triggers:"
msgid "Add a trigger for the notification."
msgstr "为通知添加触发器。"
msgctxt "model:ir.action,name:act_email_form"
msgid "Notification Emails"
msgstr "电子邮件通知"
msgctxt "model:ir.action,name:act_notification_email_log"
msgid "Logs"
msgstr "日志"
msgctxt "model:ir.action,name:act_notification_email_log_relate"
msgid "Notification E-Mails"
msgstr "电子邮件通知"
msgctxt "model:ir.message,text:msg_notification_invalid_subject"
msgid ""
"Invalid e-mail subject in notification \"%(notification)s\" with exception "
"\"%(exception)s\"."
msgstr "通知 \"%(notification)s\" 中电子邮件主题无效,异常为: \"%(exception)s\"."
msgctxt "model:ir.ui.menu,name:menu_email_form"
msgid "Notification Emails"
msgstr "电子邮件通知"
#, fuzzy
msgctxt "model:notification.email,name:"
msgid "Email Notification"
msgstr "电子邮件通知"
msgctxt "model:notification.email.attachment,name:"
msgid "Email Notification Attachment"
msgstr "电子邮件通知附件"
msgctxt "model:notification.email.log,name:"
msgid "Notification Email Log"
msgstr "电子邮件通知日志"
msgctxt "selection:ir.trigger,action:"
msgid "Email Notification"
msgstr "电子邮件通知"
msgctxt "view:notification.email.log:"
msgid "Time"
msgstr "时间"
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data grouped="1">
<record model="ir.message" id="msg_notification_invalid_subject">
<field name="text">Invalid e-mail subject in notification "%(notification)s" with exception "%(exception)s".</field>
</record>
</data>
</tryton>
+405
View File
@@ -0,0 +1,405 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import mimetypes
from email.encoders import encode_base64
from email.header import Header
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.nonmultipart import MIMENonMultipart
from email.utils import formataddr, getaddresses, parseaddr
from sql import Null
from sql.operators import Concat
from genshi.template import TextTemplate
from trytond.config import config
from trytond.i18n import gettext
from trytond.model import ModelView, ModelSQL, fields
from trytond.pool import Pool
from trytond.pyson import Eval
from trytond.report import get_email
from trytond.sendmail import sendmail_transactional, SMTPDataManager
from trytond.transaction import Transaction
from .exceptions import TemplateError
from trytond.ir.resource import ResourceAccessMixin
class Email(ModelSQL, ModelView):
"Email Notification"
__name__ = 'notification.email'
from_ = fields.Char(
"From", translate=True,
help="Leave empty for the value defined in the configuration file.")
subject = fields.Char(
"Subject", translate=True,
help="The Genshi syntax can be used "
"with 'record' in the evaluation context.\n"
"If empty the report name will be used.")
recipients = fields.Many2One(
'ir.model.field', "Recipients",
domain=[
('model.model', '=', Eval('model')),
],
depends=['model'],
help="The field that contains the recipient(s).")
fallback_recipients = fields.Many2One(
'res.user', "Recipients Fallback User",
domain=[
('email', '!=', None),
],
states={
'invisible': ~Eval('recipients'),
},
depends=['recipients'],
help="User notified when no recipients e-mail is found")
recipients_secondary = fields.Many2One(
'ir.model.field', "Secondary Recipients",
domain=[
('model.model', '=', Eval('model')),
],
depends=['model'],
help="The field that contains the secondary recipient(s).")
fallback_recipients_secondary = fields.Many2One(
'res.user', "Secondary Recipients Fallback User",
domain=[
('email', '!=', None),
],
states={
'invisible': ~Eval('recipients_secondary'),
},
depends=['recipients'],
help="User notified when no secondary recipients e-mail is found")
recipients_hidden = fields.Many2One(
'ir.model.field', "Hidden Recipients",
domain=[
('model.model', '=', Eval('model')),
],
depends=['model'],
help="The field that contains the hidden recipient(s).")
fallback_recipients_hidden = fields.Many2One(
'res.user', "Hidden Recipients Fallback User",
domain=[
('email', '!=', None),
],
states={
'invisible': ~Eval('recipients_hidden'),
},
depends=['recipients_hidden'],
help="User notified when no hidden recipients e-mail is found")
contact_mechanism = fields.Selection(
'get_contact_mechanisms', "Contact Mechanism",
help="Define which email to use from the party's contact mechanisms")
content = fields.Many2One(
'ir.action.report', "Content", required=True,
domain=[('template_extension', 'in', ['txt', 'html', 'xhtml'])],
help="The report used as email template.")
attachments = fields.Many2Many(
'notification.email.attachment', 'notification', 'report',
"Attachments",
domain=[
('model', '=', Eval('model')),
],
depends=['model'],
help="The reports used as attachments.")
triggers = fields.One2Many(
'ir.trigger', 'notification_email', "Triggers",
domain=[('model.model', '=', Eval('model'))],
depends=['model'],
help="Add a trigger for the notification.")
model = fields.Function(
fields.Char("Model"), 'on_change_with_model', searcher='search_model')
@classmethod
def __setup__(cls):
pool = Pool()
EmailTemplate = pool.get('ir.email.template')
super().__setup__()
for field in [
'recipients',
'recipients_secondary',
'recipients_hidden',
]:
field = getattr(cls, field)
field.domain.append(['OR',
('relation', 'in', EmailTemplate.email_models()),
[
('model.model', 'in', EmailTemplate.email_models()),
('name', '=', 'id'),
],
])
def get_rec_name(self, name):
return self.content.rec_name
@classmethod
def search_rec_name(cls, name, clause):
return [('content',) + tuple(clause[1:])]
@classmethod
def get_contact_mechanisms(cls):
pool = Pool()
try:
ContactMechanism = pool.get('party.contact_mechanism')
except KeyError:
return [(None, "")]
return ContactMechanism.usages()
@fields.depends('content')
def on_change_with_model(self, name=None):
if self.content:
return self.content.model
@classmethod
def search_model(cls, name, clause):
return [('content.model',) + tuple(clause[1:])]
def _get_addresses(self, value):
pool = Pool()
EmailTemplate = pool.get('ir.email.template')
with Transaction().set_context(usage=self.contact_mechanism):
return EmailTemplate.get_addresses(value)
def _get_languages(self, value):
pool = Pool()
EmailTemplate = pool.get('ir.email.template')
with Transaction().set_context(usage=self.contact_mechanism):
return EmailTemplate.get_languages(value)
def get_email(self, record, from_, to, cc, bcc, languages):
pool = Pool()
Attachment = pool.get('notification.email.attachment')
# TODO order languages to get default as last one for title
content, title = get_email(self.content, record, languages)
language = list(languages)[-1]
with Transaction().set_context(language=language.code):
notification = self.__class__(self.id)
if notification.from_:
from_ = notification.from_
if self.subject:
title = (TextTemplate(notification.subject)
.generate(record=record)
.render())
if self.attachments:
msg = MIMEMultipart('mixed')
msg.attach(content)
for report in self.attachments:
msg.attach(Attachment.get_mime(report, record, language.code))
else:
msg = content
msg['From'] = from_
msg['To'] = ', '.join(formataddr(parseaddr(a)) for a in to)
msg['Cc'] = ', '.join(formataddr(parseaddr(a)) for a in cc)
msg['Subject'] = Header(title, 'utf-8')
msg['Auto-Submitted'] = 'auto-generated'
return msg
def get_log(self, record, trigger, msg, bcc=None):
return {
'recipients': msg['To'],
'recipients_secondary': msg['Cc'],
'recipients_hidden': bcc,
'resource': str(record),
'notification': trigger.notification_email.id,
'trigger': trigger.id,
}
@classmethod
def trigger(cls, records, trigger):
"Action function for the triggers"
if not trigger.notification_email:
raise ValueError(
'Trigger "%s" is not related to any email notification'
% trigger.rec_name)
trigger.notification_email.send_email(records, trigger)
def send_email(self, records, trigger):
pool = Pool()
Log = pool.get('notification.email.log')
datamanager = SMTPDataManager()
Transaction().join(datamanager)
from_ = (config.get('notification_email', 'from')
or config.get('email', 'from'))
logs = []
for record in records:
languagues = set()
to = []
if self.recipients:
recipients = getattr(record, self.recipients.name, None)
if recipients:
languagues.update(self._get_languages(recipients))
to = self._get_addresses(recipients)
if not to and self.fallback_recipients:
languagues.update(
self._get_languages(self.fallback_recipients))
to = self._get_addresses(self.fallback_recipients)
cc = []
if self.recipients_secondary:
recipients_secondary = getattr(
record, self.recipients_secondary.name, None)
if recipients_secondary:
languagues.update(
self._get_languages(recipients_secondary))
cc = self._get_addresses(recipients_secondary)
if not cc and self.fallback_recipients_secondary:
languagues.update(
self._get_languages(self.fallback_recipients_secondary))
cc = self._get_addresses(self.fallback_recipients_secondary)
bcc = []
if self.recipients_hidden:
recipients_hidden = getattr(
record, self.recipients_hidden.name, None)
if recipients_hidden:
languagues.update(self._get_languages(recipients_hidden))
bcc = self._get_addresses(recipients_hidden)
if not bcc and self.fallback_recipients_hidden:
languagues.update(
self._get_languages(self.fallback_recipients_hidden))
bcc = self._get_addresses(self.fallback_recipients_hidden)
to_addrs = [e for _, e in getaddresses(to + cc + bcc)]
if to_addrs:
msg = self.get_email(record, from_, to, cc, bcc, languagues)
sendmail_transactional(
from_, to_addrs, msg, datamanager=datamanager)
logs.append(self.get_log(
record, trigger, msg, bcc=', '.join(bcc)))
if logs:
Log.create(logs)
@classmethod
def validate(cls, notifications):
super().validate(notifications)
for notification in notifications:
notification.check_subject()
def check_subject(self):
if not self.subject:
return
try:
TextTemplate(self.subject)
except Exception as exception:
raise TemplateError(
gettext('notification_email.'
'msg_notification_invalid_subject',
notification=self.rec_name,
exception=exception)) from exception
class EmailAttachment(ModelSQL):
"Email Notification Attachment"
__name__ = 'notification.email.attachment'
notification = fields.Many2One(
'notification.email', "Notification",
required=True, select=True)
report = fields.Many2One(
'ir.action.report', "Report", required=True,
domain=[
('model', '=', Eval('model')),
],
depends=['model'])
model = fields.Function(fields.Char("Model"), 'get_model')
def get_model(self, name):
return self.notification.model
@classmethod
def get_mime(cls, report, record, language):
pool = Pool()
Report = pool.get(report.report_name, type='report')
with Transaction().set_context(language=language):
ext, content, _, title = Report.execute(
[record.id], {
'action_id': report.id,
})
name = '%s.%s' % (title, ext)
mimetype, _ = mimetypes.guess_type(name)
if mimetype:
msg = MIMENonMultipart(*mimetype.split('/'))
msg.set_payload(content)
encode_base64(msg)
else:
msg = MIMEApplication(content)
if not isinstance(name, str):
name = name.encode('utf-8')
if not isinstance(language, str):
language = language.encode('utf-8')
msg.add_header(
'Content-Disposition', 'attachment',
filename=('utf-8', language, name))
return msg
class EmailLog(ResourceAccessMixin, ModelSQL, ModelView):
"Notification Email Log"
__name__ = 'notification.email.log'
date = fields.Function(fields.DateTime('Date'), 'get_date')
recipients = fields.Char("Recipients")
recipients_secondary = fields.Char("Secondary Recipients")
recipients_hidden = fields.Char("Hidden Recipients")
notification = fields.Many2One(
'notification.email', "Notification",
required=True, ondelete='RESTRICT')
trigger = fields.Many2One('ir.trigger', "Trigger")
@classmethod
def __setup__(cls):
super().__setup__()
cls._order = [
('create_date', 'DESC'),
('id', 'DESC'),
]
@classmethod
def __register__(cls, module_name):
pool = Pool()
Model = pool.get('ir.model')
Trigger = pool.get('ir.trigger')
model = Model.__table__()
trigger = Trigger.__table__()
table = cls.__table__()
super().__register__(module_name)
table_h = cls.__table_handler__(module_name)
cursor = Transaction().connection.cursor()
# Migration from 5.6:
# fill notification and resource
# remove required on trigger
notification = trigger.select(
trigger.notification_email,
where=trigger.id == table.trigger)
resource = (trigger
.join(model, condition=trigger.model == model.id)
.select(
Concat(model.model, ',-1'),
where=trigger.id == table.trigger))
cursor.execute(*table.update(
[table.notification, table.resource],
[notification, resource],
where=(table.trigger != Null) & (table.resource == Null)))
table_h.not_null_action('trigger', 'remove')
def get_date(self, name):
return self.create_date.replace(microsecond=0)
@classmethod
def search_date(cls, name, clause):
return [('create_date',) + tuple(clause[1:])]
@staticmethod
def order_date(tables):
table, _ = tables[None]
return [table.create_date]
+126
View File
@@ -0,0 +1,126 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="email_view_form">
<field name="model">notification.email</field>
<field name="type">form</field>
<field name="name">email_form</field>
</record>
<record model="ir.ui.view" id="email_view_list">
<field name="model">notification.email</field>
<field name="type">tree</field>
<field name="name">email_list</field>
</record>
<record model="ir.action.act_window" id="act_email_form">
<field name="name">Notification Emails</field>
<field name="res_model">notification.email</field>
</record>
<record model="ir.action.act_window.view"
id="act_email_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="email_view_list"/>
<field name="act_window" ref="act_email_form"/>
</record>
<record model="ir.action.act_window.view"
id="act_email_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="email_view_form"/>
<field name="act_window" ref="act_email_form"/>
</record>
<menuitem
parent="ir.menu_models"
action="act_email_form"
sequence="50"
id="menu_email_form"/>
<record model="ir.model.access" id="access_email">
<field name="model"
search="[('model', '=', 'notification.email')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_email_admin">
<field name="model"
search="[('model', '=', 'notification.email')]"/>
<field name="group" ref="res.group_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.ui.view" id="email_log_view_form">
<field name="model">notification.email.log</field>
<field name="type">form</field>
<field name="name">log_form</field>
</record>
<record model="ir.ui.view" id="email_log_view_list">
<field name="model">notification.email.log</field>
<field name="type">tree</field>
<field name="name">log_list</field>
</record>
<record model="ir.model.access" id="access_email_log">
<field name="model" search="[('model', '=', 'notification.email.log')]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.action.act_window" id="act_notification_email_log">
<field name="name">Logs</field>
<field name="res_model">notification.email.log</field>
<field name="domain"
eval="[('notification', 'in', Eval('active_ids'))]"
pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_notification_email_log_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="email_log_view_list"/>
<field name="act_window" ref="act_notification_email_log"/>
</record>
<record model="ir.action.act_window.view" id="act_notification_email_log_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="email_log_view_form"/>
<field name="act_window" ref="act_notification_email_log"/>
</record>
<record model="ir.action.keyword"
id="act_notification_email_log_keyword1">
<field name="keyword">form_relate</field>
<field name="model">notification.email,-1</field>
<field name="action" ref="act_notification_email_log"/>
</record>
<record model="ir.action.act_window" id="act_notification_email_log_relate">
<field name="name">Notification E-Mails</field>
<field name="res_model">notification.email.log</field>
<field
name="domain"
eval="[If(Eval('active_ids', []) == [Eval('active_id')], ('resource', '=', [Eval('active_model'), Eval('active_id')]), ('resource.id', 'in', Eval('active_ids'), Eval('active_model')))]"
pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_notification_email_log_relate_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="email_log_view_list"/>
<field name="act_window" ref="act_notification_email_log_relate"/>
</record>
<record model="ir.action.act_window.view" id="act_notification_email_log_relate_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="email_log_view_form"/>
<field name="act_window" ref="act_notification_email_log_relate"/>
</record>
<record model="ir.action.keyword" id="act_notification_email_log_relate_keyword1">
<field name="keyword">form_relate</field>
<field name="action" ref="act_notification_email_log_relate"/>
</record>
</data>
</tryton>
+153
View File
@@ -0,0 +1,153 @@
#!/usr/bin/env python3
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import io
import os
import re
from configparser import ConfigParser
from setuptools import setup, find_packages
def read(fname):
return io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
def get_require_version(name):
if minor_version % 2:
require = '%s >= %s.%s.dev0, < %s.%s'
else:
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
return require
config = ConfigParser()
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
version = info.get('version', '0.0.1')
major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
name = 'trytond_notification_email'
download_url = 'http://downloads.tryton.org/%s.%s/' % (
major_version, minor_version)
if minor_version % 2:
version = '%s.%s.dev0' % (major_version, minor_version)
download_url = (
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
name[8:], name, version))
local_version = []
if os.environ.get('CI_JOB_ID'):
local_version.append(os.environ['CI_JOB_ID'])
else:
for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']:
if os.environ.get(build):
local_version.append(os.environ[build])
else:
local_version = []
break
if local_version:
version += '+' + '.'.join(local_version)
requires = ['Genshi']
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
tests_require = [
get_require_version('trytond_company'),
get_require_version('trytond_commission'),
get_require_version('trytond_party'),
get_require_version('trytond_web_user'),
]
dependency_links = []
if minor_version % 2:
dependency_links.append(
'https://trydevpi.tryton.org/?local_version='
+ '.'.join(local_version))
setup(name=name,
version=version,
description='Tryton module for sending email notifications',
long_description=read('README.rst'),
author='Tryton',
author_email='bugs@tryton.org',
url='http://www.tryton.org/',
download_url=download_url,
project_urls={
"Bug Tracker": 'https://bugs.tryton.org/',
"Documentation": 'https://docs.tryton.org/',
"Forum": 'https://www.tryton.org/forum',
"Source Code": 'https://hg.tryton.org/modules/notification_email',
},
keywords='tryton email notification',
package_dir={'trytond.modules.notification_email': '.'},
packages=(
['trytond.modules.notification_email']
+ ['trytond.modules.notification_email.%s' % p
for p in find_packages()]
),
package_data={
'trytond.modules.notification_email': (info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt',
'icons/*.svg', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Framework :: Tryton',
'Intended Audience :: Developers',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Indonesian',
'Natural Language :: Italian',
'Natural Language :: Persian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Romanian',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
],
license='GPL-3',
python_requires='>=3.6',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
notification_email = trytond.modules.notification_email
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
tests_require=tests_require,
)
@@ -0,0 +1,10 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
try:
from trytond.modules.notification_email.tests.test_notification_email \
import suite
except ImportError:
from .test_notification_email import suite
__all__ = ['suite']
@@ -0,0 +1,324 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import sys
import unittest
from unittest.mock import patch, ANY
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
from trytond.tests.test_tryton import suite as test_suite
from trytond.pool import Pool
from trytond.config import config
from trytond.transaction import Transaction
from trytond.modules.company.tests import CompanyTestMixin
from trytond.modules.notification_email import notification \
as notification_module
FROM = 'tryton@example.com'
class NotificationEmailTestCase(CompanyTestMixin, ModuleTestCase):
"Test Notification Email module"
module = 'notification_email'
extras = ['company', 'commission', 'party', 'web_user']
def setUp(self):
super(NotificationEmailTestCase, self).setUp()
reset_from = config.get('email', 'from', default='')
config.set('email', 'from', FROM)
self.addCleanup(lambda: config.set('email', 'from', reset_from))
def _setup_notification(self):
pool = Pool()
Model = pool.get('ir.model')
ModelField = pool.get('ir.model.field')
Action = pool.get('ir.action')
Report = pool.get('ir.action.report')
User = pool.get('res.user')
NotificationEmail = pool.get('notification.email')
model, = Model.search([
('model', '=', User.__name__),
])
action = Action(name="Notification Email", type='ir.action.report')
action.save()
report = Report()
report.report_name = 'notification_notification.test.report'
report.action = action
report.template_extension = 'txt'
report.report_content = b'Hello ${records[0].name}'
report.model = model.model
report.save()
user = User(Transaction().user)
user.email = 'user@example.com'
user.save()
notification_email = NotificationEmail()
notification_email.recipients, = ModelField.search([
('model.model', '=', model.model),
('name', '=', 'create_uid'),
])
notification_email.content = report
notification_email.save()
def run_tasks(self):
pool = Pool()
Queue = pool.get('ir.queue')
transaction = Transaction()
self.assertTrue(transaction.tasks)
while transaction.tasks:
task = Queue(transaction.tasks.pop())
task.run()
@unittest.skipIf(
(3, 5, 0) <= sys.version_info < (3, 5, 2), "python bug #25195")
@with_transaction()
def test_notification_email(self):
"Test email notificiation is sent on trigger"
pool = Pool()
User = pool.get('res.user')
Trigger = pool.get('ir.trigger')
Model = pool.get('ir.model')
NotificationEmail = pool.get('notification.email')
Log = pool.get('notification.email.log')
self._setup_notification()
notification_email, = NotificationEmail.search([])
model, = Model.search([
('model', '=', User.__name__),
])
Trigger.create([{
'name': 'Test creation',
'model': model.id,
'on_create': True,
'condition': 'true',
'notification_email': notification_email.id,
'action': 'notification.email|trigger',
}])
with patch.object(
notification_module, 'sendmail_transactional') as sendmail, \
patch.object(notification_module, 'SMTPDataManager'):
User.create([{'name': "Michael Scott", 'login': "msc"}])
self.run_tasks()
sendmail.assert_called_once_with(
FROM, ['user@example.com'], ANY,
datamanager=ANY)
_, _, msg = sendmail.call_args[0]
self.assertEqual(msg['From'], FROM)
self.assertEqual(
msg['Subject'], 'Notification Email-Michael Scott')
self.assertEqual(msg['To'], 'Administrator <user@example.com>')
self.assertEqual(msg['Auto-Submitted'], 'auto-generated')
self.assertEqual(msg.get_content_type(), 'multipart/alternative')
self.assertEqual(
msg.get_payload(0).get_payload(), 'Hello Michael Scott')
log, = Log.search([])
self.assertEqual(log.trigger.notification_email, notification_email)
self.assertEqual(log.recipients, 'Administrator <user@example.com>')
self.assertEqual(log.recipients_secondary, '')
self.assertEqual(log.recipients_hidden, '')
@with_transaction()
def test_notification_email_attachment(self):
"Test email notificiation with attachment"
pool = Pool()
Model = pool.get('ir.model')
Report = pool.get('ir.action.report')
User = pool.get('res.user')
NotificationEmail = pool.get('notification.email')
Language = pool.get('ir.lang')
self._setup_notification()
model, = Model.search([
('model', '=', User.__name__),
])
en, = Language.search([('code', '=', 'en')])
attachment = Report()
attachment.name = "Attachment"
attachment.report_name = 'notification_notification.test.report'
attachment.template_extension = 'txt'
attachment.report_content = b'attachment for ${records[0].name}'
attachment.model = model.model
attachment.save()
notification_email, = NotificationEmail.search([])
notification_email.attachments = [attachment]
notification_email.save()
user, = User.create([{'name': "Michael Scott", 'login': "msc"}])
msg = notification_email.get_email(
user, FROM, ['Administrator <user@example.com>'], [], [], [en])
self.assertEqual(msg['From'], FROM)
self.assertEqual(
msg['Subject'], 'Notification Email-Michael Scott')
self.assertEqual(msg['To'], 'Administrator <user@example.com>')
self.assertEqual(msg.get_content_type(), 'multipart/mixed')
self.assertEqual(
msg.get_payload(0).get_content_type(), 'multipart/alternative')
attachment = msg.get_payload(1)
self.assertEqual(
attachment.get_payload(None, True),
b'attachment for Michael Scott')
self.assertEqual(
attachment.get_content_type(), 'text/plain')
self.assertEqual(
attachment.get_filename(), "Attachment-Michael Scott.txt")
@with_transaction()
def test_notification_email_subject(self):
"Test email notificiation with subject"
pool = Pool()
Model = pool.get('ir.model')
User = pool.get('res.user')
NotificationEmail = pool.get('notification.email')
Language = pool.get('ir.lang')
self._setup_notification()
model, = Model.search([
('model', '=', User.__name__),
])
en, = Language.search([('code', '=', 'en')])
notification_email, = NotificationEmail.search([])
notification_email.subject = 'Notification for ${record.name}'
notification_email.save()
user, = User.create([{'name': "Michael Scott", 'login': "msc"}])
msg = notification_email.get_email(
user, FROM, ['Administrator <user@example.com>'], [], [], [en])
self.assertEqual(msg['Subject'], 'Notification for Michael Scott')
@with_transaction()
def test_notification_email_translated_subject(self):
"Test email notificiation with translated subject"
pool = Pool()
Model = pool.get('ir.model')
User = pool.get('res.user')
NotificationEmail = pool.get('notification.email')
Language = pool.get('ir.lang')
self._setup_notification()
model, = Model.search([
('model', '=', User.__name__),
])
es, = Language.search([('code', '=', 'es')])
Language.load_translations([es])
notification_email, = NotificationEmail.search([])
notification_email.subject = 'Notification for ${record.name}'
notification_email.save()
with Transaction().set_context(lang='es'):
notification_email, = NotificationEmail.search([])
notification_email.subject = 'Notificación para ${record.name}'
notification_email.save()
user, = User.create([{
'name': "Michael Scott",
'login': "msc",
'language': es.id,
}])
msg = notification_email.get_email(
user, FROM, ['Administrator <user@example.com>'], [], [], [es])
self.assertEqual(msg['Subject'], 'Notificación para Michael Scott')
@unittest.skipIf(
(3, 5, 0) <= sys.version_info < (3, 5, 2), "python bug #25195")
@with_transaction()
def test_notification_email_fallback(self):
"Test email notification fallback"
pool = Pool()
User = pool.get('res.user')
Trigger = pool.get('ir.trigger')
Model = pool.get('ir.model')
NotificationEmail = pool.get('notification.email')
User = pool.get('res.user')
fallback_user = User()
fallback_user.name = 'Fallback'
fallback_user.email = 'fallback@example.com'
fallback_user.login = 'fallback'
fallback_user.save()
self._setup_notification()
notification_email, = NotificationEmail.search([])
notification_email.recipients = None
notification_email.fallback_recipients = fallback_user
notification_email.save()
model, = Model.search([
('model', '=', User.__name__),
])
Trigger.create([{
'name': 'Test creation',
'model': model.id,
'on_create': True,
'condition': 'true',
'notification_email': notification_email.id,
'action': 'notification.email|trigger',
}])
with patch.object(
notification_module, 'sendmail_transactional') as sendmail, \
patch.object(notification_module, 'SMTPDataManager'):
User.create([{'name': "Michael Scott", 'login': "msc"}])
self.run_tasks()
sendmail.assert_called_once_with(
FROM, ['fallback@example.com'], ANY,
datamanager=ANY)
_, _, msg = sendmail.call_args[0]
self.assertEqual(msg['To'], 'Fallback <fallback@example.com>')
@with_transaction()
def test_notification_email_no_recipient(self):
"Test email notification no recipient"
pool = Pool()
User = pool.get('res.user')
Trigger = pool.get('ir.trigger')
Model = pool.get('ir.model')
NotificationEmail = pool.get('notification.email')
User = pool.get('res.user')
self._setup_notification()
notification_email, = NotificationEmail.search([])
notification_email.recipients = None
notification_email.save()
model, = Model.search([
('model', '=', User.__name__),
])
Trigger.create([{
'name': 'Test creation',
'model': model.id,
'on_create': True,
'condition': 'true',
'notification_email': notification_email.id,
'action': 'notification.email|trigger',
}])
with patch.object(
notification_module, 'get_email') as get_email, \
patch.object(notification_module, 'SMTPDataManager'):
User.create([{'name': "Michael Scott", 'login': "msc"}])
self.run_tasks()
get_email.assert_not_called()
def suite():
suite = test_suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
NotificationEmailTestCase))
return suite
+15
View File
@@ -0,0 +1,15 @@
[tox]
envlist = {py36,py37,py38,py39}-{sqlite,postgresql},pypy3-{sqlite,postgresql}
[testenv]
commands = {envpython} setup.py test
deps =
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
py36-sqlite: sqlitebck
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
sqlite: DB_NAME={env:SQLITE_NAME::memory:}
postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}} {opts} {packages}
+14
View File
@@ -0,0 +1,14 @@
[tryton]
version=6.0.4
depends:
ir
res
extras_depend:
company
commission
party
web_user
xml:
notification.xml
ir.xml
message.xml
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="from_"/>
<field name="from_"/>
<label name="content"/>
<field name="content"/>
<label name="subject"/>
<field name="subject" colspan="3"/>
<label name="recipients"/>
<field name="recipients"/>
<label name="fallback_recipients"/>
<field name="fallback_recipients"/>
<label name="recipients_secondary"/>
<field name="recipients_secondary"/>
<label name="fallback_recipients_secondary"/>
<field name="fallback_recipients_secondary"/>
<label name="recipients_hidden"/>
<field name="recipients_hidden"/>
<label name="fallback_recipients_hidden"/>
<field name="fallback_recipients_hidden"/>
<label name="contact_mechanism"/>
<field name="contact_mechanism"/>
<field name="attachments" colspan="4"/>
<field name="triggers" colspan="4"/>
</form>
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="rec_name" expand="1"/>
</tree>
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="date"/>
<field name="date"/>
<label name="resource"/>
<field name="resource"/>
<label name="notification"/>
<field name="notification"/>
<label name="trigger"/>
<field name="trigger"/>
<label name="recipients"/>
<field name="recipients" colspan="3"/>
<label name="recipients_secondary"/>
<field name="recipients_secondary" colspan="3"/>
<label name="recipients_hidden"/>
<field name="recipients_hidden" colspan="3"/>
</form>
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="date" widget="date"/>
<field name="date" widget="time" string="Time"/>
<field name="notification" expand="2"/>
<field name="recipients" expand="1"/>
<field name="recipients_secondary" expand="1"/>
<field name="recipients_hidden" expand="1"/>
<field name="resource" expand="1"/>
</tree>
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form" position="inside">
<label name="notification_email"/>
<field name="notification_email"/>
</xpath>
</data>
+68
View File
@@ -0,0 +1,68 @@
clone:
hg:
image: plugins/hg
environment:
- HG_SHARE_POOL=/root/.cache/hg
volumes:
- cache:/root/.cache
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- echo "[extensions]" >> /root/.hgrc
- echo "hgext.share =" >> /root/.hgrc
- echo "[share]" >> /root/.hgrc
- echo "pool = /root/.cache/hg" >> /root/.hgrc
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
check_dist:
image: ${IMAGE}
commands:
- pip install twine
- python setup.py sdist
- twine check dist/*
services:
postgresql:
image: postgres
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
when:
matrix:
DATABASE: postgresql
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
DATABASE: sqlite
- IMAGE: python:3.7
TOXENV: py37
DATABASE: postgresql
- IMAGE: python:3.8
TOXENV: py38
DATABASE: sqlite
- IMAGE: python:3.8
TOXENV: py38
DATABASE: postgresql
- IMAGE: python:3.9
TOXENV: py39
DATABASE: sqlite
- IMAGE: python:3.9
TOXENV: py39
DATABASE: postgresql
+2
View File
@@ -0,0 +1,2 @@
[flake8]
ignore=E123,E124,E126,E128,E741,W503
+135
View File
@@ -0,0 +1,135 @@
Version 6.0.3 - 2022-06-03
* Bug fixes (see mercurial logs for details)
Version 6.0.2 - 2021-07-21
* Bug fixes (see mercurial logs for details)
Version 6.0.1 - 2021-06-17
* Bug fixes (see mercurial logs for details)
Version 6.0.0 - 2021-05-03
* Bug fixes (see mercurial logs for details)
* Add language to contact mechanism
* Add contact_mechanism as email recipient
* Rename zip into postal code
* Add simple distance between parties
* Configure available identifiers
* Add ar, at, by, cn, cr, gr, id, il, kr, lt, no, ro and se identifiers
Version 5.8.0 - 2020-11-02
* Bug fixes (see mercurial logs for details)
* Remove support for Python 3.5
* Add ad, gt, jp, md, nz, pe, py, uy, ve and za tax identifiers
Version 5.6.0 - 2020-05-04
* Bug fixes (see mercurial logs for details)
* Display name on contact mechanism record name
Version 5.4.0 - 2019-11-04
* Bug fixes (see mercurial logs for details)
* Limit subdivision types on address
* Add call url for mobile contact mechanisms
* Replace country and language in address format by codes
* Add sequence field to contact mechanism form view
Version 5.2.0 - 2019-05-06
* Bug fixes (see mercurial logs for details)
* Remove starting wildcard when searching on codes and numbers
* Include all identifier from python-stdnum
* Use country code as local prefix to parse phone numbers
Version 5.0.0 - 2018-10-01
* Bug fixes (see mercurial logs for details)
* Support attention party in address format
* Add party name on address
* Remove support for Python 2.7
Version 4.8.0 - 2018-04-23
* Bug fixes (see mercurial logs for details)
* Add Erase Party wizard
* Search party also by contact mechanisms
* Add contact_mechanism_get
* Add name to contact mechanism
* Improve distinction of address record name
Version 4.6.0 - 2017-10-30
* Bug fixes (see mercurial logs for details)
Version 4.4.0 - 2017-05-01
* Bug fixes (see mercurial logs for details)
* Use static selection for identifier type
Version 4.2.0 - 2016-11-28
* Bug fixes (see mercurial logs for details)
* Add format to phone numbers
* Rename VAT Code into Tax Identifier
* Add sequence order on Identifier
* Add Replace Party wizard
* Remove streetbis from Address
* Add address format per country and language
* Restrict subdivision address to first level
Version 4.0.0 - 2016-05-02
* Bug fixes (see mercurial logs for details)
* Add Python3 support
* Remove required on Party name
Version 3.8.0 - 2015-11-02
* Bug fixes (see mercurial logs for details)
* Change Party.lang into Property
* Add a list of identifier to party
Version 3.6.0 - 2015-04-20
* Bug fixes (see mercurial logs for details)
* Add support for PyPy
* compact vat number
* value Function fields don't set the value anymore
Version 3.4.0 - 2014-10-20
* Bug fixes (see mercurial logs for details)
* Add autocomplete on zip and city
Version 3.2.0 - 2014-04-21
* Bug fixes (see mercurial logs for details)
Version 3.0.0 - 2013-10-21
* Bug fixes (see mercurial logs for details)
Version 2.8.0 - 2013-04-22
* Bug fixes (see mercurial logs for details)
* Add url widget to contact mechanism list view
Version 2.6.0 - 2012-10-22
* Bug fixes (see mercurial logs for details)
Version 2.4.0 - 2012-04-24
* Bug fixes (see mercurial logs for details)
* Allow to have no Party Sequence
Version 2.2.0 - 2011-10-24
* Bug fixes (see mercurial logs for details)
Version 2.0.0 - 2011-04-27
* Bug fixes (see mercurial logs for details)
Version 1.8.0 - 2010-11-01
* Bug fixes (see mercurial logs for details)
* Add default address on party
Version 1.6.0 - 2010-05-10
* Bug fixes (see mercurial logs for details)
* Don't allow empty vat_number if vat_country is set
* Use model singleton to define which party sequence to use
* Improve search_rec_name of category to take care of separator
Version 1.4.0 - 2009-10-19
* Bug fixes (see mercurial logs for details)
Version 1.2.0 - 2009-04-20
* Bug fixes (see mercurial logs for details)
* Add CheckVIES wizard (VAT Information Exchange System)
* Add default categories on party with context
* Allow egg installation
Version 1.0.0 - 2008-11-17
* Initial release
+20
View File
@@ -0,0 +1,20 @@
Copyright (C) 2008-2022 Cédric Krier.
Copyright (C) 2008-2013 Bertrand Chenal.
Copyright (C) 2008-2022 B2CK SPRL.
Copyright (C) 2008-2022 Udo Spallek.
Copyright (C) 2008-2011 Korbinian Preisler.
Copyright (C) 2008-2011 virtual things.
Copyright (C) 2004-2008 Tiny SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+6
View File
@@ -0,0 +1,6 @@
include CHANGELOG
include COPYRIGHT
include LICENSE
include README.rst
include doc/*
include icons/LICENSE
+1
View File
@@ -0,0 +1 @@
doc/index.rst
+38
View File
@@ -0,0 +1,38 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool
from . import category
from . import party
from . import address
from . import contact_mechanism
from . import configuration
from . import ir
def register():
Pool.register(
category.Category,
party.Party,
party.PartyLang,
party.PartyCategory,
party.Identifier,
party.CheckVIESResult,
party.ReplaceAsk,
party.EraseAsk,
address.Address,
address.AddressFormat,
address.SubdivisionType,
contact_mechanism.ContactMechanism,
contact_mechanism.ContactMechanismLanguage,
configuration.Configuration,
configuration.ConfigurationSequence,
configuration.ConfigurationLang,
ir.Email,
ir.EmailTemplate,
module='party', type_='model')
Pool.register(
party.CheckVIES,
party.Replace,
party.Erase,
module='party', type_='wizard')
+431
View File
@@ -0,0 +1,431 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
'Address'
from string import Template
from sql import Literal
from sql.conditionals import Coalesce
from sql.functions import Substring
from sql.operators import Concat, Equal
from trytond.i18n import gettext
from trytond.model import (
ModelView, ModelSQL, MatchMixin, DeactivableMixin, fields,
sequence_ordered, Exclude)
from trytond.model.exceptions import AccessError
from trytond.pyson import Eval, If
from trytond.pool import Pool
from trytond.rpc import RPC
from trytond.transaction import Transaction
from trytond.cache import Cache
from .exceptions import InvalidFormat
class Address(DeactivableMixin, sequence_ordered(), ModelSQL, ModelView):
"Address"
__name__ = 'party.address'
party = fields.Many2One('party.party', 'Party', required=True,
ondelete='CASCADE', select=True, states={
'readonly': Eval('id', 0) > 0,
},
depends=['id'])
party_name = fields.Char(
"Party Name",
help="If filled, replace the name of the party for address formatting")
name = fields.Char("Building Name")
street = fields.Text("Street")
postal_code = fields.Char("Postal Code")
city = fields.Char("City")
country = fields.Many2One('country.country', "Country")
subdivision_types = fields.Function(
fields.MultiSelection(
'get_subdivision_types', "Subdivision Types"),
'on_change_with_subdivision_types')
subdivision = fields.Many2One("country.subdivision",
'Subdivision',
domain=[
('country', '=', Eval('country', -1)),
If(Eval('subdivision_types', []),
('type', 'in', Eval('subdivision_types', [])),
()
),
],
depends=['country', 'subdivision_types'])
full_address = fields.Function(fields.Text('Full Address'),
'get_full_address')
@classmethod
def __setup__(cls):
super(Address, cls).__setup__()
cls._order.insert(0, ('party', 'ASC'))
cls.__rpc__.update(
autocomplete_postal_code=RPC(instantiate=0, cache=dict(days=1)),
autocomplete_city=RPC(instantiate=0, cache=dict(days=1)),
)
@classmethod
def __register__(cls, module_name):
cursor = Transaction().connection.cursor()
sql_table = cls.__table__()
table = cls.__table_handler__(module_name)
# Migration from 5.8: rename zip to postal code
table.column_rename('zip', 'postal_code')
super(Address, cls).__register__(module_name)
table = cls.__table_handler__(module_name)
# Migration from 4.0: remove streetbis
if table.column_exist('streetbis'):
value = Concat(
Coalesce(sql_table.street, ''),
Concat('\n', Coalesce(sql_table.streetbis, '')))
cursor.execute(*sql_table.update(
[sql_table.street],
[value]))
table.drop_column('streetbis')
_autocomplete_limit = 100
@fields.depends('country', 'subdivision')
def _autocomplete_domain(self):
domain = []
if self.country:
domain.append(('country', '=', self.country.id))
if self.subdivision:
domain.append(['OR',
('subdivision', 'child_of',
[self.subdivision.id], 'parent'),
('subdivision', '=', None),
])
return domain
def _autocomplete_search(self, domain, name):
pool = Pool()
PostalCode = pool.get('country.postal_code')
if domain:
records = PostalCode.search(domain, limit=self._autocomplete_limit)
if len(records) < self._autocomplete_limit:
return sorted({getattr(z, name) for z in records})
return []
@fields.depends('city', methods=['_autocomplete_domain'])
def autocomplete_postal_code(self):
domain = self._autocomplete_domain()
if self.city:
domain.append(('city', 'ilike', '%%%s%%' % self.city))
return self._autocomplete_search(domain, 'postal_code')
@fields.depends('postal_code', methods=['_autocomplete_domain'])
def autocomplete_city(self):
domain = self._autocomplete_domain()
if self.postal_code:
domain.append(('postal_code', 'ilike', '%s%%' % self.postal_code))
return self._autocomplete_search(domain, 'city')
def get_full_address(self, name):
pool = Pool()
AddressFormat = pool.get('party.address.format')
full_address = Template(AddressFormat.get_format(self)).substitute(
**self._get_address_substitutions())
return '\n'.join(
filter(None, (x.strip() for x in full_address.splitlines())))
def _get_address_substitutions(self):
context = Transaction().context
subdivision_code = ''
if getattr(self, 'subdivision', None):
subdivision_code = self.subdivision.code or ''
if '-' in subdivision_code:
subdivision_code = subdivision_code.split('-', 1)[1]
substitutions = {
'party_name': '',
'attn': '',
'name': getattr(self, 'name', None) or '',
'street': getattr(self, 'street', None) or '',
'postal_code': getattr(self, 'postal_code', None) or '',
'city': getattr(self, 'city', None) or '',
'subdivision': (self.subdivision.name
if getattr(self, 'subdivision', None) else ''),
'subdivision_code': subdivision_code,
'country': (self.country.name
if getattr(self, 'country', None) else ''),
'country_code': (self.country.code or ''
if getattr(self, 'country', None) else ''),
}
# Keep zip for backward compatibility
substitutions['zip'] = substitutions['postal_code']
if context.get('address_from_country') == getattr(self, 'country', ''):
substitutions['country'] = ''
if context.get('address_with_party', False):
substitutions['party_name'] = self.party_full_name
if context.get('address_attention_party', False):
substitutions['attn'] = (
context['address_attention_party'].full_name)
for key, value in list(substitutions.items()):
substitutions[key.upper()] = value.upper()
return substitutions
@property
def party_full_name(self):
name = ''
if self.party_name:
name = self.party_name
elif self.party:
name = self.party.full_name
return name
def get_rec_name(self, name):
party = self.party_full_name
if self.street:
street = self.street.splitlines()[0]
else:
street = None
if self.country:
country = self.country.code
else:
country = None
return ', '.join(
filter(None, [
party,
self.name,
street,
self.postal_code,
self.city,
country]))
@classmethod
def search_rec_name(cls, name, clause):
if clause[1].startswith('!') or clause[1].startswith('not '):
bool_op = 'AND'
else:
bool_op = 'OR'
return [bool_op,
('party',) + tuple(clause[1:]),
('name',) + tuple(clause[1:]),
('street',) + tuple(clause[1:]),
('postal_code',) + tuple(clause[1:]),
('city',) + tuple(clause[1:]),
('country',) + tuple(clause[1:]),
]
@classmethod
def write(cls, *args):
actions = iter(args)
for addresses, values in zip(actions, actions):
if 'party' in values:
for address in addresses:
if address.party.id != values['party']:
raise AccessError(
gettext('party.msg_address_change_party',
address=address.rec_name))
super(Address, cls).write(*args)
@fields.depends('subdivision', 'country')
def on_change_country(self):
if (self.subdivision
and self.subdivision.country != self.country):
self.subdivision = None
@classmethod
def get_subdivision_types(cls):
pool = Pool()
Subdivision = pool.get('country.subdivision')
return Subdivision.fields_get(['type'])['type']['selection']
@fields.depends('country')
def on_change_with_subdivision_types(self, name=None):
pool = Pool()
Types = pool.get('party.address.subdivision_type')
return Types.get_types(self.country)
class AddressFormat(DeactivableMixin, MatchMixin, ModelSQL, ModelView):
"Address Format"
__name__ = 'party.address.format'
country_code = fields.Char("Country Code", size=2)
language_code = fields.Char("Language Code", size=2)
format_ = fields.Text("Format", required=True,
help="Available variables (also in upper case):\n"
"- ${party_name}\n"
"- ${name}\n"
"- ${attn}\n"
"- ${street}\n"
"- ${postal_code}\n"
"- ${city}\n"
"- ${subdivision}\n"
"- ${subdivision_code}\n"
"- ${country}\n"
"- ${country_code}")
_get_format_cache = Cache('party.address.format.get_format')
@classmethod
def __setup__(cls):
super(AddressFormat, cls).__setup__()
cls._order.insert(0, ('country_code', 'ASC NULLS LAST'))
cls._order.insert(1, ('language_code', 'ASC NULLS LAST'))
@classmethod
def __register__(cls, module_name):
pool = Pool()
Country = pool.get('country.country')
Language = pool.get('ir.lang')
country = Country.__table__()
language = Language.__table__()
table = cls.__table__()
cursor = Transaction().connection.cursor()
super().__register__(module_name)
table_h = cls.__table_handler__()
# Migration from 5.2: replace country by country_code
if table_h.column_exist('country'):
query = table.update(
[table.country_code],
country.select(
country.code,
where=country.id == table.country))
cursor.execute(*query)
table_h.drop_column('country')
# Migration from 5.2: replace language by language_code
if table_h.column_exist('language'):
query = table.update(
[table.language_code],
language.select(
Substring(language.code, 0, 2),
where=language.id == table.language))
cursor.execute(*query)
table_h.drop_column('language')
@classmethod
def default_format_(cls):
return """${party_name}
${name}
${street}
${postal_code} ${city}
${subdivision}
${COUNTRY}"""
@classmethod
def create(cls, *args, **kwargs):
records = super(AddressFormat, cls).create(*args, **kwargs)
cls._get_format_cache.clear()
return records
@classmethod
def write(cls, *args, **kwargs):
super(AddressFormat, cls).write(*args, **kwargs)
cls._get_format_cache.clear()
@classmethod
def delete(cls, *args, **kwargs):
super(AddressFormat, cls).delete(*args, **kwargs)
cls._get_format_cache.clear()
@classmethod
def validate(cls, formats):
super(AddressFormat, cls).validate(formats)
for format_ in formats:
format_.check_format()
def check_format(self):
pool = Pool()
Address = pool.get('party.address')
address = Address()
try:
Template(self.format_).substitute(
**address._get_address_substitutions())
except Exception as exception:
raise InvalidFormat(gettext('party.invalid_format',
format=self.format_,
exception=exception)) from exception
@classmethod
def get_format(cls, address, pattern=None):
if pattern is None:
pattern = {}
else:
pattern = pattern.copy()
pattern.setdefault(
'country_code', address.country.code if address.country else None)
pattern.setdefault('language_code', Transaction().language[:2])
key = tuple(sorted(pattern.items()))
format_ = cls._get_format_cache.get(key)
if format_ is not None:
return format_
for record in cls.search([]):
if record.match(pattern):
format_ = record.format_
break
else:
format_ = cls.default_format_()
cls._get_format_cache.set(key, format_)
return format_
class SubdivisionType(DeactivableMixin, ModelSQL, ModelView):
"Address Subdivision Type"
__name__ = 'party.address.subdivision_type'
country_code = fields.Char("Country Code", size=2, required=True)
types = fields.MultiSelection('get_subdivision_types', "Subdivision Types")
_get_types_cache = Cache('party.address.subdivision_type.get_types')
@classmethod
def __setup__(cls):
super().__setup__()
t = cls.__table__()
cls._sql_constraints = [
('country_code_unique',
Exclude(t, (t.country_code, Equal),
where=t.active == Literal(True)),
'party.msg_address_subdivision_country_code_unique')
]
cls._order.insert(0, ('country_code', 'ASC NULLS LAST'))
@classmethod
def get_subdivision_types(cls):
pool = Pool()
Subdivision = pool.get('country.subdivision')
return Subdivision.fields_get(['type'])['type']['selection']
@classmethod
def create(cls, *args, **kwargs):
records = super().create(*args, **kwargs)
cls._get_types_cache.clear()
return records
@classmethod
def write(cls, *args, **kwargs):
super().write(*args, **kwargs)
cls._get_types_cache.clear()
@classmethod
def delete(cls, *args, **kwargs):
super().delete(*args, **kwargs)
cls._get_types_cache.clear()
@classmethod
def get_types(cls, country):
key = country.code if country else None
types = cls._get_types_cache.get(key)
if types is not None:
return list(types)
records = cls.search([
('country_code', '=', country.code if country else None),
])
if records:
record, = records
types = record.types
else:
types = []
cls._get_types_cache.set(key, types)
return types
+788
View File
@@ -0,0 +1,788 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="address_view_tree">
<field name="model">party.address</field>
<field name="type">tree</field>
<field name="priority" eval="10"/>
<field name="name">address_tree</field>
</record>
<record model="ir.ui.view" id="address_view_tree_sequence">
<field name="model">party.address</field>
<field name="type">tree</field>
<field name="priority" eval="20"/>
<field name="name">address_tree_sequence</field>
</record>
<record model="ir.ui.view" id="address_view_form">
<field name="model">party.address</field>
<field name="type">form</field>
<field name="name">address_form</field>
</record>
<record model="ir.action.act_window" id="act_address_form">
<field name="name">Addresses</field>
<field name="res_model">party.address</field>
</record>
<record model="ir.action.act_window.view" id="act_address_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="address_view_tree"/>
<field name="act_window" ref="act_address_form"/>
</record>
<record model="ir.action.act_window.view" id="act_address_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="address_view_form"/>
<field name="act_window" ref="act_address_form"/>
</record>
<menuitem
parent="menu_party"
action="act_address_form"
sequence="20"
id="menu_address_form"/>
<record model="ir.ui.view" id="address_format_view_list">
<field name="model">party.address.format</field>
<field name="type">tree</field>
<field name="name">address_format_list</field>
</record>
<record model="ir.ui.view" id="address_format_view_form">
<field name="model">party.address.format</field>
<field name="type">form</field>
<field name="name">address_format_form</field>
</record>
<record model="ir.action.act_window" id="act_address_format_form">
<field name="name">Address Formats</field>
<field name="res_model">party.address.format</field>
</record>
<record model="ir.action.act_window.view" id="act_address_format_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="address_format_view_list"/>
<field name="act_window" ref="act_address_format_form"/>
</record>
<record model="ir.action.act_window.view" id="act_address_format_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="address_format_view_form"/>
<field name="act_window" ref="act_address_format_form"/>
</record>
<menuitem
parent="menu_configuration"
action="act_address_format_form"
sequence="50"
id="menu_address_format_form"/>
<record model="ir.model.access" id="access_address_format">
<field name="model" search="[('model', '=', 'party.address.format')]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_address_format_admin">
<field name="model" search="[('model', '=', 'party.address.format')]"/>
<field name="group" ref="group_party_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.ui.view" id="address_subdivision_type_view_list">
<field name="model">party.address.subdivision_type</field>
<field name="type">tree</field>
<field name="name">address_subdivision_type_list</field>
</record>
<record model="ir.ui.view" id="address_subdivision_type_view_form">
<field name="model">party.address.subdivision_type</field>
<field name="type">form</field>
<field name="name">address_subdivision_type_form</field>
</record>
<record model="ir.action.act_window" id="act_address_subdivision_type_form">
<field name="name">Address Subdivision Types</field>
<field name="res_model">party.address.subdivision_type</field>
</record>
<record model="ir.action.act_window.view" id="act_address_subdivision_type_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="address_subdivision_type_view_list"/>
<field name="act_window" ref="act_address_subdivision_type_form"/>
</record>
<record model="ir.action.act_window.view" id="act_address_subdivision_type_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="address_subdivision_type_view_form"/>
<field name="act_window" ref="act_address_subdivision_type_form"/>
</record>
<menuitem
parent="menu_configuration"
action="act_address_subdivision_type_form"
sequence="50"
id="menu_address_subdivision_type_form"/>
<record model="ir.model.access" id="access_address_subdivision_type">
<field name="model" search="[('model', '=', 'party.address.subdivision_type')]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_address_subdivision_type_admin">
<field name="model" search="[('model', '=', 'party.address.subdivision_type')]"/>
<field name="group" ref="group_party_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
</data>
<data noupdate="1" grouped="1">
<!-- From https://en.wikipedia.org/wiki/Address_(geography) -->
<record model="party.address.format" id="address_format_ar">
<field name="country_code">AR</field>
<field name="format_">${party_name}
${name}
${street}
${subdivision}
${POSTAL_CODE}, ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_au">
<field name="country_code">AU</field>
<field name="format_">${party_name}
${attn}
${name}
${street}
${subdivision}
${CITY} ${SUBDIVISION} ${POSTAL_CODE}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_at">
<field name="country_code">AT</field>
<field name="format_">${party_name}
${attn}
${name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_bd">
<field name="country_code">BD</field>
<field name="format_">${party_name}
${attn}
${name}
${street}
${city}-${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_by">
<field name="country_code">BY</field>
<field name="format_">${party_name}
${name}
${street}
${postal_code}, ${city}
${subdivision}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_be">
<field name="country_code">BE</field>
<field name="format_">${attn}
${party_name}
${name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_br">
<field name="country_code">BR</field>
<field name="format_">${party_name}
${street}
${name}
${city} - ${subdivision_code}
${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_bg">
<field name="country_code">BG</field>
<field name="format_">${party_name}
${street}
${name}
${postal_code} ${city}
${subdivision}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_ca_fr">
<field name="country_code">CA</field>
<field name="language_code">fr</field>
<field name="format_">${attn}
${party_name}
${name}
${street}
${city} (${subdivision}) ${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_ca">
<field name="country_code">CA</field>
<field name="format_">${ATTN}
${PARTY_NAME}
${NAME}
${STREET}
${CITY} ${SUBDIVISION_CODE} ${POSTAL_CODE}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_cl">
<field name="country_code">CL</field>
<field name="format_">${party_name}
${street}
${name}
${postal_code}
${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_cn_zh_CN">
<field name="country_code">CN</field>
<field name="language_code">zh</field>
<field name="format_">${COUNTRY} ${POSTAL_CODE}
${subdivision}${city}${street}${name}
${party_name}</field>
</record>
<record model="party.address.format" id="address_format_cn">
<field name="country_code">CN</field>
<field name="format_">${COUNTRY} ${POSTAL_CODE}
${subdivision}, ${city}, ${street}, ${name}
${party_name}</field>
</record>
<record model="party.address.format" id="address_format_hr">
<field name="country_code">HR</field>
<field name="format_">${party_name}
${street}
${COUNTRY_CODE}-${POSTAL_CODE} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_cz">
<field name="country_code">CZ</field>
<field name="format_">${party_name}
${attn}
${street}
${COUNTRY_CODE}-${POSTAL_CODE} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_dk">
<field name="country_code">DK</field>
<field name="format_">${party_name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_ee">
<field name="country_code">EE</field>
<field name="format_">${party_name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_fi">
<field name="country_code">FI</field>
<field name="format_">${attn}
${party_name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_fr">
<field name="country_code">FR</field>
<field name="format_">${party_name}
${attn}
${name}
${street}
${POSTAL_CODE} ${CITY}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_de">
<field name="country_code">DE</field>
<field name="format_">${party_name}
${attn}
${name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_gr">
<field name="country_code">GR</field>
<field name="format_">${party_name}
${street}
${COUNTRY_CODE}-${POSTAL_CODE} ${CITY}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_hk">
<field name="country_code">HK</field>
<field name="format_">${party_name}
${name}
${street}
${subdivision}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_hu">
<field name="country_code">HU</field>
<field name="format_">${party_name}
${city}
${street}
${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_is">
<field name="country_code">IS</field>
<field name="format_">${party_name}
${street}
${name}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_in">
<field name="country_code">IN</field>
<field name="format_">${party_name}
${name}
${street}
${CITY} ${postal_code}
${subdivision}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_id">
<field name="country_code">ID</field>
<field name="format_">${party_name}
${name}
${street}
${city} ${postal_code}
${subdivision}
${COUNTRY}</field>
</record>
<record model="party.address.subdivision_type" id="address_subdivision_type_id">
<field name="country_code">ID</field>
<field name="types" eval="['province', 'autonomous province', 'special district', 'special region']"/>
</record>
<record model="party.address.format" id="address_format_ir">
<field name="country_code">IR</field>
<field name="format_">${party_name}
${name}
${city}
${street}
${subdivision}
${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_iq">
<field name="country_code">IQ</field>
<field name="format_">${party_name}
${street}
${name}
${subdivision}
${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_ie">
<field name="country_code">IE</field>
<field name="format_">${party_name}
${street}
${city} ${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_il">
<field name="country_code">IL</field>
<field name="format_">${party_name}
${street}
${city} ${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_it">
<field name="country_code">IT</field>
<field name="format_">${party_name}
${attn}
${name}
${street}
${postal_code} ${city} ${SUBDIVISION_CODE}
${COUNTRY}</field>
</record>
<record model="party.address.subdivision_type" id="address_subdivision_it">
<field name="country_code">IT</field>
<field name="types" eval="['province']"/>
</record>
<record model="party.address.format" id="address_format_jp_jp">
<field name="country_code">JP</field>
<field name="language_code">jp</field>
<field name="format_">${COUNTRY}
${postal_code}
${subdivision}${city}${street}
${party_name}</field>
</record>
<record model="party.address.format" id="address_format_jp">
<field name="country_code">JP</field>
<field name="format_">${party_name}
${street}
${city}, ${SUBDIVISION} ${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_kr_ko">
<field name="country_code">KR</field>
<field name="language_code">ko</field>
<field name="format_">${COUNTRY}
${street}
${party_name}
${postal_code}</field>
</record>
<record model="party.address.format" id="address_format_kr">
<field name="country_code">KR</field>
<field name="format_">${party_name}
${street}
${city}, ${subdivision} ${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_lv">
<field name="country_code">LV</field>
<field name="format_">${party_name}
${street}
${city}
${subdivision}
${COUNTRY_CODE}-${POSTAL_CODE}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_mo_zh_CN">
<field name="country_code">MO</field>
<field name="language_code">zh</field>
<field name="format_">${COUNTRY}
${city}
${street}
${party_name}</field>
</record>
<record model="party.address.format" id="address_format_mo">
<field name="country_code">MO</field>
<field name="format_">${party_name}
${street}
${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_my">
<field name="country_code">MY</field>
<field name="format_">${attn}
${party_name}
${name}
${street}
${postal_code} ${CITY}
${SUBDIVISION}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_mx">
<field name="country_code">MX</field>
<field name="format_">${attn}
${party_name}
${street}
${name}
${postal_code}, ${city}, ${subdivision}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_nl">
<field name="country_code">NL</field>
<field name="format_">${party_name}
${attn}
${name}
${street}
${postal_code} ${CITY}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_nz">
<field name="country_code">NZ</field>
<field name="format_">${party_name}
${street}
${city} ${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_no">
<field name="country_code">NO</field>
<field name="format_">${party_name}
${street}
${postal_code} ${CITY}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_om">
<field name="country_code">OM</field>
<field name="format_">${party_name}
${street}
${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_pk">
<field name="country_code">PK</field>
<field name="format_">${party_name}
${street}
${city}
${postal_code}
${subdivision}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_pe">
<field name="country_code">PE</field>
<field name="format_">${party_name}
${street}
${name}
${city}
${subdivision}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_ph">
<field name="country_code">PH</field>
<field name="format_">${party_name}
${street}
${postal_code} ${CITY}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_pl">
<field name="country_code">PL</field>
<field name="format_">${attn} ${party_name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_pt">
<field name="country_code">PT</field>
<field name="format_">${party_name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_qa">
<field name="country_code">QA</field>
<field name="format_">${party_name}
${street}
${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_ro">
<field name="country_code">RO</field>
<field name="format_">${attn} ${party_name}
${street}
${city}
${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_ru">
<field name="country_code">RU</field>
<field name="format_">${party_name}
${street}
${city}
${subdivision}
${COUNTRY}
${postal_code}</field>
</record>
<record model="party.address.format" id="address_format_sa">
<field name="country_code">SA</field>
<field name="format_">${party_name}
${street}
${city} ${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_rs">
<field name="country_code">RS</field>
<field name="format_">${party_name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_sg">
<field name="country_code">SG</field>
<field name="format_">${party_name}
${street}
${name}
${CITY} ${POSTAL_CODE}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_sk">
<field name="country_code">SK</field>
<field name="format_">${attn}
${party_name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_sl">
<field name="country_code">SL</field>
<field name="format_">${party_name}
${attn}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_es">
<field name="country_code">ES</field>
<field name="format_">${party_name}
${street}
${postal_code} ${city}
${subdivision}
${COUNTRY}</field>
</record>
<record model="party.address.subdivision_type" id="address_subdivision_es">
<field name="country_code">ES</field>
<field name="types" eval="['province']"/>
</record>
<record model="party.address.format" id="address_format_lk">
<field name="country_code">LK</field>
<field name="format_">${party_name}
${street}
${CITY}
${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_se">
<field name="country_code">SE</field>
<field name="format_">${party_name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_ch">
<field name="country_code">CH</field>
<field name="format_">${party_name}
${street}
${postal_code} ${city}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_tw_zh_CN">
<field name="country_code">TW</field>
<field name="language_code">zh</field>
<field name="format_">${COUNTRY}
${postal_code}
${street}
${party_name}</field>
</record>
<record model="party.address.format" id="address_format_tw">
<field name="country_code">TW</field>
<field name="format_">${party_name}
${street}
${city}, ${subdivision} ${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_th">
<field name="country_code">TH</field>
<field name="format_">${party_name}
${street}
${name}
${subdivision}
${COUNTRY}
${postal_code}</field>
</record>
<record model="party.address.format" id="address_format_tr">
<field name="country_code">TR</field>
<field name="format_">${party_name}
${attn}
${street}
${name}
${postal_code} ${city} ${subdivision}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_ua">
<field name="country_code">UA</field>
<field name="format_">${party_name}
${street}
${city}
${subdivision}
${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_gb">
<field name="country_code">GB</field>
<field name="format_">${party_name}
${street}
${CITY}
${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_us">
<field name="country_code">US</field>
<field name="format_">${attn}
${party_name}
${street}
${city}, ${subdivision_code} ${postal_code}
${COUNTRY}</field>
</record>
<record model="party.address.format" id="address_format_vn">
<field name="country_code">VN</field>
<field name="format_">${party_name}
${street}
${city}
${subdivision}
${COUNTRY}</field>
</record>
</data>
</tryton>
+41
View File
@@ -0,0 +1,41 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from sql.conditionals import Coalesce
from sql.operators import Equal
from trytond.model import (
ModelView, ModelSQL, DeactivableMixin, fields, Exclude, tree)
class Category(DeactivableMixin, tree(separator=' / '), ModelSQL, ModelView):
"Category"
__name__ = 'party.category'
name = fields.Char(
"Name", required=True, translate=True,
help="The main identifier of the category.")
parent = fields.Many2One(
'party.category', "Parent", select=True,
help="Add the category below the parent.")
childs = fields.One2Many(
'party.category', 'parent', "Children",
help="Add children below the category.")
@classmethod
def __setup__(cls):
super(Category, cls).__setup__()
t = cls.__table__()
cls._sql_constraints = [
('name_parent_exclude',
Exclude(t, (t.name, Equal), (Coalesce(t.parent, -1), Equal)),
'party.msg_category_name_unique'),
]
cls._order.insert(0, ('name', 'ASC'))
@classmethod
def __register__(cls, module_name):
super(Category, cls).__register__(module_name)
table_h = cls.__table_handler__(module_name)
# Migration from 4.6: replace unique by exclude
table_h.drop_constraint('name_parent_uniq')

Some files were not shown because too many files have changed in this diff Show More