Browse Source

Merge commit 'a784d0a4d12162c7f43fe058d6a8e41de4ea0a87' as 'account_standard_report'

pull/310/head
Florent de Labarre 7 years ago
parent
commit
d75efeb9eb
  1. 88
      account_standard_report/.gitignore
  2. 674
      account_standard_report/LICENSE
  3. 53
      account_standard_report/README.md
  4. 5
      account_standard_report/__init__.py
  5. 22
      account_standard_report/__manifest__.py
  6. 30
      account_standard_report/data/data_account_standard_report.xml
  7. 18
      account_standard_report/data/report_paperformat.xml
  8. 571
      account_standard_report/i18n/account_standard_report.pot
  9. 591
      account_standard_report/i18n/fr.po
  10. 11
      account_standard_report/migrations/10.0.1.1/post-00-regenrate-shorted.py
  11. 3
      account_standard_report/models/__init__.py
  12. 10
      account_standard_report/models/account.py
  13. 3
      account_standard_report/report/__init__.py
  14. 472
      account_standard_report/report/report_account_standard_excel.py
  15. 353
      account_standard_report/report/report_account_standard_report.xml
  16. BIN
      account_standard_report/static/description/icon.png
  17. 137
      account_standard_report/views/account_standard.xml
  18. 15
      account_standard_report/views/account_view.xml
  19. 3
      account_standard_report/wizard/__init__.py
  20. 973
      account_standard_report/wizard/account_standard_report.py
  21. 70
      account_standard_report/wizard/account_standard_report_view.xml

88
account_standard_report/.gitignore

@ -0,0 +1,88 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IPython Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# dotenv
.env
# virtualenv
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject

674
account_standard_report/LICENSE

@ -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:
{project} Copyright (C) {year} {fullname}
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>.

53
account_standard_report/README.md

@ -0,0 +1,53 @@
Account Standard report
=======================
This module can generate a accounting report in Odoo Tree View, PDF and Excel, with the new implementation of the accounting from Odoo V9.
In this new implementation there are not openning entries, it is a continously accounting. And in some case in repport
the matching have no sense, because some moves are matched with the next year (or after the end date).
Features
========
Report
------
* Odoo Tree View
* Export in PDF
* Export Excel Files (xlsx), build to use pivot table
* General Ledger
* Partner Ledger
* Journal Ledger
* Open Ledger
* Aged balance
Initial balance
---------------
* Initial Balance with detail on unmatching moves from payable/receivable account
* With ou without reduced balance (credit or debit egual zero) on payable/receivable account
* Use the fiscal date of company to generate the initial balance
Matching Number
---------------
* Management of macthing after the end date. (replace by * if one move is dated after the end date)
* The partner ledger unreconciled don't change over time, because the unreconciled entries stay unreconciled even if there are reconcilied with an entrie after the end date.
Installation
============
Just install the module
Go to Accounting/Adviser/Chart of account : set the 'Thrid Parties' field on supplier and custommer accounts.
Usage
=====
* Go to Accounting/Report/Standard Report
* Choose your options
Known issues / Roadmap
======================
Bug Tracker
===========
Contributors
------------
* Florent de Labarre
Maintainer
----------

5
account_standard_report/__init__.py

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
from . import wizard
from . import report
from . import models

22
account_standard_report/__manifest__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
{
'name': 'Standard Accounting Report',
'version': '10.0.1.1.0',
'category': 'Accounting & Finance',
'author': 'Florent de Labarre',
'summary': 'Standard Accounting Report',
'website': 'https://github.com/fmdl',
'depends': ['account', 'report_xlsx'],
'data': [
'data/report_paperformat.xml',
'data/data_account_standard_report.xml',
'report/report_account_standard_report.xml',
'views/account_view.xml',
'views/account_standard.xml',
'wizard/account_standard_report_view.xml',
],
'demo': [],
'installable': True,
'auto_install': False,
}

30
account_standard_report/data/data_account_standard_report.xml

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<report
id="action_standard_report"
model="account.report.standard.ledger"
string="Standard Report"
report_type="qweb-pdf"
name="account_standard_report.report_account_standard_report"
file="account_standard_report.report_account_standard_report"/>
<record id="action_standard_report" model="ir.actions.report.xml">
<field name="print_report_name">(object.report_id.report_name + '.pdf')</field>
</record>
<record id="action_standard_report" model="ir.actions.report.xml">
<field name="paperformat_id" ref="account_standard_report.paperformat_account_standard"/>
</record>
<report
id="action_standard_excel"
model="account.report.standard.ledger"
string="Excel Report"
report_type="xlsx"
name="account_standard_report.report_account_standard_excel"
file="account_standard_report.report_account_standard_excel"/>
<record id="action_standard_excel" model="ir.actions.report.xml">
<field name="print_report_name">(object.report_id.report_name + '.xlsx')</field>
</record>
</data>
</odoo>

18
account_standard_report/data/report_paperformat.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="paperformat_account_standard" model="report.paperformat">
<field name="name">A4 Landscape Account</field>
<field name="default" eval="True"/>
<field name="format">custom</field>
<field name="page_height">297</field>
<field name="page_width">210</field>
<field name="orientation">Landscape</field>
<field name="margin_top">12</field>
<field name="margin_bottom">15</field>
<field name="margin_left">5</field>
<field name="margin_right">5</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">9</field>
<field name="dpi">110</field>
</record>
</odoo>

571
account_standard_report/i18n/account_standard_report.pot

@ -0,0 +1,571 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_standard_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-12 21:44+0000\n"
"PO-Revision-Date: 2017-05-12 21:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_detail_unreconcillied_in_init
msgid " * Check : Add the detail of entries un-reconcillied and with payable/receivable account in the report.\n"
" * Unckeck : no detail.\n"
""
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_rem_futur_reconciled
msgid " * Check : Reconciled Entries matched with futur is considered like unreconciled. Matching number in futur is replace by *.\n"
" * Uncheck : Reconciled Entries matched with futur is considered like reconciled. Carfull use if \"With Reconciled Entries\" is uncheck.\n"
""
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_summary
msgid " * Check : generate a summary report.\n"
" * Uncheck : detail report.\n"
""
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_init_balance_history
msgid " * Check this box if you need to report all the debit and the credit sum before the Start Date.\n"
" * Uncheck this box to report only the balance before the Start Date\n"
""
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_type_ledger
msgid " * General Ledger : Journal entries group by account\n"
" * Partner Leger : Journal entries group by partner, with only payable/recevable accounts\n"
" * Journal Ledger : Journal entries group by journal, without initial balance\n"
" * Open Ledger : Openning journal at Start date\n"
""
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/wizard/account_standard_report.py:603
#, python-format
msgid " Summary"
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "<strong>Company:</strong>"
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "<strong>End Date :</strong>"
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "<strong>Start Date :</strong>"
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "<strong>Target Moves:</strong>"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:103
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Account"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:106
#, python-format
msgid "Account Name"
msgstr ""
#. module: account_standard_report
#: model:ir.model,name:account_standard_report.model_account_report_standard_ledger
msgid "Account Standard Ledger"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_account_in_ex_clude
msgid "Accounts"
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,target_move:0
#: code:addons/account_standard_report/report/report_account_standard_excel.py:26
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "All Entries"
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,target_move:0
#: code:addons/account_standard_report/report/report_account_standard_excel.py:26
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "All Posted Entries"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_periode_date
msgid "Auto complete Start and End date."
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:127
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Balance"
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "Code"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_company_id
msgid "Company"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:18
#, python-format
msgid "Company:"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_create_uid
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_create_uid
msgid "Created by"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_create_date
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_create_date
msgid "Created on"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:124
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Credit"
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "Currency"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:97
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Date"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_date_from
msgid "Date from"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_date_to
msgid "Date to"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:121
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Debit"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_detail_unreconcillied_in_init
msgid "Detail of un-reconcillied payable/receivable entries in initiale balance."
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_display_name
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_display_name
#: model:ir.model.fields,field_description:account_standard_report.field_report_account_standard_report_report_account_standard_report_display_name
msgid "Display Name"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:118
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Due Date"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_date_to
msgid "End Date"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:23
#, python-format
msgid "End Date : %s "
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.account_report_standard_view
msgid "Excel File"
msgstr ""
#. module: account_standard_report
#: model:ir.actions.report.xml,name:account_standard_report.action_standard_excel
msgid "Excel Report"
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,account_methode:0
msgid "Exclude"
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,type_ledger:0
#: code:addons/account_standard_report/wizard/account_standard_report.py:9
#, python-format
msgid "General Ledger"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_id
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_id
#: model:ir.model.fields,field_description:account_standard_report.field_report_account_standard_report_report_account_standard_report_id
msgid "ID"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_account_in_ex_clude
msgid "If empty, get all accounts"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_partner_ids
msgid "If empty, get all partners"
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,account_methode:0
msgid "Include"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_amount_currency
msgid "It adds the currency column on report if the currency differs from the company currency."
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:100
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "JRNL"
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,type_ledger:0
#: code:addons/account_standard_report/wizard/account_standard_report.py:19
#, python-format
msgid "Journal Ledger"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:109
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Journal entries"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_journal_ids
msgid "Journals"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger___last_update
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode___last_update
#: model:ir.model.fields,field_description:account_standard_report.field_report_account_standard_report_report_account_standard_report___last_update
msgid "Last Modified on"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_write_uid
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_write_uid
msgid "Last Updated by"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_write_date
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_write_date
msgid "Last Updated on"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:130
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Match."
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_account_methode
msgid "Methode"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_name
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "Name"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:28
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Only UnReconciled Entries"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_reconciled
msgid "Only for entrie with a payable/receivable account.\n"
" * Check this box to see un-reconcillied and reconciled entries with payable.\n"
" * Uncheck to see only un-reconcillied entries. Can be use only with parnter ledger.\n"
""
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,type_ledger:0
#: code:addons/account_standard_report/wizard/account_standard_report.py:24
#, python-format
msgid "Open Ledger"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:115
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Partner"
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,type_ledger:0
#: code:addons/account_standard_report/wizard/account_standard_report.py:14
#, python-format
msgid "Partner Ledger"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_result_selection
msgid "Partner's"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_partner_ids
msgid "Partners"
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,result_selection:0
msgid "Payable Accounts"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_init_balance_history
msgid "Payable/receivable initial balance with history."
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_date
msgid "Periode"
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.account_report_standard_view
msgid "Print PDF"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:20
#, python-format
msgid "Print on %s"
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,result_selection:0
msgid "Receivable Accounts"
msgstr ""
#. module: account_standard_report
#: selection:account.report.standard.ledger,result_selection:0
msgid "Receivable and Payable Accounts"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:112
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Ref"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_report_name
msgid "Report Name"
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.account_report_standard_view
msgid "Report Options"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_sum_group_by_bottom
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_sum_group_by_top
msgid "See the sum of element on top."
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_journal_ids
msgid "Select journal, for the Open Ledger you need to set all journals."
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.account_report_standard_view
msgid "Standard Accounting Report"
msgstr ""
#. module: account_standard_report
#: model:ir.actions.act_window,name:account_standard_report.action_account_standard_report_menu
#: model:ir.actions.report.xml,name:account_standard_report.action_standard_report
#: model:ir.ui.menu,name:account_standard_report.menu_account_standard_report
msgid "Standard Report"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_date_from
msgid "Start Date"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:22
#, python-format
msgid "Start Date : %s "
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_sum_group_by_bottom
msgid "Sum on Bottom"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_sum_group_by_top
msgid "Sum on Top"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_summary
msgid "Summary"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_target_move
msgid "Target Moves"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:25
#, python-format
msgid "Target Moves:"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_with_init_balance
msgid "The initial balance is compute with the fiscal date of company.\n"
" * Check this box to generate the summary of initial balance.\n"
" * Uncheck to see all entries.\n"
""
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "Total"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_type_ledger
msgid "Type"
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_date_from
msgid "Use to compute initial balance."
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_date_to
msgid "Use to compute the entrie matched with futur."
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_amount_currency
msgid "With Currency"
msgstr ""
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "With Initial Balance."
msgstr ""
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_with_init_balance
msgid "With Initial Report at Start Date"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:28
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_reconciled
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "With Reconciled Entries"
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:29
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_rem_futur_reconciled
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "With entries matched with other entries dated after End Date."
msgstr ""
#. module: account_standard_report
#: code:addons/account_standard_report/wizard/account_standard_report.py:604
#, python-format
msgid "_summary"
msgstr ""
#. module: account_standard_report
#: model:ir.model,name:account_standard_report.model_account_report_standard_ledger_periode
msgid "account.report.standard.ledger.periode"
msgstr ""
#. module: account_standard_report
#: model:ir.model,name:account_standard_report.model_report_account_standard_report_report_account_standard_report
msgid "report.account_standard_report.report_account_standard_report"
msgstr ""

591
account_standard_report/i18n/fr.po

@ -0,0 +1,591 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_standard_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-12 21:40+0000\n"
"PO-Revision-Date: 2017-05-12 23:46+0200\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: fr\n"
"X-Generator: Poedit 2.0.1\n"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_detail_unreconcillied_in_init
msgid ""
" * Check : Add the detail of entries un-reconcillied and with payable/receivable account in the report.\n"
" * Unckeck : no detail.\n"
msgstr ""
" * Coché : ajoute le détail des écritures non lettrées des comptes des tiers.\n"
" * Décoché : pas de détail.\n"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_rem_futur_reconciled
msgid ""
" * Check : Reconciled Entries matched with futur is considered like unreconciled. Matching number in futur is replace by *.\n"
" * Uncheck : Reconciled Entries matched with futur is considered like reconciled. Carfull use if \"With Reconciled Entries\" is uncheck.\n"
msgstr ""
" * Coché : Les écritures lettrées avec une écriture datée après la période sont considérées comme non lettrées. Le lettre sera remplacé par *.\n"
" * Décoché : Les écritures lettrées avec une écriture datée après la période sont considérées comme lettrées. Attention si « Ecritures lettrées » .\n"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_summary
msgid ""
" * Check : generate a summary report.\n"
" * Uncheck : detail report.\n"
msgstr ""
" * Coché : génère le résumé (ou balance)\n"
" * Décoché : édition détaillée\n"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_init_balance_history
msgid ""
" * Check this box if you need to report all the debit and the credit sum before the Start Date.\n"
" * Uncheck this box to report only the balance before the Start Date\n"
msgstr ""
" * Coché : affiche le total des écritures avant le début de période dans le report initial.\n"
" * Décoché : affiche la balance des écritures avant le début de période dans le report initial.\n"
"\n"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_type_ledger
msgid ""
" * General Ledger : Journal entries group by account\n"
" * Partner Leger : Journal entries group by partner, with only payable/recevable accounts\n"
" * Journal Ledger : Journal entries group by journal, without initial balance\n"
" * Open Ledger : Openning journal at Start date\n"
msgstr ""
" * Grand livre : Ecritures groupées par compte\n"
" * Livre des tiers : Ecritures groupées par tiers\n"
" * Journal : Ecritures groupées par journal\n"
" * Journal d’ouverture : Génère l’édition des à-nouveaux\n"
#. module: account_standard_report
#: code:addons/account_standard_report/wizard/account_standard_report.py:603
#, python-format
msgid " Summary"
msgstr " Balance"
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "<strong>Company:</strong>"
msgstr "<strong>Société :</strong>"
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "<strong>End Date :</strong>"
msgstr "<strong>Au :</strong>"
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "<strong>Start Date :</strong>"
msgstr "<strong>Période du :</strong>"
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "<strong>Target Moves:</strong>"
msgstr "<strong>Statut des écritures</strong>"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:103
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Account"
msgstr "Compte"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:106
#, python-format
msgid "Account Name"
msgstr "Description"
#. module: account_standard_report
#: model:ir.model,name:account_standard_report.model_account_report_standard_ledger
msgid "Account Standard Ledger"
msgstr "Edition standard comptable"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_account_in_ex_clude
msgid "Accounts"
msgstr "Comptes"
#. module: account_standard_report
#: selection:account.report.standard.ledger,target_move:0
#: code:addons/account_standard_report/report/report_account_standard_excel.py:26
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "All Entries"
msgstr "Toutes les écritures"
#. module: account_standard_report
#: selection:account.report.standard.ledger,target_move:0
#: code:addons/account_standard_report/report/report_account_standard_excel.py:26
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "All Posted Entries"
msgstr "Toutes les écritures validées"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_periode_date
msgid "Auto complete Start and End date."
msgstr "Auto-complétion de la période."
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:127
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Balance"
msgstr "Balance"
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "Code"
msgstr "Code"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_company_id
msgid "Company"
msgstr "Société"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:18
#, python-format
msgid "Company:"
msgstr "Société:"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_create_uid
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_create_uid
msgid "Created by"
msgstr "Créé par"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_create_date
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_create_date
msgid "Created on"
msgstr "Créé le"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:124
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Credit"
msgstr "Crédit"
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "Currency"
msgstr "Devise"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:97
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Date"
msgstr "Date "
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_date_from
msgid "Date from"
msgstr "Période du"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_date_to
msgid "Date to"
msgstr "Au"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:121
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Debit"
msgstr "Débit"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_detail_unreconcillied_in_init
msgid "Detail of un-reconcillied payable/receivable entries in initiale balance."
msgstr "Détail des écritures non réconciliées des comptes tiers dans la balance initiale."
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_display_name
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_display_name
#: model:ir.model.fields,field_description:account_standard_report.field_report_account_standard_report_report_account_standard_report_display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:118
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Due Date"
msgstr "Date d'échéance"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_date_to
msgid "End Date"
msgstr "Date de fin"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:23
#, python-format
msgid "End Date : %s "
msgstr "Au : %s "
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.account_report_standard_view
msgid "Excel File"
msgstr "Fichier Excel"
#. module: account_standard_report
#: model:ir.actions.report.xml,name:account_standard_report.action_standard_excel
msgid "Excel Report"
msgstr "Edition Excel"
#. module: account_standard_report
#: selection:account.report.standard.ledger,account_methode:0
msgid "Exclude"
msgstr "Exclure"
#. module: account_standard_report
#: selection:account.report.standard.ledger,type_ledger:0
#: code:addons/account_standard_report/wizard/account_standard_report.py:9
#, python-format
msgid "General Ledger"
msgstr "Grand Livre"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_id
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_id
#: model:ir.model.fields,field_description:account_standard_report.field_report_account_standard_report_report_account_standard_report_id
msgid "ID"
msgstr "ID"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_account_in_ex_clude
msgid "If empty, get all accounts"
msgstr "Si vide, tous les comptes comptables tiers seront pris"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_partner_ids
msgid "If empty, get all partners"
msgstr "Si vide, tous les partenaires ayant des écritures seront pris"
#. module: account_standard_report
#: selection:account.report.standard.ledger,account_methode:0
msgid "Include"
msgstr "Inclure"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_amount_currency
msgid "It adds the currency column on report if the currency differs from the company currency."
msgstr "Il ajoute la colonne devise sur le rapport si la devise est différente de la devise de la société."
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:100
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "JRNL"
msgstr "JRNL"
#. module: account_standard_report
#: selection:account.report.standard.ledger,type_ledger:0
#: code:addons/account_standard_report/wizard/account_standard_report.py:19
#, python-format
msgid "Journal Ledger"
msgstr "Journal"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:109
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Journal entries"
msgstr "Pièces comptables"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_journal_ids
msgid "Journals"
msgstr "Journaux"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger___last_update
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode___last_update
#: model:ir.model.fields,field_description:account_standard_report.field_report_account_standard_report_report_account_standard_report___last_update
msgid "Last Modified on"
msgstr "Dernière Modification le"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_write_uid
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_write_date
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:130
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Match."
msgstr "Let."
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_account_methode
msgid "Methode"
msgstr "Méthode"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_name
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "Name"
msgstr "Nom"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:28
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Only UnReconciled Entries"
msgstr "Seulement les écritures non lettrées"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_reconciled
msgid ""
"Only for entrie with a payable/receivable account.\n"
" * Check this box to see un-reconcillied and reconciled entries with payable.\n"
" * Uncheck to see only un-reconcillied entries. Can be use only with parnter ledger.\n"
msgstr ""
"Seulement pour les écritures des comptes de tiers.\n"
" * Cocher cette case pour voir les écritures lettrées et non lettrées.\n"
" * Décocher pour voir seulement les écritures réconciliées. Doit être utiliser pour l’édition du livre des tiers.\n"
#. module: account_standard_report
#: selection:account.report.standard.ledger,type_ledger:0
#: code:addons/account_standard_report/wizard/account_standard_report.py:24
#, python-format
msgid "Open Ledger"
msgstr "Journal d’ouverture"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:115
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Partner"
msgstr "Partenaire"
#. module: account_standard_report
#: selection:account.report.standard.ledger,type_ledger:0
#: code:addons/account_standard_report/wizard/account_standard_report.py:14
#, python-format
msgid "Partner Ledger"
msgstr "Livre des tiers"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_result_selection
msgid "Partner's"
msgstr "Du partenaire"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_partner_ids
msgid "Partners"
msgstr "Partenaires"
#. module: account_standard_report
#: selection:account.report.standard.ledger,result_selection:0
msgid "Payable Accounts"
msgstr "Comptes fournisseurs"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_init_balance_history
msgid "Payable/receivable initial balance with history."
msgstr "Total initial des comptes tiers."
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_periode_date
msgid "Periode"
msgstr "Periode"
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.account_report_standard_view
msgid "Print PDF"
msgstr "Impression PDF"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:20
#, python-format
msgid "Print on %s"
msgstr "Imprimé le %s"
#. module: account_standard_report
#: selection:account.report.standard.ledger,result_selection:0
msgid "Receivable Accounts"
msgstr "Comptes clients"
#. module: account_standard_report
#: selection:account.report.standard.ledger,result_selection:0
msgid "Receivable and Payable Accounts"
msgstr "Comptes des tiers"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:112
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "Ref"
msgstr "Réf"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_report_name
msgid "Report Name"
msgstr "Nom du rapport"
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.account_report_standard_view
msgid "Report Options"
msgstr "Options du Rapport"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_sum_group_by_bottom
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_sum_group_by_top
msgid "See the sum of element on top."
msgstr "Affiche la somme au dessus."
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_journal_ids
msgid "Select journal, for the Open Ledger you need to set all journals."
msgstr "Sélectionner le journal, pour le journal d’ouverture vous devez mettre tous les journaux."
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.account_report_standard_view
msgid "Standard Accounting Report"
msgstr "Edition standard de comptabilité"
#. module: account_standard_report
#: model:ir.actions.act_window,name:account_standard_report.action_account_standard_report_menu
#: model:ir.actions.report.xml,name:account_standard_report.action_standard_report
#: model:ir.ui.menu,name:account_standard_report.menu_account_standard_report
msgid "Standard Report"
msgstr "Edition standard"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_date_from
msgid "Start Date"
msgstr "Date de début"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:22
#, python-format
msgid "Start Date : %s "
msgstr "Période : %s "
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_sum_group_by_bottom
msgid "Sum on Bottom"
msgstr "Somme en bas"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_sum_group_by_top
msgid "Sum on Top"
msgstr "Somme au dessus"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_summary
msgid "Summary"
msgstr "Résumé"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_target_move
msgid "Target Moves"
msgstr "Statu des écritures"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:25
#, python-format
msgid "Target Moves:"
msgstr "Statut des Ecritures:"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_with_init_balance
msgid ""
"The initial balance is compute with the fiscal date of company.\n"
" * Check this box to generate the summary of initial balance.\n"
" * Uncheck to see all entries.\n"
msgstr ""
"La balance initial est calculée à partir des périodes fiscales de l'entreprise.\n"
" * Coché cette case pour afficher la balance initiale de façon condensé.\n"
" * Décoché cela affiche toutes les écritures passées.\n"
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "Total"
msgstr "Total"
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_type_ledger
msgid "Type"
msgstr "Type"
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_date_from
msgid "Use to compute initial balance."
msgstr "Calcul la balance initiale."
#. module: account_standard_report
#: model:ir.model.fields,help:account_standard_report.field_account_report_standard_ledger_date_to
msgid "Use to compute the entrie matched with futur."
msgstr "Calcul si l'écriture est lettrée avec une autre écriture datée après la période."
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_amount_currency
msgid "With Currency"
msgstr "Avec devise"
#. module: account_standard_report
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
msgid "With Initial Balance."
msgstr "Avec balance initiale."
#. module: account_standard_report
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_with_init_balance
msgid "With Initial Report at Start Date"
msgstr "Avec balance initiale à la date de début de période"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:28
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_reconciled
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "With Reconciled Entries"
msgstr "Ecritures lettrées"
#. module: account_standard_report
#: code:addons/account_standard_report/report/report_account_standard_excel.py:29
#: model:ir.model.fields,field_description:account_standard_report.field_account_report_standard_ledger_rem_futur_reconciled
#: model:ir.ui.view,arch_db:account_standard_report.report_account_standard_report
#, python-format
msgid "With entries matched with other entries dated after End Date."
msgstr "Avec la gestion des écritures lettrées avec une autre écriture datée après la période."
#. module: account_standard_report
#: code:addons/account_standard_report/wizard/account_standard_report.py:604
#, python-format
msgid "_summary"
msgstr "_balance"
#. module: account_standard_report
#: model:ir.model,name:account_standard_report.model_account_report_standard_ledger_periode
msgid "account.report.standard.ledger.periode"
msgstr "account.report.standard.ledger.periode"
#. module: account_standard_report
#: model:ir.model,name:account_standard_report.model_report_account_standard_report_report_account_standard_report
msgid "report.account_standard_report.report_account_standard_report"
msgstr "report.account_standard_report.report_account_standard_report"

11
account_standard_report/migrations/10.0.1.1/post-00-regenrate-shorted.py

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
import logging
from odoo import api
logger = logging.getLogger('MIG compacted')
def migrate(cr, v):
with api.Environment.manage():
cr.execute("""UPDATE account_account SET compacted = FALSE WHERE compacted IS NULL;""")

3
account_standard_report/models/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import account

10
account_standard_report/models/account.py

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from odoo import models, fields
class AccountAccount(models.Model):
_inherit = 'account.account'
compacted = fields.Boolean('Compacte reconciled entries.', help='If flagged, no details will be displayed in the Standard report, only compacted amounts per period.', default=False)
type_third_parties = fields.Selection([('no', 'No'), ('supplier', 'Supplier'), ('customer', 'Customer')], string='Third Partie', required=True, default='no')

3
account_standard_report/report/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import report_account_standard_excel

472
account_standard_report/report/report_account_standard_excel.py

@ -0,0 +1,472 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from odoo.addons.report_xlsx.report.report_xlsx import ReportXlsx
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT
from odoo import _
class AccountStandardExcel(ReportXlsx):
def generate_xlsx_report(self, workbook, data, wizard):
num_format = _('_ * #,##0.00_) ;_ * - #,##0.00_) ;_ * "-"??_) ;_ @_ ')
bold = workbook.add_format({'bold': True})
middle = workbook.add_format({'bold': True, 'top': 1})
left = workbook.add_format({'left': 1, 'top': 1, 'bold': True})
right = workbook.add_format({'right': 1, 'top': 1})
top = workbook.add_format({'top': 1})
currency_format = workbook.add_format({'num_format': _(num_format)})
c_middle = workbook.add_format({'bold': True, 'top': 1, 'num_format': _(num_format)})
report_format = workbook.add_format({'font_size': 24})
rounding = self.env.user.company_id.currency_id.decimal_places or 2
lang_code = self.env.user.lang or 'en_US'
date_format = self.env['res.lang']._lang_get(lang_code).date_format
report = wizard.report_id
def _get_data_float(data):
if data == None or data == False:
return 0.0
else:
return wizard.company_currency_id.round(data) + 0.0
def get_date_format(date):
if date:
date = datetime.strptime(date, DEFAULT_SERVER_DATE_FORMAT)
date = date.strftime(date_format)
return date
def _header_sheet(sheet):
sheet.write(0, 4, report.name, report_format)
sheet.write(2, 0, _('Company:'), bold)
sheet.write(3, 0, wizard.company_id.name,)
sheet.write(4, 0, _('Print on %s') % report.print_time)
sheet.write(2, 2, _('Start Date : %s ') % wizard.date_from if wizard.date_from else '')
sheet.write(3, 2, _('End Date : %s ') % wizard.date_to if wizard.date_to else '')
sheet.write(2, 4, _('Target Moves:'), bold)
sheet.write(3, 4, _('All Entries') if wizard.target_move == 'all' else _('All Posted Entries'))
sheet.write(2, 6, _('Only UnReconciled Entries') if wizard.reconciled is False else _('With Reconciled Entries'), bold)
if wizard.type_ledger == 'aged':
if wizard.summary:
sheet = workbook.add_worksheet(report.name)
_header_sheet(sheet)
head = [
{'name': 'Code',
'larg': 10,
'col': {}},
{'name': 'Name',
'larg': 30,
'col': {}},
{'name': _('Not Due'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('0-30'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('30-60'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('60-90'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('90-120'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('Older'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('Total'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
]
all_lines = wizard._sql_get_line_for_report(type_l=('4_total',))
# print(all_lines)
if all_lines:
row = 6
row += 1
start_row = row
for i, line in enumerate(all_lines):
i += row
sheet.write(i, 0, line.get('code', ''))
sheet.write(i, 1, line.get('name', ''))
sheet.write(i, 2, _get_data_float(line.get('current')), currency_format)
sheet.write(i, 3, _get_data_float(line.get('age_30_days')), currency_format)
sheet.write(i, 4, _get_data_float(line.get('age_60_days')), currency_format)
sheet.write(i, 5, _get_data_float(line.get('age_90_days')), currency_format)
sheet.write(i, 6, _get_data_float(line.get('age_120_days')), currency_format)
sheet.write(i, 7, _get_data_float(line.get('older')), currency_format)
sheet.write(i, 8, _get_data_float(line.get('balance')), currency_format)
row = i
for j, h in enumerate(head):
sheet.set_column(j, j, h['larg'])
table = []
for h in head:
col = {}
col['header'] = h['name']
col.update(h['col'])
table.append(col)
sheet.add_table(start_row - 1, 0, row + 1, len(head) - 1,
{'total_row': 1,
'columns': table,
'style': 'Table Style Light 9',
})
else: # aged not summary
head = [
{'name': _('Date'),
'larg': 10,
'col': {}},
{'name': _('JRNL'),
'larg': 10,
'col': {}},
{'name': _('Account'),
'larg': 10,
'col': {}},
{'name': _('Account Name'),
'larg': 15,
'col': {}},
{'name': _('Journal entries'),
'larg': 20,
'col': {}},
{'name': _('Ref'),
'larg': 40,
'col': {}},
{'name': _('Partner'),
'larg': 20,
'col': {}},
{'name': _('Due Date'),
'larg': 10,
'col': {}},
{'name': _('Not Due'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('0-30'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('30-60'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('60-90'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('90-120'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('Older'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('Total'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('Match.'),
'larg': 10,
'col': {}},
]
table = []
for h in head:
col = {'header': h['name']}
col.update(h['col'])
table.append(col)
def _set_line(line):
sheet.write(i, 0, get_date_format(line.get('date', '')))
sheet.write(i, 1, line.get('j_code', ''))
sheet.write(i, 2, line.get('a_code', ''))
sheet.write(i, 3, line.get('a_name', ''))
sheet.write(i, 4, line.get('move_name', ''))
sheet.write(i, 5, line.get('displayed_name', ''))
sheet.write(i, 6, line.get('partner_name', ''))
sheet.write(i, 7, get_date_format(line.get('date_maturity', '')))
sheet.write(i, 8, _get_data_float(line.get('current')), currency_format)
sheet.write(i, 9, _get_data_float(line.get('age_30_days')), currency_format)
sheet.write(i, 10, _get_data_float(line.get('age_60_days')), currency_format)
sheet.write(i, 11, _get_data_float(line.get('age_90_days')), currency_format)
sheet.write(i, 12, _get_data_float(line.get('age_120_days')), currency_format)
sheet.write(i, 13, _get_data_float(line.get('older')), currency_format)
sheet.write(i, 14, _get_data_float(line.get('balance')), currency_format)
sheet.write(i, 15, line.get('matching_number', ''))
def _set_table(start_row, row):
sheet.add_table(start_row - 1, 0, row + 1, len(head) - 1,
{'total_row': 1,
'columns': table,
'style': 'Table Style Light 9',
})
#sheet.write(row + 1, 10, "=I%s-J%s" % (row + 2, row + 2), currency_format)
# With total workbook
sheet = workbook.add_worksheet(report.name + _(' Totals'))
_header_sheet(sheet)
row = 6
all_lines = wizard._sql_get_line_for_report(type_l=('1_init_line', '2_line'))
for obj in report.report_object_ids:
lines_obj = []
obj_id = obj.id
for line in all_lines:
if line.get('report_object_id') == obj_id:
lines_obj.append(line)
if lines_obj:
row += 1
sheet.write(row, 0, obj.partner_id.name, left) # obj.partner_id.name
sheet.write(row, 1, '', top)
sheet.write(row, 2, '', top)
sheet.write(row, 3, '', top)
sheet.write(row, 4, '', top)
sheet.write(row, 5, '', top)
sheet.write(row, 6, '', c_middle)
sheet.write(row, 7, '', c_middle)
sheet.write(row, 8, '', c_middle)
sheet.write(row, 9, '', c_middle)
sheet.write(row, 10, '', c_middle)
sheet.write(row, 11, '', c_middle)
sheet.write(row, 12, '', c_middle)
sheet.write(row, 13, '', c_middle)
sheet.write(row, 14, '', c_middle)
sheet.write(row, 15, '', right)
row += 2
start_row = row
for i, line in enumerate(lines_obj):
i += row
_set_line(line)
row = i
for j, h in enumerate(head):
sheet.set_column(j, j, h['larg'])
_set_table(start_row, row)
row += 2
# Pivot
sheet = workbook.add_worksheet(report.name)
_header_sheet(sheet)
# for group_by in data['group_by_data']['ids']:
# for line in data['lines_group_by'][group_by]['new_lines']:
# if line['type_line'] != 'total':
# all_lines.append(line)
# Head
if all_lines:
row = 6
row += 1
start_row = row
for i, line in enumerate(all_lines):
i += row
_set_line(line)
row = i
for j, h in enumerate(head):
sheet.set_column(j, j, h['larg'])
_set_table(start_row, row)
else: # standard report
if wizard.summary:
sheet = workbook.add_worksheet(report.name)
_header_sheet(sheet)
all_lines = wizard._sql_get_line_for_report(type_l=('4_total',))
# for group_by in data['group_by_data']['ids']:
# all_lines.append(data['lines_group_by'][group_by])
if all_lines:
# Head
head = [
{'name': 'Code',
'larg': 10,
'col': {}},
{'name': 'Name',
'larg': 30,
'col': {}},
{'name': 'Debit',
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': 'Credit',
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': 'Balance',
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
]
row = 6
row += 1
start_row = row
for i, line in enumerate(all_lines):
i += row
sheet.write(i, 0, line.get('code', ''))
sheet.write(i, 1, line.get('name', ''))
sheet.write(i, 2, line.get('debit', ''), currency_format)
sheet.write(i, 3, line.get('credit', ''), currency_format)
sheet.write(i, 4, line.get('balance', ''), currency_format)
row = i
for j, h in enumerate(head):
sheet.set_column(j, j, h['larg'])
table = []
for h in head:
col = {}
col['header'] = h['name']
col.update(h['col'])
table.append(col)
sheet.add_table(start_row - 1, 0, row + 1, len(head) - 1,
{'total_row': 1,
'columns': table,
'style': 'Table Style Light 9',
})
else: # not summary
head = [
{'name': _('Date'),
'larg': 10,
'col': {}},
{'name': _('JRNL'),
'larg': 10,
'col': {}},
{'name': _('Account'),
'larg': 10,
'col': {}},
{'name': _('Account Name'),
'larg': 15,
'col': {}},
{'name': _('Journal entries'),
'larg': 20,
'col': {}},
{'name': _('Ref'),
'larg': 40,
'col': {}},
{'name': _('Partner'),
'larg': 20,
'col': {}},
{'name': _('Due Date'),
'larg': 10,
'col': {}},
{'name': _('Debit'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('Credit'),
'larg': 15,
'col': {'total_function': 'sum', 'format': currency_format}},
{'name': _('Balance'),
'larg': 15,
'col': {'format': currency_format}},
{'name': _('Match.'),
'larg': 10,
'col': {}},
]
table = []
for h in head:
col = {'header': h['name']}
col.update(h['col'])
table.append(col)
def _set_line(line):
sheet.write(i, 0, get_date_format(line.get('date', '')) if line.get('type_view') != 'init' else 'INIT')
sheet.write(i, 1, line.get('j_code', ''))
sheet.write(i, 2, line.get('a_code', ''))
sheet.write(i, 3, line.get('a_name', ''))
sheet.write(i, 4, line.get('move_name', ''))
sheet.write(i, 5, line.get('displayed_name', ''))
sheet.write(i, 6, line.get('partner_name', ''))
sheet.write(i, 7, get_date_format(line.get('date_maturity', '')))
sheet.write(i, 8, _get_data_float(line.get('debit', '')), currency_format)
sheet.write(i, 9, _get_data_float(line.get('credit', '')), currency_format)
sheet.write(i, 10, _get_data_float(line.get('cumul_balance', '')), currency_format)
sheet.write(i, 11, line.get('matching_number', ''))
def _set_table(start_row, row):
sheet.add_table(start_row - 1, 0, row + 1, len(head) - 1,
{'total_row': 1,
'columns': table,
'style': 'Table Style Light 9',
})
#sheet.write(row + 1, 10, "=I%s-J%s" % (row + 2, row + 2), currency_format)
# With total workbook
sheet = workbook.add_worksheet(report.name + _(' Totals'))
_header_sheet(sheet)
row = 6
all_lines = wizard._sql_get_line_for_report(type_l=('0_init', '1_init_line', '2_line'))
for obj in report.report_object_ids:
lines_obj = []
obj_id = obj.id
for line in all_lines:
if line.get('report_object_id') == obj_id:
lines_obj.append(line)
if lines_obj:
row += 1
name_view = ''
if wizard.type == 'account':
name_view = obj.account_id.display_name
if wizard.type == 'partner':
name_view = obj.partner_id.display_name
if wizard.type == 'journal':
name_view = obj.journal_id.display_name
sheet.write(row, 0, name_view, left)
sheet.write(row, 1, '', top)
sheet.write(row, 2, '', top)
sheet.write(row, 3, '', top)
sheet.write(row, 4, '', top)
sheet.write(row, 5, '', top)
sheet.write(row, 6, '', top)
sheet.write(row, 7, '', top)
sheet.write(row, 8, '', top)
sheet.write(row, 9, '', top)
sheet.write(row, 10, '', top)
sheet.write(row, 11, '', right)
row += 2
start_row = row
for i, line in enumerate(lines_obj):
i += row
_set_line(line)
row = i
for j, h in enumerate(head):
sheet.set_column(j, j, h['larg'])
_set_table(start_row, row)
row += 2
# Pivot workbook
sheet = workbook.add_worksheet(report.name)
_header_sheet(sheet)
# Head
if all_lines:
row = 6
row += 1
start_row = row
for i, line in enumerate(all_lines):
i += row
_set_line(line)
row = i
for j, h in enumerate(head):
sheet.set_column(j, j, h['larg'])
_set_table(start_row, row)
AccountStandardExcel('report.account_standard_report.report_account_standard_excel', 'account.report.standard.ledger')

353
account_standard_report/report/report_account_standard_report.xml

@ -0,0 +1,353 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_account_standard_report">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="report.internal_layout">
<div class="page" style="font-size:11px">
<h2 t-field="o.report_id.name"/>
<div class="row">
<div class="col-xs-3">
<strong>Company:</strong>
<p t-field="o.company_id"/>
</div>
<div class="col-xs-3">
<t t-if="o.date_from">
<strong>Start Date :</strong>
<span t-field="o.date_from"/><br/></t>
<t t-if="o.date_to">
<strong>End Date :</strong>
<span t-field="o.date_to"/></t>
</div>
<div class="col-xs-3">
<strong>Target Moves:</strong>
<p t-if="o.target_move == 'all'">All Entries</p>
<p t-if="o.target_move == 'posted'">All Posted Entries</p>
</div>
<div class="col-xs-3">
<strong t-if="o.reconciled == True">With Reconciled Entries</strong>
<strong t-if="o.reconciled == False">Only UnReconciled Entries</strong>
</div>
</div>
<t t-if="o.type_ledger == 'aged'">
<table class="table table-condensed">
<thead>
<tr>
<th class="col-xs-1">Total</th>
<th></th>
<th class="col-xs-1 text-right">Not Due</th>
<th class="col-xs-1 text-right">0-30</th>
<th class="col-xs-1 text-right">30-60</th>
<th class="col-xs-1 text-right">60-90</th>
<th class="col-xs-1 text-right">90-120</th>
<th class="col-xs-1 text-right">Older</th>
<th class="col-xs-1 text-right">Total</th>
</tr>
</thead>
<tbody style="white-space:nowrap">
<tr>
<td class="text-right" colspan="3">
<strong t-esc="o.report_id.line_super_total_id.current" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<strong t-esc="o.report_id.line_super_total_id.age_30_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<strong t-esc="o.report_id.line_super_total_id.age_60_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<strong t-esc="o.report_id.line_super_total_id.age_90_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<strong t-esc="o.report_id.line_super_total_id.age_120_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<strong t-esc="o.report_id.line_super_total_id.older" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<strong t-esc="o.report_id.line_super_total_id.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
</tr>
</tbody>
</table>
<t t-if="not o.summary">
<table class="table-condensed">
<thead>
<tr>
<th class="col-xs-1">Date</th>
<th class="col-xs-1">JRNL</th>
<th class="col-xs-1">Account</th>
<th class="col-xs-1">Journal entries</th>
<!-- <th class="col-xs-3">Ref</th> -->
<th class="col-xs-1">Due Date</th>
<th class="col-xs-1 text-right">Not Due</th>
<th class="col-xs-1 text-right">0-30</th>
<th class="col-xs-1 text-right">30-60</th>
<th class="col-xs-1 text-right">60-90</th>
<th class="col-xs-1 text-right">90-120</th>
<th class="col-xs-1 text-right">Older</th>
<th class="col-xs-1 text-right">Total</th>
<th class="col-xs-1">Match.</th>
</tr>
</thead>
<t t-foreach="o.report_id.report_object_ids" t-as="object">
<tbody t-if="object.line_ids" style="border-bottom: 1px solid;margin-bottom:10px">
<tr style="border-bottom: 1px solid #ddd;">
<td colspan="12">
<strong t-field="object.partner_id"/>
</td>
<td></td>
</tr>
<tr t-foreach="object.line_ids" t-as="l">
<td style="white-space:nowrap">
<strong t-if="l.type_view != 'total'" t-field="l.date"></strong>
<strong t-if="l.type_view == 'total'">Total</strong>
</td>
<td>
<span t-if="l.type_view == 'normal'" t-field="l.journal_id.code"></span>
</td>
<td>
<span t-if="l.type_view == 'normal'" t-field="l.account_id.code"></span>
</td>
<td>
<span t-if="l.type_view == 'normal'" t-field="l.move_id"></span>
</td>
<td>
<span t-if="l.type_view == 'normal'" t-field="l.date_maturity"></span>
</td>
<td class="text-right">
<span t-if="l.current and l.type_view == 'normal'" t-esc="l.current" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<strong t-if="l.current and l.type_view == 'total'" t-esc="l.current" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.age_30_days and l.type_view == 'normal'" t-esc="l.age_30_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<strong t-if="l.age_30_days and l.type_view == 'total'" t-esc="l.age_30_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.age_60_days and l.type_view == 'normal'" t-esc="l.age_60_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<strong t-if="l.age_60_days and l.type_view == 'total'" t-esc="l.age_60_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.age_90_days and l.type_view == 'normal'" t-esc="l.age_90_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<strong t-if="l.age_90_days and l.type_view == 'total'" t-esc="l.age_90_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.age_120_days and l.type_view == 'normal'" t-esc="l.age_120_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<strong t-if="l.age_120_days and l.type_view == 'total'" t-esc="l.age_120_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.older and l.type_view == 'normal'" t-esc="l.older" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<strong t-if="l.older and l.type_view == 'total'" t-esc="l.older" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right" style="border-left: 1px dotted #ddd;">
<span t-if="l.type_view == 'normal'" t-esc="l.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<strong t-if="l.type_view == 'total'" t-esc="l.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td>
<span t-if="l.reconciled" t-field="l.full_reconcile_id"/>
<span t-if="not l.reconciled and l.full_reconcile_id">*</span>
</td>
</tr>
</tbody>
</t>
</table>
</t>
<t t-if="o.summary">
<table class="table-condensed">
<thead>
<tr>
<th class="col-xs-1">Partner</th>
<th class="col-xs-1 text-right">Not Due</th>
<th class="col-xs-1 text-right">0-30</th>
<th class="col-xs-1 text-right">30-60</th>
<th class="col-xs-1 text-right">60-90</th>
<th class="col-xs-1 text-right">90-120</th>
<th class="col-xs-1 text-right">Older</th>
<th class="col-xs-1 text-right">Total</th>
</tr>
</thead>
<t t-foreach="o.report_id.line_total_ids" t-as="l">
<tr style="border-bottom: 1px solid #ddd">
<td>
<span t-field="l.partner_id"></span>
</td>
<td class="text-right">
<span t-if="l.current" t-esc="l.current" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.age_30_days" t-esc="l.age_30_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.age_60_days" t-esc="l.age_60_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.age_90_days" t-esc="l.age_90_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.age_120_days" t-esc="l.age_120_days" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.older" t-esc="l.older" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right" style="border-left: 1px dotted #ddd;">
<span t-esc="l.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
</tr>
</t>
</table>
</t>
</t>
<t t-if="o.type_ledger != 'aged'">
<table class="table table-condensed">
<thead>
<tr>
<th class="col-xs-1">Total</th>
<th></th>
<th class="col-xs-1 text-right">Debit</th>
<th class="col-xs-1 text-right">Credit</th>
<th class="col-xs-1 text-right">Balance</th>
</tr>
</thead>
<tbody style="white-space:nowrap">
<tr>
<td class="text-right" colspan="3">
<strong t-esc="o.report_id.line_super_total_id.debit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<strong t-esc="o.report_id.line_super_total_id.credit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<strong t-esc="o.report_id.line_super_total_id.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
</tr>
</tbody>
</table>
<t t-if="o.summary">
<table class="table-condensed">
<thead>
<tr>
<th class="col-xs-1" t-if="o.type == 'journal'">JRNL</th>
<th class="col-xs-1" t-if="o.type == 'account'">Account</th>
<th class="col-xs-1" t-if="o.type == 'partner'">Partner</th>
<th class="col-xs-1 text-right">Debit</th>
<th class="col-xs-1 text-right">Credit</th>
<th class="col-xs-1 text-right">Balance</th>
</tr>
</thead>
<t t-foreach="o.report_id.line_total_ids" t-as="l">
<tr style="border-bottom: 1px solid #ddd">
<td t-if="o.type == 'journal'">
<span t-field="l.journal_id"></span>
</td>
<td t-if="o.type == 'account'">
<span t-field="l.account_id"></span>
</td>
<td t-if="o.type == 'partner'">
<span t-field="l.partner_id"></span>
</td>
<td class="text-right">
<span t-if="l.debit" t-esc="l.debit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.credit" t-esc="l.credit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right" style="border-left: 1px dotted #ddd;">
<span t-esc="l.balance" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
</tr>
</t>
</table>
</t>
<t t-if="not o.summary">
<table class="table-condensed">
<thead>
<tr>
<th class="col-xs-1">Date</th>
<th class="col-xs-1">JRNL</th>
<th class="col-xs-1">Account</th>
<th class="col-xs-1">Journal entries</th>
<th class="col-xs-3">Ref</th>
<th class="col-xs-3">Partner</th>
<th class="col-xs-1">Due Date</th>
<th class="col-xs-1 text-right">Debit</th>
<th class="col-xs-1 text-right">Credit</th>
<th class="col-xs-1 text-right">Balance</th>
<th class="col-xs-1">Match.</th>
</tr>
</thead>
<t t-foreach="o.report_id.report_object_ids" t-as="object">
<tbody t-if="object.line_ids" style="border-bottom: 1px solid;page-break-inside: avoid">
<tr style="border-bottom: 1px solid #ddd;">
<td colspan="10">
<strong t-if="o.type == 'account'" t-field="object.account_id"/>
<strong t-if="o.type == 'partner'" t-field="object.partner_id"/>
<strong t-if="o.type == 'journal'" t-field="object.journal_id"/>
</td>
<td></td>
</tr>
<tr t-foreach="object.line_ids" t-as="l">
<td style="white-space:nowrap">
<i t-if="l.type_view == 'init' and l.type == '1_init_line'" t-field="l.date"></i>
<i t-if="l.type_view == 'init' and l.type == '0_init'">INIT</i>
<strong t-if="l.type_view == 'total'">Total</strong>
<span t-if="l.type_view == 'normal' and l.type == '2_line'" t-field="l.date"></span>
<span t-if="l.type_view == 'normal' and l.type == '3_compact'">Compact</span>
</td>
<td>
<i t-if="l.type_view == 'init'" t-field="l.journal_id.code"></i>
<span t-if="l.type_view == 'normal'" t-field="l.journal_id.code"></span>
</td>
<td>
<i t-if="l.type_view == 'init'" t-field="l.account_id.code"></i>
<span t-if="l.type_view == 'normal'" t-field="l.account_id.code"></span>
</td>
<td>
<i t-if="l.type_view == 'init'" t-field="l.move_id"></i>
<span t-if="l.type_view == 'normal'" t-field="l.move_id"></span>
</td>
<td>
<i t-if="l.type_view == 'init'" t-field="l.move_line_id.ref"></i>
<span t-if="l.type_view == 'normal'" t-field="l.move_line_id.ref"></span>
</td>
<td>
<i t-if="l.type_view == 'init'" t-field="l.partner_id"></i>
<span t-if="l.type_view == 'normal'" t-field="l.partner_id"></span>
</td>
<td>
<i t-if="l.type_view == 'init'" t-field="l.date_maturity"></i>
<span t-if="l.type_view == 'normal'" t-field="l.date_maturity"></span>
</td>
<td class="text-right">
<span t-if="l.debit and l.type_view == 'normal'" t-esc="l.debit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<i t-if="l.debit and l.type_view == 'init'" t-esc="l.debit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<strong t-if="l.debit and l.type_view == 'total'" t-esc="l.debit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right">
<span t-if="l.credit and l.type_view == 'normal'" t-esc="l.credit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<i t-if="l.credit and l.type_view == 'init'" t-esc="l.credit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<strong t-if="l.credit and l.type_view == 'total'" t-esc="l.credit" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td class="text-right" style="white-space:nowrap">
<span t-esc="o.company_currency_id.round(l.cumul_balance) + 0.0" t-if="l.type_view == 'normal'" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<i t-esc="o.company_currency_id.round(l.cumul_balance) + 0.0" t-if="l.type_view == 'init'" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
<strong t-esc="o.company_currency_id.round(l.cumul_balance) + 0.0" t-if="l.type_view == 'total'" t-esc-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
<td>
<span t-if="l.reconciled" t-field="l.full_reconcile_id"/>
<span t-if="not l.reconciled and l.full_reconcile_id">*</span>
</td>
</tr>
</tbody>
</t>
</table>
</t>
</t>
</div>
</t>
</t>
</t>
</template>
</odoo>

BIN
account_standard_report/static/description/icon.png

After

Width: 200  |  Height: 200  |  Size: 4.6 KiB

137
account_standard_report/views/account_standard.xml

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.ui.view" id="view_account_report_standard_ledger_line_tree">
<field name="name">account.report.standard.ledger.line</field>
<field name="model">account.report.standard.ledger.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree>
<field name="type"/>
<field name="date"/>
<field name="journal_id"/>
<field name="account_id"/>
<field name="move_id"/>
<field name="partner_id"/>
<field name="debit" sum="Total" attrs="{'invisible':[('debit','=',0)]}"/>
<field name="credit" sum="Total" attrs="{'invisible':[('credit','=',0)]}"/>
<field name="cumul_balance"/>
<field name="full_reconcile_id"/>
<field name="reconciled"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_aged_tree">
<field name="name">account.report.standard.ledger.line</field>
<field name="model">account.report.standard.ledger.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree>
<field name="type"/>
<field name="date"/>
<field name="partner_id"/>
<!-- <field name="account_id"/> -->
<field name="move_id"/>
<!-- <field name="move_line_id"/> -->
<field name="date_maturity"/>
<field name="current" sum="Total" attrs="{'invisible':[('current','=',0)]}"/>
<field name="age_30_days" sum="Total" attrs="{'invisible':[('age_30_days','=',0)]}"/>
<field name="age_60_days" sum="Total" attrs="{'invisible':[('age_60_days','=',0)]}"/>
<field name="age_90_days" sum="Total" attrs="{'invisible':[('age_90_days','=',0)]}"/>
<field name="age_120_days" sum="Total" attrs="{'invisible':[('age_120_days','=',0)]}"/>
<field name="older" sum="Total" attrs="{'invisible':[('older','=',0)]}"/>
<field name="balance" sum="Total"/>
<!-- <field name="cumul_balance"/> -->
<field name="full_reconcile_id"/>
<field name="reconciled"/>
</tree>
</field>
</record>
<record id="account_report_standard_ledger_line_form" model="ir.ui.view">
<field name="name">account.report.standard.ledger.line.form</field>
<field name="model">account.report.standard.ledger.line</field>
<field name="arch" type="xml">
<form string="Journal Item">
<sheet>
<group>
<group>
<field name="type"/>
<field name="move_line_id"/>
<field name="partner_id"/>
</group>
<group>
<field name="journal_id"/>
<field name="date"/>
</group>
</group>
<notebook colspan="4">
<page string="Information">
<group>
<group string="Amount">
<field name="account_id" domain="[('company_id', '=', company_id)]"/>
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
</group>
<group string="Accounting Documents">
<field name="move_id" required="False"/>
</group>
<group string="Dates">
<field name="date_maturity"/>
</group>
<group string="Matching">
<field name="full_reconcile_id"/>
<field name="reconciled"/>
</group>
</group>
</page>
<page string="Other">
<group>
<field name="report_id"/>
<field name="report_object_id"/>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- search view -->
<record id="account_report_standard_ledger_line_search_view" model="ir.ui.view">
<field name="name">account.report.standard.ledger.line.search</field>
<field name="model">account.report.standard.ledger.line</field>
<field name="arch" type="xml">
<search string="Journal Items">
<field name="move_id" filter_domain="['|', ('move_id','ilike',self)]" string="Move"/>
<field name="date"/>
<separator/>
<filter string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
<filter name="posted" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
<separator/>
<filter string="Unreconciled" domain="[('full_reconcile_id', '=', False), ('balance','!=', 0), ('account_id.reconcile','=',True)]" help="Journal items where matching number isn't set" name="unreconciled"/>
<separator/>
<filter string="Supplier" domain="[('account_id.type_third_parties', '=', 'supplier')]" help="From Supplier accounts" name="supplier"/>
<filter string="Customer" domain="[('account_id.type_third_parties', '=', 'customer')]" help="From Customer accounts" name="customer"/>
<filter string="General" domain="[('type', '!=', '4_total')]" context="{'group_by':'account_id'}" name="general"/>
<filter string="Partner" domain="[('type', '!=', '4_total')]" context="{'group_by':'partner_id'}" name="partner"/>
<filter string="Journal" domain="[('type', '!=', '4_total')]" context="{'group_by':'journal_id'}" name="journal"/>
<filter string="Open" domain="[('type', '!=', '4_total')]" context="{'group_by':'account_id'}" name="open"/>
<filter string="Aged Balance" domain="[('type', '!=', '4_total')]" context="{'group_by':'partner_id'}" name="aged"/>
<separator/>
<field name="account_id"/>
<field name="partner_id"/>
<field name="journal_id"/>
<field name="type"/>
<group expand="0" string="Group By">
<filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Account" context="{'group_by':'account_id'}"/>
<filter string="Date" domain="[]" context="{'group_by':'date'}"/>
<filter string="Type" domain="[]" context="{'group_by':'type'}"/>
</group>
</search>
</field>
</record>
</odoo>

15
account_standard_report/views/account_view.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.ui.view" id="view_account_specific_form">
<field name="name">account.account.form.inherit</field>
<field name="inherit_id" ref="account.view_account_form"/>
<field name="model">account.account</field>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="deprecated" position="after">
<field name="compacted" attrs="{'readonly':[('reconcile','=',False)]}"/>
<field name="type_third_parties"/>
</field>
</field>
</record>
</odoo>

3
account_standard_report/wizard/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import account_standard_report

973
account_standard_report/wizard/account_standard_report.py

@ -0,0 +1,973 @@
# -*- coding: utf-8 -*-
import calendar
import odoo.addons.decimal_precision as dp
from datetime import datetime, timedelta
from odoo import api, models, fields, _
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
from odoo.exceptions import AccessError, UserError
D_LEDGER = {'general': {'name': _('General Ledger'),
'group_by': 'account_id',
'model': 'account.account',
'short': 'code',
},
'partner': {'name': _('Partner Ledger'),
'group_by': 'partner_id',
'model': 'res.partner',
'short': 'name',
},
'journal': {'name': _('Journal Ledger'),
'group_by': 'journal_id',
'model': 'account.journal',
'short': 'code',
},
'open': {'name': _('Open Ledger'),
'group_by': 'account_id',
'model': 'account.account',
'short': 'code',
},
'aged': {'name': _('Aged Balance'),
'group_by': 'partner_id',
'model': 'res.partner',
'short': 'name',
},
}
class AccountStandardLedgerPeriode(models.TransientModel):
_name = 'account.report.standard.ledger.periode'
name = fields.Char('Name')
date_from = fields.Datetime('Date from')
date_to = fields.Datetime('Date to')
class AccountStandardLedgerReport(models.TransientModel):
_name = 'account.report.standard.ledger.report'
name = fields.Char()
report_object_ids = fields.One2many('account.report.standard.ledger.report.object', 'report_id')
report_name = fields.Char()
line_total_ids = fields.Many2many('account.report.standard.ledger.line', relation='table_standard_report_line_total')
line_super_total_id = fields.Many2one('account.report.standard.ledger.line')
print_time = fields.Char()
date_from = fields.Date(string='Start Date', help='Use to compute initial balance.')
date_to = fields.Date(string='End Date', help='Use to compute the entrie matched with futur.')
class AccountStandardLedgerLines(models.TransientModel):
_name = 'account.report.standard.ledger.line'
_order = 'id' # ,move_id,account_id #type,date,move_line_id_id,
_rec_name = 'move_id'
report_id = fields.Many2one('account.report.standard.ledger.report')
account_id = fields.Many2one('account.account', 'Account')
type = fields.Selection([('0_init', 'Initial'), ('1_init_line', 'Init Line'), ('2_line', 'Line'), ('3_compact',
'Compacted'), ('4_total', 'Total'), ('5_super_total', 'Super Total')], string='Type')
type_view = fields.Selection([('init', 'Init'), ('normal', 'Normal'), ('total', 'Total')])
journal_id = fields.Many2one('account.journal', 'Journal')
partner_id = fields.Many2one('res.partner', 'Partner')
group_by_key = fields.Char()
move_id = fields.Many2one('account.move', 'Entrie')
move_line_id = fields.Many2one('account.move.line')
date = fields.Date()
date_maturity = fields.Date('Due Date')
debit = fields.Float(default=0.0, digits=dp.get_precision('Account'))
credit = fields.Float(default=0.0, digits=dp.get_precision('Account'))
balance = fields.Float(default=0.0, digits=dp.get_precision('Account'))
cumul_balance = fields.Float(default=0.0, digits=dp.get_precision('Account'), string='Balance')
full_reconcile_id = fields.Many2one('account.full.reconcile', 'Match.')
reconciled = fields.Boolean('Reconciled')
report_object_id = fields.Many2one('account.report.standard.ledger.report.object')
current = fields.Float(default=0.0, digits=dp.get_precision('Account'), string='Not due')
age_30_days = fields.Float(default=0.0, digits=dp.get_precision('Account'), string='30 days')
age_60_days = fields.Float(default=0.0, digits=dp.get_precision('Account'), string='60 days')
age_90_days = fields.Float(default=0.0, digits=dp.get_precision('Account'), string='90 days')
age_120_days = fields.Float(default=0.0, digits=dp.get_precision('Account'), string='120 days')
older = fields.Float(default=0.0, digits=dp.get_precision('Account'), string='Older')
company_currency_id = fields.Many2one('res.currency')
@api.model
def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True):
res = super(AccountStandardLedgerLines, self).read_group(domain, fields, groupby, offset, limit=limit, orderby=orderby, lazy=lazy)
if 'cumul_balance' in fields and 'debit' in fields and 'credit' in fields:
for line in res:
line['cumul_balance'] = line['debit'] - line['credit']
return res
class AccountStandardLedgerReportObject(models.TransientModel):
_name = 'account.report.standard.ledger.report.object'
_order = 'name, id'
name = fields.Char()
object_id = fields.Integer()
report_id = fields.Many2one('account.report.standard.ledger.report')
line_ids = fields.One2many('account.report.standard.ledger.line', 'report_object_id')
account_id = fields.Many2one('account.account', 'Account')
journal_id = fields.Many2one('account.journal', 'Journal')
partner_id = fields.Many2one('res.partner', 'Partner')
class AccountStandardLedger(models.TransientModel):
_name = 'account.report.standard.ledger'
_description = 'Account Standard Ledger'
def _get_periode_date(self):
lang_code = self.env.user.lang or 'en_US'
date_format = self.env['res.lang']._lang_get(lang_code).date_format
today_year = fields.datetime.now().year
last_day = self.company_id.fiscalyear_last_day or 31
last_month = self.company_id.fiscalyear_last_month or 12
periode_obj = self.env['account.report.standard.ledger.periode']
periode_obj.search([]).unlink()
periode_ids = periode_obj
for year in range(today_year, today_year - 4, -1):
date_from = datetime(year - 1, last_month, last_day) + timedelta(days=1)
date_to = datetime(year, last_month, last_day)
user_periode = "%s - %s" % (date_from.strftime(date_format),
date_to.strftime(date_format),
)
vals = {
'name': user_periode,
'date_from': date_from.strftime(DEFAULT_SERVER_DATE_FORMAT),
'date_to': date_to.strftime(DEFAULT_SERVER_DATE_FORMAT), }
periode_ids += periode_obj.create(vals)
return False
name = fields.Char(default='Standard Report')
type_ledger = fields.Selection([('general', 'General Ledger'), ('partner', 'Partner Ledger'), ('journal', 'Journal Ledger'), ('open', 'Open Ledger'), ('aged', 'Aged Balance')], string='Type', default='general', required=True,
help=' * General Ledger : Journal entries group by account\n'
' * Partner Leger : Journal entries group by partner, with only payable/recevable accounts\n'
' * Journal Ledger : Journal entries group by journal, without initial balance\n'
' * Open Ledger : Openning journal at Start date\n')
summary = fields.Boolean('Trial Balance', default=False,
help=' * Check : generate a trial balance.\n'
' * Uncheck : detail report.\n')
amount_currency = fields.Boolean("With Currency", help="It adds the currency column on report if the currency differs from the company currency.")
reconciled = fields.Boolean('With Reconciled Entries', default=True,
help='Only for entrie with a payable/receivable account.\n'
' * Check this box to see un-reconcillied and reconciled entries with payable.\n'
' * Uncheck to see only un-reconcillied entries. Can be use only with parnter ledger.\n')
partner_select_ids = fields.Many2many(comodel_name='res.partner', string='Partners', domain=['|', ('is_company', '=', True), ('parent_id', '=', False)], help='If empty, get all partners')
account_methode = fields.Selection([('include', 'Include'), ('exclude', 'Exclude')], string="Methode")
account_in_ex_clude = fields.Many2many(comodel_name='account.account', string='Accounts', help='If empty, get all accounts')
init_balance_history = fields.Boolean('Initial balance with history.', default=True,
help=' * Check this box if you need to report all the debit and the credit sum before the Start Date.\n'
' * Uncheck this box to report only the balance before the Start Date\n')
company_id = fields.Many2one('res.company', string='Company', readonly=True, default=lambda self: self.env.user.company_id)
company_currency_id = fields.Many2one('res.currency', related='company_id.currency_id', string="Company Currency", readonly=True,
help='Utility field to express amount currency', store=True)
journal_ids = fields.Many2many('account.journal', string='Journals', required=True, default=lambda self: self.env['account.journal'].search([('company_id', '=', self.env.user.company_id.id)]),
help='Select journal, for the Open Ledger you need to set all journals.')
date_from = fields.Date(string='Start Date', help='Use to compute initial balance.')
date_to = fields.Date(string='End Date', help='Use to compute the entrie matched with futur.')
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries'),
], string='Target Moves', required=True, default='posted')
periode_date = fields.Many2one('account.report.standard.ledger.periode', 'Periode', default=_get_periode_date, help="Auto complete Start and End date.")
month_selec = fields.Selection([(1, '01 Junary'), (2, '02 Febuary'), (3, '03 March'), (4, '04 April'), (5, '05 May'), (6, '06 June'),
(7, '07 Jully'), (8, '08 August'), (9, '09 September'), (10, '10 October'), (11, '11 November'), (12, '12 December')],
string='Month')
result_selection = fields.Selection([('customer', 'Customer'),
('supplier', 'Supplier'),
('customer_supplier', 'Receivable and Payable Accounts')
], string="Partner's", required=True, default='supplier')
report_name = fields.Char('Report Name')
compact_account = fields.Boolean('Compacte account.', default=False)
report_id = fields.Many2one('account.report.standard.ledger.report')
account_ids = fields.Many2many('account.account', relation='table_standard_report_accounts')
partner_ids = fields.Many2many('res.partner', relation='table_standard_report_partner')
type = fields.Selection([('account', 'Account'), ('partner', 'Partner'), ('journal', 'Journal')])
@api.onchange('account_in_ex_clude')
def on_change_summary(self):
if self.account_in_ex_clude:
self.account_methode = 'include'
else:
self.account_methode = False
@api.onchange('type_ledger')
def on_change_type_ledger(self):
if self.type_ledger in ('partner', 'journal', 'open', 'aged'):
self.compact_account = False
if self.type_ledger == 'aged':
self.date_from = False
self.reconciled = False
else:
self.on_change_periode_date()
self.on_change_month_selec()
if self.type_ledger not in ('partner', 'aged',):
self.reconciled = True
return {'domain': {'account_in_ex_clude': []}}
self.account_in_ex_clude = False
if self.result_selection == 'suplier':
return {'domain': {'account_in_ex_clude': [('type_third_parties', '=', 'supplier')]}}
if self.result_selection == 'customer':
return {'domain': {'account_in_ex_clude': [('type_third_parties', '=', 'customer')]}}
return {'domain': {'account_in_ex_clude': [('type_third_parties', 'in', ('supplier', 'customer'))]}}
@api.onchange('periode_date')
def on_change_periode_date(self):
if self.periode_date:
self.date_from = self.periode_date.date_from
self.date_to = self.periode_date.date_to
if self.month_selec:
self.on_change_month_selec()
@api.onchange('month_selec')
def on_change_month_selec(self):
if self.periode_date and self.month_selec:
date_from = datetime.strptime(self.periode_date.date_from, DEFAULT_SERVER_DATETIME_FORMAT)
date_from = datetime(date_from.year, self.month_selec, 1)
date_to = datetime(date_from.year, self.month_selec, calendar.monthrange(date_from.year, self.month_selec)[1])
self.date_from = date_from.strftime(DEFAULT_SERVER_DATE_FORMAT)
self.date_to = date_to.strftime(DEFAULT_SERVER_DATE_FORMAT)
elif self.periode_date and not self.month_selec:
self.on_change_periode_date()
def action_view_lines(self):
self.ensure_one()
self._compute_data()
return {
'name': _("Ledger Lines"),
'view_type': 'form',
'view_mode': 'tree,form',
'views': [(self.env.ref('account_standard_report.view_aged_tree').id if self.type_ledger == 'aged' else False, 'tree'), (False, 'form')],
'res_model': 'account.report.standard.ledger.line',
'type': 'ir.actions.act_window',
'domain': "[('report_id','=',%s),('type','not in',('5_super_total','4_total'))]" % (self.report_id.id),
'context': {'search_default_%s' % self.type_ledger: 1, 'read_report_id': self.report_id.id},
'target': 'current',
}
def print_pdf_report(self):
self.ensure_one()
self._compute_data()
return self.env['report'].get_action(self, 'account_standard_report.report_account_standard_report')
def print_excel_report(self):
self.ensure_one()
self._compute_data()
return self.env['report'].get_action(self, 'account_standard_report.report_account_standard_excel')
def _pre_compute(self):
lang_code = self.env.context.get('lang') or 'en_US'
date_format = self.env['res.lang']._lang_get(lang_code).date_format
time_format = self.env['res.lang']._lang_get(lang_code).time_format
vals = {'report_name': self._get_name_report(),
'name': self._get_name_report(),
'print_time': '%s' % fields.Datetime.context_timestamp(self.with_context(tz=self.env.user.tz), datetime.now()).strftime(('%s %s') % (date_format, time_format)),
'date_to': self.date_to if self.date_to else "2099-01-01",
'date_from': self.date_from if self.date_from else "1970-01-01",
}
self.report_id = self.env['account.report.standard.ledger.report'].create(vals)
self.account_ids = self._search_account()
self.partner_ids = self._search_partner()
if self.type_ledger in ('general', 'open'):
self.type = 'account'
elif self.type_ledger in ('partner', 'aged'):
self.type = 'partner'
else:
self.type = 'journal'
if self.type_ledger in ('partner', 'journal', 'open', 'aged'):
self.compact_account = False
if self.type_ledger not in ('partner', 'aged',):
self.reconciled = True
self.partner_select_ids = False
def _compute_data(self):
if not self.user_has_groups('account.group_account_user'):
raise UserError(_('Your are not an accountant !'))
self._pre_compute()
self._sql_report_object()
if self.type == 'account':
self._sql_unaffected_earnings()
if self.type in ('account, partner'):
if self.type_ledger != 'aged':
self._sql_init_balance()
self._sql_lines()
if self.compact_account and self.type_ledger == 'general':
self._sql_lines_compacted()
self._sql_total()
self._sql_super_total()
self.refresh()
# complet total line
line_obj = self.env['account.report.standard.ledger.line']
self.report_id.line_total_ids = line_obj.search([('report_id', '=', self.report_id.id), ('type', '=', '4_total')])
self.report_id.line_super_total_id = line_obj.search([('report_id', '=', self.report_id.id), ('type', '=', '5_super_total')], limit=1)
self._format_total()
def _sql_report_object(self):
query = """INSERT INTO account_report_standard_ledger_report_object
(report_id, create_uid, create_date, object_id, name, account_id, partner_id, journal_id)
SELECT DISTINCT
%s AS report_id,
%s AS create_uid,
NOW() AS create_date,
CASE
WHEN %s = 'account' THEN aml.account_id
WHEN %s = 'partner' THEN aml.partner_id
ELSE aml.journal_id
END AS object_id,
CASE
WHEN %s = 'account' THEN acc.code || ' ' || acc.name
WHEN %s = 'partner' THEN CASE WHEN rep.ref IS NULL THEN rep.name ELSE rep.ref || ' ' || rep.name END
ELSE acj.code || ' ' || acj.name
END AS name,
CASE WHEN %s = 'account' THEN aml.account_id ELSE NULL END AS account_id,
CASE WHEN %s = 'partner' THEN aml.partner_id ELSE NULL END AS partner_id,
CASE WHEN %s = 'journal' THEN aml.journal_id ELSE NULL END AS journal_id
FROM
account_move_line aml
LEFT JOIN account_account acc ON (acc.id = aml.account_id)
LEFT JOIN res_partner rep ON (rep.id = aml.partner_id)
LEFT JOIN account_journal acj ON (acj.id = aml.journal_id)
WHERE
aml.company_id = %s
AND aml.journal_id IN %s
AND aml.account_id IN %s
AND (%s in ('account', 'journal') OR aml.partner_id IN %s)
ORDER BY
name
"""
params = [
# SELECT
self.report_id.id,
self.env.uid,
self.type, self.type, self.type, self.type,
self.type, self.type, self.type,
# WHERE
self.company_id.id,
tuple(self.journal_ids.ids) if self.journal_ids else (None,),
tuple(self.account_ids.ids) if self.account_ids else (None,),
self.type,
tuple(self.partner_ids.ids) if self.partner_ids else (None,),
]
self.env.cr.execute(query, tuple(params))
def _sql_unaffected_earnings(self):
company = self.company_id
unaffected_earnings_account = self.env['account.account'].search([('company_id', '=', company.id), ('user_type_id', '=', self.env.ref('account.data_unaffected_earnings').id)], limit=1)
if unaffected_earnings_account not in self.account_ids:
return
report_object_id = self.report_id.report_object_ids.filtered(lambda x: x.object_id == unaffected_earnings_account.id)
if not report_object_id:
report_object_id = self.report_id.report_object_ids.create({'report_id': self.report_id.id,
'object_id': unaffected_earnings_account.id,
'name': '%s %s' % (unaffected_earnings_account.code, unaffected_earnings_account.name),
'account_id': unaffected_earnings_account.id})
query = """
INSERT INTO account_report_standard_ledger_line
(report_id, create_uid, create_date, account_id, type, type_view, date, debit, credit, balance, cumul_balance, company_currency_id, reconciled, report_object_id)
SELECT
%s AS report_id,
%s AS create_uid,
NOW() AS create_date,
%s AS account_id,
'0_init' AS type,
'init' AS type_view,
%s AS date,
CASE WHEN %s THEN COALESCE(SUM(aml.debit), 0) ELSE CASE WHEN COALESCE(SUM(aml.balance), 0) <= 0 THEN 0 ELSE COALESCE(SUM(aml.balance), 0) END END AS debit,
CASE WHEN %s THEN COALESCE(SUM(aml.credit), 0) ELSE CASE WHEN COALESCE(SUM(aml.balance), 0) >= 0 THEN 0 ELSE COALESCE(-SUM(aml.balance), 0) END END AS credit,
COALESCE(SUM(aml.balance), 0) AS balance,
COALESCE(SUM(aml.balance), 0) AS cumul_balance,
%s AS company_currency_id,
FALSE as reconciled,
%s AS report_object_id
FROM
account_move_line aml
LEFT JOIN account_account acc ON (aml.account_id = acc.id)
LEFT JOIN account_account_type acc_type ON (acc.user_type_id = acc_type.id)
LEFT JOIN account_move m ON (aml.move_id = m.id)
WHERE
m.state IN %s
AND aml.company_id = %s
AND aml.date < %s
AND acc_type.include_initial_balance = FALSE
HAVING
CASE
WHEN %s = FALSE THEN ABS(SUM(aml.balance)) > %s
ELSE ABS(SUM(aml.debit)) > %s OR ABS(SUM(aml.debit)) > %s OR ABS(SUM(aml.balance)) > %s
END
"""
date_from_fiscal = self.company_id.compute_fiscalyear_dates(datetime.strptime(self.report_id.date_from, DEFAULT_SERVER_DATE_FORMAT))['date_from']
params = [
# SELECT
self.report_id.id,
self.env.uid,
unaffected_earnings_account.id,
date_from_fiscal,
self.init_balance_history,
self.init_balance_history,
self.company_currency_id.id,
report_object_id.id,
# WHERE
('posted',) if self.target_move == 'posted' else ('posted', 'draft',),
company.id,
self.report_id.date_from,
# HAVING
self.init_balance_history,
self.company_currency_id.rounding, self.company_currency_id.rounding, self.company_currency_id.rounding, self.company_currency_id.rounding,
]
self.env.cr.execute(query, tuple(params))
def _sql_init_balance(self):
company = self.company_id
# initial balance partner
query = """
INSERT INTO account_report_standard_ledger_line
(report_id, create_uid, create_date, account_id, partner_id, group_by_key, type, type_view, date, debit, credit, balance, cumul_balance, company_currency_id, reconciled, report_object_id)
WITH matching_in_futur_before_init (id) AS
(
SELECT DISTINCT
afr.id as id
FROM
account_full_reconcile afr
INNER JOIN account_move_line aml ON aml.full_reconcile_id=afr.id
WHERE
aml.company_id = %s
AND aml.date >= %s
)
SELECT
%s AS report_id,
%s AS create_uid,
NOW() AS create_date,
MIN(aml.account_id),
CASE WHEN %s = 'partner' THEN MIN(aml.partner_id) ELSE NULL END,
(CASE
WHEN %s = 'account' THEN '-' || aml.account_id
ELSE aml.partner_id || '-' || aml.account_id
END) AS group_by_key,
'0_init' AS type,
'init' AS type_view,
%s AS date,
CASE WHEN %s THEN COALESCE(SUM(aml.debit), 0) ELSE CASE WHEN COALESCE(SUM(aml.balance), 0) <= 0 THEN 0 ELSE COALESCE(SUM(aml.balance), 0) END END AS debit,
CASE WHEN %s THEN COALESCE(SUM(aml.credit), 0) ELSE CASE WHEN COALESCE(SUM(aml.balance), 0) >= 0 THEN 0 ELSE COALESCE(-SUM(aml.balance), 0) END END AS credit,
COALESCE(SUM(aml.balance), 0) AS balance,
COALESCE(SUM(aml.balance), 0) AS cumul_balance,
%s AS company_currency_id,
FALSE as reconciled,
MIN(ro.id) AS report_object_id
FROM
account_report_standard_ledger_report_object ro
INNER JOIN account_move_line aml ON (CASE WHEN %s = 'account' THEN aml.account_id = ro.object_id ELSE aml.partner_id = ro.object_id END)
LEFT JOIN account_account acc ON (aml.account_id = acc.id)
LEFT JOIN account_account_type acc_type ON (acc.user_type_id = acc_type.id)
LEFT JOIN account_move m ON (aml.move_id = m.id)
LEFT JOIN matching_in_futur_before_init mif ON (aml.full_reconcile_id = mif.id)
WHERE
m.state IN %s
AND ro.report_id = %s
AND aml.company_id = %s
AND aml.date < %s
AND acc_type.include_initial_balance = TRUE
AND aml.journal_id IN %s
AND aml.account_id IN %s
AND (%s in ('account', 'journal') OR aml.partner_id IN %s)
AND ((%s AND acc.compacted = TRUE) OR acc.type_third_parties = 'no' OR (aml.full_reconcile_id IS NOT NULL AND mif.id IS NULL))
GROUP BY
group_by_key
HAVING
CASE
WHEN %s = FALSE THEN ABS(SUM(aml.balance)) > %s
ELSE ABS(SUM(aml.debit)) > %s OR ABS(SUM(aml.debit)) > %s OR ABS(SUM(aml.balance)) > %s
END
"""
params = [
# matching_in_futur
company.id,
self.report_id.date_from,
# init_account_table
# SELECT
self.report_id.id,
self.env.uid,
self.type, self.type,
self.report_id.date_from,
self.init_balance_history,
self.init_balance_history,
self.company_currency_id.id,
# FROM
self.type,
# WHERE
('posted',) if self.target_move == 'posted' else ('posted', 'draft',),
self.report_id.id,
company.id,
self.report_id.date_from,
tuple(self.journal_ids.ids) if self.journal_ids else (None,),
tuple(self.account_ids.ids) if self.account_ids else (None,),
self.type,
tuple(self.partner_ids.ids) if self.partner_ids else (None,),
self.compact_account,
# HAVING
self.init_balance_history,
self.company_currency_id.rounding, self.company_currency_id.rounding, self.company_currency_id.rounding, self.company_currency_id.rounding,
]
self.env.cr.execute(query, tuple(params))
def _sql_lines(self):
# lines_table
query = """
INSERT INTO account_report_standard_ledger_line
(report_id, create_uid, create_date, account_id, type, type_view, journal_id, partner_id, move_id, move_line_id, date, date_maturity, debit, credit, balance, full_reconcile_id, reconciled, report_object_id, cumul_balance, current, age_30_days, age_60_days, age_90_days, age_120_days, older, company_currency_id)
WITH matching_in_futur_before_init (id) AS
(
SELECT DISTINCT
afr.id AS id
FROM
account_full_reconcile afr
INNER JOIN account_move_line aml ON aml.full_reconcile_id=afr.id
WHERE
aml.company_id = %s
AND aml.date >= %s
),
matching_in_futur_after_date_to (id) AS
(
SELECT DISTINCT
afr.id AS id
FROM
account_full_reconcile afr
INNER JOIN account_move_line aml ON aml.full_reconcile_id = afr.id
WHERE
aml.company_id = %s
AND aml.date > %s
),
initial_balance (id, balance) AS
(
SELECT
MIN(report_object_id) AS id,
COALESCE(SUM(balance), 0) AS balance
FROM
account_report_standard_ledger_line
WHERE
report_id = %s
AND type = '0_init'
GROUP BY
report_object_id
),
date_range AS
(
SELECT
%s AS date_current,
DATE %s - INTEGER '30' AS date_less_30_days,
DATE %s - INTEGER '60' AS date_less_60_days,
DATE %s - INTEGER '90' AS date_less_90_days,
DATE %s - INTEGER '120' AS date_less_120_days,
DATE %s - INTEGER '150' AS date_older
)
SELECT
%s AS report_id,
%s AS create_uid,
NOW() AS create_date,
aml.account_id,
CASE WHEN aml.date >= %s THEN '2_line' ELSE '1_init_line' END AS type,
CASE WHEN aml.date >= %s THEN 'normal' ELSE 'init' END AS type_view,
aml.journal_id,
aml.partner_id,
aml.move_id,
aml.id,
aml.date,
aml.date_maturity,
aml.debit,
aml.credit,
aml.balance,
aml.full_reconcile_id,
CASE WHEN aml.full_reconcile_id is NOT NULL AND NOT mifad.id IS NOT NULL THEN TRUE ELSE FALSE END AS reconciled,
ro.id AS report_object_id,
CASE
WHEN %s = 'account' THEN COALESCE(init.balance, 0) + (SUM(aml.balance) OVER (PARTITION BY aml.account_id ORDER BY aml.account_id, aml.date, aml.id))
WHEN %s = 'partner' THEN COALESCE(init.balance, 0) + (SUM(aml.balance) OVER (PARTITION BY aml.partner_id ORDER BY aml.partner_id, aml.date, aml.id))
ELSE SUM(aml.balance) OVER (PARTITION BY aml.journal_id ORDER BY aml.journal_id, aml.date, aml.id)
END AS cumul_balance,
CASE WHEN aml.date_maturity > date_range.date_less_30_days THEN aml.balance END AS current,
CASE WHEN aml.date_maturity > date_range.date_less_60_days AND aml.date_maturity <= date_range.date_less_30_days THEN aml.balance END AS age_30_days,
CASE WHEN aml.date_maturity > date_range.date_less_90_days AND aml.date_maturity <= date_range.date_less_60_days THEN aml.balance END AS age_60_days,
CASE WHEN aml.date_maturity > date_range.date_less_120_days AND aml.date_maturity <= date_range.date_less_90_days THEN aml.balance END AS age_90_days,
CASE WHEN aml.date_maturity > date_range.date_older AND aml.date_maturity <= date_range.date_less_120_days THEN aml.balance END AS age_120_days,
CASE WHEN aml.date_maturity <= date_range.date_older THEN aml.balance END AS older,
%s AS company_currency_id
FROM
date_range,
account_report_standard_ledger_report_object ro
INNER JOIN account_move_line aml ON (
CASE
WHEN %s = 'account' THEN aml.account_id = ro.object_id
WHEN %s = 'partner' THEN aml.partner_id = ro.object_id
ELSE aml.journal_id = ro.object_id
END)
LEFT JOIN account_journal j ON (aml.journal_id = j.id)
LEFT JOIN account_account acc ON (aml.account_id = acc.id)
LEFT JOIN account_account_type acc_type ON (acc.user_type_id = acc_type.id)
LEFT JOIN account_move m ON (aml.move_id = m.id)
LEFT JOIN matching_in_futur_before_init mif ON (aml.full_reconcile_id = mif.id)
LEFT JOIN matching_in_futur_after_date_to mifad ON (aml.full_reconcile_id = mifad.id)
LEFT JOIN initial_balance init ON (ro.id = init.id)
WHERE
m.state IN %s
AND ro.report_id = %s
AND aml.company_id = %s
AND (CASE
WHEN %s = 'journal' THEN aml.date >= %s
WHEN aml.date >= %s THEN %s != 'open'
ELSE acc.type_third_parties IN ('supplier', 'customer') AND (aml.full_reconcile_id IS NULL OR mif.id IS NOT NULL)
END)
AND aml.date <= %s
AND aml.journal_id IN %s
AND aml.account_id IN %s
AND (%s IN ('account','journal') OR aml.partner_id IN %s)
AND NOT (%s AND acc.compacted = TRUE)
AND (%s OR NOT (aml.full_reconcile_id is NOT NULL AND NOT mifad.id IS NOT NULL))
ORDER BY
aml.date, aml.id
"""
params = [
# matching_in_futur init
self.company_id.id,
self.report_id.date_from,
# matching_in_futur date_to
self.company_id.id,
self.report_id.date_to,
# initial_balance
self.report_id.id,
# date_range
self.report_id.date_to, self.report_id.date_to, self.report_id.date_to, self.report_id.date_to, self.report_id.date_to, self.report_id.date_to,
# lines_table
# SELECT
self.report_id.id,
self.env.uid,
self.report_id.date_from,
self.report_id.date_from,
self.type, self.type,
self.company_currency_id.id,
# FROM
self.type, self.type,
# WHERE
('posted',) if self.target_move == 'posted' else ('posted', 'draft',),
self.report_id.id,
self.company_id.id,
self.type, self.report_id.date_from,
self.report_id.date_from, self.type_ledger,
self.report_id.date_to,
tuple(self.journal_ids.ids) if self.journal_ids else (None,),
tuple(self.account_ids.ids) if self.account_ids else (None,),
self.type,
tuple(self.partner_ids.ids) if self.partner_ids else (None,),
self.compact_account,
self.reconciled,
]
self.env.cr.execute(query, tuple(params))
def _sql_lines_compacted(self):
query = """
INSERT INTO account_report_standard_ledger_line
(report_id, create_uid, create_date, account_id, type, type_view, date, debit, credit, balance, cumul_balance, company_currency_id, report_object_id)
WITH initial_balance (id, balance) AS
(
SELECT
MIN(report_object_id) AS id,
COALESCE(SUM(balance), 0) AS balance
FROM
account_report_standard_ledger_line
WHERE
report_id = %s
AND type = '0_init'
GROUP BY
report_object_id
)
SELECT
%s AS report_id,
%s AS create_uid,
NOW() AS create_date,
MIN(aml.account_id) AS account_id,
'3_compact' AS type,
'normal' AS type_view,
%s AS date,
COALESCE(SUM(aml.debit), 0) AS debit,
COALESCE(SUM(aml.credit), 0) AS credit,
COALESCE(SUM(aml.balance), 0) AS balance,
COALESCE(MIN(init.balance), 0) + COALESCE(SUM(aml.balance), 0) AS cumul_balance,
%s AS company_currency_id,
MIN(ro.id) AS report_object_id
FROM
account_report_standard_ledger_report_object ro
INNER JOIN account_move_line aml ON (aml.account_id = ro.object_id)
LEFT JOIN account_journal j ON (aml.journal_id = j.id)
LEFT JOIN account_account acc ON (aml.account_id = acc.id)
LEFT JOIN account_account_type acc_type ON (acc.user_type_id = acc_type.id)
LEFT JOIN account_move m ON (aml.move_id = m.id)
LEFT JOIN initial_balance init ON (ro.id = init.id)
WHERE
m.state IN %s
AND ro.report_id = %s
AND aml.company_id = %s
AND aml.date >= %s
AND aml.date <= %s
AND aml.journal_id IN %s
AND aml.account_id IN %s
AND (%s AND acc.compacted = TRUE)
GROUP BY
aml.account_id
"""
params = [
# initial_balance
self.report_id.id,
# SELECT
self.report_id.id,
self.env.uid,
self.report_id.date_from,
self.company_currency_id.id,
# FROM
# WHERE
('posted',) if self.target_move == 'posted' else ('posted', 'draft',),
self.report_id.id,
self.company_id.id,
self.report_id.date_from,
self.report_id.date_to,
tuple(self.journal_ids.ids) if self.journal_ids else (None,),
tuple(self.account_ids.ids) if self.account_ids else (None,),
self.compact_account,
]
self.env.cr.execute(query, tuple(params))
def _sql_total(self):
query = """
INSERT INTO account_report_standard_ledger_line
(report_id, create_uid, create_date, account_id, partner_id, journal_id, type, type_view, date, debit, credit, balance, cumul_balance, report_object_id, current, age_30_days, age_60_days, age_90_days, age_120_days, older, company_currency_id)
SELECT
%s AS report_id,
%s AS create_uid,
NOW() AS create_date,
CASE WHEN %s = 'account' THEN MIN(account_id) ELSE NULL END AS account_id,
CASE WHEN %s = 'partner' THEN MIN(partner_id) ELSE NULL END AS partner_id,
CASE WHEN %s = 'journal' THEN MIN(journal_id) ELSE NULL END AS journal_id,
'4_total' AS type,
'total' AS type_view,
%s AS date,
COALESCE(SUM(debit), 0) AS debit,
COALESCE(SUM(credit), 0) AS credit,
COALESCE(SUM(balance), 0) AS balance,
COALESCE(SUM(balance), 0) AS cumul_balance,
MIN(report_object_id) AS report_object_id,
COALESCE(SUM(current), 0) AS current,
COALESCE(SUM(age_30_days), 0) AS age_30_days,
COALESCE(SUM(age_60_days), 0) AS age_60_days,
COALESCE(SUM(age_90_days), 0) AS age_90_days,
COALESCE(SUM(age_120_days), 0) AS age_120_days,
COALESCE(SUM(older), 0) AS older,
%s AS company_currency_id
FROM
account_report_standard_ledger_line
WHERE
report_id = %s
AND report_object_id IS NOT NULL
GROUP BY
report_object_id
ORDER BY
report_object_id
"""
params = [
# SELECT
self.report_id.id,
self.env.uid,
self.type, self.type, self.type,
self.report_id.date_from,
self.company_currency_id.id,
# WHERE
self.report_id.id,
]
self.env.cr.execute(query, tuple(params))
def _sql_super_total(self):
query = """
INSERT INTO account_report_standard_ledger_line
(report_id, create_uid, create_date, type, type_view, date, debit, credit, balance, cumul_balance, current, age_30_days, age_60_days, age_90_days, age_120_days, older, company_currency_id)
SELECT
%s AS report_id,
%s AS create_uid,
NOW() AS create_date,
'5_super_total' AS type,
'total' AS type_view,
%s AS date,
COALESCE(SUM(debit), 0) AS debit,
COALESCE(SUM(credit), 0) AS credit,
COALESCE(SUM(balance), 0) AS balance,
COALESCE(SUM(balance), 0) AS cumul_balance,
COALESCE(SUM(current), 0) AS current,
COALESCE(SUM(age_30_days), 0) AS age_30_days,
COALESCE(SUM(age_60_days), 0) AS age_60_days,
COALESCE(SUM(age_90_days), 0) AS age_90_days,
COALESCE(SUM(age_120_days), 0) AS age_120_days,
COALESCE(SUM(older), 0) AS older,
%s AS company_currency_id
FROM
account_report_standard_ledger_line
WHERE
report_id = %s
AND type = '4_total'
"""
params = [
# SELECT
self.report_id.id,
self.env.uid,
self.report_id.date_from,
self.company_currency_id.id,
self.report_id.id,
]
self.env.cr.execute(query, tuple(params))
def _search_account(self):
type_ledger = self.type_ledger
domain = [('deprecated', '=', False), ('company_id', '=', self.company_id.id)]
if type_ledger in ('partner', 'aged',):
result_selection = self.result_selection
if result_selection == 'supplier':
acc_type = ('supplier',)
elif result_selection == 'customer':
acc_type = ('customer',)
else:
acc_type = ('supplier', 'customer',)
domain.append(('type_third_parties', 'in', acc_type))
account_in_ex_clude = self.account_in_ex_clude.ids
acc_methode = self.account_methode
if account_in_ex_clude:
if acc_methode == 'include':
domain.append(('id', 'in', account_in_ex_clude))
elif acc_methode == 'exclude':
domain.append(('id', 'not in', account_in_ex_clude))
return self.env['account.account'].search(domain)
def _search_partner(self):
if self.type_ledger in ('partner', 'aged'):
if self.partner_select_ids:
return self.partner_select_ids
return self.env['res.partner'].search([])
return False
def _get_name_report(self):
report_name = D_LEDGER[self.type_ledger]['name']
if self.summary:
report_name += _(' Balance')
return report_name
def _sql_get_line_for_report(self, type_l, report_object=None):
query = """SELECT
aml.report_object_id AS report_object_id,
aml.type_view AS type_view,
CASE
WHEN %s = 'account' THEN acc.code
WHEN %s = 'journal' THEN acj.code
ELSE rep.ref
END AS code,
CASE
WHEN %s = 'account' THEN acc.name
WHEN %s = 'journal' THEN acj.name
ELSE rep.name
END AS name,
acj.code AS j_code,
acc.code AS a_code,
acc.name AS a_name,
aml.current AS current,
aml.age_30_days AS age_30_days,
aml.age_60_days AS age_60_days,
aml.age_90_days AS age_90_days,
aml.age_120_days AS age_120_days,
aml.older AS older,
aml.credit AS credit,
aml.debit AS debit,
aml.cumul_balance AS cumul_balance,
aml.balance AS balance,
ml.name AS move_name,
ml.ref AS displayed_name,
rep.name AS partner_name,
aml.date AS date,
aml.date_maturity AS date_maturity,
CASE
WHEN aml.full_reconcile_id IS NOT NULL THEN (CASE WHEN aml.reconciled = TRUE THEN afr.name ELSE '*' END)
ELSE ''
END AS matching_number
FROM
account_report_standard_ledger_line aml
LEFT JOIN account_account acc ON (acc.id = aml.account_id)
LEFT JOIN account_journal acj ON (acj.id = aml.journal_id)
LEFT JOIN res_partner rep ON (rep.id = aml.partner_id)
LEFT JOIN account_move ml ON (ml.id = aml.move_id)
LEFT JOIN account_full_reconcile afr ON (aml.full_reconcile_id = afr.id)
WHERE
aml.report_id = %s
AND (%s OR aml.report_object_id = %s)
AND aml.type IN %s
ORDER BY
aml.id
"""
params = [
self.type, self.type, self.type, self.type,
self.report_id.id,
True if report_object is None else False,
report_object,
type_l
]
self.env.cr.execute(query, tuple(params))
return self.env.cr.dictfetchall()
def _format_total(self):
if not self.company_currency_id:
return
lines = self.report_id.line_total_ids + self.report_id.line_super_total_id
for line in lines:
line.write({
'debit': self.company_currency_id.round(line.debit) + 0.0,
'credit': self.company_currency_id.round(line.credit) + 0.0,
'balance': self.company_currency_id.round(line.balance) + 0.0,
'current': self.company_currency_id.round(line.current) + 0.0,
'age_30_days': self.company_currency_id.round(line.age_30_days) + 0.0,
'age_60_days': self.company_currency_id.round(line.age_60_days) + 0.0,
'age_90_days': self.company_currency_id.round(line.age_90_days) + 0.0,
'age_120_days': self.company_currency_id.round(line.age_120_days) + 0.0,
'older': self.company_currency_id.round(line.older) + 0.0,
})

70
account_standard_report/wizard/account_standard_report_view.xml

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="account_report_standard_view" model="ir.ui.view">
<field name="name">Standard Ledger</field>
<field name="model">account.report.standard.ledger</field>
<field name="arch" type="xml">
<form string="Report Options" class="oe_form_configuration">
<header>
<button name="action_view_lines" string="View Lines" type="object"/>
<button name="print_pdf_report" string="Print PDF" type="object" default_focus="1" class="oe_highlight"/>
<button name="print_excel_report" string="Excel File" type="object"/>
</header>
<field name="company_id" invisible="1"/>
<h1>Standard Accounting Report</h1>
<group col="4">
<field name="type_ledger" widget="radio"/>
<field name="summary"/>
</group>
<group col="4">
<field name="target_move"/>
<field name="reconciled" attrs="{'readonly': [('type_ledger', 'not in', ('partner', 'aged',))]}"/>
<field name="compact_account" attrs="{'readonly': [('type_ledger', '!=', 'general')]}"/>
<field name="result_selection" attrs="{'invisible': [('type_ledger', 'not in', ('partner', 'aged',))]}"/>
</group>
<group col="4">
<field name="periode_date" widget="selection"/>
<field name="month_selec" widget="selection"/>
</group>
<group col="2">
<group>
<field name="date_from"/>
</group>
<group>
<field name="date_to"/>
</group>
</group>
<group>
<field name="journal_ids" widget="many2many_tags" options="{'no_create': True}"/>
</group>
<group col="3">
<field name="partner_select_ids" widget="many2many_tags" options="{'no_create': True}" attrs="{'invisible': [('type_ledger', 'not in', ('partner', 'aged',))]}"/>
</group>
<group col="4">
<field name="account_in_ex_clude" widget="many2many_tags" options="{'no_create': True}"/>
<field name="account_methode" attrs="{'invisible':[('account_in_ex_clude', '=', [])]}"/>
</group>
<group col="4">
<field name="init_balance_history"/>
<field name="company_currency_id"/>
<field name="company_id"/>
</group>
</form>
</field>
</record>
<record id="action_account_standard_report_menu" model="ir.actions.act_window">
<field name="name">Standard Report</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.report.standard.ledger</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_report_standard_view"/>
<field name="target">inline</field>
</record>
<menuitem id="menu_account_standard_report" name="Standard Report" sequence="0" parent="account.menu_finance_reports" action="action_account_standard_report_menu" groups="account.group_account_manager,account.group_account_user"/>
</data>
</odoo>
Loading…
Cancel
Save