Merge new root
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
clone:
|
||||
hg:
|
||||
image: plugins/hg
|
||||
environment:
|
||||
- HG_SHARE_POOL=/root/.cache/hg
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
pipeline:
|
||||
tox:
|
||||
image: ${IMAGE}
|
||||
environment:
|
||||
- CFLAGS=-O0
|
||||
- DB_CACHE=/cache
|
||||
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
|
||||
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
|
||||
commands:
|
||||
- echo "[extensions]" >> /root/.hgrc
|
||||
- echo "hgext.share =" >> /root/.hgrc
|
||||
- echo "[share]" >> /root/.hgrc
|
||||
- echo "pool = /root/.cache/hg" >> /root/.hgrc
|
||||
- pip install tox
|
||||
- tox -e "${TOXENV}-${DATABASE}"
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
check_dist:
|
||||
image: ${IMAGE}
|
||||
commands:
|
||||
- pip install twine
|
||||
- python setup.py sdist
|
||||
- twine check dist/*
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
check_doc:
|
||||
image: ${IMAGE}
|
||||
commands:
|
||||
- pip install sphinx
|
||||
- python -m sphinx -T -E -W -n -b html doc _build/html
|
||||
- python -m sphinx -T -E -W -n -b linkcheck doc _build
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
services:
|
||||
postgresql:
|
||||
image: postgres
|
||||
environment:
|
||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||
command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off"
|
||||
when:
|
||||
matrix:
|
||||
DATABASE: postgresql
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- IMAGE: python:3.7
|
||||
TOXENV: py37
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.7
|
||||
TOXENV: py37
|
||||
DATABASE: postgresql
|
||||
- IMAGE: python:3.8
|
||||
TOXENV: py38
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.8
|
||||
TOXENV: py38
|
||||
DATABASE: postgresql
|
||||
- IMAGE: python:3.9
|
||||
TOXENV: py39
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.9
|
||||
TOXENV: py39
|
||||
DATABASE: postgresql
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
@@ -0,0 +1,2 @@
|
||||
[flake8]
|
||||
ignore=E123,E124,E126,E128,E741,W503
|
||||
@@ -0,0 +1,3 @@
|
||||
[settings]
|
||||
multi_line_output=4
|
||||
known_first_party=trytond
|
||||
@@ -0,0 +1,264 @@
|
||||
Version 6.6.0 - 2022-10-31
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Limit transit only between different warehouses
|
||||
* Remove default currency on move
|
||||
* Allow cancelling move done
|
||||
* Support warehouse pickup
|
||||
* Allow resetting packed customer shipments
|
||||
* Allow grouping by date products by location
|
||||
* Ignore consumable products when inactivating locations
|
||||
|
||||
Version 6.4.0 - 2022-05-02
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add location or warehouse in shipment tree view
|
||||
* Warn user when deactivating a product that has stock
|
||||
* Add support for Python 3.10
|
||||
* Remove support for Python 3.6
|
||||
|
||||
Version 6.2.0 - 2021-11-01
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add method to sort quantities for assignation
|
||||
* Add warehouse properties to move
|
||||
* Allow view location as parent of warehouse
|
||||
|
||||
Version 6.0.0 - 2021-05-03
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Allow shipments to be automatically assigned
|
||||
* Rename inventory count quantity_added to quantity
|
||||
* Add document source on move of product quantities by warehouse
|
||||
* Add relate from assigned shipment to products quantities by warehouse
|
||||
* Show quantities by warehouse for many products
|
||||
* Default to ordering shipments by date
|
||||
* Add delivery usage to contact mechanism
|
||||
* Make customer's outgoing moves editable for same storage and output zone
|
||||
* Add margin reporting
|
||||
* Add products_by_locations Model
|
||||
|
||||
Version 5.8.0 - 2020-11-02
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Remove support for Python 3.5
|
||||
* Add picked step to customer shipment workflow
|
||||
* Add cron task to reschedule past shipments
|
||||
* Allow lost and found on inventory moves of shipments
|
||||
* Add waste locations on warehouses
|
||||
* Add warning to prevent move in the future
|
||||
* Add relate to open inventory lines
|
||||
* Use simplified view for moves list on shipments
|
||||
* Add a relate from product to its moves
|
||||
* Factorize the cost price of move for cost computation
|
||||
* Fill grouping values when assigning move
|
||||
* Use a single assign wizard for all shipments
|
||||
* Add access rules to product quantities by warehouse
|
||||
* Add moves for product quantities by warehouse
|
||||
* Enforce filling cost price of move
|
||||
* Rename move state from cancel to cancelled
|
||||
* Rename shipment states from cancel to cancelled
|
||||
* Rename inventory state from cancel to cancelled
|
||||
* Override warehouse with context value for current user
|
||||
|
||||
Version 5.6.0 - 2020-05-04
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add visual on product and location quantities
|
||||
* Define one lost and found location per warehouse
|
||||
* Show warehouse in user status if not unique
|
||||
* Add cost price revision
|
||||
* Add wizard to modify product cost price
|
||||
* Add cron task to recompute product cost
|
||||
* Update cost of moves when recomputing product cost
|
||||
|
||||
Version 5.4.0 - 2019-11-04
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add today record in Product Quantities By Warehouse
|
||||
* Allow consumable product on inventories
|
||||
* Let the user select a default warehouse
|
||||
* Add method to get default warehouse
|
||||
* Improve moves synchronisation on shipments
|
||||
* Allow move as move's origin
|
||||
* Open product quantities by warehouse to show moves
|
||||
|
||||
Version 5.2.0 - 2019-05-06
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Don't set default unit price on stock move
|
||||
* Prefer to pick product from the source location
|
||||
* Change move attribute of ShipmentReport for a method
|
||||
* Rename inventory count quantity_resulting to total_quantity
|
||||
|
||||
Version 5.0.0 - 2018-10-01
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add count wizard on inventory
|
||||
* Remove support for Python 2.7
|
||||
* Prevent delete lines if inventory is not draft or canceled
|
||||
* Manage same input and storage location in customer return shipment
|
||||
|
||||
Version 4.8.0 - 2018-04-23
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add _stock_move_split context keyword when copying move for split
|
||||
* Manage same input and storage location in supplier shipment
|
||||
* Check pending shipment to erase party
|
||||
* Define how inventory non filled lines are managed
|
||||
* Do not fill inventory quantity automatically
|
||||
* Assign supplier return shipment using children when location is a view
|
||||
* Duplicate "Locations Quantity" into tree and list
|
||||
* Remove product_ids from products_by_location for grouping_filter
|
||||
* Add quantities relates on Template
|
||||
* Allow grouping per product columns to compute quantities
|
||||
|
||||
Version 4.6.0 - 2017-10-30
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add flat children option on location
|
||||
* Raise single warning for move without origin
|
||||
* Allow to set manual effective date on move
|
||||
* Improve computation of cost price
|
||||
* Limit move locations 'child_of' constraints to specific shipment states
|
||||
* Allow to delete staging move
|
||||
* Allow to deactivate only empty locations
|
||||
|
||||
Version 4.4.0 - 2017-05-01
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add employee on shipments for some states
|
||||
* Add request state on internal shipment
|
||||
* Manage same picking/storage and output location
|
||||
|
||||
Version 4.2.0 - 2016-11-28
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Make inventory number always readonly
|
||||
* Manage readonly state on Inventory Line
|
||||
* Add lead time and transit location for internal shipments between warehouses
|
||||
|
||||
Version 4.0.0 - 2016-05-02
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Rename Shipments code into number
|
||||
* Add number to inventories
|
||||
* Add supplier and delivery address on supplier return shipment
|
||||
* Add Python3 support
|
||||
* Add do button on stock move form & list
|
||||
* Add warehouse address on internal shipment
|
||||
|
||||
Version 3.8.0 - 2015-11-02
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add drop location type
|
||||
* Add buttons on stock move form & list
|
||||
* Allow to use view location on staging and draft moves
|
||||
* Add picking location on warehouse
|
||||
* Always compute expected quantity in inventory
|
||||
* Allow to change the destination of internal shipment's moves
|
||||
* Allow to modify internal shipment moves in waiting state
|
||||
* Compute inventory lines in complete_lines() using new grouping() method
|
||||
* Allow to re-compute cost price
|
||||
* Allow to change unit price of move done
|
||||
|
||||
Version 3.6.0 - 2015-04-20
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add support for PyPy
|
||||
* Add 'staging' state to stock move
|
||||
* Apply stock_assign of compute_quantity_query only on outgoing moves
|
||||
* Add domain on location's parent and childs
|
||||
* Do not filter out inactive products from stock computation
|
||||
|
||||
Version 3.4.0 - 2014-10-20
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Always succeed assignation from lost and found on internal shipments
|
||||
* Remove return shipment out wizard
|
||||
|
||||
Version 3.2.0 - 2014-04-21
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add warning for moves without origin
|
||||
* Allow to define the effective date of shipments
|
||||
* Prevent changing product type if stock moves exist
|
||||
* Use new methods to compute quantities in StockMixin._search_quantity()
|
||||
* Split products_by_location into two methods on Move:
|
||||
compute_quantities_query and compute_quantities
|
||||
* Use origin for inventory moves
|
||||
* Allow partial assignation on Supplier Shipment Return
|
||||
|
||||
Version 3.0.0 - 2013-10-21
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add Mixin class with helper to setup stock quantity fields
|
||||
* Allow to customize move creation of Inventory
|
||||
* Allow to customize unique constraint on Inventory
|
||||
* Allow specific grouping Period Cache
|
||||
* Add grouping on products_by_location and assign_try
|
||||
|
||||
Version 2.8.0 - 2013-04-22
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Merge all shipment Many2One into shipment Reference
|
||||
* Add origin Reference on Stock Move
|
||||
* Add workflow to stock move
|
||||
|
||||
Version 2.6.0 - 2012-10-22
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add Product Quantities By Warehouse
|
||||
|
||||
Version 2.4.0 - 2012-04-24
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Remove special to_location_warehouse search clause
|
||||
* Remove default from and to location and instead use domain
|
||||
* Update cost_price only from supplier to storage
|
||||
|
||||
Version 2.2.0 - 2011-10-25
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Ensure coherence between planned date of shipments and moves
|
||||
|
||||
Version 2.0.0 - 2011-04-27
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add period to reduce data computation
|
||||
* Add internal_quantity on move to speedup computation
|
||||
|
||||
Version 1.8.0 - 2010-11-01
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
|
||||
Version 1.6.0 - 2010-05-11
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Use model singleton to define shipment sequences
|
||||
* Add default search value on inventory, move and shipments
|
||||
|
||||
Version 1.4.0 - 2009-10-19
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Add new group "Stock Force Assignment"
|
||||
* Migrate packing* objects and tables to shipment*
|
||||
* Return move id in create_move of inventory line
|
||||
|
||||
Version 1.2.0 - 2009-04-20
|
||||
--------------------------
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Added return packings and a wizard to create customer return packing.
|
||||
* Make assign_try to assign as much possible
|
||||
* Move assign_try and pick_product from product.product to stock.move
|
||||
* Added stock_skip_warehouse keyword for products_by_location
|
||||
method. The default behaviour is now to compute quantities on all
|
||||
child locations for a warehouse.
|
||||
* Handle average price for products return to supplier
|
||||
* Added stock_destinations keyword on products_by_location context to
|
||||
filter moves to a set of destinations.
|
||||
* Allow egg installation
|
||||
|
||||
Version 1.0.0 - 2008-11-17
|
||||
--------------------------
|
||||
* Initial release
|
||||
@@ -0,0 +1,18 @@
|
||||
Copyright (C) 2012 Openlabs Technologies & Consulting (P) LTD.
|
||||
Copyright (C) 2008-2022 Cédric Krier.
|
||||
Copyright (C) 2008-2013 Bertrand Chenal.
|
||||
Copyright (C) 2008-2022 B2CK SPRL.
|
||||
Copyright (C) 2004-2008 Tiny SPRL.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,6 @@
|
||||
include CHANGELOG
|
||||
include COPYRIGHT
|
||||
include LICENSE
|
||||
include README.rst
|
||||
include icons/LICENSE
|
||||
graft doc
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
doc/index.rst
|
||||
@@ -0,0 +1,78 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.pool import Pool
|
||||
|
||||
from . import (
|
||||
configuration, inventory, ir, location, move, party, period, product, res,
|
||||
shipment, stock_reporting_margin)
|
||||
from .move import StockMixin
|
||||
|
||||
__all__ = ['StockMixin', 'register']
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
location.Location,
|
||||
location.WarehouseWasteLocation,
|
||||
location.ProductsByLocationsContext,
|
||||
location.ProductsByLocations,
|
||||
location.LocationLeadTime,
|
||||
move.Move,
|
||||
shipment.ShipmentIn,
|
||||
shipment.ShipmentInReturn,
|
||||
shipment.ShipmentOut,
|
||||
shipment.ShipmentOutReturn,
|
||||
shipment.ShipmentInternal,
|
||||
shipment.AssignPartial,
|
||||
party.Party,
|
||||
party.PartyLocation,
|
||||
party.PartyDeliveredToWarehouse,
|
||||
party.Address,
|
||||
party.ContactMechanism,
|
||||
period.Period,
|
||||
period.Cache,
|
||||
product.Template,
|
||||
product.Product,
|
||||
product.ProductByLocationContext,
|
||||
product.ProductQuantitiesByWarehouse,
|
||||
product.ProductQuantitiesByWarehouseContext,
|
||||
product.ProductQuantitiesByWarehouseMove,
|
||||
product.RecomputeCostPriceStart,
|
||||
product.CostPriceRevision,
|
||||
product.ModifyCostPriceStart,
|
||||
inventory.Inventory,
|
||||
inventory.InventoryLine,
|
||||
inventory.CountSearch,
|
||||
inventory.CountQuantity,
|
||||
configuration.Configuration,
|
||||
configuration.ConfigurationSequence,
|
||||
configuration.ConfigurationLocation,
|
||||
ir.Cron,
|
||||
res.User,
|
||||
stock_reporting_margin.Context,
|
||||
stock_reporting_margin.Main,
|
||||
stock_reporting_margin.MainTimeseries,
|
||||
stock_reporting_margin.Product,
|
||||
stock_reporting_margin.ProductTimeseries,
|
||||
stock_reporting_margin.Category,
|
||||
stock_reporting_margin.CategoryTimeseries,
|
||||
stock_reporting_margin.CategoryTree,
|
||||
module='stock', type_='model')
|
||||
Pool.register(
|
||||
shipment.Assign,
|
||||
product.OpenProductQuantitiesByWarehouse,
|
||||
product.OpenProductQuantitiesByWarehouseMove,
|
||||
product.RecomputeCostPrice,
|
||||
product.ModifyCostPrice,
|
||||
inventory.Count,
|
||||
party.Replace,
|
||||
party.Erase,
|
||||
module='stock', type_='wizard')
|
||||
Pool.register(
|
||||
shipment.DeliveryNote,
|
||||
shipment.PickingList,
|
||||
shipment.SupplierRestockingList,
|
||||
shipment.CustomerReturnRestockingList,
|
||||
shipment.InteralShipmentReport,
|
||||
module='stock', type_='report')
|
||||
@@ -0,0 +1,235 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond import backend
|
||||
from trytond.model import (
|
||||
ModelSingleton, ModelSQL, ModelView, ValueMixin, fields)
|
||||
from trytond.modules.company.model import (
|
||||
CompanyMultiValueMixin, CompanyValueMixin)
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Eval, Id
|
||||
from trytond.tools.multivalue import migrate_property
|
||||
|
||||
sequences = ['shipment_in_sequence', 'shipment_in_return_sequence',
|
||||
'shipment_out_sequence', 'shipment_out_return_sequence',
|
||||
'shipment_internal_sequence', 'inventory_sequence']
|
||||
shipment_internal_transit = fields.Many2One(
|
||||
'stock.location', "Internal Shipment Transit", required=True,
|
||||
domain=[
|
||||
('type', '=', 'storage'),
|
||||
],
|
||||
help="The default location used for stock that is in transit between "
|
||||
"warehouses.")
|
||||
|
||||
|
||||
def default_func(field_name):
|
||||
@classmethod
|
||||
def default(cls, **pattern):
|
||||
return getattr(
|
||||
cls.multivalue_model(field_name),
|
||||
'default_%s' % field_name, lambda: None)()
|
||||
return default
|
||||
|
||||
|
||||
def default_sequence(name):
|
||||
@classmethod
|
||||
def default(cls):
|
||||
pool = Pool()
|
||||
ModelData = pool.get('ir.model.data')
|
||||
try:
|
||||
return ModelData.get_id('stock', name)
|
||||
except KeyError:
|
||||
return None
|
||||
return default
|
||||
|
||||
|
||||
class Configuration(
|
||||
ModelSingleton, ModelSQL, ModelView, CompanyMultiValueMixin):
|
||||
'Stock Configuration'
|
||||
__name__ = 'stock.configuration'
|
||||
shipment_in_sequence = fields.MultiValue(fields.Many2One(
|
||||
'ir.sequence', "Supplier Shipment Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in',
|
||||
[Eval('context', {}).get('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_shipment_in')),
|
||||
],
|
||||
help="Used to generate the number given to supplier shipments."))
|
||||
shipment_in_return_sequence = fields.MultiValue(fields.Many2One(
|
||||
'ir.sequence', "Supplier Return Shipment Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in',
|
||||
[Eval('context', {}).get('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_shipment_in_return')),
|
||||
],
|
||||
help="Used to generate the number given to supplier return "
|
||||
"shipments."))
|
||||
shipment_out_sequence = fields.MultiValue(fields.Many2One(
|
||||
'ir.sequence', "Customer Shipment Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in',
|
||||
[Eval('context', {}).get('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_shipment_out')),
|
||||
],
|
||||
help="Used to generate the number given to customer "
|
||||
"shipments."))
|
||||
shipment_out_return_sequence = fields.MultiValue(fields.Many2One(
|
||||
'ir.sequence', "Customer Return Shipment Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in',
|
||||
[Eval('context', {}).get('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_shipment_out_return')),
|
||||
],
|
||||
help="Used to generate the number given to customer return "
|
||||
"shipments."))
|
||||
shipment_internal_sequence = fields.MultiValue(fields.Many2One(
|
||||
'ir.sequence', "Internal Shipment Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in',
|
||||
[Eval('context', {}).get('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_shipment_internal')),
|
||||
],
|
||||
help="Used to generate the number given to internal "
|
||||
"shipments."))
|
||||
inventory_sequence = fields.MultiValue(fields.Many2One(
|
||||
'ir.sequence', "Inventory Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in',
|
||||
[Eval('context', {}).get('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_inventory')),
|
||||
],
|
||||
help="Used to generate the number given to inventories."))
|
||||
shipment_internal_transit = fields.MultiValue(shipment_internal_transit)
|
||||
|
||||
@classmethod
|
||||
def multivalue_model(cls, field):
|
||||
pool = Pool()
|
||||
if field in sequences:
|
||||
return pool.get('stock.configuration.sequence')
|
||||
if field == 'shipment_internal_transit':
|
||||
return pool.get('stock.configuration.location')
|
||||
return super(Configuration, cls).multivalue_model(field)
|
||||
|
||||
default_shipment_in_sequence = default_func('shipment_in_sequence')
|
||||
default_shipment_in_return_sequence = default_func(
|
||||
'shipment_in_return_sequence')
|
||||
default_shipment_out_sequence = default_func('shipment_out_sequence')
|
||||
default_shipment_out_return_sequence = default_func(
|
||||
'shipment_out_return_sequence')
|
||||
default_shipment_internal_sequence = default_func(
|
||||
'shipment_internal_sequence')
|
||||
default_inventory_sequence = default_func('inventory_sequence')
|
||||
default_shipment_internal_transit = default_func(
|
||||
'shipment_internal_transit')
|
||||
|
||||
|
||||
class ConfigurationSequence(ModelSQL, CompanyValueMixin):
|
||||
"Stock Configuration Sequence"
|
||||
__name__ = 'stock.configuration.sequence'
|
||||
shipment_in_sequence = fields.Many2One(
|
||||
'ir.sequence', "Supplier Shipment Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in', [Eval('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_shipment_in')),
|
||||
])
|
||||
shipment_in_return_sequence = fields.Many2One(
|
||||
'ir.sequence', "Supplier Return Shipment Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in', [Eval('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_shipment_in_return')),
|
||||
])
|
||||
shipment_out_sequence = fields.Many2One(
|
||||
'ir.sequence', "Customer Shipment Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in', [Eval('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_shipment_out')),
|
||||
])
|
||||
shipment_out_return_sequence = fields.Many2One(
|
||||
'ir.sequence', "Customer Return Shipment Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in', [Eval('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_shipment_out_return')),
|
||||
])
|
||||
shipment_internal_sequence = fields.Many2One(
|
||||
'ir.sequence', "Internal Shipment Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in', [Eval('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_shipment_internal')),
|
||||
])
|
||||
inventory_sequence = fields.Many2One(
|
||||
'ir.sequence', "Inventory Sequence", required=True,
|
||||
domain=[
|
||||
('company', 'in', [Eval('company', -1), None]),
|
||||
('sequence_type', '=',
|
||||
Id('stock', 'sequence_type_inventory')),
|
||||
])
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
exist = backend.TableHandler.table_exist(cls._table)
|
||||
|
||||
super(ConfigurationSequence, cls).__register__(module_name)
|
||||
|
||||
if not exist:
|
||||
cls._migrate_property([], [], [])
|
||||
|
||||
@classmethod
|
||||
def _migrate_property(cls, field_names, value_names, fields):
|
||||
field_names.extend(sequences)
|
||||
value_names.extend(sequences)
|
||||
fields.append('company')
|
||||
migrate_property(
|
||||
'stock.configuration', field_names, cls, value_names,
|
||||
fields=fields)
|
||||
|
||||
default_shipment_in_sequence = default_sequence('sequence_shipment_in')
|
||||
default_shipment_in_return_sequence = default_sequence(
|
||||
'sequence_shipment_in_return')
|
||||
default_shipment_out_sequence = default_sequence('sequence_shipment_out')
|
||||
default_shipment_out_return_sequence = default_sequence(
|
||||
'sequence_shipment_out_return')
|
||||
default_shipment_internal_sequence = default_sequence(
|
||||
'sequence_shipment_internal')
|
||||
default_inventory_sequence = default_sequence('sequence_inventory')
|
||||
|
||||
|
||||
class ConfigurationLocation(ModelSQL, ValueMixin):
|
||||
"Stock Configuration Location"
|
||||
__name__ = 'stock.configuration.location'
|
||||
shipment_internal_transit = shipment_internal_transit
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
exist = backend.TableHandler.table_exist(cls._table)
|
||||
|
||||
super(ConfigurationLocation, cls).__register__(module_name)
|
||||
|
||||
if not exist:
|
||||
cls._migrate_property([], [], [])
|
||||
|
||||
@classmethod
|
||||
def _migrate_property(cls, field_names, value_names, fields):
|
||||
field_names.append('shipment_internal_transit')
|
||||
value_names.append('shipment_internal_transit')
|
||||
migrate_property(
|
||||
'stock.configuration', field_names, cls, value_names,
|
||||
fields=fields)
|
||||
|
||||
@classmethod
|
||||
def default_shipment_internal_transit(cls):
|
||||
pool = Pool()
|
||||
ModelData = pool.get('ir.model.data')
|
||||
try:
|
||||
return ModelData.get_id('stock', 'location_transit')
|
||||
except KeyError:
|
||||
return None
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="stock_configuration_view_form">
|
||||
<field name="model">stock.configuration</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">configuration_form</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window" id="act_stock_configuration_form">
|
||||
<field name="name">Configuration</field>
|
||||
<field name="res_model">stock.configuration</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view"
|
||||
id="act_stock_configuration_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view" ref="stock_configuration_view_form"/>
|
||||
<field name="act_window" ref="act_stock_configuration_form"/>
|
||||
</record>
|
||||
<menuitem
|
||||
parent="menu_configuration"
|
||||
action="act_stock_configuration_form"
|
||||
sequence="10"
|
||||
id="menu_stock_configuration"
|
||||
icon="tryton-list"/>
|
||||
|
||||
<record model="ir.model.access" id="access_configuration">
|
||||
<field name="model" search="[('model', '=', 'stock.configuration')]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_configuration_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.configuration')]"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
@@ -0,0 +1,491 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:meta><meta:generator>LibreOffice/5.2.7.2$Linux_X86_64 LibreOffice_project/20m0$Build-2</meta:generator><meta:initial-creator>Bertrand Chenal</meta:initial-creator><meta:creation-date>2009-03-26T13:54:48</meta:creation-date><dc:date>2016-03-21T16:02:20.533874912</dc:date><meta:editing-cycles>56</meta:editing-cycles><meta:editing-duration>PT7H2M27S</meta:editing-duration><meta:document-statistic meta:character-count="834" meta:image-count="0" meta:non-whitespace-character-count="791" meta:object-count="0" meta:page-count="2" meta:paragraph-count="30" meta:table-count="1" meta:word-count="73"/><meta:user-defined meta:name="Info 1"/><meta:user-defined meta:name="Info 2"/><meta:user-defined meta:name="Info 3"/><meta:user-defined meta:name="Info 4"/></office:meta>
|
||||
<office:settings>
|
||||
<config:config-item-set config:name="ooo:view-settings">
|
||||
<config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="ViewAreaWidth" config:type="long">43760</config:config-item>
|
||||
<config:config-item config:name="ViewAreaHeight" config:type="long">21691</config:config-item>
|
||||
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item-map-indexed config:name="Views">
|
||||
<config:config-item-map-entry>
|
||||
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
|
||||
<config:config-item config:name="ViewLeft" config:type="long">2630</config:config-item>
|
||||
<config:config-item config:name="ViewTop" config:type="long">5313</config:config-item>
|
||||
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="VisibleRight" config:type="long">43759</config:config-item>
|
||||
<config:config-item config:name="VisibleBottom" config:type="long">21689</config:config-item>
|
||||
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
|
||||
<config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
|
||||
</config:config-item-map-entry>
|
||||
</config:config-item-map-indexed>
|
||||
</config:config-item-set>
|
||||
<config:config-item-set config:name="ooo:configuration-settings">
|
||||
<config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintFaxName" config:type="string"/>
|
||||
<config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrinterName" config:type="string"/>
|
||||
<config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
|
||||
<config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="Rsid" config:type="int">440606</config:config-item>
|
||||
<config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
|
||||
<config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
|
||||
<config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
|
||||
<config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="RsidRoot" config:type="int">68753</config:config-item>
|
||||
<config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
|
||||
<config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
|
||||
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
|
||||
<config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
|
||||
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
|
||||
</config:config-item-set>
|
||||
</office:settings>
|
||||
<office:scripts>
|
||||
<office:script script:language="ooo:Basic">
|
||||
<ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
|
||||
</office:script>
|
||||
</office:scripts>
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/>
|
||||
<style:font-face style:name="Liberation Serif2" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif1" svg:font-family="'Liberation Serif'" style:font-adornments="Bold" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-adornments="Regular" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Thorndale AMT" svg:font-family="'Thorndale AMT'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Andale Sans UI" svg:font-family="'Andale Sans UI'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
</office:font-face-decls>
|
||||
<office:styles>
|
||||
<style:default-style style:family="graphic">
|
||||
<style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.1181in" draw:shadow-offset-y="0.1181in" draw:start-line-spacing-horizontal="0.1114in" draw:start-line-spacing-vertical="0.1114in" draw:end-line-spacing-horizontal="0.1114in" draw:end-line-spacing-vertical="0.1114in" style:flow-with-text="false"/>
|
||||
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
|
||||
<style:tab-stops/>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties style:use-window-font-color="true" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Andale Sans UI" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="paragraph">
|
||||
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="0.4925in" style:writing-mode="lr-tb"/>
|
||||
<style:text-properties style:use-window-font-color="true" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Andale Sans UI" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table">
|
||||
<style:table-properties table:border-model="collapsing"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table-row">
|
||||
<style:table-row-properties fo:keep-together="auto"/>
|
||||
</style:default-style>
|
||||
<style:style style:name="Standard" style:family="paragraph" style:class="text">
|
||||
<style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.1665in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false" fo:keep-with-next="always"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" style:font-style-name="Regular" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="16pt" style:font-name-asian="DejaVu Sans" style:font-family-asian="'DejaVu Sans'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans" style:font-family-complex="'DejaVu Sans'" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false"/>
|
||||
<style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
|
||||
<style:text-properties style:font-size-asian="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties fo:margin-top="0.0835in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-size-complex="12pt" style:font-style-complex="italic"/>
|
||||
</style:style>
|
||||
<style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-size-asian="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="16pt" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table_20_Heading" style:display-name="Table Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents" style:class="extra" style:master-page-name="">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-name="Liberation Serif1" fo:font-family="'Liberation Serif'" style:font-style-name="Bold" style:font-family-generic="roman" style:font-pitch="variable" fo:font-weight="bold" style:font-size-asian="10.5pt" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="3.4626in" style:type="center"/>
|
||||
<style:tab-stop style:position="6.9252in" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="3.4626in" style:type="center"/>
|
||||
<style:tab-stop style:position="6.9252in" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_body_20_indent" style:display-name="Text body indent" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-left="0.1965in" fo:margin-right="0in" fo:margin-top="0in" fo:margin-bottom="0in" loext:contextual-spacing="false" fo:text-indent="0in" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
|
||||
<style:style style:name="Quotations" style:family="paragraph" style:parent-style-name="Standard" style:class="html">
|
||||
<style:paragraph-properties fo:margin-left="0.3937in" fo:margin-right="0.3937in" fo:margin-top="0in" fo:margin-bottom="0.1965in" loext:contextual-spacing="false" fo:text-indent="0in" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="Title" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="28pt" fo:font-weight="bold" style:font-size-asian="28pt" style:font-weight-asian="bold" style:font-size-complex="28pt" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Subtitle" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:margin-top="0.0417in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" style:font-size-complex="18pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Placeholder" style:family="text">
|
||||
<style:text-properties fo:font-variant="small-caps" fo:color="#008080" style:text-underline-style="dotted" style:text-underline-width="auto" style:text-underline-color="font-color"/>
|
||||
</style:style>
|
||||
<style:style style:name="Bullet_20_Symbols" style:display-name="Bullet Symbols" style:family="text">
|
||||
<style:text-properties style:font-name="StarSymbol" fo:font-family="StarSymbol" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-size-complex="9pt"/>
|
||||
</style:style>
|
||||
<text:outline-style style:name="Outline">
|
||||
<text:outline-level-style text:level="1" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="2" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="3" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="4" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="5" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="6" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="7" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="8" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="9" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="10" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
</text:outline-style>
|
||||
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
|
||||
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
|
||||
<text:linenumbering-configuration text:number-lines="false" text:offset="0.1965in" style:num-format="1" text:number-position="left" text:increment="5"/>
|
||||
</office:styles>
|
||||
<office:automatic-styles>
|
||||
<style:style style:name="Table1" style:family="table">
|
||||
<style:table-properties style:width="6.6924in" fo:margin-left="0in" fo:margin-right="0in" fo:margin-top="0.15in" fo:margin-bottom="0in" table:align="margins"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="1.8438in" style:rel-column-width="18053*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="1.8444in" style:rel-column-width="18060*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="1.1611in" style:rel-column-width="11369*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A1" style:family="table-cell">
|
||||
<style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000">
|
||||
<style:background-image/>
|
||||
</style:table-cell-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D1" style:family="table-cell">
|
||||
<style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.0382in" fo:border="0.05pt solid #000000">
|
||||
<style:background-image/>
|
||||
</style:table-cell-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.B3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00053457"/>
|
||||
</style:style>
|
||||
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00053457"/>
|
||||
</style:style>
|
||||
<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="12pt" officeooo:paragraph-rsid="00053457" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P4" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00053457"/>
|
||||
</style:style>
|
||||
<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="12pt" officeooo:paragraph-rsid="00053457" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P7" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00053457"/>
|
||||
</style:style>
|
||||
<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P9" style:family="paragraph" style:parent-style-name="Table_20_Heading">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties style:font-name="Liberation Serif2"/>
|
||||
</style:style>
|
||||
<style:style style:name="P10" style:family="paragraph" style:parent-style-name="Table_20_Contents">
|
||||
<style:text-properties style:font-name="Liberation Serif2"/>
|
||||
</style:style>
|
||||
<style:style style:name="P11" style:family="paragraph" style:parent-style-name="Table_20_Contents">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P12" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:break-before="page"/>
|
||||
</style:style>
|
||||
<style:style style:name="P13" style:family="paragraph" style:parent-style-name="Heading_20_1" style:master-page-name="">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" fo:break-before="page"/>
|
||||
<style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="P14" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:text-properties officeooo:paragraph-rsid="0002e6f0"/>
|
||||
</style:style>
|
||||
<style:style style:name="T1" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T2" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" officeooo:rsid="0002e6f0" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T3" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" officeooo:rsid="00058f93" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T4" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" officeooo:rsid="0006a771" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T5" style:family="text">
|
||||
<style:text-properties fo:font-weight="normal" style:font-weight-asian="normal" style:font-weight-complex="normal"/>
|
||||
</style:style>
|
||||
<style:page-layout style:name="pm1">
|
||||
<style:page-layout-properties fo:page-width="8.2673in" fo:page-height="11.6925in" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.7874in" fo:margin-bottom="0.7874in" fo:margin-left="0.7874in" fo:margin-right="0.7874in" style:writing-mode="lr-tb" style:footnote-max-height="0in">
|
||||
<style:footnote-sep style:width="0.0071in" style:distance-before-sep="0.0398in" style:distance-after-sep="0.0398in" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
|
||||
</style:page-layout-properties>
|
||||
<style:header-style>
|
||||
<style:header-footer-properties fo:min-height="0in" fo:margin-left="0in" fo:margin-right="0in" fo:margin-bottom="0.1965in"/>
|
||||
</style:header-style>
|
||||
<style:footer-style>
|
||||
<style:header-footer-properties fo:min-height="0in" fo:margin-left="0in" fo:margin-right="0in" fo:margin-top="0.1965in"/>
|
||||
</style:footer-style>
|
||||
</style:page-layout>
|
||||
</office:automatic-styles>
|
||||
<office:master-styles>
|
||||
<style:master-page style:name="Standard" style:page-layout-name="pm1">
|
||||
<style:header>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><if test="company and company.header"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><for each="line in company.header.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P3"><text:placeholder text:placeholder-type="text"><company.rec_name if company else ''></text:placeholder></text:p>
|
||||
</style:header>
|
||||
<style:footer>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><if test="company and company.footer"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><for each="line in company.footer.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P4"><text:page-number text:select-page="current">2</text:page-number>/<text:page-count>2</text:page-count></text:p>
|
||||
</style:footer>
|
||||
</style:master-page>
|
||||
</office:master-styles>
|
||||
<office:body>
|
||||
<office:text text:use-soft-page-breaks="true">
|
||||
<office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
|
||||
<text:sequence-decls>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
|
||||
</text:sequence-decls>
|
||||
<text:p text:style-name="P12"><text:placeholder text:placeholder-type="text"><for each="shipment in records"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P13">Restocking List</text:p>
|
||||
<text:p text:style-name="P14"><text:span text:style-name="T4">Shipment </text:span><text:span text:style-name="T3">Number</text:span><text:span text:style-name="T1">: </text:span><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"><shipment.number></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="P14"><text:span text:style-name="T1">Reference:</text:span><text:span text:style-name="T5"> </text:span><text:span text:style-name="T5"><text:placeholder text:placeholder-type="text"><shipment.origins or ''></text:placeholder></text:span><text:span text:style-name="T5"><text:placeholder text:placeholder-type="text"><', ' if (shipment.origins and shipment.reference) else ''></text:placeholder></text:span><text:span text:style-name="T5"><text:placeholder text:placeholder-type="text"><shipment.reference or ''></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T2">Customer</text:span><text:span text:style-name="T1">:</text:span><text:span text:style-name="T5"> </text:span><text:span text:style-name="T5"><text:placeholder text:placeholder-type="text"><shipment.customer.rec_name></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Planned Date:</text:span><text:span text:style-name="T5"> </text:span><text:span text:style-name="T5"><text:placeholder text:placeholder-type="text"><shipment.planned_date and format_date(shipment.planned_date, user.language) or ''></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Warehouse:</text:span><text:span text:style-name="T5"> </text:span><text:span text:style-name="T5"><text:placeholder text:placeholder-type="text"><shipment.warehouse.rec_name></text:placeholder></text:span></text:p>
|
||||
<table:table table:name="Table1" table:style-name="Table1">
|
||||
<table:table-column table:style-name="Table1.A" table:number-columns-repeated="2"/>
|
||||
<table:table-column table:style-name="Table1.C"/>
|
||||
<table:table-column table:style-name="Table1.D"/>
|
||||
<table:table-header-rows>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P9">From Location</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P9">To Location</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P9">Product</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D1" office:value-type="string">
|
||||
<text:p text:style-name="P9">Quantity</text:p>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
</table:table-header-rows>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="2" office:value-type="string">
|
||||
<text:p text:style-name="P10"><text:placeholder text:placeholder-type="text"><for each="move in moves[shipment.id]"></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="P10"/>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="P10"/>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.B3" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.from_location.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.B3" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.to_location.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.product.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="P11"><text:placeholder text:placeholder-type="text"><format_number_symbol(move.quantity, user.language, move.uom, digits=move.uom.digits)></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="2" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="P10"/>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="P10"/>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
</table:table>
|
||||
<text:p text:style-name="Text_20_body"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</office:text>
|
||||
</office:body>
|
||||
</office:document>
|
||||
@@ -0,0 +1,500 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:meta><meta:generator>LibreOffice/7.3.3.2$Linux_X86_64 LibreOffice_project/30$Build-2</meta:generator><meta:creation-date>2008-06-07T15:29:02</meta:creation-date><dc:date>2009-03-26T18:33:13</dc:date><meta:editing-cycles>1</meta:editing-cycles><meta:editing-duration>PT0S</meta:editing-duration><meta:document-statistic meta:table-count="1" meta:image-count="0" meta:object-count="0" meta:page-count="2" meta:paragraph-count="28" meta:word-count="84" meta:character-count="1078" meta:non-whitespace-character-count="1022"/><meta:user-defined meta:name="Info 1"/><meta:user-defined meta:name="Info 2"/><meta:user-defined meta:name="Info 3"/><meta:user-defined meta:name="Info 4"/></office:meta>
|
||||
<office:settings>
|
||||
<config:config-item-set config:name="ooo:view-settings">
|
||||
<config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="ViewAreaWidth" config:type="long">48129</config:config-item>
|
||||
<config:config-item config:name="ViewAreaHeight" config:type="long">23021</config:config-item>
|
||||
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item-map-indexed config:name="Views">
|
||||
<config:config-item-map-entry>
|
||||
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
|
||||
<config:config-item config:name="ViewLeft" config:type="long">37596</config:config-item>
|
||||
<config:config-item config:name="ViewTop" config:type="long">8964</config:config-item>
|
||||
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="VisibleRight" config:type="long">48128</config:config-item>
|
||||
<config:config-item config:name="VisibleBottom" config:type="long">23019</config:config-item>
|
||||
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
|
||||
<config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
|
||||
</config:config-item-map-entry>
|
||||
</config:config-item-map-indexed>
|
||||
</config:config-item-set>
|
||||
<config:config-item-set config:name="ooo:configuration-settings">
|
||||
<config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
|
||||
<config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
|
||||
<config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
|
||||
<config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
|
||||
<config:config-item config:name="ApplyUserData" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintFaxName" config:type="string"/>
|
||||
<config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
|
||||
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
|
||||
<config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="Rsid" config:type="int">2929175</config:config-item>
|
||||
<config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
|
||||
<config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="PrinterName" config:type="string"/>
|
||||
<config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
|
||||
<config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="RsidRoot" config:type="int">1813180</config:config-item>
|
||||
<config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
|
||||
</config:config-item-set>
|
||||
</office:settings>
|
||||
<office:scripts>
|
||||
<office:script script:language="ooo:Basic">
|
||||
<ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
|
||||
</office:script>
|
||||
</office:scripts>
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="Andale Sans UI" svg:font-family="'Andale Sans UI'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Sans1" svg:font-family="'Liberation Sans'" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif1" svg:font-family="'Liberation Serif'" style:font-adornments="Bold" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif2" svg:font-family="'Liberation Serif'" style:font-adornments="Regular" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/>
|
||||
<style:font-face style:name="Thorndale AMT" svg:font-family="'Thorndale AMT'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
</office:font-face-decls>
|
||||
<office:styles>
|
||||
<style:default-style style:family="graphic">
|
||||
<style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
|
||||
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
|
||||
<style:tab-stops/>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Andale Sans UI" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="paragraph">
|
||||
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="lr-tb"/>
|
||||
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Andale Sans UI" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table">
|
||||
<style:table-properties table:border-model="collapsing"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table-row">
|
||||
<style:table-row-properties fo:keep-together="auto"/>
|
||||
</style:default-style>
|
||||
<style:style style:name="Standard" style:family="paragraph" style:class="text">
|
||||
<style:text-properties style:font-name="Liberation Sans1" fo:font-family="'Liberation Sans'" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
|
||||
<style:text-properties style:font-name="Liberation Serif2" fo:font-family="'Liberation Serif'" style:font-style-name="Regular" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="16pt" style:font-name-asian="DejaVu Sans" style:font-family-asian="'DejaVu Sans'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans" style:font-family-complex="'DejaVu Sans'" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false"/>
|
||||
<style:text-properties style:font-name="Liberation Sans1" fo:font-family="'Liberation Sans'" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
|
||||
<style:text-properties style:font-size-asian="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-size-complex="12pt" style:font-style-complex="italic"/>
|
||||
</style:style>
|
||||
<style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-size-asian="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table_20_Heading" style:display-name="Table Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents" style:class="extra" style:master-page-name="">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-name="Liberation Serif1" fo:font-family="'Liberation Serif'" style:font-style-name="Bold" style:font-family-generic="roman" style:font-pitch="variable" fo:font-weight="bold" style:font-size-asian="10.5pt" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="16pt" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="8.5cm" style:type="center"/>
|
||||
<style:tab-stop style:position="17cm" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="8.795cm" style:type="center"/>
|
||||
<style:tab-stop style:position="17.59cm" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="8.795cm" style:type="center"/>
|
||||
<style:tab-stop style:position="17.59cm" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_body_20_indent" style:display-name="Text body indent" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-left="0.499cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
|
||||
<style:style style:name="Quotations" style:family="paragraph" style:parent-style-name="Standard" style:class="html">
|
||||
<style:paragraph-properties fo:margin-left="1cm" fo:margin-right="1cm" fo:margin-top="0cm" fo:margin-bottom="0.499cm" style:contextual-spacing="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="Title" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="28pt" fo:font-weight="bold" style:font-size-asian="28pt" style:font-weight-asian="bold" style:font-size-complex="28pt" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Subtitle" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:margin-top="0.106cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" style:font-size-complex="18pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Placeholder" style:family="text">
|
||||
<style:text-properties fo:font-variant="small-caps" fo:color="#008080" loext:opacity="100%" style:text-underline-style="dotted" style:text-underline-width="auto" style:text-underline-color="font-color"/>
|
||||
</style:style>
|
||||
<style:style style:name="Bullet_20_Symbols" style:display-name="Bullet Symbols" style:family="text">
|
||||
<style:text-properties style:font-name="StarSymbol" fo:font-family="StarSymbol" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-size-complex="9pt"/>
|
||||
</style:style>
|
||||
<text:outline-style style:name="Outline">
|
||||
<text:outline-level-style text:level="1" loext:num-list-format="%1%" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="2" loext:num-list-format="%2%" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="3" loext:num-list-format="%3%" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="4" loext:num-list-format="%4%" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="5" loext:num-list-format="%5%" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="6" loext:num-list-format="%6%" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="7" loext:num-list-format="%7%" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="8" loext:num-list-format="%8%" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="9" loext:num-list-format="%9%" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="10" loext:num-list-format="%10%" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
</text:outline-style>
|
||||
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
|
||||
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
|
||||
<text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
|
||||
</office:styles>
|
||||
<office:automatic-styles>
|
||||
<style:style style:name="Table1" style:family="table">
|
||||
<style:table-properties style:width="16.999cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.381cm" fo:margin-bottom="0cm" table:align="margins"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="9.606cm" style:rel-column-width="37032*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.B" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="7.392cm" style:rel-column-width="28503*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A1" style:family="table-cell">
|
||||
<style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000">
|
||||
<style:background-image/>
|
||||
</style:table-cell-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.B1" style:family="table-cell">
|
||||
<style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.097cm" fo:border="0.05pt solid #000000">
|
||||
<style:background-image/>
|
||||
</style:table-cell-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.B3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00224f9c"/>
|
||||
</style:style>
|
||||
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00224f9c"/>
|
||||
</style:style>
|
||||
<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="12pt" officeooo:paragraph-rsid="00224f9c" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P4" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00224f9c"/>
|
||||
</style:style>
|
||||
<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00224f9c"/>
|
||||
</style:style>
|
||||
<style:style style:name="P7" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="12pt" officeooo:paragraph-rsid="00224f9c" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P9" style:family="paragraph" style:parent-style-name="Text_20_body">
|
||||
<style:text-properties style:font-name="Liberation Serif"/>
|
||||
</style:style>
|
||||
<style:style style:name="P10" style:family="paragraph" style:parent-style-name="Table_20_Heading">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties style:font-name="Liberation Serif"/>
|
||||
</style:style>
|
||||
<style:style style:name="P11" style:family="paragraph" style:parent-style-name="Table_20_Contents">
|
||||
<style:text-properties style:font-name="Liberation Serif"/>
|
||||
</style:style>
|
||||
<style:style style:name="P12" style:family="paragraph" style:parent-style-name="Table_20_Contents">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
<style:text-properties style:font-name="Liberation Serif"/>
|
||||
</style:style>
|
||||
<style:style style:name="P13" style:family="paragraph" style:parent-style-name="Table_20_Contents">
|
||||
<style:text-properties style:font-name="Liberation Serif" officeooo:paragraph-rsid="0025e811"/>
|
||||
</style:style>
|
||||
<style:style style:name="P14" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:break-before="page"/>
|
||||
</style:style>
|
||||
<style:style style:name="P15" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:margin-left="11.28cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
|
||||
<style:text-properties style:font-name="Liberation Sans"/>
|
||||
</style:style>
|
||||
<style:style style:name="P16" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="">
|
||||
<style:paragraph-properties fo:margin-left="11.28cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="auto" fo:break-before="page"/>
|
||||
<style:text-properties style:font-name="Liberation Sans"/>
|
||||
</style:style>
|
||||
<style:style style:name="P17" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:margin-left="11.28cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
|
||||
<style:text-properties style:font-name="Liberation Sans" officeooo:paragraph-rsid="0028d873"/>
|
||||
</style:style>
|
||||
<style:style style:name="P18" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="">
|
||||
<style:paragraph-properties fo:margin-left="11.28cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="auto" fo:break-before="page"/>
|
||||
<style:text-properties style:font-name="Liberation Sans" officeooo:paragraph-rsid="0028d873"/>
|
||||
</style:style>
|
||||
<style:style style:name="P19" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="">
|
||||
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="auto" fo:break-before="page"/>
|
||||
<style:text-properties style:font-name="Liberation Sans" fo:font-size="6pt" officeooo:paragraph-rsid="0028d873" style:font-size-asian="5.25pt" style:font-size-complex="6pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P20" style:family="paragraph" style:parent-style-name="Heading_20_1">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
|
||||
</style:style>
|
||||
<style:style style:name="P21" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:text-properties officeooo:paragraph-rsid="001d64ef"/>
|
||||
</style:style>
|
||||
<style:style style:name="T1" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T2" style:family="text">
|
||||
<style:text-properties fo:font-weight="normal" style:font-weight-asian="normal" style:font-weight-complex="normal"/>
|
||||
</style:style>
|
||||
<style:page-layout style:name="pm1">
|
||||
<style:page-layout-properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="44" style:layout-grid-base-height="0.55cm" style:layout-grid-ruby-height="0cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="true" style:layout-grid-display="true" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
|
||||
<style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
|
||||
</style:page-layout-properties>
|
||||
<style:header-style>
|
||||
<style:header-footer-properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.499cm"/>
|
||||
</style:header-style>
|
||||
<style:footer-style>
|
||||
<style:header-footer-properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm"/>
|
||||
</style:footer-style>
|
||||
</style:page-layout>
|
||||
<style:style style:name="dp1" style:family="drawing-page">
|
||||
<style:drawing-page-properties draw:background-size="full"/>
|
||||
</style:style>
|
||||
</office:automatic-styles>
|
||||
<office:master-styles>
|
||||
<style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1">
|
||||
<style:header>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><if test="company and company.header"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><for each="line in company.header.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P3"><text:placeholder text:placeholder-type="text"><company.rec_name if company else ''></text:placeholder></text:p>
|
||||
</style:header>
|
||||
<style:footer>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><if test="company and company.footer"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><for each="line in company.footer.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P4"><text:page-number text:select-page="current">2</text:page-number>/<text:page-count>2</text:page-count></text:p>
|
||||
</style:footer>
|
||||
</style:master-page>
|
||||
</office:master-styles>
|
||||
<office:body>
|
||||
<office:text text:use-soft-page-breaks="true">
|
||||
<office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
|
||||
<text:sequence-decls>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
|
||||
</text:sequence-decls>
|
||||
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text"><for each="shipment in records"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P19"/>
|
||||
<text:p text:style-name="P17"><text:placeholder text:placeholder-type="text"><replace text:p="set_lang(shipment.delivery_address.party.lang)"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P17"><text:placeholder text:placeholder-type="text"><replace text:p="shipment.set_lang(shipment.delivery_address.party.lang)"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P17"><text:placeholder text:placeholder-type="text"><shipment.customer.full_name></text:placeholder></text:p>
|
||||
<text:p text:style-name="P17"><text:placeholder text:placeholder-type="text"><for each="line in shipment.delivery_address.full_address.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P15"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P15"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P20">Delivery Note</text:p>
|
||||
<text:p text:style-name="P21"><text:span text:style-name="T1">Shipment Number:</text:span> <text:placeholder text:placeholder-type="text"><shipment.number></text:placeholder><text:span text:style-name="T2"><text:line-break/></text:span><text:span text:style-name="T1">Customer Code:</text:span><text:span text:style-name="T2"> </text:span><text:span text:style-name="T2"><text:placeholder text:placeholder-type="text"><shipment.customer.code></text:placeholder></text:span><text:span text:style-name="T2"><text:line-break/></text:span><text:span text:style-name="T1">Reference:</text:span><text:span text:style-name="T2"> </text:span><text:span text:style-name="T2"><text:placeholder text:placeholder-type="text"><shipment.origins or ''></text:placeholder></text:span><text:span text:style-name="T2"><text:placeholder text:placeholder-type="text"><', ' if (shipment.origins and shipment.reference) else ''></text:placeholder></text:span><text:span text:style-name="T2"><text:placeholder text:placeholder-type="text"><shipment.reference or ''></text:placeholder></text:span><text:span text:style-name="T2"><text:line-break/></text:span><text:span text:style-name="T1">Date: </text:span><text:span text:style-name="T2"><text:placeholder text:placeholder-type="text"><format_date(shipment.effective_date or datetime.date.today(), shipment.delivery_address.party.lang)></text:placeholder></text:span></text:p>
|
||||
<table:table table:name="Table1" table:style-name="Table1">
|
||||
<table:table-column table:style-name="Table1.A"/>
|
||||
<table:table-column table:style-name="Table1.B"/>
|
||||
<table:table-header-rows>
|
||||
<table:table-row table:style-name="TableLine94459967088608">
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P10">Product</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.B1" office:value-type="string">
|
||||
<text:p text:style-name="P10">Quantity</text:p>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
</table:table-header-rows>
|
||||
<table:table-row table:style-name="TableLine94459967142064">
|
||||
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="2" office:value-type="string">
|
||||
<text:p text:style-name="P11"><text:placeholder text:placeholder-type="text"><for each="move in shipment.outgoing_moves"></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
</table:table-row>
|
||||
<table:table-row table:style-name="TableLine94459967143328">
|
||||
<table:table-cell table:style-name="Table1.A3" office:value-type="string">
|
||||
<text:p text:style-name="P13"><text:placeholder text:placeholder-type="text"><move.product.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.B3" office:value-type="string">
|
||||
<text:p text:style-name="P12"><text:placeholder text:placeholder-type="text"><format_number_symbol(move.quantity, shipment.delivery_address.party.lang, move.uom, digits=move.uom.digits)></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
<table:table-row table:style-name="TableLine94459967144848">
|
||||
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="2" office:value-type="string">
|
||||
<text:p text:style-name="P11"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
</table:table-row>
|
||||
</table:table>
|
||||
<text:p text:style-name="P9"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</office:text>
|
||||
</office:body>
|
||||
</office:document>
|
||||
@@ -0,0 +1,61 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
|
||||
trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
|
||||
|
||||
|
||||
def get_info():
|
||||
import configparser
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
module_dir = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
|
||||
info = dict(config.items('tryton'))
|
||||
|
||||
result = subprocess.run(
|
||||
[sys.executable, 'setup.py', '--name'],
|
||||
stdout=subprocess.PIPE, check=True, cwd=module_dir)
|
||||
info['name'] = result.stdout.decode('utf-8').strip()
|
||||
|
||||
result = subprocess.run(
|
||||
[sys.executable, 'setup.py', '--version'],
|
||||
stdout=subprocess.PIPE, check=True, cwd=module_dir)
|
||||
version = result.stdout.decode('utf-8').strip()
|
||||
if 'dev' in version:
|
||||
info['series'] = 'latest'
|
||||
else:
|
||||
info['series'] = '.'.join(version.split('.', 2)[:2])
|
||||
|
||||
for key in {'depends', 'extras_depend'}:
|
||||
info[key] = info.get(key, '').strip().splitlines()
|
||||
info['modules'] = set(info['depends'] + info['extras_depend'])
|
||||
info['modules'] -= {'ir', 'res'}
|
||||
|
||||
return info
|
||||
|
||||
|
||||
info = get_info()
|
||||
|
||||
master_doc = 'index'
|
||||
project = info['name']
|
||||
release = version = info['series']
|
||||
default_role = 'ref'
|
||||
highlight_language = 'none'
|
||||
extensions = [
|
||||
'sphinx.ext.intersphinx',
|
||||
]
|
||||
intersphinx_mapping = {
|
||||
'trytond': (trytond_url.format(series=version), None),
|
||||
}
|
||||
intersphinx_mapping.update({
|
||||
m: (modules_url.format(
|
||||
module=m.replace('_', '-'), series=version), None)
|
||||
for m in info['modules']
|
||||
})
|
||||
|
||||
del get_info, info, modules_url, trytond_url
|
||||
@@ -0,0 +1,17 @@
|
||||
.. _model-stock.configuration:
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
The *Stock Configuration* contains settings that are used to configure the
|
||||
behaviour and default values for stock related activities, including the
|
||||
sequences used to generate `Shipment <concept-stock.shipment>` numbers.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The stock configuration can be found using the main menu item:
|
||||
|
||||
|Inventory & Stock --> Configuration --> Configuration|__
|
||||
|
||||
.. |Inventory & Stock --> Configuration --> Configuration| replace:: :menuselection:`Inventory & Stock --> Configuration --> Configuration`
|
||||
__ https://demo.tryton.org/model/stock.configuration/1
|
||||
@@ -0,0 +1,16 @@
|
||||
******
|
||||
Design
|
||||
******
|
||||
|
||||
The stock module introduces or extends the following concepts.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
location
|
||||
move
|
||||
shipment
|
||||
inventory
|
||||
period
|
||||
configuration
|
||||
product
|
||||
@@ -0,0 +1,48 @@
|
||||
.. _model-stock.inventory:
|
||||
|
||||
Inventory
|
||||
=========
|
||||
|
||||
The *Inventory* concept is used to help check and correct the amount of
|
||||
stock stored in a `Location <model-stock.location>`.
|
||||
|
||||
Each inventory has a set of lines, one for each `Product <concept-product>`
|
||||
that is in, or is should be in, the location.
|
||||
Each line has an expected quantity and an actual quantity.
|
||||
The former is used to show how much stock is expected to be in the location
|
||||
and the latter is used to record how much stock was actually found there.
|
||||
|
||||
A option on the inventory specifies what to do with lines whose actual
|
||||
quantity is left empty.
|
||||
|
||||
When the *Inventory* is confirmed the stock in the location is updated by
|
||||
creating a set of `Stock Moves <model-stock.move>`.
|
||||
These moves correct the stock in the location.
|
||||
They do this by transferring stock to and from the lost and found location
|
||||
associated with location being checked.
|
||||
|
||||
.. warning::
|
||||
|
||||
Do not use inventories when `Setting initial stock levels`.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The inventory checks can be found using the main menu item:
|
||||
|
||||
|Inventory & Stock --> Inventories|__
|
||||
|
||||
.. |Inventory & Stock --> Inventories| replace:: :menuselection:`Inventory & Stock --> Inventories`
|
||||
__ https://demo.tryton.org/model/stock.inventory
|
||||
|
||||
Wizards
|
||||
-------
|
||||
|
||||
.. _wizard-stock.inventory.count:
|
||||
|
||||
Inventory Count
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The *Inventory Count* wizard helps users fill in inventories on a
|
||||
`Product <concept-product>` by product basis.
|
||||
It takes a product and a quantity and adds this to the appropriate inventory
|
||||
line.
|
||||
@@ -0,0 +1,59 @@
|
||||
.. _model-stock.location:
|
||||
|
||||
Location
|
||||
========
|
||||
|
||||
A location represents the place where stock is stored.
|
||||
This may be a physical location, such as a shelf, or a virtual location such
|
||||
as the location used for products that have gone missing.
|
||||
|
||||
Locations are organised in to a structure with each location having a parent
|
||||
location and zero or more sub-locations.
|
||||
It is possible to restrict a location to only one level of children.
|
||||
This enables the use of an optimisation that improves the performance of the
|
||||
the stock quantity calculation.
|
||||
|
||||
A location also has a set of properties that allow the :ref:`current and
|
||||
forecasted amounts of stock <concept-product.quantity>` in the location to be
|
||||
obtained along with the stock's value.
|
||||
|
||||
.. _concept-stock.location.warehouse:
|
||||
|
||||
Warehouse
|
||||
---------
|
||||
|
||||
Warehouses are special locations that represent a physical warehouse and as
|
||||
such can have an `Address <party:model-party.address>`.
|
||||
They are also normally split up into a set of locations each with a particular
|
||||
purpose, such as for the input, output or storage of stock.
|
||||
|
||||
.. seealso::
|
||||
|
||||
Stock locations can be added, removed and changed from the main menu item:
|
||||
|
||||
|Inventory & Stock --> Configuration --> Locations|__
|
||||
|
||||
.. |Inventory & Stock --> Configuration --> Locations| replace:: :menuselection:`Inventory & Stock --> Configuration --> Locations`
|
||||
__ https://demo.tryton.org/model/stock.location
|
||||
|
||||
The stock locations structure, and access to the stock levels in
|
||||
a location can be found from the main menu item:
|
||||
|
||||
:menuselection:`Inventory & Stock --> Locations`
|
||||
|
||||
.. _model-stock.location.lead_time:
|
||||
|
||||
Location Lead Time
|
||||
==================
|
||||
|
||||
A *Location Lead Time* is the amount of time that it normally takes to
|
||||
transfer stock between two `Warehouses <concept-stock.location.warehouse>`.
|
||||
|
||||
.. seealso::
|
||||
|
||||
Location lead times can be updated from the main menu item:
|
||||
|
||||
|Inventory & Stock --> Configuration --> Locations --> Location Lead Times|__
|
||||
|
||||
.. |Inventory & Stock --> Configuration --> Locations --> Location Lead Times| replace:: :menuselection:`Inventory & Stock --> Configuration --> Locations --> Location Lead Times`
|
||||
__ https://demo.tryton.org/model/stock.location.lead_time
|
||||
@@ -0,0 +1,58 @@
|
||||
.. _model-stock.move:
|
||||
|
||||
Move
|
||||
====
|
||||
|
||||
In Tryton a stock *Move* represents the transfer of a given amount of a
|
||||
`Product <concept-product>` between two different
|
||||
`Stock Locations <model-stock.location>`.
|
||||
Often stock moves will be grouped together into a
|
||||
`Shipment <concept-stock.shipment>`.
|
||||
|
||||
.. note::
|
||||
|
||||
Service products have no physical presence, so are not available for
|
||||
use in stock moves.
|
||||
|
||||
A stock move has some properties that record the planned date for the stock
|
||||
move and also its effective date, which is when the move actually happened.
|
||||
|
||||
Some stock moves are also associated with unit and cost prices.
|
||||
These allow the value of stock to be calculated at any time, and for products'
|
||||
cost prices to be updated based on the stock moves.
|
||||
|
||||
Each `Company <company:model-company.company>` has its own stock moves which
|
||||
are kept separate from other company's stock moves.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The stock moves can be listed by opening the main menu item:
|
||||
|
||||
|Inventory & Stock --> Moves|__
|
||||
|
||||
.. |Inventory & Stock --> Moves| replace:: :menuselection:`Inventory & Stock --> Moves`
|
||||
__ https://demo.tryton.org/model/stock.move
|
||||
|
||||
.. _concept-stock.move.assign:
|
||||
|
||||
Assign Concept
|
||||
--------------
|
||||
|
||||
A stock move is assigned when the stock for the stock move has been found
|
||||
and reserved and cannot be assigned by any other stock move.
|
||||
|
||||
When attempting to assign a stock move Tryton looks at the stock move's source
|
||||
locations and their sub-locations, and searches for the stock that is needed
|
||||
to complete the stock moves.
|
||||
If stock is found then the source location of the stock move is changed,
|
||||
or the stock move is split up into several stock moves, each of which may
|
||||
take stock from a different sub-location.
|
||||
|
||||
If there is not enough stock available to fully assign the stock move then the
|
||||
remainder is left in a stock move that is not assigned.
|
||||
|
||||
.. note::
|
||||
|
||||
Consumable products always get assigned even when there is not enough
|
||||
stock available for the stock move.
|
||||
This is the key difference between goods and consumable products.
|
||||
@@ -0,0 +1,32 @@
|
||||
.. _model-stock.period:
|
||||
|
||||
Period
|
||||
======
|
||||
|
||||
In Tryton a stock *Period* is used to group together the all stock moves that
|
||||
happened up to a specific date and that were also done after the date of any
|
||||
previous stock *Period*.
|
||||
|
||||
This allows the stock levels for the `Products <concept-product>` in all stock
|
||||
`Locations <model-stock.location>` to be calculated for the date of the period,
|
||||
and stored in the `Stock Period Cache <model-stock.period.cache>`.
|
||||
|
||||
These cached values can then be used, where applicable, instead of having to
|
||||
recalculate them each time they are needed.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The periods can be viewed and managed from the main menu item:
|
||||
|
||||
|Inventory & Stock --> Configuration --> Periods|__
|
||||
|
||||
.. |Inventory & Stock --> Configuration --> Periods| replace:: :menuselection:`Inventory & Stock --> Configuration --> Periods`
|
||||
__ https://demo.tryton.org/model/stock.period
|
||||
|
||||
.. _model-stock.period.cache:
|
||||
|
||||
Period Cache
|
||||
============
|
||||
|
||||
The *Period Cache* is used to store the quantities of a product in a
|
||||
particular location on the date defined by its `Period <model-stock.period>`.
|
||||
@@ -0,0 +1,97 @@
|
||||
.. _concept-product:
|
||||
|
||||
Product
|
||||
=======
|
||||
|
||||
When the *Stock Module* is activated, products gain some extra properties.
|
||||
These include a product's stock and forecast quantities, which show its
|
||||
current and predicted future stock situation, and the cost value of its
|
||||
stock.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The `Product <product:concept-product>` concept is introduced by the
|
||||
:doc:`Product Module <product:index>`.
|
||||
|
||||
.. _concept-product.quantity:
|
||||
|
||||
Product Quantity
|
||||
----------------
|
||||
|
||||
The amount, and the value, of a product in a
|
||||
`Stock Location <model-stock.location>` is calculated by adding up all the
|
||||
`Stock Moves <model-stock.move>` in to that location and subtracting those
|
||||
out of the same location.
|
||||
|
||||
Some values from the
|
||||
:attr:`Transaction context <trytond:trytond.transaction.Transaction.context>`
|
||||
are used to help determine which stock moves get included in this calculation
|
||||
and which get left out.
|
||||
These values include things like which locations to include in the
|
||||
calculation, and what dates should be included.
|
||||
|
||||
Normally, when calculating stock quantities for a date in the past, only moves
|
||||
that are done are included in the calculation, and only if their effective
|
||||
date is early enough.
|
||||
This reflects the real situation based on completed stock moves.
|
||||
For dates in the future, draft and `Assigned <concept-stock.move.assign>`
|
||||
moves are also included, but only if their planned date is between today's
|
||||
date and the future date, inclusive.
|
||||
|
||||
.. note::
|
||||
|
||||
The stock quantity of consumable products is calculated in exactly
|
||||
the same way as any other product, even though consumable products
|
||||
can always be assigned regardless of how much stock there is.
|
||||
|
||||
Wizards
|
||||
-------
|
||||
|
||||
.. _wizard-product.recompute_cost_price:
|
||||
|
||||
Recompute Cost Price
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The *Recompute Cost Price* wizard updates products' cost prices using their
|
||||
cost price method.
|
||||
|
||||
.. _wizard-product.modify_cost_price:
|
||||
|
||||
Modify Cost Price
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
The *Modify Cost Price* wizard is only way in which a product's cost price
|
||||
can be changed once it has stock moves.
|
||||
The wizard takes a date and a fixed price or formula for the new cost price.
|
||||
These changes are stored in the
|
||||
`Cost Price Revision <model-product.cost_price.revision>` concept and are
|
||||
applied at the beginning of the date that was selected when the cost price
|
||||
of the product gets re-calculated.
|
||||
|
||||
.. _model-stock.product_quantities_warehouse:
|
||||
|
||||
Product Quantities by Warehouse
|
||||
===============================
|
||||
|
||||
The idea of the *Product Quantities by Warehouse* concept is to provide
|
||||
information about how the stock levels of one or more products have varied
|
||||
over time in a particular `Warehouse <concept-stock.location.warehouse>`.
|
||||
|
||||
.. _model-stock.product_quantities_warehouse.move:
|
||||
|
||||
Product Quantities by Warehouse Move
|
||||
====================================
|
||||
|
||||
The *Product Quantities by Warehouse Move* concept provides information about
|
||||
how `Stock Moves <model-stock.move>` have affected the stock levels in a
|
||||
`Warehouse <concept-stock.location.warehouse>` over time.
|
||||
|
||||
.. _model-product.cost_price.revision:
|
||||
|
||||
Cost Price Revision
|
||||
===================
|
||||
|
||||
The *Cost Price Revision* records changes to a product's cost price.
|
||||
These revisions are automatically created when the product's cost price is
|
||||
changed using the `Modify Cost Price <wizard-product.modify_cost_price>`
|
||||
wizard.
|
||||
@@ -0,0 +1,231 @@
|
||||
.. _concept-stock.shipment:
|
||||
|
||||
Shipment
|
||||
========
|
||||
|
||||
In Tryton the concept of a *Shipment* is used to help organise and manage
|
||||
groups of related `Stock Moves <model-stock.move>`.
|
||||
There are different types of shipment which are used for different purposes.
|
||||
Some of these types of shipment may also be split up into stages.
|
||||
In each stage stock is moved to or from an intermediate
|
||||
`Location <model-stock.location>`.
|
||||
Each stage's moves form a subset of the shipment's total moves.
|
||||
|
||||
.. _model-stock.shipment.in:
|
||||
|
||||
Supplier Shipment
|
||||
-----------------
|
||||
|
||||
A *Supplier Shipment* has a set of properties that hold details about the
|
||||
shipment such as who the supplier is, what
|
||||
`Warehouse <concept-stock.location.warehouse>` it is going to and the date
|
||||
when the shipment is expected to be delivered.
|
||||
|
||||
It is made up from two sets of `Stock Moves <model-stock.move>`:
|
||||
|
||||
* Incoming moves, these are used to move stock between a supplier
|
||||
`Location <model-stock.location>` and the warehouse's input location, and
|
||||
* Inventory moves, these then put the stock away in the warehouse's storage
|
||||
location, or one of its child locations.
|
||||
|
||||
.. note::
|
||||
|
||||
If the warehouse's input location and storage location are the same then
|
||||
the inventory moves are not created.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The supplier shipments can be found by opening the main menu item:
|
||||
|
||||
|Inventory & Stock --> Supplier Shipments|__
|
||||
|
||||
.. |Inventory & Stock --> Supplier Shipments| replace:: :menuselection:`Inventory & Stock --> Supplier Shipments`
|
||||
__ https://demo.tryton.org/model/stock.shipment.in
|
||||
|
||||
Reports
|
||||
^^^^^^^
|
||||
|
||||
.. _report-stock.shipment.in.restocking_list:
|
||||
|
||||
Restocking List
|
||||
"""""""""""""""
|
||||
|
||||
The *Restocking List* report lists the items on an incoming shipment and the
|
||||
destination locations for the stock based on the inventory moves.
|
||||
|
||||
.. _model-stock.shipment.in.return:
|
||||
|
||||
Supplier Return Shipment
|
||||
------------------------
|
||||
|
||||
A *Supplier Return Shipment* has a set of properties that contain information
|
||||
about the shipment such as who the supplier was, what
|
||||
`Address <party:model-party.address>` the shipment is going to, and the date
|
||||
the shipment is sent.
|
||||
|
||||
It is made up from a single set of `Stock Moves <model-stock.move>` that return
|
||||
the stock directly back to a supplier `Location <model-stock.location>`.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The supplier shipments can be found by opening the main menu item:
|
||||
|
||||
|Inventory & Stock --> Supplier Shipments --> Supplier Return Shipments|__
|
||||
|
||||
.. |Inventory & Stock --> Supplier Shipments --> Supplier Return Shipments| replace:: :menuselection:`Inventory & Stock --> Supplier Shipments --> Supplier Return Shipments`
|
||||
__ https://demo.tryton.org/model/stock.shipment.in.return
|
||||
|
||||
.. _model-stock.shipment.out:
|
||||
|
||||
Customer Shipment
|
||||
-----------------
|
||||
|
||||
A *Customer Shipment* has a set of properties that contain information about
|
||||
the shipment such as which `Warehouse <concept-stock.location.warehouse>` it
|
||||
is being sent from, what `Address <party:model-party.address>` it is being
|
||||
delivered to, and the date it is being sent.
|
||||
|
||||
A customer shipment is made up from two sets of
|
||||
`Stock Moves <model-stock.move>`:
|
||||
|
||||
* Inventory moves, these moves are used to pick the stock from the warehouse's
|
||||
storage `Location <model-stock.location>` and put it in the output location,
|
||||
and
|
||||
* Outgoing moves, these then take the picked stock and send it to a
|
||||
customer location.
|
||||
The outgoing moves are created first and define what stock needs to be sent
|
||||
to the customer.
|
||||
|
||||
.. note::
|
||||
|
||||
If the warehouse's picking location (or storage location if no picking
|
||||
location is defined) is the same as its output location then only
|
||||
outgoing moves are created and these moves do not get
|
||||
`Assigned <concept-stock.move.assign>`.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The customer shipments can be found by opening the main menu item:
|
||||
|
||||
|Inventory & Stock --> Customer Shipments|__
|
||||
|
||||
.. |Inventory & Stock --> Customer Shipments| replace:: :menuselection:`Inventory & Stock --> Customer Shipments`
|
||||
__ https://demo.tryton.org/model/stock.shipment.out
|
||||
|
||||
Reports
|
||||
^^^^^^^
|
||||
|
||||
.. _report-stock.shipment.out.picking_list:
|
||||
|
||||
Picking List
|
||||
""""""""""""
|
||||
|
||||
The *Picking List* report lists the stock that is needed for a shipment.
|
||||
For each item on the shipment it details the location the stock should be
|
||||
taken from, and how much should be taken.
|
||||
|
||||
.. _report-stock.shipment.out.delivery_note:
|
||||
|
||||
Delivery Note
|
||||
"""""""""""""
|
||||
|
||||
The *Delivery Note* report contains information about where the shipment is
|
||||
being sent, and when the delivery is happening.
|
||||
It also lists all the items on the shipment.
|
||||
|
||||
.. _model-stock.shipment.out.return:
|
||||
|
||||
Customer Return Shipment
|
||||
------------------------
|
||||
|
||||
A *Customer Return Shipment* has properties that contain information about
|
||||
which customer the stock is being returned from, which
|
||||
`Warehouse <concept-stock.location.warehouse>` it is sent to and the date the
|
||||
return is happening.
|
||||
|
||||
It is made up from two sets of `Stock Moves <model-stock.move>`:
|
||||
|
||||
* Incoming moves, these are used to move stock between a customer
|
||||
`Location <model-stock.location>` and the warehouse's input location, and
|
||||
* Inventory moves, these then put the stock away in the warehouse's storage
|
||||
location, or one of its child locations.
|
||||
|
||||
.. note::
|
||||
|
||||
If the warehouse's input location and storage location are the same then
|
||||
the inventory moves are not created.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The customer shipments can be found by opening the main menu item:
|
||||
|
||||
|Inventory & Stock --> Customer Shipments --> Customer Return Shipments|__
|
||||
|
||||
.. |Inventory & Stock --> Customer Shipments --> Customer Return Shipments| replace:: :menuselection:`Inventory & Stock --> Customer Shipments --> Customer Return Shipments`
|
||||
__ https://demo.tryton.org/model/stock.shipment.out.return
|
||||
|
||||
Reports
|
||||
^^^^^^^
|
||||
|
||||
.. _report-stock.shipment.out.return.restocking_list:
|
||||
|
||||
Customer Return Restocking List
|
||||
"""""""""""""""""""""""""""""""
|
||||
|
||||
The *Customer Return Restocking List* report lists the items that were
|
||||
returned by a customer.
|
||||
For each item a destination location for the stock is also included based on
|
||||
the inventory moves.
|
||||
|
||||
.. _model-stock.shipment.internal:
|
||||
|
||||
Internal Shipment
|
||||
-----------------
|
||||
|
||||
An internal shipment allows a group of `Stock Moves <model-stock.move>`,
|
||||
between locations within the same `Company <company:model-company.company>`,
|
||||
to be managed as a single entity.
|
||||
|
||||
For internal shipments that are planned to start and end on different dates it
|
||||
is made up from two sets of moves.
|
||||
The first set are outgoing moves that put the stock in a transit
|
||||
`Location <model-stock.location>` and the second set are incoming moves that
|
||||
take the stock from the transit location and place it in the destination
|
||||
location.
|
||||
|
||||
.. seealso::
|
||||
|
||||
Internal shipments are available from the main menu item:
|
||||
|
||||
|Inventory & Stock --> Internal Shipments|__
|
||||
|
||||
.. |Inventory & Stock --> Internal Shipments| replace:: :menuselection:`Inventory & Stock --> Internal Shipments`
|
||||
__ https://demo.tryton.org/model/stock.shipment.internal
|
||||
|
||||
Reports
|
||||
^^^^^^^
|
||||
|
||||
.. _report-stock.shipment.internal.report:
|
||||
|
||||
Internal Shipment Report
|
||||
""""""""""""""""""""""""
|
||||
|
||||
The *Internal Shipment Report* provides a list of the items on the internal
|
||||
shipment along with their quantities.
|
||||
For shipments between `Warehouses <concept-stock.location.warehouse>` it also
|
||||
contains the `Address <party:model-party.address>` of the warehouse the stock
|
||||
is being sent to.
|
||||
|
||||
Wizards
|
||||
-------
|
||||
|
||||
.. _wizard-stock.shipment.assign:
|
||||
|
||||
Assign Shipment
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The *Assign Shipment* wizard is used to assign a shipment.
|
||||
Assigning a shipment tries to `Assign <concept-stock.move.assign>` the
|
||||
`Stock Moves <model-stock.move>` that take the stock for the shipment.
|
||||
If not all the stock moves can be assigned then it provides the user with a
|
||||
set of options of what to do next.
|
||||
@@ -0,0 +1,19 @@
|
||||
############
|
||||
Stock Module
|
||||
############
|
||||
|
||||
The *Stock Module* provides the fundamental concepts required for managing
|
||||
stock.
|
||||
This includes keeping track of where the stock is, how much is available,
|
||||
and checking and correcting stock levels.
|
||||
It also allows stock to be moved from one place to another, and delivered to
|
||||
and from customers and suppliers.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
setup
|
||||
usage/index
|
||||
design/index
|
||||
reference
|
||||
releases
|
||||
@@ -0,0 +1,13 @@
|
||||
*************
|
||||
API Reference
|
||||
*************
|
||||
|
||||
Stock Quantities
|
||||
================
|
||||
|
||||
.. class:: trytond.modules.stock.StockMixin
|
||||
|
||||
This mixin_ provides some common methods that are useful when creating
|
||||
classes that provide quantity fields.
|
||||
|
||||
.. _mixin: http://en.wikipedia.org/wiki/Mixin
|
||||
@@ -0,0 +1,7 @@
|
||||
.. _releases-index:
|
||||
|
||||
=============
|
||||
Release notes
|
||||
=============
|
||||
|
||||
.. include:: ../CHANGELOG
|
||||
@@ -0,0 +1,69 @@
|
||||
*****
|
||||
Setup
|
||||
*****
|
||||
|
||||
.. _Setting up stock locations:
|
||||
|
||||
Setting up stock locations
|
||||
==========================
|
||||
|
||||
The *Stock Module* provides a set of default
|
||||
`Stock Locations <model-stock.location>`, however it is likely that you will
|
||||
want to customise them to suit your company.
|
||||
|
||||
.. tip::
|
||||
|
||||
If you only have a small `Warehouse <concept-stock.location.warehouse>`
|
||||
you can use the same location for its storage, input and output locations.
|
||||
This reduces the stock moves required to send and receive shipments.
|
||||
|
||||
.. tip::
|
||||
|
||||
If you have a large number of locations in your warehouse you can
|
||||
use the option to limit locations to only a single level of children.
|
||||
This will improve the performance of Tryton when it is calculating
|
||||
stock quantities.
|
||||
|
||||
.. tip::
|
||||
|
||||
If you are altering your stock locations, and you have already used a
|
||||
stock location then it cannot be deleted.
|
||||
However, you can deactivate it which will hide it during normal use.
|
||||
|
||||
.. _Setting initial stock levels:
|
||||
|
||||
Setting initial stock levels
|
||||
============================
|
||||
|
||||
When you start using Tryton you may already have some stock that you want to
|
||||
bring into the system.
|
||||
|
||||
In order to ensure the value of your stock is correctly calculated, and to
|
||||
show that this stock has (at some point in the past) come from a supplier,
|
||||
you must enter this initial stock in the correct way.
|
||||
|
||||
The right way of doing this is to create a set of individual
|
||||
`Stock Moves <model-stock.move>`.
|
||||
These moves can be created in the view that is opened from the
|
||||
|Inventory & Stock --> Moves|__ main menu item.
|
||||
Each of the stock moves should move some stock of a `Product <concept-product>`
|
||||
from a supplier `Location <model-stock.location>` to the appropriate storage
|
||||
location.
|
||||
These stock moves must have their unit prices set to their product's cost
|
||||
price.
|
||||
|
||||
.. |Inventory & Stock --> Moves| replace:: :menuselection:`Inventory & Stock --> Moves`
|
||||
__ https://demo.tryton.org/model/stock.move
|
||||
|
||||
.. note::
|
||||
|
||||
As these moves are for your initial stock they have no origin, and
|
||||
when you try and do these moves Tryton will warn you about this.
|
||||
Because this is for your initial stock this is not a problem, and you
|
||||
can safely go ahead and finish doing the moves.
|
||||
|
||||
.. tip::
|
||||
|
||||
If you create all the stock moves to start with, you can then select them
|
||||
all in the list view, and use the :guilabel:`Do` item from the
|
||||
:guilabel:`Launch Action` menu to do them all in one go.
|
||||
@@ -0,0 +1,14 @@
|
||||
*****
|
||||
Usage
|
||||
*****
|
||||
|
||||
The [:menuselection:`Inventory & Stock`] main menu item allows access to the
|
||||
items that allow you to view, manage and change things related to stock.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
shipment
|
||||
quantity
|
||||
value
|
||||
period
|
||||
@@ -0,0 +1,16 @@
|
||||
.. _Using stock periods:
|
||||
|
||||
Using stock periods
|
||||
===================
|
||||
|
||||
You can use `Stock Periods <model-stock.period>` to stop
|
||||
`Stock Moves <model-stock.move>` being created or updated before a specific
|
||||
date, and to improve the performance of Tryton when looking at and using
|
||||
`Product Quantities <concept-product.quantity>`.
|
||||
|
||||
.. tip::
|
||||
|
||||
Depending on the number of stock moves that your
|
||||
`Company <company:model-company.company>` generates you may find it useful
|
||||
to create new stock periods as part of your accounting period end, or
|
||||
fiscal year end, processes.
|
||||
@@ -0,0 +1,98 @@
|
||||
.. _Viewing stock levels:
|
||||
|
||||
Viewing stock levels
|
||||
====================
|
||||
|
||||
In Tryton there are a few different ways of seeing
|
||||
`Product Stock Quantities <concept-product.quantity>`.
|
||||
You can also easily see what the stock situation was at any time in the past,
|
||||
and get an idea of what the stock situation will be after any
|
||||
`Stock Moves <model-stock.move>` that are still being processed have been
|
||||
completed.
|
||||
|
||||
.. note::
|
||||
|
||||
Tryton is designed to allow you to create stock moves even if they
|
||||
create negative stock.
|
||||
For normal storage locations negative stock levels indicate that more
|
||||
stock has been used than was available.
|
||||
This suggests that there may be incoming moves to the location that
|
||||
have not yet been done, or a mistake has been made that can be resolved
|
||||
by `Checking and correcting stock levels`.
|
||||
|
||||
However, although it is possible to create negative stock, you will
|
||||
normally use `Shipments <concept-stock.shipment>` to help manage stock
|
||||
moves, and a process to `assign them <Assigning shipments>`.
|
||||
These respect stock availability and wont allow you to create negative
|
||||
stock unless you force them to.
|
||||
|
||||
Depending on what you are trying to find out you can get information about
|
||||
stock levels for either `Products <concept-product>` or
|
||||
`Locations <model-stock.location>`.
|
||||
|
||||
If you are interested in finding out where some particular products are
|
||||
stored, then once you have selected the products you are interested in, you
|
||||
can use the menu items in the product's :guilabel:`Open related records` menu.
|
||||
|
||||
To view how much stock is in one or more stock locations you first need to
|
||||
select the locations you are interested in.
|
||||
Once you have done this you can use the :guilabel:`Products` item from the
|
||||
:guilabel:`Open related records` menu.
|
||||
This then shows the total stock that is in all the selected locations.
|
||||
|
||||
.. tip::
|
||||
|
||||
From the [:menuselection:`Inventory & Stock --> Locations`] main menu item
|
||||
you can quickly get a list of stock in a single location by opening the
|
||||
location you are interested in.
|
||||
|
||||
.. tip::
|
||||
|
||||
If you have only selected a single location then the stock levels will
|
||||
include all the stock in the location's children as well.
|
||||
However, if you selected multiple locations then only the stock in the
|
||||
selected locations is included, any stock in their child locations is
|
||||
*not* included.
|
||||
|
||||
.. _Checking and correcting stock levels:
|
||||
|
||||
Checking and correcting stock levels
|
||||
====================================
|
||||
|
||||
There are a range of things, such as mispicks, damages and theft, that can
|
||||
cause the stock levels on Tryton to not match the actual amount of stock
|
||||
available.
|
||||
|
||||
Tryton allows you to check for and correct these discrepancies by performing
|
||||
an `Inventory <model-stock.inventory>` of a
|
||||
`Stock Location <model-stock.location>`.
|
||||
This process is sometimes also called a stocktake, stock count or inventory
|
||||
check.
|
||||
How often you need to do this, and to what extent, is very dependent on your
|
||||
business.
|
||||
You may do this once a year at the end of your fiscal year, or continuously
|
||||
by means of a `cycle count`_.
|
||||
|
||||
When you create a new inventory you can use the :guilabel:`Complete` button to
|
||||
complete the creation of the inventory.
|
||||
This adds a line to the inventory for each product that is expected to be in
|
||||
the location.
|
||||
|
||||
How you go about actually counting the stock will depend on how your stock
|
||||
location is organised.
|
||||
If each `Product <concept-product>` is all together and is easy to count,
|
||||
then you can enter the totals directly into the :guilabel:`Quantity` column.
|
||||
If there are many different lines in the location, or not all of each product
|
||||
is together, then you can start the `Count <wizard-stock.inventory.count>`
|
||||
wizard using the :guilabel:`Count` button to enter the quantities as you go.
|
||||
In this case, multiple quantities for the same product will be automatically
|
||||
added together.
|
||||
|
||||
For each inventory you can choose how to deal with any lines where the quantity
|
||||
has been left empty.
|
||||
You can either keep the stock in the location, or empty it out.
|
||||
|
||||
Once the inventory has been finished you use the :guilabel:`Confirm` button
|
||||
to correct the stock levels on Tryton.
|
||||
|
||||
.. _`cycle count`: https://en.wikipedia.org/wiki/Cycle_count
|
||||
@@ -0,0 +1,125 @@
|
||||
.. _Sending and receiving deliveries:
|
||||
|
||||
Sending and receiving deliveries
|
||||
================================
|
||||
|
||||
In Tryton you use `Shipments <concept-stock.shipment>` to send stock to your
|
||||
customers and receive stock from your suppliers.
|
||||
There are different kinds of shipments available depending on whether you're
|
||||
dealing with customers or suppliers and whether you are sending or receiving
|
||||
stock.
|
||||
|
||||
Although each type of shipment helps you manage the delivery of some stock,
|
||||
and encompasses the same set of ideas, each is tailored for a particular
|
||||
type of delivery.
|
||||
|
||||
From Suppliers
|
||||
--------------
|
||||
|
||||
You use a `Supplier Shipment <model-stock.shipment.in>` when receiving stock
|
||||
from a supplier.
|
||||
|
||||
* The supplier shipment is first received in to the
|
||||
`Warehouse's <concept-stock.location.warehouse>`
|
||||
input `Location <model-stock.location>`.
|
||||
* You can then use the
|
||||
`Restocking List <report-stock.shipment.in.restocking_list>`
|
||||
to help you put the stock away in the right locations in the warehouse.
|
||||
|
||||
To Suppliers
|
||||
------------
|
||||
|
||||
If you need to send stock back to a supplier you use a
|
||||
`Supplier Return Shipment <model-stock.shipment.in.return>`.
|
||||
|
||||
To Customers
|
||||
------------
|
||||
|
||||
You use a `Customer Shipment <model-stock.shipment.out>` when sending stock
|
||||
out to a customer.
|
||||
|
||||
* When the customer shipment is waiting to be worked on, normally the first
|
||||
thing you need to do is `Assign it <Assigning shipments>`.
|
||||
* You then pick the stock from the
|
||||
`Warehouse <concept-stock.location.warehouse>`.
|
||||
A `Picking List <report-stock.shipment.out.picking_list>` helps with this as
|
||||
it details how much stock you need, and where it can be found.
|
||||
* Once you've picked and packed the delivery you can dispatch it to the
|
||||
customer from the warehouse's output `Location <model-stock.location>`.
|
||||
It is common practice to send a
|
||||
`Delivery Note <report-stock.shipment.out.delivery_note>` along with your
|
||||
customer's shipment.
|
||||
|
||||
From Customers
|
||||
--------------
|
||||
|
||||
Stock that is returned by customers is handled by using a
|
||||
`Customer Return Shipment <model-stock.shipment.out.return>`.
|
||||
It works in a similar way to supplier shipments.
|
||||
|
||||
* You receive the stock in the warehouse's input location.
|
||||
* Then you use the `Customer Return Restocking List
|
||||
<report-stock.shipment.out.return.restocking_list>` to help you put it away
|
||||
in the warehouse.
|
||||
|
||||
.. _Moving stock within your company:
|
||||
|
||||
Moving stock within your company
|
||||
================================
|
||||
|
||||
If you want to move stock between `Locations <model-stock.location>` within a
|
||||
`Warehouse <concept-stock.location.warehouse>`, or between warehouses that
|
||||
belong to the same `Company <company:model-company.company>` you use an
|
||||
`Internal Shipment <model-stock.shipment.internal>`.
|
||||
|
||||
The internal shipment helps you manage the processes of moving stock from one
|
||||
place to another.
|
||||
|
||||
* Once the internal shipment is waiting to be worked on, you need to go ahead
|
||||
and `Assign it <Assigning shipments>`.
|
||||
* You can use the
|
||||
`Internal Shipment Report <report-stock.shipment.internal.report>`
|
||||
to help you find and pick, or move, the stock.
|
||||
* If the stock is intended for another warehouse you then send the shipment
|
||||
to it.
|
||||
* Finally once you've put the stock away in the correct locations the internal
|
||||
shipment is done.
|
||||
|
||||
.. tip::
|
||||
|
||||
You can use the `Stock Location Lead Time <model-stock.location.lead_time>`
|
||||
to setup how long it normally takes for shipments between two warehouses.
|
||||
|
||||
.. note::
|
||||
|
||||
If an internal shipment is expected to take more than one day to complete
|
||||
then when the stock is sent it gets put in a transit location until the
|
||||
shipment is done.
|
||||
|
||||
.. _Assigning shipments:
|
||||
|
||||
Assigning shipments
|
||||
===================
|
||||
|
||||
Any `Shipments <concept-stock.shipment>` types that normally take stock from
|
||||
either a storage or view `Location <model-stock.location>` must be assigned
|
||||
before they can be done.
|
||||
The aim of this process is to find and reserve the stock specifically for the
|
||||
shipment.
|
||||
|
||||
The `Assign Shipment <wizard-stock.shipment.assign>` wizard is used when
|
||||
assigning shipments.
|
||||
It tries to `Assign <concept-stock.move.assign>` each of the shipment's
|
||||
incoming `Stock Moves <model-stock.move>`.
|
||||
In doing so it updates the stock moves based on what stock it managed to find.
|
||||
|
||||
If there is not enough stock available to fully assign the shipment you can
|
||||
force the remainder to be assigned, although this will result in some stock
|
||||
locations having negative stock.
|
||||
|
||||
.. note::
|
||||
|
||||
When stock moves from a view location are assigned the stock must always be
|
||||
taken from one of its sub-locations, as view locations cannot be the
|
||||
source or destination of a done move.
|
||||
This also means moves from a view location cannot be forced.
|
||||
@@ -0,0 +1,66 @@
|
||||
.. _Finding the value of your stock:
|
||||
|
||||
Finding the value of your stock
|
||||
===============================
|
||||
|
||||
In Tryton you can easily find the value of stock that's in one, or more,
|
||||
`Locations <model-stock.location>` as the stock's cost value is included when
|
||||
`Viewing stock levels` for the locations you are interested in.
|
||||
|
||||
.. _Updating the value of your stock:
|
||||
|
||||
Updating the value of your stock
|
||||
================================
|
||||
|
||||
The value of the stock that your `Company <company:model-company.company>`
|
||||
owns is based on the `Quantity <concept-product.quantity>` of stock and its
|
||||
cost price.
|
||||
|
||||
You can correct the quantity of stock by
|
||||
`Checking and correcting stock levels`.
|
||||
|
||||
You can also change how much the stock is worth by
|
||||
`Updating a product's cost price`.
|
||||
|
||||
.. _Updating a product's cost price:
|
||||
|
||||
Updating a product's cost price
|
||||
===============================
|
||||
|
||||
A `Product's <concept-product>` cost price is affected by various factors
|
||||
including its cost price method and in some cases the value of stock received
|
||||
or dispatched.
|
||||
|
||||
The `Recompute Cost Price <wizard-product.recompute_cost_price>` wizard is
|
||||
used to update a product's cost price using the product's cost price method.
|
||||
|
||||
.. tip::
|
||||
|
||||
Most of the time you will not need to run the wizard that recalculates your
|
||||
products' cost prices, because, by default, there is a scheduled task that
|
||||
runs once a day and does this for you.
|
||||
|
||||
You can, however, also run the wizard at any time to ensure you are seeing
|
||||
the most up to date information.
|
||||
|
||||
Once there are some `Stock Moves <model-stock.move>` for a
|
||||
`Product <concept-product>` you can make a manual adjustment to a product's
|
||||
cost price using the `Modify Cost Price <wizard-product.modify_cost_price>`
|
||||
wizard.
|
||||
This allows you to do things like reduce the cost price, and consequently
|
||||
stock value, of a product by ``10%`` from a certain date by using
|
||||
``cost_price * 0.9``.
|
||||
|
||||
.. note::
|
||||
|
||||
If you modify a cost price you may also need to run the *Recompute Cost
|
||||
Price* wizard to see the changes reflected in the product's cost price.
|
||||
|
||||
.. _Viewing cost price changes:
|
||||
|
||||
Viewing cost price changes
|
||||
==========================
|
||||
|
||||
You can get a list of any manual cost price changes that have been applied
|
||||
to a product by using the :guilabel:`Cost Price Revision` relate action from
|
||||
the product's :guilabel:`Open Related Records` menu.
|
||||
@@ -0,0 +1,48 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.exceptions import UserError, UserWarning
|
||||
from trytond.model.exceptions import ValidationError
|
||||
|
||||
|
||||
class AssignError(UserError):
|
||||
pass
|
||||
|
||||
|
||||
class MoveValidationError(ValidationError):
|
||||
pass
|
||||
|
||||
|
||||
class LocationValidationError(ValidationError):
|
||||
pass
|
||||
|
||||
|
||||
class PeriodCloseError(UserError):
|
||||
pass
|
||||
|
||||
|
||||
class InventoryValidationError(ValidationError):
|
||||
pass
|
||||
|
||||
|
||||
class InventoryCountWarning(UserWarning):
|
||||
pass
|
||||
|
||||
|
||||
class MoveOriginWarning(UserWarning):
|
||||
pass
|
||||
|
||||
|
||||
class MoveFutureWarning(UserWarning):
|
||||
pass
|
||||
|
||||
|
||||
class InventoryFutureWarning(UserWarning):
|
||||
pass
|
||||
|
||||
|
||||
class ProductCostPriceError(ValidationError):
|
||||
pass
|
||||
|
||||
|
||||
class ProductStockWarning(UserWarning):
|
||||
pass
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M4 8h3V4h14c1.1 0 2 .9 2 2v11h-2c0 1.66-1.34 3-3 3s-3-1.34-3-3H9c0 1.66-1.34 3-3 3s-3-1.34-3-3H1v-5zm14 10.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zm-13.5-9L2.54 12H7V9.5zm1.5 9c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5z"/></svg>
|
||||
|
After Width: | Height: | Size: 416 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zM6 18.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm13.5-9l1.96 2.5H17V9.5h2.5zm-1.5 9c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></svg>
|
||||
|
After Width: | Height: | Size: 426 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M19 7V4H5v3H2v13h8v-4h4v4h8V7h-3zm-8 3H9v1h2v1H8V9h2V8H8V7h3v3zm5 2h-1v-2h-2V7h1v2h1V7h1v5z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 241 B |
@@ -0,0 +1,528 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:meta><meta:generator>LibreOffice/6.4.6.2$Linux_X86_64 LibreOffice_project/40$Build-2</meta:generator><meta:initial-creator>Bertrand Chenal</meta:initial-creator><meta:creation-date>2009-03-26T13:54:48</meta:creation-date><dc:date>2020-10-24T23:33:19.178125329</dc:date><meta:editing-cycles>62</meta:editing-cycles><meta:editing-duration>PT7H27M11S</meta:editing-duration><meta:document-statistic meta:table-count="1" meta:image-count="0" meta:object-count="0" meta:page-count="2" meta:paragraph-count="35" meta:word-count="77" meta:character-count="953" meta:non-whitespace-character-count="911"/><meta:user-defined meta:name="Info 1"/><meta:user-defined meta:name="Info 2"/><meta:user-defined meta:name="Info 3"/><meta:user-defined meta:name="Info 4"/></office:meta>
|
||||
<office:settings>
|
||||
<config:config-item-set config:name="ooo:view-settings">
|
||||
<config:config-item config:name="ViewAreaTop" config:type="long">23186</config:config-item>
|
||||
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="ViewAreaWidth" config:type="long">26301</config:config-item>
|
||||
<config:config-item config:name="ViewAreaHeight" config:type="long">24026</config:config-item>
|
||||
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item-map-indexed config:name="Views">
|
||||
<config:config-item-map-entry>
|
||||
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
|
||||
<config:config-item config:name="ViewLeft" config:type="long">4651</config:config-item>
|
||||
<config:config-item config:name="ViewTop" config:type="long">35512</config:config-item>
|
||||
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="VisibleTop" config:type="long">23186</config:config-item>
|
||||
<config:config-item config:name="VisibleRight" config:type="long">26300</config:config-item>
|
||||
<config:config-item config:name="VisibleBottom" config:type="long">47210</config:config-item>
|
||||
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
|
||||
<config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
|
||||
</config:config-item-map-entry>
|
||||
</config:config-item-map-indexed>
|
||||
</config:config-item-set>
|
||||
<config:config-item-set config:name="ooo:configuration-settings">
|
||||
<config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintFaxName" config:type="string"/>
|
||||
<config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="RsidRoot" config:type="int">1178252</config:config-item>
|
||||
<config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrinterName" config:type="string"/>
|
||||
<config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="Rsid" config:type="int">2029623</config:config-item>
|
||||
<config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
|
||||
<config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
|
||||
<config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
|
||||
<config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
|
||||
<config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
|
||||
<config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
|
||||
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
|
||||
<config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
|
||||
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
|
||||
</config:config-item-set>
|
||||
</office:settings>
|
||||
<office:scripts>
|
||||
<office:script script:language="ooo:Basic">
|
||||
<ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
|
||||
</office:script>
|
||||
</office:scripts>
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/>
|
||||
<style:font-face style:name="Liberation Serif2" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif1" svg:font-family="'Liberation Serif'" style:font-adornments="Bold" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-adornments="Regular" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Thorndale AMT" svg:font-family="'Thorndale AMT'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Andale Sans UI" svg:font-family="'Andale Sans UI'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
</office:font-face-decls>
|
||||
<office:styles>
|
||||
<style:default-style style:family="graphic">
|
||||
<style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
|
||||
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
|
||||
<style:tab-stops/>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties style:use-window-font-color="true" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Andale Sans UI" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="paragraph">
|
||||
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="lr-tb"/>
|
||||
<style:text-properties style:use-window-font-color="true" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Andale Sans UI" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table">
|
||||
<style:table-properties table:border-model="collapsing"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table-row">
|
||||
<style:table-row-properties fo:keep-together="auto"/>
|
||||
</style:default-style>
|
||||
<style:style style:name="Standard" style:family="paragraph" style:class="text">
|
||||
<style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" style:font-style-name="Regular" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="16pt" style:font-name-asian="DejaVu Sans" style:font-family-asian="'DejaVu Sans'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans" style:font-family-complex="'DejaVu Sans'" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false"/>
|
||||
<style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
|
||||
<style:text-properties style:font-size-asian="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-size-complex="12pt" style:font-style-complex="italic"/>
|
||||
</style:style>
|
||||
<style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-size-asian="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="16pt" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table_20_Heading" style:display-name="Table Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents" style:class="extra" style:master-page-name="">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-name="Liberation Serif1" fo:font-family="'Liberation Serif'" style:font-style-name="Bold" style:font-family-generic="roman" style:font-pitch="variable" fo:font-weight="bold" style:font-size-asian="10.5pt" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="8.5cm" style:type="center"/>
|
||||
<style:tab-stop style:position="17cm" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="8.795cm" style:type="center"/>
|
||||
<style:tab-stop style:position="17.59cm" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="8.795cm" style:type="center"/>
|
||||
<style:tab-stop style:position="17.59cm" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_body_20_indent" style:display-name="Text body indent" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-left="0.499cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
|
||||
<style:style style:name="Quotations" style:family="paragraph" style:parent-style-name="Standard" style:class="html">
|
||||
<style:paragraph-properties fo:margin-left="1cm" fo:margin-right="1cm" fo:margin-top="0cm" fo:margin-bottom="0.499cm" loext:contextual-spacing="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="Title" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="28pt" fo:font-weight="bold" style:font-size-asian="28pt" style:font-weight-asian="bold" style:font-size-complex="28pt" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Subtitle" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:margin-top="0.106cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" style:font-size-complex="18pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Placeholder" style:family="text">
|
||||
<style:text-properties fo:font-variant="small-caps" fo:color="#008080" style:text-underline-style="dotted" style:text-underline-width="auto" style:text-underline-color="font-color"/>
|
||||
</style:style>
|
||||
<style:style style:name="Bullet_20_Symbols" style:display-name="Bullet Symbols" style:family="text">
|
||||
<style:text-properties style:font-name="StarSymbol" fo:font-family="StarSymbol" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-size-complex="9pt"/>
|
||||
</style:style>
|
||||
<text:outline-style style:name="Outline">
|
||||
<text:outline-level-style text:level="1" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="2" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="3" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="4" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="5" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="6" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="7" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="8" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="9" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="10" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.381cm"/>
|
||||
</text:outline-level-style>
|
||||
</text:outline-style>
|
||||
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
|
||||
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
|
||||
<text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
|
||||
</office:styles>
|
||||
<office:automatic-styles>
|
||||
<style:style style:name="Table1" style:family="table">
|
||||
<style:table-properties style:width="16.999cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.381cm" fo:margin-bottom="0cm" table:align="margins"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="4.683cm" style:rel-column-width="18053*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="4.685cm" style:rel-column-width="18060*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="2.949cm" style:rel-column-width="11369*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A1" style:family="table-cell">
|
||||
<style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000">
|
||||
<style:background-image/>
|
||||
</style:table-cell-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D1" style:family="table-cell">
|
||||
<style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.097cm" fo:border="0.05pt solid #000000">
|
||||
<style:background-image/>
|
||||
</style:table-cell-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.B3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="0019177b"/>
|
||||
</style:style>
|
||||
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="0019177b"/>
|
||||
</style:style>
|
||||
<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="12pt" officeooo:paragraph-rsid="0019177b" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P4" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="0019177b"/>
|
||||
</style:style>
|
||||
<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="12pt" officeooo:paragraph-rsid="0019177b" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P7" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="0019177b"/>
|
||||
</style:style>
|
||||
<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P9" style:family="paragraph" style:parent-style-name="Table_20_Heading">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties style:font-name="Liberation Serif2"/>
|
||||
</style:style>
|
||||
<style:style style:name="P10" style:family="paragraph" style:parent-style-name="Table_20_Contents">
|
||||
<style:text-properties style:font-name="Liberation Serif2"/>
|
||||
</style:style>
|
||||
<style:style style:name="P11" style:family="paragraph" style:parent-style-name="Table_20_Contents">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P12" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:break-before="page"/>
|
||||
</style:style>
|
||||
<style:style style:name="P13" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:text-properties officeooo:paragraph-rsid="00139706"/>
|
||||
</style:style>
|
||||
<style:style style:name="P14" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:margin-left="11.25cm" fo:margin-right="0cm" fo:text-align="end" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P15" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="">
|
||||
<style:paragraph-properties fo:margin-left="11.25cm" fo:margin-right="0cm" fo:text-align="end" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="auto" fo:break-before="page"/>
|
||||
</style:style>
|
||||
<style:style style:name="P16" style:family="paragraph" style:parent-style-name="Heading_20_1">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="P17" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:margin-left="11.25cm" fo:margin-right="0cm" fo:text-align="end" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P18" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="">
|
||||
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="start" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="auto" fo:break-before="page"/>
|
||||
<style:text-properties fo:font-size="6pt" style:font-size-asian="5.25pt" style:font-size-complex="6pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P19" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:break-before="page"/>
|
||||
</style:style>
|
||||
<style:style style:name="T1" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T2" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" officeooo:rsid="001d148e" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T3" style:family="text">
|
||||
<style:text-properties fo:font-weight="normal" style:font-weight-asian="normal" style:font-weight-complex="normal"/>
|
||||
</style:style>
|
||||
<style:page-layout style:name="pm1">
|
||||
<style:page-layout-properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
|
||||
<style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
|
||||
</style:page-layout-properties>
|
||||
<style:header-style>
|
||||
<style:header-footer-properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.499cm"/>
|
||||
</style:header-style>
|
||||
<style:footer-style>
|
||||
<style:header-footer-properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm"/>
|
||||
</style:footer-style>
|
||||
</style:page-layout>
|
||||
</office:automatic-styles>
|
||||
<office:master-styles>
|
||||
<style:master-page style:name="Standard" style:page-layout-name="pm1">
|
||||
<style:header>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><if test="company and company.header"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><for each="line in company.header.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P3"><text:placeholder text:placeholder-type="text"><company.rec_name if company else ''></text:placeholder></text:p>
|
||||
</style:header>
|
||||
<style:footer>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><if test="company and company.footer"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><for each="line in company.footer.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P4"><text:page-number text:select-page="current">2</text:page-number>/<text:page-count>2</text:page-count></text:p>
|
||||
</style:footer>
|
||||
</style:master-page>
|
||||
</office:master-styles>
|
||||
<office:body>
|
||||
<office:text text:use-soft-page-breaks="true">
|
||||
<office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
|
||||
<text:sequence-decls>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
|
||||
</text:sequence-decls>
|
||||
<text:p text:style-name="P12"><text:placeholder text:placeholder-type="text"><for each="shipment in records"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P18"/>
|
||||
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text"><if test="shipment.to_location.warehouse and shipment.to_location.warehouse.address"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text"><for each="line in shipment.to_location.warehouse.address.full_address.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P16">Internal Shipment</text:p>
|
||||
<text:p text:style-name="P13"><text:span text:style-name="T2">Shipment Number</text:span><text:span text:style-name="T1">: </text:span><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"><shipment.number></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Reference:</text:span><text:span text:style-name="T3"> </text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.reference or ''></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">From Location:</text:span> <text:placeholder text:placeholder-type="text"><shipment.from_location.rec_name></text:placeholder></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">To Location:</text:span> <text:placeholder text:placeholder-type="text"><shipment.to_location.rec_name></text:placeholder></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Planned Date:</text:span><text:span text:style-name="T3"> </text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.planned_date and format_date(shipment.planned_date, user.language) or ''></text:placeholder></text:span></text:p>
|
||||
<table:table table:name="Table1" table:style-name="Table1">
|
||||
<table:table-column table:style-name="Table1.A" table:number-columns-repeated="2"/>
|
||||
<table:table-column table:style-name="Table1.C"/>
|
||||
<table:table-column table:style-name="Table1.D"/>
|
||||
<table:table-header-rows>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P9">From Location</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P9">To Location</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P9">Product</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D1" office:value-type="string">
|
||||
<text:p text:style-name="P9">Quantity</text:p>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
</table:table-header-rows>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="2" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><for each="move in moves[shipment.id]"></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="P10"/>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="P10"/>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.B3" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.from_location.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.B3" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.to_location.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.product.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="P11"><text:placeholder text:placeholder-type="text"><format_number_symbol(move.quantity, user.language, move.uom, digits=move.uom.digits)></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="2" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="P10"/>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="P10"/>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
</table:table>
|
||||
<text:p text:style-name="Text_20_body"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</office:text>
|
||||
</office:body>
|
||||
</office:document>
|
||||
@@ -0,0 +1,663 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from collections import defaultdict
|
||||
|
||||
from sql import Null
|
||||
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import (
|
||||
Check, Index, Model, ModelSQL, ModelView, Workflow, fields)
|
||||
from trytond.model.exceptions import AccessError
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Bool, Eval, If
|
||||
from trytond.tools import grouped_slice
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.wizard import Button, StateTransition, StateView, Wizard
|
||||
|
||||
from .exceptions import (
|
||||
InventoryCountWarning, InventoryFutureWarning, InventoryValidationError)
|
||||
|
||||
|
||||
class Inventory(Workflow, ModelSQL, ModelView):
|
||||
'Stock Inventory'
|
||||
__name__ = 'stock.inventory'
|
||||
_rec_name = 'number'
|
||||
|
||||
_states = {
|
||||
'readonly': Eval('state') != 'draft',
|
||||
}
|
||||
|
||||
number = fields.Char('Number', readonly=True,
|
||||
help="The main identifier for the inventory.")
|
||||
location = fields.Many2One(
|
||||
'stock.location', 'Location', required=True,
|
||||
domain=[('type', '=', 'storage')], states={
|
||||
'readonly': (Eval('state') != 'draft') | Eval('lines', [0]),
|
||||
},
|
||||
help="The location inventoried.")
|
||||
date = fields.Date('Date', required=True, states={
|
||||
'readonly': (Eval('state') != 'draft') | Eval('lines', [0]),
|
||||
},
|
||||
help="The date of the stock count.")
|
||||
lines = fields.One2Many(
|
||||
'stock.inventory.line', 'inventory', 'Lines',
|
||||
states={
|
||||
'readonly': (_states['readonly'] | ~Eval('location')
|
||||
| ~Eval('date')),
|
||||
})
|
||||
empty_quantity = fields.Selection([
|
||||
(None, ""),
|
||||
('keep', "Keep"),
|
||||
('empty', "Empty"),
|
||||
], "Empty Quantity", states=_states,
|
||||
help="How lines without a quantity are handled.")
|
||||
company = fields.Many2One('company.company', 'Company', required=True,
|
||||
states={
|
||||
'readonly': (Eval('state') != 'draft') | Eval('lines', [0]),
|
||||
},
|
||||
help="The company the inventory is associated with.")
|
||||
state = fields.Selection([
|
||||
('draft', "Draft"),
|
||||
('done', "Done"),
|
||||
('cancelled', "Cancelled"),
|
||||
], "State", readonly=True, sort=False,
|
||||
help="The current state of the inventory.")
|
||||
|
||||
del _states
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(Inventory, cls).__setup__()
|
||||
t = cls.__table__()
|
||||
cls._sql_indexes.add(
|
||||
Index(t, (t.state, Index.Equality()), where=t.state == 'draft'))
|
||||
cls._order.insert(0, ('date', 'DESC'))
|
||||
cls._transitions |= set((
|
||||
('draft', 'done'),
|
||||
('draft', 'cancelled'),
|
||||
))
|
||||
cls._buttons.update({
|
||||
'confirm': {
|
||||
'invisible': Eval('state').in_(['done', 'cancelled']),
|
||||
'depends': ['state'],
|
||||
},
|
||||
'cancel': {
|
||||
'invisible': Eval('state').in_(['cancelled', 'done']),
|
||||
'depends': ['state'],
|
||||
},
|
||||
'complete_lines': {
|
||||
'readonly': Eval('state') != 'draft',
|
||||
'depends': ['state'],
|
||||
},
|
||||
'do_count': {
|
||||
'readonly': Eval('state') != 'draft',
|
||||
'depends': ['state'],
|
||||
},
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
super(Inventory, cls).__register__(module_name)
|
||||
|
||||
cursor = Transaction().connection.cursor()
|
||||
table = cls.__table_handler__(module_name)
|
||||
sql_table = cls.__table__()
|
||||
|
||||
# Migration from 5.4: remove lost_found
|
||||
table.not_null_action('lost_found', 'remove')
|
||||
|
||||
# Migration from 5.6: rename state cancel to cancelled
|
||||
cursor.execute(*sql_table.update(
|
||||
[sql_table.state], ['cancelled'],
|
||||
where=sql_table.state == 'cancel'))
|
||||
|
||||
@staticmethod
|
||||
def default_state():
|
||||
return 'draft'
|
||||
|
||||
@staticmethod
|
||||
def default_date():
|
||||
Date = Pool().get('ir.date')
|
||||
return Date.today()
|
||||
|
||||
@staticmethod
|
||||
def default_company():
|
||||
return Transaction().context.get('company')
|
||||
|
||||
@classmethod
|
||||
def view_attributes(cls):
|
||||
return super().view_attributes() + [
|
||||
('/tree', 'visual', If(Eval('state') == 'cancelled', 'muted', '')),
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def delete(cls, inventories):
|
||||
# Cancel before delete
|
||||
cls.cancel(inventories)
|
||||
for inventory in inventories:
|
||||
if inventory.state != 'cancelled':
|
||||
raise AccessError(
|
||||
gettext('stock.msg_inventory_delete_cancel',
|
||||
inventory=inventory.rec_name))
|
||||
super(Inventory, cls).delete(inventories)
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
@Workflow.transition('done')
|
||||
def confirm(cls, inventories):
|
||||
pool = Pool()
|
||||
Move = pool.get('stock.move')
|
||||
Date = pool.get('ir.date')
|
||||
Warning = pool.get('res.user.warning')
|
||||
today_cache = {}
|
||||
|
||||
def in_future(inventory):
|
||||
if inventory.company not in today_cache:
|
||||
with Transaction().set_context(company=inventory.company.id):
|
||||
today_cache[inventory.company] = Date.today()
|
||||
today = today_cache[inventory.company]
|
||||
if inventory.date > today:
|
||||
return inventory
|
||||
future_inventories = sorted(filter(in_future, inventories))
|
||||
if future_inventories:
|
||||
names = ', '.join(i.rec_name for i in future_inventories[:5])
|
||||
if len(future_inventories) > 5:
|
||||
names + '...'
|
||||
warning_name = Warning.format('date_future', future_inventories)
|
||||
if Warning.check(warning_name):
|
||||
raise InventoryFutureWarning(warning_name,
|
||||
gettext('stock.msg_inventory_date_in_the_future',
|
||||
inventories=names))
|
||||
|
||||
moves = []
|
||||
for inventory in inventories:
|
||||
keys = set()
|
||||
for line in inventory.lines:
|
||||
key = line.unique_key
|
||||
if key in keys:
|
||||
raise InventoryValidationError(
|
||||
gettext('stock.msg_inventory_line_unique',
|
||||
line=line.rec_name,
|
||||
inventory=inventory.rec_name))
|
||||
keys.add(key)
|
||||
move = line.get_move()
|
||||
if move:
|
||||
moves.append(move)
|
||||
if moves:
|
||||
Move.save(moves)
|
||||
# Skip MoveFutureWarning as it is newly created moves
|
||||
with Transaction().set_user(0):
|
||||
Move.do(moves)
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
@Workflow.transition('cancelled')
|
||||
def cancel(cls, inventories):
|
||||
Line = Pool().get("stock.inventory.line")
|
||||
Line.cancel_move([l for i in inventories for l in i.lines])
|
||||
|
||||
@classmethod
|
||||
def create(cls, vlist):
|
||||
pool = Pool()
|
||||
Configuration = pool.get('stock.configuration')
|
||||
config = Configuration(1)
|
||||
vlist = [x.copy() for x in vlist]
|
||||
default_company = cls.default_company()
|
||||
for values in vlist:
|
||||
if values.get('number') is None:
|
||||
values['number'] = config.get_multivalue(
|
||||
'inventory_sequence',
|
||||
company=values.get('company', default_company)).get()
|
||||
inventories = super(Inventory, cls).create(vlist)
|
||||
cls.complete_lines(inventories, fill=False)
|
||||
return inventories
|
||||
|
||||
@classmethod
|
||||
def write(cls, *args):
|
||||
super().write(*args)
|
||||
inventories = cls.browse(set(sum(args[::2], [])))
|
||||
cls.complete_lines(inventories, fill=False)
|
||||
|
||||
@classmethod
|
||||
def copy(cls, inventories, default=None):
|
||||
pool = Pool()
|
||||
Date = pool.get('ir.date')
|
||||
|
||||
if default is None:
|
||||
default = {}
|
||||
else:
|
||||
default = default.copy()
|
||||
default.setdefault('date', Date.today())
|
||||
default.setdefault('lines.moves', None)
|
||||
default.setdefault('number', None)
|
||||
|
||||
new_inventories = super().copy(inventories, default=default)
|
||||
cls.complete_lines(new_inventories, fill=False)
|
||||
return new_inventories
|
||||
|
||||
@staticmethod
|
||||
def grouping():
|
||||
return ('product',)
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
def complete_lines(cls, inventories, fill=True):
|
||||
'''
|
||||
Complete or update the inventories
|
||||
'''
|
||||
pool = Pool()
|
||||
Line = pool.get('stock.inventory.line')
|
||||
Product = pool.get('product.product')
|
||||
|
||||
grouping = cls.grouping()
|
||||
to_create, to_write = [], []
|
||||
for inventory in inventories:
|
||||
# Once done computation is wrong because include created moves
|
||||
if inventory.state == 'done':
|
||||
continue
|
||||
# Compute product quantities
|
||||
with Transaction().set_context(stock_date_end=inventory.date):
|
||||
if fill:
|
||||
pbl = Product.products_by_location(
|
||||
[inventory.location.id],
|
||||
grouping=grouping)
|
||||
else:
|
||||
product_ids = [l.product.id for l in inventory.lines]
|
||||
pbl = defaultdict(int)
|
||||
for product_ids in grouped_slice(product_ids):
|
||||
pbl.update(Product.products_by_location(
|
||||
[inventory.location.id],
|
||||
grouping=grouping,
|
||||
grouping_filter=(list(product_ids),)))
|
||||
|
||||
# Index some data
|
||||
product2type = {}
|
||||
product2consumable = {}
|
||||
for product in Product.browse({line[1] for line in pbl}):
|
||||
product2type[product.id] = product.type
|
||||
product2consumable[product.id] = product.consumable
|
||||
|
||||
# Update existing lines
|
||||
for line in inventory.lines:
|
||||
if line.product.type != 'goods':
|
||||
Line.delete([line])
|
||||
continue
|
||||
|
||||
key = (inventory.location.id,) + line.unique_key
|
||||
if key in pbl:
|
||||
quantity = pbl.pop(key)
|
||||
else:
|
||||
quantity = 0.0
|
||||
values = line.update_values4complete(quantity)
|
||||
if values:
|
||||
to_write.extend(([line], values))
|
||||
|
||||
if not fill:
|
||||
continue
|
||||
# Create lines if needed
|
||||
for key, quantity in pbl.items():
|
||||
product_id = key[grouping.index('product') + 1]
|
||||
if (product2type[product_id] != 'goods'
|
||||
or product2consumable[product_id]):
|
||||
continue
|
||||
if not quantity:
|
||||
continue
|
||||
|
||||
values = Line.create_values4complete(inventory, quantity)
|
||||
for i, fname in enumerate(grouping, 1):
|
||||
values[fname] = key[i]
|
||||
to_create.append(values)
|
||||
if to_create:
|
||||
Line.create(to_create)
|
||||
if to_write:
|
||||
Line.write(*to_write)
|
||||
|
||||
@classmethod
|
||||
@ModelView.button_action('stock.wizard_inventory_count')
|
||||
def do_count(cls, inventories):
|
||||
cls.complete_lines(inventories)
|
||||
|
||||
|
||||
class InventoryLine(ModelSQL, ModelView):
|
||||
'Stock Inventory Line'
|
||||
__name__ = 'stock.inventory.line'
|
||||
_states = {
|
||||
'readonly': Eval('inventory_state') != 'draft',
|
||||
}
|
||||
|
||||
product = fields.Many2One('product.product', 'Product', required=True,
|
||||
domain=[
|
||||
('type', '=', 'goods'),
|
||||
], states=_states)
|
||||
uom = fields.Function(fields.Many2One('product.uom', 'UOM',
|
||||
help="The unit in which the quantity is specified."), 'get_uom')
|
||||
expected_quantity = fields.Float(
|
||||
"Expected Quantity", digits='uom', required=True, readonly=True,
|
||||
states={
|
||||
'invisible': Eval('id', -1) < 0,
|
||||
},
|
||||
help="The quantity the system calculated should be in the location.")
|
||||
quantity = fields.Float(
|
||||
"Actual Quantity", digits='uom', states=_states,
|
||||
help="The actual quantity found in the location.")
|
||||
moves = fields.One2Many('stock.move', 'origin', 'Moves', readonly=True)
|
||||
inventory = fields.Many2One('stock.inventory', 'Inventory', required=True,
|
||||
ondelete='CASCADE',
|
||||
states={
|
||||
'readonly': _states['readonly'] & Bool(Eval('inventory')),
|
||||
},
|
||||
help="The inventory the line belongs to.")
|
||||
inventory_location = fields.Function(
|
||||
fields.Many2One('stock.location', "Location"),
|
||||
'on_change_with_inventory_location',
|
||||
searcher='search_inventory_location')
|
||||
inventory_date = fields.Function(
|
||||
fields.Date("Date"),
|
||||
'on_change_with_inventory_date',
|
||||
searcher='search_inventory_date')
|
||||
inventory_state = fields.Function(
|
||||
fields.Selection('get_inventory_states', "Inventory State",
|
||||
depends={'inventory'}),
|
||||
'on_change_with_inventory_state')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(InventoryLine, cls).__setup__()
|
||||
cls.__access__.add('inventory')
|
||||
t = cls.__table__()
|
||||
cls._sql_constraints += [
|
||||
('check_line_qty_pos', Check(t, t.quantity >= 0),
|
||||
'stock.msg_inventory_line_quantity_positive'),
|
||||
]
|
||||
cls._order.insert(0, ('product', 'ASC'))
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
transaction = Transaction()
|
||||
cursor = transaction.connection.cursor()
|
||||
update = transaction.connection.cursor()
|
||||
pool = Pool()
|
||||
Move = pool.get('stock.move')
|
||||
sql_table = cls.__table__()
|
||||
move_table = Move.__table__()
|
||||
|
||||
super(InventoryLine, cls).__register__(module_name)
|
||||
|
||||
table = cls.__table_handler__(module_name)
|
||||
|
||||
# Migration from 3.0: use Move origin
|
||||
if table.column_exist('move'):
|
||||
cursor.execute(*sql_table.select(sql_table.id, sql_table.move,
|
||||
where=sql_table.move != Null))
|
||||
for line_id, move_id in cursor:
|
||||
update.execute(*move_table.update(
|
||||
columns=[move_table.origin],
|
||||
values=['%s,%s' % (cls.__name__, line_id)],
|
||||
where=move_table.id == move_id))
|
||||
table.drop_column('move')
|
||||
|
||||
# Migration from 4.6: drop required on quantity
|
||||
table.not_null_action('quantity', action='remove')
|
||||
|
||||
@staticmethod
|
||||
def default_expected_quantity():
|
||||
return 0.
|
||||
|
||||
@fields.depends('product')
|
||||
def on_change_product(self):
|
||||
if self.product:
|
||||
self.uom = self.product.default_uom
|
||||
|
||||
@fields.depends('inventory', '_parent_inventory.location')
|
||||
def on_change_with_inventory_location(self, name=None):
|
||||
if self.inventory and self.inventory.location:
|
||||
return self.inventory.location.id
|
||||
|
||||
@classmethod
|
||||
def search_inventory_location(cls, name, clause):
|
||||
nested = clause[0][len(name):]
|
||||
return [('inventory.' + name + nested, *clause[1:])]
|
||||
|
||||
@fields.depends('inventory', '_parent_inventory.date')
|
||||
def on_change_with_inventory_date(self, name=None):
|
||||
if self.inventory:
|
||||
return self.inventory.date
|
||||
|
||||
@classmethod
|
||||
def search_inventory_date(cls, name, clause):
|
||||
return [('inventory.date',) + tuple(clause[1:])]
|
||||
|
||||
@classmethod
|
||||
def get_inventory_states(cls):
|
||||
pool = Pool()
|
||||
Inventory = pool.get('stock.inventory')
|
||||
return Inventory.fields_get(['state'])['state']['selection']
|
||||
|
||||
@fields.depends('inventory', '_parent_inventory.state')
|
||||
def on_change_with_inventory_state(self, name=None):
|
||||
if self.inventory:
|
||||
return self.inventory.state
|
||||
return 'draft'
|
||||
|
||||
def get_rec_name(self, name):
|
||||
return self.product.rec_name
|
||||
|
||||
@classmethod
|
||||
def search_rec_name(cls, name, clause):
|
||||
return [('product.rec_name',) + tuple(clause[1:])]
|
||||
|
||||
def get_uom(self, name):
|
||||
return self.product.default_uom.id
|
||||
|
||||
@property
|
||||
def unique_key(self):
|
||||
key = []
|
||||
for fname in self.inventory.grouping():
|
||||
value = getattr(self, fname)
|
||||
if isinstance(value, Model):
|
||||
value = value.id
|
||||
key.append(value)
|
||||
return tuple(key)
|
||||
|
||||
@classmethod
|
||||
def cancel_move(cls, lines):
|
||||
Move = Pool().get('stock.move')
|
||||
moves = [m for l in lines for m in l.moves if l.moves]
|
||||
Move.cancel(moves)
|
||||
Move.delete(moves)
|
||||
|
||||
def get_move(self):
|
||||
'''
|
||||
Return Move instance for the inventory line
|
||||
'''
|
||||
pool = Pool()
|
||||
Move = pool.get('stock.move')
|
||||
Uom = pool.get('product.uom')
|
||||
|
||||
qty = self.quantity
|
||||
if qty is None:
|
||||
if self.inventory.empty_quantity is None:
|
||||
raise InventoryValidationError(
|
||||
gettext('stock.msg_inventory_missing_empty_quantity',
|
||||
inventory=self.inventory.rec_name))
|
||||
if self.inventory.empty_quantity == 'keep':
|
||||
return
|
||||
else:
|
||||
qty = 0.0
|
||||
|
||||
delta_qty = Uom.compute_qty(self.uom,
|
||||
self.expected_quantity - qty,
|
||||
self.uom)
|
||||
if delta_qty == 0.0:
|
||||
return
|
||||
from_location = self.inventory.location
|
||||
to_location = self.inventory.location.lost_found_used
|
||||
if not to_location:
|
||||
raise InventoryValidationError(
|
||||
gettext('stock.msg_inventory_location_missing_lost_found',
|
||||
inventory=self.inventory.rec_name,
|
||||
location=self.inventory.location.rec_name))
|
||||
if delta_qty < 0:
|
||||
(from_location, to_location, delta_qty) = \
|
||||
(to_location, from_location, -delta_qty)
|
||||
|
||||
return Move(
|
||||
from_location=from_location,
|
||||
to_location=to_location,
|
||||
quantity=delta_qty,
|
||||
product=self.product,
|
||||
uom=self.uom,
|
||||
company=self.inventory.company,
|
||||
effective_date=self.inventory.date,
|
||||
origin=self,
|
||||
)
|
||||
|
||||
def update_values4complete(self, quantity):
|
||||
'''
|
||||
Return update values to complete inventory
|
||||
'''
|
||||
values = {}
|
||||
# if nothing changed, no update
|
||||
if self.expected_quantity == quantity:
|
||||
return values
|
||||
values['expected_quantity'] = quantity
|
||||
return values
|
||||
|
||||
@classmethod
|
||||
def create_values4complete(cls, inventory, quantity):
|
||||
'''
|
||||
Return create values to complete inventory
|
||||
'''
|
||||
return {
|
||||
'inventory': inventory.id,
|
||||
'expected_quantity': quantity,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def delete(cls, lines):
|
||||
for line in lines:
|
||||
if line.inventory_state not in {'cancelled', 'draft'}:
|
||||
raise AccessError(
|
||||
gettext('stock.msg_inventory_line_delete_cancel',
|
||||
line=line.rec_name,
|
||||
inventory=line.inventory.rec_name))
|
||||
super(InventoryLine, cls).delete(lines)
|
||||
|
||||
|
||||
class Count(Wizard):
|
||||
"Stock Inventory Count"
|
||||
__name__ = 'stock.inventory.count'
|
||||
start_state = 'search'
|
||||
|
||||
search = StateView(
|
||||
'stock.inventory.count.search',
|
||||
'stock.inventory_count_search_view_form', [
|
||||
Button("End", 'end', 'tryton-cancel'),
|
||||
Button("Select", 'quantity', 'tryton-forward', default=True),
|
||||
])
|
||||
quantity = StateView(
|
||||
'stock.inventory.count.quantity',
|
||||
'stock.inventory_count_quantity_view_form', [
|
||||
Button("Cancel", 'search', 'tryton-cancel'),
|
||||
Button("Add", 'add', 'tryton-ok', default=True),
|
||||
])
|
||||
add = StateTransition()
|
||||
|
||||
def default_quantity(self, fields):
|
||||
pool = Pool()
|
||||
InventoryLine = pool.get('stock.inventory.line')
|
||||
Warning = pool.get('res.user.warning')
|
||||
values = {}
|
||||
lines = InventoryLine.search(
|
||||
self.get_line_domain(self.record), limit=1)
|
||||
if not lines:
|
||||
warning_name = '%s.%s.count_create' % (
|
||||
self.record, self.search.search)
|
||||
if Warning.check(warning_name):
|
||||
raise InventoryCountWarning(warning_name,
|
||||
gettext('stock.msg_inventory_count_create_line',
|
||||
search=self.search.search.rec_name))
|
||||
line, = InventoryLine.create([self.get_line_values(self.record)])
|
||||
else:
|
||||
line, = lines
|
||||
values['line'] = line.id
|
||||
values['product'] = line.product.id
|
||||
values['uom'] = line.uom.id
|
||||
if line.uom.rounding == 1:
|
||||
values['quantity'] = 1.
|
||||
return values
|
||||
|
||||
def get_line_domain(self, inventory):
|
||||
pool = Pool()
|
||||
Product = pool.get('product.product')
|
||||
domain = [
|
||||
('inventory', '=', inventory.id),
|
||||
]
|
||||
if isinstance(self.search.search, Product):
|
||||
domain.append(('product', '=', self.search.search.id))
|
||||
return domain
|
||||
|
||||
def get_line_values(self, inventory):
|
||||
pool = Pool()
|
||||
Product = pool.get('product.product')
|
||||
InventoryLine = pool.get('stock.inventory.line')
|
||||
values = InventoryLine.create_values4complete(inventory, 0)
|
||||
if isinstance(self.search.search, Product):
|
||||
values['product'] = self.search.search.id
|
||||
return values
|
||||
|
||||
def transition_add(self):
|
||||
if self.quantity.line and self.quantity.quantity:
|
||||
line = self.quantity.line
|
||||
if line.quantity:
|
||||
line.quantity += self.quantity.quantity
|
||||
else:
|
||||
line.quantity = self.quantity.quantity
|
||||
line.save()
|
||||
return 'search'
|
||||
|
||||
|
||||
class CountSearch(ModelView):
|
||||
"Stock Inventory Count"
|
||||
__name__ = 'stock.inventory.count.search'
|
||||
|
||||
search = fields.Reference(
|
||||
"Search", [
|
||||
('product.product', "Product"),
|
||||
],
|
||||
required=True,
|
||||
domain={
|
||||
'product.product': [
|
||||
('type', '=', 'goods'),
|
||||
('consumable', '=', False),
|
||||
],
|
||||
},
|
||||
help="The item that's counted.")
|
||||
|
||||
@classmethod
|
||||
def default_search(cls):
|
||||
return 'product.product,-1'
|
||||
|
||||
|
||||
class CountQuantity(ModelView):
|
||||
"Stock Inventory Count"
|
||||
__name__ = 'stock.inventory.count.quantity'
|
||||
|
||||
line = fields.Many2One(
|
||||
'stock.inventory.line', "Line", readonly=True, required=True)
|
||||
product = fields.Many2One('product.product', "Product", readonly=True)
|
||||
uom = fields.Many2One('product.uom', "UOM", readonly=True,
|
||||
help="The unit in which the quantities are specified.")
|
||||
total_quantity = fields.Float(
|
||||
"Total Quantity", digits='uom', readonly=True,
|
||||
help="The total amount of the line counted so far.")
|
||||
|
||||
quantity = fields.Float(
|
||||
"Quantity", digits='uom', required=True,
|
||||
help="The quantity to add to the existing count.")
|
||||
|
||||
@fields.depends('quantity', 'line')
|
||||
def on_change_quantity(self):
|
||||
if self.line:
|
||||
self.total_quantity = (
|
||||
(self.line.quantity or 0) + (self.quantity or 0))
|
||||
@@ -0,0 +1,191 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="inventory_view_form">
|
||||
<field name="model">stock.inventory</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">inventory_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="inventory_view_tree">
|
||||
<field name="model">stock.inventory</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">inventory_tree</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window" id="act_inventory_form">
|
||||
<field name="name">Inventories</field>
|
||||
<field name="res_model">stock.inventory</field>
|
||||
<field name="search_value"
|
||||
eval="[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-1))]"
|
||||
pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view"
|
||||
id="act_inventory_form_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view" ref="inventory_view_tree"/>
|
||||
<field name="act_window" ref="act_inventory_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view"
|
||||
id="act_inventory_form_view2">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view" ref="inventory_view_form"/>
|
||||
<field name="act_window" ref="act_inventory_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_inventory_form_domain_draft">
|
||||
<field name="name">Draft</field>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
|
||||
<field name="count" eval="True"/>
|
||||
<field name="act_window" ref="act_inventory_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_inventory_form_domain_all">
|
||||
<field name="name">All</field>
|
||||
<field name="sequence" eval="9999"/>
|
||||
<field name="domain"></field>
|
||||
<field name="act_window" ref="act_inventory_form"/>
|
||||
</record>
|
||||
<menuitem
|
||||
parent="menu_stock"
|
||||
action="act_inventory_form"
|
||||
sequence="20"
|
||||
id="menu_inventory_form"/>
|
||||
|
||||
<record model="ir.ui.view" id="inventory_line_view_form">
|
||||
<field name="model">stock.inventory.line</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">inventory_line_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="inventory_line_view_tree">
|
||||
<field name="model">stock.inventory.line</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="10"/>
|
||||
<field name="name">inventory_line_tree</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="inventory_line_view_list_simple">
|
||||
<field name="model">stock.inventory.line</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="name">inventory_line_list_simple</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_inventory_line_relate">
|
||||
<field name="name">Inventory Lines</field>
|
||||
<field name="res_model">stock.inventory.line</field>
|
||||
<field
|
||||
name="domain"
|
||||
eval="[If(Eval('active_ids', []) == [Eval('active_id')], ('inventory', '=', Eval('active_id')), ('inventory', 'in', Eval('active_ids')))]"
|
||||
pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_inventory_line_relate_keyword1">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">stock.inventory,-1</field>
|
||||
<field name="action" ref="act_inventory_line_relate"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_inventory_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.inventory')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_inventory_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_inventory_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_inventory">
|
||||
<field name="model" search="[('model', '=', 'stock.inventory')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_inventory_group_stock">
|
||||
<field name="model" search="[('model', '=', 'stock.inventory')]"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="inventory_confirm_button">
|
||||
<field name="name">confirm</field>
|
||||
<field name="string">Confirm</field>
|
||||
<field name="confirm">Are you sure you want to confirm the inventory?</field>
|
||||
<field name="model" search="[('model', '=', 'stock.inventory')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group"
|
||||
id="inventory_confirm_button_group_stock">
|
||||
<field name="button" ref="inventory_confirm_button"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="inventory_cancel_button">
|
||||
<field name="name">cancel</field>
|
||||
<field name="string">Cancel</field>
|
||||
<field name="confirm">Are you sure you want to cancel the inventory?</field>
|
||||
<field name="model" search="[('model', '=', 'stock.inventory')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group"
|
||||
id="inventory_cancel_button_group_stock">
|
||||
<field name="button" ref="inventory_cancel_button"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="inventory_complete_lines_button">
|
||||
<field name="name">complete_lines</field>
|
||||
<field name="string">Complete</field>
|
||||
<field name="help">Add an inventory line for each missing products</field>
|
||||
<field name="model" search="[('model', '=', 'stock.inventory')]"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="inventory_count_button">
|
||||
<field name="name">do_count</field>
|
||||
<field name="string">Count</field>
|
||||
<field name="help">Launch the wizard to count products</field>
|
||||
<field name="model" search="[('model', '=', 'stock.inventory')]"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_inventory_count">
|
||||
<field name="name">Count</field>
|
||||
<field name="wiz_name">stock.inventory.count</field>
|
||||
<field name="model">stock.inventory</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="inventory_count_search_view_form">
|
||||
<field name="model">stock.inventory.count.search</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">inventory_count_search_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="inventory_count_quantity_view_form">
|
||||
<field name="model">stock.inventory.count.quantity</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">inventory_count_quantity_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.sequence.type" id="sequence_type_inventory">
|
||||
<field name="name">Inventory</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type-res.group"
|
||||
id="sequence_type_inventory_group_admin">
|
||||
<field name="sequence_type" ref="sequence_type_inventory"/>
|
||||
<field name="group" ref="res.group_admin"/>
|
||||
</record>
|
||||
<record model="ir.sequence.type-res.group"
|
||||
id="sequence_type_inventory_group_stock_admin">
|
||||
<field name="sequence_type" ref="sequence_type_inventory"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.sequence" id="sequence_inventory">
|
||||
<field name="name">Inventory</field>
|
||||
<field name="sequence_type" ref="sequence_type_inventory"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
@@ -0,0 +1,25 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
|
||||
class Cron(metaclass=PoolMeta):
|
||||
__name__ = 'ir.cron'
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls.method.selection.extend([
|
||||
('product.product|recompute_cost_price_from_moves',
|
||||
"Recompute Cost Price from Moves"),
|
||||
('stock.shipment.out|reschedule',
|
||||
"Reschedule Customer Shipments"),
|
||||
('stock.shipment.in.return|reschedule',
|
||||
"Reschedule Supplier Return Shipments"),
|
||||
('stock.shipment.internal|reschedule',
|
||||
"Reschedule Internal Shipments"),
|
||||
('stock.shipment.out|assign_cron',
|
||||
"Assign Customer Shipments"),
|
||||
('stock.shipment.internal|assign_cron',
|
||||
"Assign Internal Shipments"),
|
||||
])
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,762 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
import datetime
|
||||
import operator
|
||||
from decimal import Decimal
|
||||
|
||||
from sql import Column
|
||||
|
||||
from trytond.cache import Cache
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import (
|
||||
DeactivableMixin, Index, MatchMixin, Model, ModelSQL, ModelView, fields,
|
||||
sequence_ordered, tree)
|
||||
from trytond.modules.product import price_digits, round_price
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Eval, If, TimeDelta
|
||||
from trytond.tools import grouped_slice
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
from .exceptions import LocationValidationError
|
||||
|
||||
|
||||
class WarehouseWasteLocation(ModelSQL):
|
||||
"Warehouse Waste Location"
|
||||
__name__ = 'stock.location.waste'
|
||||
|
||||
warehouse = fields.Many2One(
|
||||
'stock.location', "Warehouse", required=True, ondelete='CASCADE',
|
||||
domain=[('type', '=', 'warehouse')])
|
||||
location = fields.Many2One(
|
||||
'stock.location', "Waste Location", required=True, ondelete='CASCADE',
|
||||
domain=[('type', '=', 'lost_found')])
|
||||
|
||||
|
||||
class Location(DeactivableMixin, tree(), ModelSQL, ModelView):
|
||||
"Stock Location"
|
||||
__name__ = 'stock.location'
|
||||
_default_warehouse_cache = Cache('stock.location.default_warehouse',
|
||||
context=False)
|
||||
|
||||
name = fields.Char("Name", size=None, required=True, translate=True)
|
||||
code = fields.Char(
|
||||
"Code",
|
||||
help="The internal identifier used for the location.")
|
||||
address = fields.Many2One(
|
||||
'party.address', "Address",
|
||||
states={
|
||||
'invisible': Eval('type') != 'warehouse',
|
||||
})
|
||||
type = fields.Selection([
|
||||
('supplier', 'Supplier'),
|
||||
('customer', 'Customer'),
|
||||
('lost_found', 'Lost and Found'),
|
||||
('warehouse', 'Warehouse'),
|
||||
('storage', 'Storage'),
|
||||
('production', 'Production'),
|
||||
('drop', 'Drop'),
|
||||
('view', 'View'),
|
||||
], "Location type")
|
||||
type_string = type.translated('type')
|
||||
parent = fields.Many2One(
|
||||
"stock.location", "Parent",
|
||||
left="left", right="right",
|
||||
help="Used to add structure above the location.")
|
||||
left = fields.Integer('Left', required=True)
|
||||
right = fields.Integer('Right', required=True)
|
||||
childs = fields.One2Many("stock.location", "parent", "Children",
|
||||
help="Used to add structure below the location.")
|
||||
flat_childs = fields.Boolean(
|
||||
"Flat Children",
|
||||
help="Check to enforce a single level of children with no "
|
||||
"grandchildren.")
|
||||
warehouse = fields.Function(fields.Many2One('stock.location', 'Warehouse'),
|
||||
'get_warehouse')
|
||||
input_location = fields.Many2One(
|
||||
"stock.location", "Input", states={
|
||||
'invisible': Eval('type') != 'warehouse',
|
||||
'required': Eval('type') == 'warehouse',
|
||||
},
|
||||
domain=[
|
||||
('type', '=', 'storage'),
|
||||
['OR',
|
||||
('parent', 'child_of', [Eval('id', -1)]),
|
||||
('parent', '=', None),
|
||||
],
|
||||
],
|
||||
help="Where incoming stock is received.")
|
||||
output_location = fields.Many2One(
|
||||
"stock.location", "Output", states={
|
||||
'invisible': Eval('type') != 'warehouse',
|
||||
'required': Eval('type') == 'warehouse',
|
||||
},
|
||||
domain=[
|
||||
('type', '=', 'storage'),
|
||||
['OR',
|
||||
('parent', 'child_of', [Eval('id', -1)]),
|
||||
('parent', '=', None)]],
|
||||
help="Where outgoing stock is sent from.")
|
||||
storage_location = fields.Many2One(
|
||||
"stock.location", "Storage", states={
|
||||
'invisible': Eval('type') != 'warehouse',
|
||||
'required': Eval('type') == 'warehouse',
|
||||
},
|
||||
domain=[
|
||||
('type', 'in', ['storage', 'view']),
|
||||
['OR',
|
||||
('parent', 'child_of', [Eval('id', -1)]),
|
||||
('parent', '=', None)]],
|
||||
help="The top level location where stock is stored.")
|
||||
picking_location = fields.Many2One(
|
||||
'stock.location', 'Picking', states={
|
||||
'invisible': Eval('type') != 'warehouse',
|
||||
},
|
||||
domain=[
|
||||
('type', '=', 'storage'),
|
||||
('parent', 'child_of', [Eval('storage_location', -1)]),
|
||||
],
|
||||
help="Where stock is picked from.\n"
|
||||
"Leave empty to use the storage location.")
|
||||
lost_found_location = fields.Many2One(
|
||||
'stock.location', "Lost and Found",
|
||||
states={
|
||||
'invisible': Eval('type') != 'warehouse',
|
||||
},
|
||||
domain=[
|
||||
('type', '=', 'lost_found'),
|
||||
],
|
||||
help="Used, by inventories, when correcting stock levels "
|
||||
"in the warehouse.")
|
||||
waste_locations = fields.Many2Many(
|
||||
'stock.location.waste', 'warehouse', 'location', "Waste Locations",
|
||||
states={
|
||||
'invisible': Eval('type') != 'warehouse',
|
||||
},
|
||||
domain=[
|
||||
('type', '=', 'lost_found'),
|
||||
],
|
||||
help="The locations used for waste products from the warehouse.")
|
||||
waste_warehouses = fields.Many2Many(
|
||||
'stock.location.waste', 'location', 'warehouse', "Waste Warehouses",
|
||||
states={
|
||||
'invisible': Eval('type') != 'lost_found',
|
||||
},
|
||||
domain=[
|
||||
('type', '=', 'warehouse'),
|
||||
],
|
||||
help="The warehouses that use the location for waste products.")
|
||||
|
||||
allow_pickup = fields.Boolean(
|
||||
"Allow Pickup",
|
||||
states={
|
||||
'invisible': (
|
||||
(Eval('type') != 'warehouse')
|
||||
& ~Eval('address')),
|
||||
})
|
||||
|
||||
quantity = fields.Function(
|
||||
fields.Float(
|
||||
"Quantity", digits=(16, Eval('quantity_uom_digits', 2)),
|
||||
help="The amount of stock in the location."),
|
||||
'get_quantity', searcher='search_quantity')
|
||||
forecast_quantity = fields.Function(
|
||||
fields.Float(
|
||||
"Forecast Quantity", digits=(16, Eval('quantity_uom_digits', 2)),
|
||||
help="The amount of stock expected to be in the location."),
|
||||
'get_quantity', searcher='search_quantity')
|
||||
quantity_uom = fields.Function(fields.Many2One(
|
||||
'product.uom', "Quantity UOM"),
|
||||
'get_quantity_uom')
|
||||
quantity_uom_digits = fields.Function(fields.Integer(
|
||||
"Quantity UOM Digits"),
|
||||
'get_quantity_uom')
|
||||
cost_value = fields.Function(fields.Numeric(
|
||||
"Cost Value", digits=price_digits,
|
||||
help="The value of the stock in the location."),
|
||||
'get_cost_value')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
cls.code.search_unaccented = False
|
||||
super(Location, cls).__setup__()
|
||||
t = cls.__table__()
|
||||
cls._sql_indexes.update({
|
||||
Index(t, (t.code, Index.Similarity())),
|
||||
Index(
|
||||
t,
|
||||
(t.left, Index.Range()),
|
||||
(t.right, Index.Range())),
|
||||
})
|
||||
cls._order.insert(0, ('name', 'ASC'))
|
||||
|
||||
parent_domain = [
|
||||
['OR',
|
||||
('parent.flat_childs', '=', False),
|
||||
('parent', '=', None),
|
||||
]
|
||||
]
|
||||
childs_domain = [
|
||||
If(Eval('flat_childs', False),
|
||||
('childs', '=', None),
|
||||
()),
|
||||
]
|
||||
childs_mapping = cls._childs_domain()
|
||||
for type_, allowed_parents in cls._parent_domain().items():
|
||||
parent_domain.append(If(Eval('type') == type_,
|
||||
('type', 'in', allowed_parents), ()))
|
||||
childs_domain.append(If(Eval('type') == type_,
|
||||
('type', 'in', childs_mapping[type_]), ()))
|
||||
cls.parent.domain = parent_domain
|
||||
cls.childs.domain = childs_domain
|
||||
|
||||
@classmethod
|
||||
def _parent_domain(cls):
|
||||
'''Returns a dict with location types as keys and a list of allowed
|
||||
parent location types as values'''
|
||||
return {
|
||||
'customer': ['customer'],
|
||||
'supplier': ['supplier'],
|
||||
'production': ['production'],
|
||||
'lost_found': ['lost_found'],
|
||||
'view': ['warehouse', 'view', 'storage'],
|
||||
'storage': ['warehouse', 'view', 'storage'],
|
||||
'warehouse': ['view'],
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def _childs_domain(cls):
|
||||
childs_domain = {}
|
||||
for type_, allowed_parents in cls._parent_domain().items():
|
||||
for parent in allowed_parents:
|
||||
childs_domain.setdefault(parent, [])
|
||||
childs_domain[parent].append(type_)
|
||||
return childs_domain
|
||||
|
||||
@classmethod
|
||||
def validate_fields(cls, locations, field_names):
|
||||
super().validate_fields(locations, field_names)
|
||||
inactives = []
|
||||
for location in locations:
|
||||
location.check_type_for_moves(field_names)
|
||||
if 'active' in field_names and not location.active:
|
||||
inactives.append(location)
|
||||
cls.check_inactive(inactives)
|
||||
|
||||
def check_type_for_moves(self, field_names=None):
|
||||
""" Check locations with moves have types compatible with moves. """
|
||||
pool = Pool()
|
||||
Move = pool.get('stock.move')
|
||||
if field_names and 'type' not in field_names:
|
||||
return
|
||||
invalid_move_types = ['warehouse', 'view']
|
||||
if self.type in invalid_move_types:
|
||||
# Use root to compute for all companies
|
||||
with Transaction().set_user(0):
|
||||
moves = Move.search([
|
||||
['OR',
|
||||
('to_location', '=', self.id),
|
||||
('from_location', '=', self.id),
|
||||
],
|
||||
('state', 'not in', ['staging', 'draft']),
|
||||
],
|
||||
order=[], limit=1)
|
||||
if moves:
|
||||
raise LocationValidationError(
|
||||
gettext('stock.msg_location_invalid_type_for_moves',
|
||||
location=self.rec_name,
|
||||
type=self.type_string))
|
||||
|
||||
@classmethod
|
||||
def check_inactive(cls, locations):
|
||||
"Check inactive location are empty"
|
||||
assert all(not l.active for l in locations)
|
||||
empty = cls.get_empty_locations(locations)
|
||||
non_empty = set(locations) - set(empty)
|
||||
if non_empty:
|
||||
raise LocationValidationError(
|
||||
gettext('stock.msg_location_inactive_not_empty',
|
||||
location=next(iter(non_empty)).rec_name))
|
||||
|
||||
@classmethod
|
||||
def get_empty_locations(cls, locations=None):
|
||||
pool = Pool()
|
||||
Move = pool.get('stock.move')
|
||||
Product = pool.get('product.product')
|
||||
if locations is None:
|
||||
locations = cls.search([])
|
||||
if not locations:
|
||||
return []
|
||||
location_ids = list(map(int, locations))
|
||||
# Use root to compute for all companies
|
||||
# and ensures inactive locations are in the query
|
||||
with Transaction().set_user(0), \
|
||||
Transaction().set_context(active_test=False):
|
||||
query = Move.compute_quantities_query(
|
||||
location_ids, with_childs=True)
|
||||
quantities = Move.compute_quantities(
|
||||
query, location_ids, with_childs=True)
|
||||
empty = set(location_ids)
|
||||
product_ids = [q[1] for q in quantities.keys()]
|
||||
consumables = {
|
||||
p.id for p in Product.browse(product_ids) if p.consumable}
|
||||
for (location_id, product), quantity in quantities.items():
|
||||
if quantity and product not in consumables:
|
||||
empty.discard(location_id)
|
||||
for sub_ids in grouped_slice(list(empty)):
|
||||
sub_ids = list(sub_ids)
|
||||
moves = Move.search([
|
||||
('state', 'not in', ['done', 'cancelled']),
|
||||
['OR',
|
||||
('from_location', 'in', sub_ids),
|
||||
('to_location', 'in', sub_ids),
|
||||
],
|
||||
])
|
||||
for move in moves:
|
||||
for location in [move.from_location, move.to_location]:
|
||||
empty.discard(location.id)
|
||||
return cls.browse(empty)
|
||||
|
||||
@staticmethod
|
||||
def default_left():
|
||||
return 0
|
||||
|
||||
@staticmethod
|
||||
def default_right():
|
||||
return 0
|
||||
|
||||
@classmethod
|
||||
def default_flat_childs(cls):
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def default_type():
|
||||
return 'storage'
|
||||
|
||||
@classmethod
|
||||
def check_xml_record(cls, records, values):
|
||||
return True
|
||||
|
||||
def get_warehouse(self, name):
|
||||
# Order by descending left to get the first one in the tree
|
||||
with Transaction().set_context(active_test=False):
|
||||
locations = self.search([
|
||||
('parent', 'parent_of', [self.id]),
|
||||
('type', '=', 'warehouse'),
|
||||
], order=[('left', 'DESC')])
|
||||
if locations:
|
||||
return locations[0].id
|
||||
|
||||
@classmethod
|
||||
def get_default_warehouse(cls):
|
||||
warehouse = Transaction().context.get('warehouse')
|
||||
if warehouse:
|
||||
return warehouse
|
||||
|
||||
warehouse = cls._default_warehouse_cache.get(None, -1)
|
||||
if warehouse == -1:
|
||||
warehouses = cls.search([
|
||||
('type', '=', 'warehouse'),
|
||||
], limit=2)
|
||||
if len(warehouses) == 1:
|
||||
warehouse = warehouses[0].id
|
||||
else:
|
||||
warehouse = None
|
||||
cls._default_warehouse_cache.set(None, warehouse)
|
||||
return warehouse
|
||||
|
||||
@property
|
||||
def lost_found_used(self):
|
||||
if self.warehouse:
|
||||
return self.warehouse.lost_found_location
|
||||
|
||||
@classmethod
|
||||
def search_rec_name(cls, name, clause):
|
||||
if clause[1].startswith('!') or clause[1].startswith('not '):
|
||||
bool_op = 'AND'
|
||||
else:
|
||||
bool_op = 'OR'
|
||||
return [bool_op,
|
||||
(cls._rec_name,) + tuple(clause[1:]),
|
||||
('code',) + tuple(clause[1:]),
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def _get_quantity_grouping(cls):
|
||||
context = Transaction().context
|
||||
grouping, grouping_filter, key = (), (), []
|
||||
if context.get('product') is not None:
|
||||
grouping = ('product',)
|
||||
grouping_filter = ([context['product']],)
|
||||
key = (context['product'],)
|
||||
elif context.get('product_template') is not None:
|
||||
grouping = ('product.template',)
|
||||
grouping_filter = ([context['product_template']],)
|
||||
key = (context['product_template'],)
|
||||
return grouping, grouping_filter, key
|
||||
|
||||
@classmethod
|
||||
def get_quantity(cls, locations, name):
|
||||
pool = Pool()
|
||||
Product = pool.get('product.product')
|
||||
Date_ = pool.get('ir.date')
|
||||
trans_context = Transaction().context
|
||||
|
||||
def valid_context(name):
|
||||
return (trans_context.get(name) is not None
|
||||
and isinstance(trans_context[name], int))
|
||||
|
||||
context = {}
|
||||
if (name == 'quantity'
|
||||
and (trans_context.get('stock_date_end', datetime.date.max)
|
||||
> Date_.today())):
|
||||
context['stock_date_end'] = Date_.today()
|
||||
|
||||
if name == 'forecast_quantity':
|
||||
context['forecast'] = True
|
||||
if not trans_context.get('stock_date_end'):
|
||||
context['stock_date_end'] = datetime.date.max
|
||||
|
||||
grouping, grouping_filter, key = cls._get_quantity_grouping()
|
||||
if not grouping:
|
||||
return {loc.id: None for loc in locations}
|
||||
|
||||
pbl = {}
|
||||
for sub_locations in grouped_slice(locations):
|
||||
location_ids = [l.id for l in sub_locations]
|
||||
with Transaction().set_context(context):
|
||||
pbl.update(Product.products_by_location(
|
||||
location_ids,
|
||||
grouping=grouping,
|
||||
grouping_filter=grouping_filter,
|
||||
with_childs=trans_context.get('with_childs', True)))
|
||||
|
||||
return dict((loc.id, pbl.get((loc.id,) + key, 0)) for loc in locations)
|
||||
|
||||
@classmethod
|
||||
def search_quantity(cls, name, domain):
|
||||
_, operator_, operand = domain
|
||||
operator_ = {
|
||||
'=': operator.eq,
|
||||
'>=': operator.ge,
|
||||
'>': operator.gt,
|
||||
'<=': operator.le,
|
||||
'<': operator.lt,
|
||||
'!=': operator.ne,
|
||||
'in': lambda v, l: v in l,
|
||||
'not in': lambda v, l: v not in l,
|
||||
}.get(operator_, lambda v, l: False)
|
||||
|
||||
ids = []
|
||||
for location in cls.search([]):
|
||||
if operator_(getattr(location, name), operand):
|
||||
ids.append(location.id)
|
||||
return [('id', 'in', ids)]
|
||||
|
||||
@classmethod
|
||||
def get_quantity_uom(cls, locations, name):
|
||||
pool = Pool()
|
||||
Product = pool.get('product.product')
|
||||
Template = pool.get('product.template')
|
||||
context = Transaction().context
|
||||
value = None
|
||||
uom = None
|
||||
if context.get('product') is not None:
|
||||
product = Product(context['product'])
|
||||
uom = product.default_uom
|
||||
elif context.get('product_template') is not None:
|
||||
template = Template(context['product_template'])
|
||||
uom = template.default_uom
|
||||
if uom:
|
||||
if name == 'quantity_uom':
|
||||
value = uom.id
|
||||
elif name == 'quantity_uom_digits':
|
||||
value = uom.digits
|
||||
return {l.id: value for l in locations}
|
||||
|
||||
@classmethod
|
||||
def get_cost_value(cls, locations, name):
|
||||
pool = Pool()
|
||||
Product = pool.get('product.product')
|
||||
Template = pool.get('product.template')
|
||||
trans_context = Transaction().context
|
||||
cost_values = {l.id: None for l in locations}
|
||||
|
||||
def valid_context(name):
|
||||
return (trans_context.get(name) is not None
|
||||
and isinstance(trans_context[name], int))
|
||||
|
||||
if not any(map(valid_context, ['product', 'product_template'])):
|
||||
return cost_values
|
||||
|
||||
def get_record():
|
||||
if trans_context.get('product') is not None:
|
||||
return Product(trans_context['product'])
|
||||
else:
|
||||
return Template(trans_context['product_template'])
|
||||
|
||||
context = {}
|
||||
if 'stock_date_end' in trans_context:
|
||||
# Use the last cost_price of the day
|
||||
context['_datetime'] = datetime.datetime.combine(
|
||||
trans_context['stock_date_end'], datetime.time.max)
|
||||
# The date could be before the product creation
|
||||
record = get_record()
|
||||
if record.create_date > context['_datetime']:
|
||||
return cost_values
|
||||
with Transaction().set_context(context):
|
||||
cost_price = get_record().cost_price
|
||||
# The template may have more than one product
|
||||
if cost_price is not None:
|
||||
for location in locations:
|
||||
cost_values[location.id] = round_price(
|
||||
Decimal(str(location.quantity)) * cost_price)
|
||||
return cost_values
|
||||
|
||||
@classmethod
|
||||
def _set_warehouse_parent(cls, locations):
|
||||
'''
|
||||
Set the parent of child location of warehouse if not set
|
||||
'''
|
||||
to_update = set()
|
||||
to_save = []
|
||||
for location in locations:
|
||||
if location.type == 'warehouse':
|
||||
if not location.input_location.parent:
|
||||
to_update.add(location.input_location)
|
||||
if not location.output_location.parent:
|
||||
to_update.add(location.output_location)
|
||||
if not location.storage_location.parent:
|
||||
to_update.add(location.storage_location)
|
||||
if to_update:
|
||||
for child_location in to_update:
|
||||
child_location.parent = location
|
||||
to_save.append(child_location)
|
||||
to_update.clear()
|
||||
cls.save(to_save)
|
||||
|
||||
@classmethod
|
||||
def create(cls, vlist):
|
||||
locations = super(Location, cls).create(vlist)
|
||||
cls._set_warehouse_parent(locations)
|
||||
cls._default_warehouse_cache.clear()
|
||||
return locations
|
||||
|
||||
@classmethod
|
||||
def write(cls, *args):
|
||||
super(Location, cls).write(*args)
|
||||
locations = sum(args[::2], [])
|
||||
cls._set_warehouse_parent(locations)
|
||||
cls._default_warehouse_cache.clear()
|
||||
|
||||
ids = [l.id for l in locations]
|
||||
warehouses = cls.search([
|
||||
('type', '=', 'warehouse'),
|
||||
['OR',
|
||||
('storage_location', 'in', ids),
|
||||
('input_location', 'in', ids),
|
||||
('output_location', 'in', ids),
|
||||
]])
|
||||
|
||||
fields = ('storage_location', 'input_location', 'output_location')
|
||||
wh2childs = {}
|
||||
for warehouse in warehouses:
|
||||
in_out_sto = (getattr(warehouse, f).id for f in fields)
|
||||
for location in locations:
|
||||
if location.id not in in_out_sto:
|
||||
continue
|
||||
childs = wh2childs.setdefault(warehouse.id, cls.search([
|
||||
('parent', 'child_of', warehouse.id),
|
||||
]))
|
||||
if location not in childs:
|
||||
raise LocationValidationError(
|
||||
gettext('stock.msg_location_child_of_warehouse',
|
||||
location=location.rec_name,
|
||||
warehouse=warehouse.rec_name))
|
||||
|
||||
@classmethod
|
||||
def delete(cls, *args):
|
||||
super().delete(*args)
|
||||
cls._default_warehouse_cache.clear()
|
||||
|
||||
@classmethod
|
||||
def copy(cls, locations, default=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
else:
|
||||
default = default.copy()
|
||||
|
||||
res = []
|
||||
for location in locations:
|
||||
if location.type == 'warehouse':
|
||||
|
||||
wh_default = default.copy()
|
||||
wh_default['type'] = 'view'
|
||||
wh_default['input_location'] = None
|
||||
wh_default['output_location'] = None
|
||||
wh_default['storage_location'] = None
|
||||
wh_default['childs'] = None
|
||||
|
||||
new_location, = super(Location, cls).copy([location],
|
||||
default=wh_default)
|
||||
|
||||
with Transaction().set_context(
|
||||
cp_warehouse_locations={
|
||||
'input_location': location.input_location.id,
|
||||
'output_location': location.output_location.id,
|
||||
'storage_location': location.storage_location.id,
|
||||
},
|
||||
cp_warehouse_id=new_location.id):
|
||||
cls.copy(location.childs,
|
||||
default={'parent': new_location.id})
|
||||
cls.write([new_location], {
|
||||
'type': 'warehouse',
|
||||
})
|
||||
else:
|
||||
new_location, = super(Location, cls).copy([location],
|
||||
default=default)
|
||||
warehouse_locations = Transaction().context.get(
|
||||
'cp_warehouse_locations') or {}
|
||||
if location.id in warehouse_locations.values():
|
||||
cp_warehouse = cls(
|
||||
Transaction().context['cp_warehouse_id'])
|
||||
for field, loc_id in warehouse_locations.items():
|
||||
if loc_id == location.id:
|
||||
cls.write([cp_warehouse], {
|
||||
field: new_location.id,
|
||||
})
|
||||
|
||||
res.append(new_location)
|
||||
return res
|
||||
|
||||
@classmethod
|
||||
def view_attributes(cls):
|
||||
storage_types = Eval('type').in_(['storage', 'warehouse', 'view'])
|
||||
return super().view_attributes() + [
|
||||
('/tree/field[@name="quantity"]',
|
||||
'visual', If(
|
||||
storage_types & (Eval('quantity', 0) < 0), 'danger', ''),
|
||||
['type']),
|
||||
('/tree/field[@name="forecast_quantity"]',
|
||||
'visual', If(
|
||||
storage_types & (Eval('forecast_quantity', 0) < 0),
|
||||
'warning', ''),
|
||||
['type']),
|
||||
]
|
||||
|
||||
|
||||
class ProductsByLocationsContext(ModelView):
|
||||
'Products by Locations'
|
||||
__name__ = 'stock.products_by_locations.context'
|
||||
forecast_date = fields.Date(
|
||||
'At Date',
|
||||
help="The date for which the stock quantity is calculated.\n"
|
||||
"* An empty value calculates as far ahead as possible.\n"
|
||||
"* A date in the past will provide historical values.")
|
||||
stock_date_end = fields.Function(fields.Date('At Date'),
|
||||
'on_change_with_stock_date_end')
|
||||
|
||||
@staticmethod
|
||||
def default_forecast_date():
|
||||
Date_ = Pool().get('ir.date')
|
||||
return Date_.today()
|
||||
|
||||
@fields.depends('forecast_date')
|
||||
def on_change_with_stock_date_end(self, name=None):
|
||||
if self.forecast_date is None:
|
||||
return datetime.date.max
|
||||
return self.forecast_date
|
||||
|
||||
|
||||
class ProductsByLocations(DeactivableMixin, ModelSQL, ModelView):
|
||||
"Products by Locations"
|
||||
__name__ = 'stock.products_by_locations'
|
||||
|
||||
product = fields.Many2One('product.product', "Product")
|
||||
quantity = fields.Function(
|
||||
fields.Float(
|
||||
"Quantity", digits=(16, Eval('default_uom_digits', 2))),
|
||||
'get_product', searcher='search_product')
|
||||
forecast_quantity = fields.Function(
|
||||
fields.Float(
|
||||
"Forecast Quantity", digits=(16, Eval('default_uom_digits', 2))),
|
||||
'get_product', searcher='search_product')
|
||||
default_uom = fields.Function(
|
||||
fields.Many2One('product.uom', "Default UOM"),
|
||||
'get_product', searcher='search_product')
|
||||
default_uom_digits = fields.Function(
|
||||
fields.Integer("Default UOM Digits"), 'get_product')
|
||||
cost_value = fields.Function(
|
||||
fields.Numeric("Cost Value"), 'get_product')
|
||||
consumable = fields.Function(
|
||||
fields.Boolean("Consumable"), 'get_product',
|
||||
searcher='search_product')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._order.insert(0, ('product', 'ASC'))
|
||||
|
||||
@classmethod
|
||||
def table_query(cls):
|
||||
pool = Pool()
|
||||
Product = pool.get('product.product')
|
||||
product = Product.__table__()
|
||||
columns = []
|
||||
for fname, field in cls._fields.items():
|
||||
if not hasattr(field, 'set'):
|
||||
if (isinstance(field, fields.Many2One)
|
||||
and field.get_target() == Product):
|
||||
column = Column(product, 'id')
|
||||
else:
|
||||
column = Column(product, fname)
|
||||
columns.append(column.as_(fname))
|
||||
return product.select(*columns)
|
||||
|
||||
def get_rec_name(self, name):
|
||||
return self.product.rec_name
|
||||
|
||||
@classmethod
|
||||
def search_rec_name(cls, name, clause):
|
||||
return [('product.rec_name',) + tuple(clause[1:])]
|
||||
|
||||
def get_product(self, name):
|
||||
value = getattr(self.product, name)
|
||||
if isinstance(value, Model):
|
||||
value = value.id
|
||||
return value
|
||||
|
||||
@classmethod
|
||||
def search_product(cls, name, clause):
|
||||
nested = clause[0][len(name):]
|
||||
return [('product.' + name + nested, *clause[1:])]
|
||||
|
||||
|
||||
class LocationLeadTime(sequence_ordered(), ModelSQL, ModelView, MatchMixin):
|
||||
'Location Lead Time'
|
||||
__name__ = 'stock.location.lead_time'
|
||||
|
||||
warehouse_from = fields.Many2One('stock.location', 'Warehouse From',
|
||||
ondelete='CASCADE',
|
||||
domain=[
|
||||
('type', '=', 'warehouse'),
|
||||
('id', '!=', Eval('warehouse_to', -1)),
|
||||
])
|
||||
warehouse_to = fields.Many2One('stock.location', 'Warehouse To',
|
||||
ondelete='CASCADE',
|
||||
domain=[
|
||||
('type', '=', 'warehouse'),
|
||||
('id', '!=', Eval('warehouse_from', -1)),
|
||||
])
|
||||
lead_time = fields.TimeDelta(
|
||||
"Lead Time",
|
||||
domain=['OR',
|
||||
('lead_time', '=', None),
|
||||
('lead_time', '>=', TimeDelta()),
|
||||
],
|
||||
help="The time it takes to move stock between the warehouses.")
|
||||
|
||||
@classmethod
|
||||
def get_lead_time(cls, pattern):
|
||||
for record in cls.search([]):
|
||||
if record.match(pattern):
|
||||
return record.lead_time
|
||||
@@ -0,0 +1,227 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="location_view_form">
|
||||
<field name="model">stock.location</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">location_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="location_view_tree">
|
||||
<field name="model">stock.location</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="field_childs">childs</field>
|
||||
<field name="name">location_tree</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="location_view_list">
|
||||
<field name="model">stock.location</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="10"/>
|
||||
<field name="name">location_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_location_tree">
|
||||
<field name="name">Locations</field>
|
||||
<field name="res_model">stock.location</field>
|
||||
<field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_location_tree_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="location_view_tree"/>
|
||||
<field name="act_window" ref="act_location_tree"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_location_tree_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="location_view_form"/>
|
||||
<field name="act_window" ref="act_location_tree"/>
|
||||
</record>
|
||||
<menuitem
|
||||
parent="menu_stock"
|
||||
action="act_location_tree"
|
||||
sequence="30"
|
||||
id="menu_location_tree"/>
|
||||
|
||||
<record model="ir.action.act_window" id="act_location_form">
|
||||
<field name="name">Locations</field>
|
||||
<field name="res_model">stock.location</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_location_form_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="location_view_list"/>
|
||||
<field name="act_window" ref="act_location_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_location_form_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="location_view_form"/>
|
||||
<field name="act_window" ref="act_location_form"/>
|
||||
</record>
|
||||
<menuitem
|
||||
parent="menu_configuration"
|
||||
action="act_location_form"
|
||||
sequence="20"
|
||||
id="menu_location_form"/>
|
||||
<menuitem
|
||||
parent="menu_location_tree"
|
||||
action="act_location_form"
|
||||
sequence="10"
|
||||
id="menu_location_form2"/>
|
||||
|
||||
<record model="ir.ui.view"
|
||||
id="products_by_locations_context_view_form">
|
||||
<field
|
||||
name="model">stock.products_by_locations.context</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">products_by_locations_context_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="products_by_locations_view_list">
|
||||
<field name="model">stock.products_by_locations</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">products_by_locations_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_products_by_locations_relate">
|
||||
<field name="name">Products by Locations</field>
|
||||
<field name="res_model">stock.products_by_locations</field>
|
||||
<field name="context" eval="{'locations': Eval('active_ids')}" pyson="1"/>
|
||||
<field name="domain"
|
||||
eval="['OR', ('quantity', '!=', 0.0), ('forecast_quantity', '!=', 0.0)]"
|
||||
pyson="1"/>
|
||||
<field name="search_value"
|
||||
eval="[('consumable', '=', False)]"
|
||||
pyson="1"/>
|
||||
<field name="context_model">stock.products_by_locations.context</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_products_by_locations_relate_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="products_by_locations_view_list"/>
|
||||
<field name="act_window" ref="act_products_by_locations_relate"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_products_by_locations_relate_keyword1">
|
||||
<field name="keyword">tree_open</field>
|
||||
<field name="model">stock.location,-1</field>
|
||||
<field name="action" ref="act_products_by_locations_relate"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_products_by_locations_relate_keyword2">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">stock.location,-1</field>
|
||||
<field name="action" ref="act_products_by_locations_relate"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_location">
|
||||
<field name="model" search="[('model', '=', 'stock.location')]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_location_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.location')]"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="location_lead_time_view_list">
|
||||
<field name="model">stock.location.lead_time</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">location_lead_time_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="location_lead_time_view_form">
|
||||
<field name="model">stock.location.lead_time</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">location_lead_time_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_location_lead_time_form">
|
||||
<field name="name">Location Lead Times</field>
|
||||
<field name="res_model">stock.location.lead_time</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view"
|
||||
id="act_location_lead_time_form_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="location_lead_time_view_list"/>
|
||||
<field name="act_window" ref="act_location_lead_time_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view"
|
||||
id="act_location_lead_time_form_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="location_lead_time_view_form"/>
|
||||
<field name="act_window" ref="act_location_lead_time_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
parent="menu_configuration"
|
||||
action="act_location_lead_time_form"
|
||||
sequence="50"
|
||||
id="menu_location_lead_time_form"/>
|
||||
|
||||
<record model="ir.model.access" id="access_location_lead_time">
|
||||
<field name="model"
|
||||
search="[('model', '=', 'stock.location.lead_time')]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_location_lead_time_admin">
|
||||
<field name="model"
|
||||
search="[('model', '=', 'stock.location.lead_time')]"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<!-- Default locations -->
|
||||
<record model="stock.location" id="location_input">
|
||||
<field name="name">Input Zone</field>
|
||||
<field name="code">IN</field>
|
||||
<field name="type">storage</field>
|
||||
</record>
|
||||
<record model="stock.location" id="location_output">
|
||||
<field name="name">Output Zone</field>
|
||||
<field name="code">OUT</field>
|
||||
<field name="type">storage</field>
|
||||
</record>
|
||||
<record model="stock.location" id="location_storage">
|
||||
<field name="name">Storage Zone</field>
|
||||
<field name="code">STO</field>
|
||||
<field name="type">storage</field>
|
||||
</record>
|
||||
<record model="stock.location" id="location_lost_found">
|
||||
<field name="name">Lost and Found</field>
|
||||
<field name="type">lost_found</field>
|
||||
</record>
|
||||
<record model="stock.location" id="location_warehouse">
|
||||
<field name="name">Warehouse</field>
|
||||
<field name="code">WH</field>
|
||||
<field name="type">warehouse</field>
|
||||
<field name="input_location" ref="location_input"/>
|
||||
<field name="output_location" ref="location_output"/>
|
||||
<field name="storage_location" ref="location_storage"/>
|
||||
<field name="lost_found_location" ref="location_lost_found"/>
|
||||
</record>
|
||||
<record model="stock.location" id="location_supplier">
|
||||
<field name="name">Supplier</field>
|
||||
<field name="code">SUP</field>
|
||||
<field name="type">supplier</field>
|
||||
</record>
|
||||
<record model="stock.location" id="location_customer">
|
||||
<field name="name">Customer</field>
|
||||
<field name="code">CUS</field>
|
||||
<field name="type">customer</field>
|
||||
</record>
|
||||
<record model="stock.location" id="location_transit">
|
||||
<field name="name">Transit</field>
|
||||
<field name="type">storage</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_product_change_default_uom">
|
||||
<field name="text">You cannot change the default UOM of a product which is associated with stock moves.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_product_change_type">
|
||||
<field name="text">You cannot change the type of a product which is associated with stock moves.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_product_change_cost_price">
|
||||
<field name="text">You cannot change the cost price of a product which is associated with stock moves.
|
||||
You must use the "Modify Cost Price" wizard.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_invalid_cost_price">
|
||||
<field name="text">Invalid cost price "%(cost_price)s" for product "%(product)s" with exception "%(exception)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_location_invalid_type_for_moves">
|
||||
<field name="text">You cannot change the type of location "%(location)s" to "%(type)s"
|
||||
because the type does not support moves and location has existing moves.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_location_child_of_warehouse">
|
||||
<field name="text">To set location "%(location)s" as storage/input/output of warehouse "%(warehouse)s", it must be in the warehouse.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_location_inactive_not_empty">
|
||||
<field name="text">To inactivate location "%(location)s", you must empty it.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_period_close_date">
|
||||
<field name="text">You cannot close periods with a date in the future or today.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_period_close_assigned_move">
|
||||
<field name="text">You cannot close periods with assigned moves in it.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_shipment_pack_inventory_done">
|
||||
<field name="text">To pack shipment "%(shipment)s" you must do the inventory moves.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_shipment_delete_cancel">
|
||||
<field name="text">To delete shipment "%(shipment)s" you must cancel it.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_inventory_delete_cancel">
|
||||
<field name="text">To delete inventory "%(inventory)s" you must cancel it.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_inventory_missing_empty_quantity">
|
||||
<field name="text">To confirm the inventory "%(inventory)s" you must select an option for empty quantity.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_inventory_location_missing_lost_found">
|
||||
<field name="text">To confirm the inventory "%(inventory)s" you must set a lost and found on a parent of location "%(location)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_inventory_line_unique">
|
||||
<field name="text">Inventory line "%(line)s" is not unique on inventory "%(inventory)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_inventory_line_quantity_positive">
|
||||
<field name="text">Inventory line quantity must be positive.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_inventory_line_delete_cancel">
|
||||
<field name="text">To delete inventory line "%(line)s" you must cancel inventory "%(inventory)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_inventory_count_create_line">
|
||||
<field name="text">No existing line found for "%(search)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_erase_party_shipment">
|
||||
<field name="text">You cannot erase party "%(party)s" while they have pending shipments with company "%(company)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_move_delete_draft_cancel">
|
||||
<field name="text">To delete stock move "%(move)s" you must cancel it or reset its state to draft.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_move_modify_period_close">
|
||||
<field name="text">To modify stock move "%(move)s" you must reopen period "%(period)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_move_modify_assigned">
|
||||
<field name="text">To modify stock move "%(move)s" you must reset its state to draft.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_move_modify_done">
|
||||
<field name="text">You cannot modify stock move "%(move)s" because it is done.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_move_modify_cancelled">
|
||||
<field name="text">You cannot modify stock move "%(move)s" because it is cancelled.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_move_no_origin">
|
||||
<field name="text">Stock moves "%(moves)s" have no origin.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_move_quantity_positive">
|
||||
<field name="text">Move quantity must be positive.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_move_internal_quantity_positive">
|
||||
<field name="text">Internal move quantity must be positive.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_move_from_to_location">
|
||||
<field name="text">The source and destination of stock move must be different.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_move_effective_date_in_the_future">
|
||||
<field name="text">The moves "%(moves)s" have effective dates in the future.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_inventory_date_in_the_future">
|
||||
<field name="text">The inventories "%(inventories)s" have dates in the future.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_stock_reporting_company">
|
||||
<field name="text">Company</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_stock_reporting_number">
|
||||
<field name="text">Number</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_stock_reporting_cost">
|
||||
<field name="text">Cost</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_stock_reporting_revenue">
|
||||
<field name="text">Revenue</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_stock_reporting_profit">
|
||||
<field name="text">Profit</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_stock_reporting_margin">
|
||||
<field name="text">Margin</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_stock_reporting_margin_trend">
|
||||
<field name="text">Margin Trend</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_stock_reporting_currency">
|
||||
<field name="text">Currency</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_product_location_quantity">
|
||||
<field name="text">The product "%(product)s" has still some quantities in locations "%(locations)s" for company "%(company)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_product_location_quantity_description">
|
||||
<field name="text">It is recommended to clear the stock from the storage locations before deactivating the product.</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,180 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="move_view_form">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">move_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="move_view_tree">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="10"/>
|
||||
<field name="name">move_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="move_view_tree_simple">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="name">move_tree_simple</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="move_view_list_shipment_in">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="name">move_list_shipment_in</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="move_view_list_shipment">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="name">move_list_shipment</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_move_form">
|
||||
<field name="name">Moves</field>
|
||||
<field name="res_model">stock.move</field>
|
||||
<field name="search_value"
|
||||
eval="[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-1))]"
|
||||
pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_move_form_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view" ref="move_view_tree"/>
|
||||
<field name="act_window" ref="act_move_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_move_form_view2">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view" ref="move_view_form"/>
|
||||
<field name="act_window" ref="act_move_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_move_form_domain_all">
|
||||
<field name="name">All</field>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="domain"></field>
|
||||
<field name="act_window" ref="act_move_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_move_form_domain_from_supplier">
|
||||
<field name="name">From Suppliers</field>
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="domain"
|
||||
eval="[('from_location.type', '=', 'supplier')]" pyson="1"/>
|
||||
<field name="act_window" ref="act_move_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_move_form_domain_from_supplier_waiting">
|
||||
<field name="name">From Suppliers Waiting</field>
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="domain"
|
||||
eval="[('from_location.type', '=', 'supplier'), ('state', '=', 'draft'), ('shipment', '=', None)]"
|
||||
pyson="1"/>
|
||||
<field name="count" eval="True"/>
|
||||
<field name="act_window" ref="act_move_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.domain" id="act_move_form_domain_to_customer">
|
||||
<field name="name">To Customers</field>
|
||||
<field name="sequence" eval="40"/>
|
||||
<field name="domain"
|
||||
eval="[('to_location.type', '=', 'customer')]"
|
||||
pyson="1"/>
|
||||
<field name="act_window" ref="act_move_form"/>
|
||||
</record>
|
||||
<menuitem
|
||||
parent="menu_stock"
|
||||
action="act_move_form"
|
||||
sequence="50"
|
||||
id="menu_move_form"/>
|
||||
<record model="ir.ui.menu-res.group"
|
||||
id="menu_move_form_group_stock">
|
||||
<field name="menu" ref="menu_move_form"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_move_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.move')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_move_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_move_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_move">
|
||||
<field name="model" search="[('model', '=', 'stock.move')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_move_group_stock">
|
||||
<field name="model" search="[('model', '=', 'stock.move')]"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="move_cancel_button">
|
||||
<field name="name">cancel</field>
|
||||
<field name="string">Cancel</field>
|
||||
<field name="confirm">Are you sure you want to cancel the move?</field>
|
||||
<field name="model" search="[('model', '=', 'stock.move')]"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="move_draft_button">
|
||||
<field name="name">draft</field>
|
||||
<field name="string">Reset to Draft</field>
|
||||
<field name="model" search="[('model', '=', 'stock.move')]"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="move_do_button">
|
||||
<field name="name">do</field>
|
||||
<field name="string">Do</field>
|
||||
<field name="confirm">Are you sure you want to complete the move?</field>
|
||||
<field name="model" search="[('model', '=', 'stock.move')]"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_product_moves">
|
||||
<field name="name">Stock Moves</field>
|
||||
<field name="res_model">stock.move</field>
|
||||
<field
|
||||
name="domain"
|
||||
eval="[If(Eval('active_ids', []) == [Eval('active_id')], (If(Eval('active_model') == 'product.template', 'product.template', 'product'), '=', Eval('active_id', -1)), (If(Eval('active_model') == 'product.template', 'product.template', 'product'), 'in', Eval('active_ids', [])))]"
|
||||
pyson="1"/>
|
||||
<field name="order" eval="[('effective_date', 'DESC NULLS FIRST')]" pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_product_moves_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="move_view_tree"/>
|
||||
<field name="act_window" ref="act_product_moves"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_product_moves_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="move_view_form"/>
|
||||
<field name="act_window" ref="act_product_moves"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.keyword" id="act_product_moves_keyword1">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.product,-1</field>
|
||||
<field name="action" ref="act_product_moves"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_product_moves_keyword2">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.template,-1</field>
|
||||
<field name="action" ref="act_product_moves"/>
|
||||
</record>
|
||||
<record model="ir.action-res.group" id="act_product_moves-group_stock">
|
||||
<field name="action" ref="act_product_moves"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
@@ -0,0 +1,183 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond import backend
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import ModelSQL, ValueMixin, fields
|
||||
from trytond.modules.party.exceptions import EraseError
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.tools.multivalue import migrate_property
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
supplier_location = fields.Many2One(
|
||||
'stock.location', "Supplier Location", domain=[('type', '=', 'supplier')],
|
||||
help="The default source location for stock received from the party.")
|
||||
customer_location = fields.Many2One(
|
||||
'stock.location', "Customer Location", domain=[('type', '=', 'customer')],
|
||||
help="The default destination location for stock sent to the party.")
|
||||
|
||||
|
||||
class Party(metaclass=PoolMeta):
|
||||
__name__ = 'party.party'
|
||||
|
||||
supplier_location = fields.MultiValue(supplier_location)
|
||||
customer_location = fields.MultiValue(customer_location)
|
||||
locations = fields.One2Many(
|
||||
'party.party.location', 'party', "Locations")
|
||||
delivered_to_warehouses = fields.Many2Many(
|
||||
'party.party-delivered_to-stock.location', 'party', 'location',
|
||||
"Delivered to Warehouses",
|
||||
domain=[
|
||||
('type', '=', 'warehouse'),
|
||||
],
|
||||
filter=[
|
||||
('allow_pickup', '=', True),
|
||||
])
|
||||
|
||||
@classmethod
|
||||
def multivalue_model(cls, field):
|
||||
pool = Pool()
|
||||
if field in {'supplier_location', 'customer_location'}:
|
||||
return pool.get('party.party.location')
|
||||
return super().multivalue_model(field)
|
||||
|
||||
@classmethod
|
||||
def default_supplier_location(cls, **pattern):
|
||||
return cls.multivalue_model(
|
||||
'supplier_location').default_supplier_location()
|
||||
|
||||
@classmethod
|
||||
def default_customer_location(cls, **pattern):
|
||||
return cls.multivalue_model(
|
||||
'customer_location').default_customer_location()
|
||||
|
||||
def address_get(self, type=None):
|
||||
pool = Pool()
|
||||
Location = pool.get('stock.location')
|
||||
context = Transaction().context
|
||||
address = super().address_get(type=type)
|
||||
if (type == 'delivery'
|
||||
and context.get('warehouse')):
|
||||
warehouse = Location(context['warehouse'])
|
||||
if warehouse in self.delivered_to_warehouses:
|
||||
address = warehouse.address
|
||||
return address
|
||||
|
||||
|
||||
class PartyLocation(ModelSQL, ValueMixin):
|
||||
"Party Location"
|
||||
__name__ = 'party.party.location'
|
||||
party = fields.Many2One('party.party', "Party", ondelete='CASCADE')
|
||||
supplier_location = supplier_location
|
||||
customer_location = customer_location
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
exist = backend.TableHandler.table_exist(cls._table)
|
||||
|
||||
super().__register__(module_name)
|
||||
|
||||
if not exist:
|
||||
cls._migrate_property([], [], [])
|
||||
|
||||
@classmethod
|
||||
def _migrate_property(cls, field_names, value_names, fields):
|
||||
field_names.extend(['supplier_location', 'customer_location'])
|
||||
value_names.extend(['supplier_location', 'customer_location'])
|
||||
migrate_property(
|
||||
'party.party', field_names, cls, value_names,
|
||||
parent='party', fields=fields)
|
||||
|
||||
@classmethod
|
||||
def default_supplier_location(cls):
|
||||
pool = Pool()
|
||||
ModelData = pool.get('ir.model.data')
|
||||
try:
|
||||
return ModelData.get_id('stock', 'location_supplier')
|
||||
except KeyError:
|
||||
return None
|
||||
|
||||
@classmethod
|
||||
def default_customer_location(cls):
|
||||
pool = Pool()
|
||||
ModelData = pool.get('ir.model.data')
|
||||
try:
|
||||
return ModelData.get_id('stock', 'location_customer')
|
||||
except KeyError:
|
||||
return None
|
||||
|
||||
|
||||
class PartyDeliveredToWarehouse(ModelSQL):
|
||||
"Party Delivered to Warehouse"
|
||||
__name__ = 'party.party-delivered_to-stock.location'
|
||||
|
||||
party = fields.Many2One('party.party', "Party", required=True)
|
||||
location = fields.Many2One(
|
||||
'stock.location', "Location", required=True, ondelete='CASCADE',
|
||||
domain=[
|
||||
('type', '=', 'warehouse'),
|
||||
])
|
||||
|
||||
|
||||
class Address(metaclass=PoolMeta):
|
||||
__name__ = 'party.address'
|
||||
delivery = fields.Boolean(
|
||||
'Delivery',
|
||||
help="Check to send deliveries to the address.")
|
||||
warehouses = fields.One2Many(
|
||||
'stock.location', 'address', "Warehouses", readonly=True)
|
||||
|
||||
|
||||
class ContactMechanism(metaclass=PoolMeta):
|
||||
__name__ = 'party.contact_mechanism'
|
||||
delivery = fields.Boolean(
|
||||
'Delivery',
|
||||
help="Check to use for delivery.")
|
||||
|
||||
@classmethod
|
||||
def usages(cls, _fields=None):
|
||||
if _fields is None:
|
||||
_fields = []
|
||||
_fields.append('delivery')
|
||||
return super().usages(_fields=_fields)
|
||||
|
||||
|
||||
class Replace(metaclass=PoolMeta):
|
||||
__name__ = 'party.replace'
|
||||
|
||||
@classmethod
|
||||
def fields_to_replace(cls):
|
||||
return super().fields_to_replace() + [
|
||||
('stock.shipment.in', 'supplier'),
|
||||
('stock.shipment.in.return', 'supplier'),
|
||||
('stock.shipment.out', 'customer'),
|
||||
('stock.shipment.out.return', 'customer'),
|
||||
]
|
||||
|
||||
|
||||
class Erase(metaclass=PoolMeta):
|
||||
__name__ = 'party.erase'
|
||||
|
||||
def check_erase_company(self, party, company):
|
||||
pool = Pool()
|
||||
ShipmentIn = pool.get('stock.shipment.in')
|
||||
ShipmentInReturn = pool.get('stock.shipment.in.return')
|
||||
ShipmentOut = pool.get('stock.shipment.out')
|
||||
ShipmentOutReturn = pool.get('stock.shipment.out.return')
|
||||
super().check_erase_company(party, company)
|
||||
|
||||
for Shipment, field in [
|
||||
(ShipmentIn, 'supplier'),
|
||||
(ShipmentInReturn, 'supplier'),
|
||||
(ShipmentOut, 'customer'),
|
||||
(ShipmentOutReturn, 'customer'),
|
||||
]:
|
||||
shipments = Shipment.search([
|
||||
(field, '=', party.id),
|
||||
('company', '=', company.id),
|
||||
('state', 'not in', ['done', 'cancelled']),
|
||||
])
|
||||
if shipments:
|
||||
raise EraseError(
|
||||
gettext('stock.msg_erase_party_shipment',
|
||||
party=party.rec_name,
|
||||
company=company.rec_name))
|
||||
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="party_party_view_form">
|
||||
<field name="model">party.party</field>
|
||||
<field name="inherit" ref="party.party_view_form"/>
|
||||
<field name="name">party_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="address_view_tree">
|
||||
<field name="model">party.address</field>
|
||||
<field name="inherit" ref="party.address_view_tree"/>
|
||||
<field name="name">party_address_tree</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="address_view_form">
|
||||
<field name="model">party.address</field>
|
||||
<field name="inherit" ref="party.address_view_form"/>
|
||||
<field name="name">party_address_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="address_view_form_simple">
|
||||
<field name="model">party.address</field>
|
||||
<field name="inherit" ref="party.address_view_form_simple"/>
|
||||
<field name="name">party_address_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="address_view_tree_sequence">
|
||||
<field name="model">party.address</field>
|
||||
<field name="inherit" ref="party.address_view_tree_sequence"/>
|
||||
<field name="name">party_address_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="contact_mechanism_view_tree">
|
||||
<field name="model">party.contact_mechanism</field>
|
||||
<field name="inherit" ref="party.contact_mechanism_view_tree"/>
|
||||
<field name="name">party_contact_mechanism_tree</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="contact_mechanism_view_form">
|
||||
<field name="model">party.contact_mechanism</field>
|
||||
<field name="inherit" ref="party.contact_mechanism_view_form"/>
|
||||
<field name="name">party_contact_mechanism_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="contact_mechanism_view_tree_sequence">
|
||||
<field name="model">party.contact_mechanism</field>
|
||||
<field name="inherit" ref="party.contact_mechanism_view_tree_sequence"/>
|
||||
<field name="name">party_contact_mechanism_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_shipment_out_form2">
|
||||
<field name="name">Customer Shipments</field>
|
||||
<field name="res_model">stock.shipment.out</field>
|
||||
<field name="domain"
|
||||
eval="[If(Eval('active_ids', []) == [Eval('active_id')], ('customer', '=', Eval('active_id')), ('customer', 'in', Eval('active_ids')))]"
|
||||
pyson="1"/>
|
||||
<field name="search_value" eval="[('state', 'not in', ['done', 'cancelled'])]" pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword"
|
||||
id="act_open_purchase_keyword1">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">party.party,-1</field>
|
||||
<field name="action" ref="act_shipment_out_form2"/>
|
||||
</record>
|
||||
<record model="ir.action-res.group"
|
||||
id="act_shipment_out_form2-group_stock">
|
||||
<field name="action" ref="act_shipment_out_form2"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_shipment_out_form3">
|
||||
<field name="name">Supplier Shipments</field>
|
||||
<field name="res_model">stock.shipment.in</field>
|
||||
<field name="domain"
|
||||
eval="[If(Eval('active_ids', []) == [Eval('active_id')], ('supplier', '=', Eval('active_id')), ('supplier', 'in', Eval('active_ids')))]"
|
||||
pyson="1"/>
|
||||
<field name="search_value" eval="[('state', 'not in', ['done', 'cancelled'])]" pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword"
|
||||
id="act_open_purchase_keyword2">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">party.party,-1</field>
|
||||
<field name="action" ref="act_shipment_out_form3"/>
|
||||
</record>
|
||||
<record model="ir.action-res.group"
|
||||
id="act_shipment_out_form3-group_stock">
|
||||
<field name="action" ref="act_shipment_out_form3"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
@@ -0,0 +1,198 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from itertools import chain, groupby
|
||||
|
||||
from sql import For, Literal
|
||||
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import Index, ModelSQL, ModelView, Workflow, fields
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Eval
|
||||
from trytond.tools import grouped_slice
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
from .exceptions import PeriodCloseError
|
||||
|
||||
|
||||
class Period(Workflow, ModelSQL, ModelView):
|
||||
'Stock Period'
|
||||
__name__ = 'stock.period'
|
||||
date = fields.Date('Date', required=True, states={
|
||||
'readonly': Eval('state') == 'closed',
|
||||
},
|
||||
help="When the stock period ends.")
|
||||
company = fields.Many2One(
|
||||
'company.company', "Company", required=True,
|
||||
help="The company the stock period is associated with.")
|
||||
caches = fields.One2Many('stock.period.cache', 'period', 'Caches',
|
||||
readonly=True)
|
||||
state = fields.Selection([
|
||||
('draft', 'Draft'),
|
||||
('closed', 'Closed'),
|
||||
], "State", readonly=True, sort=False,
|
||||
help="The current state of the stock period.")
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(Period, cls).__setup__()
|
||||
t = cls.__table__()
|
||||
cls._sql_indexes.add(
|
||||
Index(
|
||||
t,
|
||||
(t.company, Index.Equality()),
|
||||
(t.date, Index.Range(order='DESC')),
|
||||
where=t.state == 'closed'))
|
||||
cls._transitions |= set((
|
||||
('draft', 'closed'),
|
||||
('closed', 'draft'),
|
||||
))
|
||||
cls._buttons.update({
|
||||
'draft': {
|
||||
'invisible': Eval('state') == 'draft',
|
||||
'depends': ['state'],
|
||||
},
|
||||
'close': {
|
||||
'invisible': Eval('state') == 'closed',
|
||||
'depends': ['state'],
|
||||
},
|
||||
})
|
||||
|
||||
@staticmethod
|
||||
def default_company():
|
||||
return Transaction().context.get('company')
|
||||
|
||||
@staticmethod
|
||||
def default_state():
|
||||
return 'draft'
|
||||
|
||||
@staticmethod
|
||||
def groupings():
|
||||
return [('product',)]
|
||||
|
||||
@staticmethod
|
||||
def get_cache(grouping):
|
||||
pool = Pool()
|
||||
if all(g == 'product' or g.startswith('product.') for g in grouping):
|
||||
return pool.get('stock.period.cache')
|
||||
|
||||
def get_rec_name(self, name):
|
||||
return str(self.date)
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
@Workflow.transition('draft')
|
||||
def draft(cls, periods):
|
||||
for grouping in cls.groupings():
|
||||
Cache = cls.get_cache(grouping)
|
||||
caches = []
|
||||
for sub_periods in grouped_slice(periods):
|
||||
caches.append(Cache.search([
|
||||
('period', 'in',
|
||||
[p.id for p in sub_periods]),
|
||||
], order=[]))
|
||||
Cache.delete(list(chain(*caches)))
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
@Workflow.transition('closed')
|
||||
def close(cls, periods):
|
||||
pool = Pool()
|
||||
Product = pool.get('product.product')
|
||||
Location = pool.get('stock.location')
|
||||
Move = pool.get('stock.move')
|
||||
Date = pool.get('ir.date')
|
||||
transaction = Transaction()
|
||||
connection = transaction.connection
|
||||
database = transaction.database
|
||||
|
||||
# XXX: A move in the period could be inserted before the lock
|
||||
# from a different transaction. It will not be taken in the pbl
|
||||
# computation but it is quite rare because only past periods are
|
||||
# closed.
|
||||
Move.lock()
|
||||
if database.has_select_for():
|
||||
move = Move.__table__()
|
||||
query = move.select(Literal(1), for_=For('UPDATE', nowait=True))
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute(*query)
|
||||
|
||||
locations = Location.search([
|
||||
('type', 'not in', ['warehouse', 'view']),
|
||||
], order=[])
|
||||
|
||||
for company, c_periods in groupby(periods, key=lambda p: p.company):
|
||||
with Transaction().set_context(company=company.id):
|
||||
today = Date.today()
|
||||
recent_date = max(period.date for period in c_periods)
|
||||
if recent_date >= today:
|
||||
raise PeriodCloseError(
|
||||
gettext('stock.msg_period_close_date'))
|
||||
if Move.search([
|
||||
('state', '=', 'assigned'),
|
||||
['OR', [
|
||||
('effective_date', '=', None),
|
||||
('planned_date', '<=', recent_date),
|
||||
],
|
||||
('effective_date', '<=', recent_date),
|
||||
]]):
|
||||
raise PeriodCloseError(
|
||||
gettext('stock.msg_period_close_assigned_move'))
|
||||
|
||||
for grouping in cls.groupings():
|
||||
Cache = cls.get_cache(grouping)
|
||||
to_create = []
|
||||
for period in periods:
|
||||
with Transaction().set_context(
|
||||
stock_date_end=period.date,
|
||||
stock_date_start=None,
|
||||
stock_assign=False,
|
||||
forecast=False,
|
||||
stock_destinations=None,
|
||||
):
|
||||
pbl = Product.products_by_location(
|
||||
[l.id for l in locations], grouping=grouping)
|
||||
for key, quantity in pbl.items():
|
||||
values = {
|
||||
'location': key[0],
|
||||
'period': period.id,
|
||||
'internal_quantity': quantity,
|
||||
}
|
||||
for i, field in enumerate(grouping, 1):
|
||||
values[field] = key[i]
|
||||
to_create.append(values)
|
||||
if to_create:
|
||||
Cache.create(to_create)
|
||||
|
||||
|
||||
class Cache(ModelSQL, ModelView):
|
||||
'''
|
||||
Stock Period Cache
|
||||
|
||||
It is used to store cached computation of stock quantities.
|
||||
'''
|
||||
__name__ = 'stock.period.cache'
|
||||
period = fields.Many2One(
|
||||
'stock.period', "Period",
|
||||
required=True, readonly=True, ondelete='CASCADE')
|
||||
location = fields.Many2One(
|
||||
'stock.location', "Location",
|
||||
required=True, readonly=True, ondelete='CASCADE')
|
||||
product = fields.Many2One(
|
||||
'product.product', "Product",
|
||||
required=True, readonly=True, ondelete='CASCADE')
|
||||
internal_quantity = fields.Float('Internal Quantity', readonly=True)
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
t = cls.__table__()
|
||||
cls._sql_indexes.update({
|
||||
Index(
|
||||
t,
|
||||
(t.period, Index.Equality()),
|
||||
(t.product, Index.Equality()),
|
||||
include=[t.internal_quantity]),
|
||||
Index(
|
||||
t,
|
||||
(t.location, Index.Equality())),
|
||||
})
|
||||
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="period_view_form">
|
||||
<field name="model">stock.period</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">period_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="period_view_list">
|
||||
<field name="model">stock.period</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">period_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_period_list">
|
||||
<field name="name">Periods</field>
|
||||
<field name="res_model">stock.period</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_period_list_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="period_view_list"/>
|
||||
<field name="act_window" ref="act_period_list"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_period_list_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="period_view_form"/>
|
||||
<field name="act_window" ref="act_period_list"/>
|
||||
</record>
|
||||
<menuitem
|
||||
parent="menu_configuration"
|
||||
action="act_period_list"
|
||||
sequence="30"
|
||||
id="menu_period_list"/>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_period_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.period')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_period_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_period_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_period">
|
||||
<field name="model" search="[('model', '=', 'stock.period')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_period_stock">
|
||||
<field name="model" search="[('model', '=', 'stock.period')]"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_period_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.period')]"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="period_draft_button">
|
||||
<field name="name">draft</field>
|
||||
<field name="string">Draft</field>
|
||||
<field name="model" search="[('model', '=', 'stock.period')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group"
|
||||
id="period_draft_button_group_stock_admin">
|
||||
<field name="button" ref="period_draft_button"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="period_close_button">
|
||||
<field name="name">close</field>
|
||||
<field name="string">Close</field>
|
||||
<field name="model" search="[('model', '=', 'stock.period')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group"
|
||||
id="period_close_button_group_stock_admin">
|
||||
<field name="button" ref="period_close_button"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="period_cache_view_form">
|
||||
<field name="model">stock.period.cache</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">period_cache_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="period_cache_view_list">
|
||||
<field name="model">stock.period.cache</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">period_cache_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_period_cache_cache">
|
||||
<field name="model" search="[('model', '=', 'stock.period.cache')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_period_cache_cache_stock">
|
||||
<field name="model" search="[('model', '=', 'stock.period.cache')]"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_period_cache_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.period.cache')]"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
@@ -0,0 +1,490 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:meta><meta:generator>LibreOffice/5.2.7.2$Linux_X86_64 LibreOffice_project/20m0$Build-2</meta:generator><meta:initial-creator>Bertrand Chenal</meta:initial-creator><meta:creation-date>2009-03-26T13:54:48</meta:creation-date><dc:date>2016-03-21T16:05:27.395388483</dc:date><meta:editing-cycles>50</meta:editing-cycles><meta:editing-duration>PT7H39M6S</meta:editing-duration><meta:document-statistic meta:character-count="829" meta:image-count="0" meta:non-whitespace-character-count="786" meta:object-count="0" meta:page-count="2" meta:paragraph-count="30" meta:table-count="1" meta:word-count="73"/><meta:user-defined meta:name="Info 1"/><meta:user-defined meta:name="Info 2"/><meta:user-defined meta:name="Info 3"/><meta:user-defined meta:name="Info 4"/></office:meta>
|
||||
<office:settings>
|
||||
<config:config-item-set config:name="ooo:view-settings">
|
||||
<config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="ViewAreaWidth" config:type="long">43760</config:config-item>
|
||||
<config:config-item config:name="ViewAreaHeight" config:type="long">21691</config:config-item>
|
||||
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item-map-indexed config:name="Views">
|
||||
<config:config-item-map-entry>
|
||||
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
|
||||
<config:config-item config:name="ViewLeft" config:type="long">2630</config:config-item>
|
||||
<config:config-item config:name="ViewTop" config:type="long">5313</config:config-item>
|
||||
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="VisibleRight" config:type="long">43759</config:config-item>
|
||||
<config:config-item config:name="VisibleBottom" config:type="long">21689</config:config-item>
|
||||
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
|
||||
<config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
|
||||
</config:config-item-map-entry>
|
||||
</config:config-item-map-indexed>
|
||||
</config:config-item-set>
|
||||
<config:config-item-set config:name="ooo:configuration-settings">
|
||||
<config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintFaxName" config:type="string"/>
|
||||
<config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrinterName" config:type="string"/>
|
||||
<config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
|
||||
<config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="Rsid" config:type="int">2539458</config:config-item>
|
||||
<config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
|
||||
<config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
|
||||
<config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
|
||||
<config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="RsidRoot" config:type="int">1812667</config:config-item>
|
||||
<config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
|
||||
<config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
|
||||
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
|
||||
<config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
|
||||
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
|
||||
</config:config-item-set>
|
||||
</office:settings>
|
||||
<office:scripts>
|
||||
<office:script script:language="ooo:Basic">
|
||||
<ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
|
||||
</office:script>
|
||||
</office:scripts>
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/>
|
||||
<style:font-face style:name="Liberation Serif2" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif1" svg:font-family="'Liberation Serif'" style:font-adornments="Bold" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-adornments="Regular" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Thorndale AMT" svg:font-family="'Thorndale AMT'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Andale Sans UI" svg:font-family="'Andale Sans UI'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
</office:font-face-decls>
|
||||
<office:styles>
|
||||
<style:default-style style:family="graphic">
|
||||
<style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.1181in" draw:shadow-offset-y="0.1181in" draw:start-line-spacing-horizontal="0.1114in" draw:start-line-spacing-vertical="0.1114in" draw:end-line-spacing-horizontal="0.1114in" draw:end-line-spacing-vertical="0.1114in" style:flow-with-text="false"/>
|
||||
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
|
||||
<style:tab-stops/>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties style:use-window-font-color="true" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Andale Sans UI" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="paragraph">
|
||||
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="0.4925in" style:writing-mode="lr-tb"/>
|
||||
<style:text-properties style:use-window-font-color="true" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Andale Sans UI" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table">
|
||||
<style:table-properties table:border-model="collapsing"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table-row">
|
||||
<style:table-row-properties fo:keep-together="auto"/>
|
||||
</style:default-style>
|
||||
<style:style style:name="Standard" style:family="paragraph" style:class="text">
|
||||
<style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.1665in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false" fo:keep-with-next="always"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" style:font-style-name="Regular" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="16pt" style:font-name-asian="DejaVu Sans" style:font-family-asian="'DejaVu Sans'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans" style:font-family-complex="'DejaVu Sans'" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false"/>
|
||||
<style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
|
||||
<style:text-properties style:font-size-asian="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties fo:margin-top="0.0835in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-size-complex="12pt" style:font-style-complex="italic"/>
|
||||
</style:style>
|
||||
<style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-size-asian="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="16pt" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table_20_Heading" style:display-name="Table Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents" style:class="extra" style:master-page-name="">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-name="Liberation Serif1" fo:font-family="'Liberation Serif'" style:font-style-name="Bold" style:font-family-generic="roman" style:font-pitch="variable" fo:font-weight="bold" style:font-size-asian="10.5pt" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="3.4626in" style:type="center"/>
|
||||
<style:tab-stop style:position="6.9252in" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="3.4626in" style:type="center"/>
|
||||
<style:tab-stop style:position="6.9252in" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_body_20_indent" style:display-name="Text body indent" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-left="0.1965in" fo:margin-right="0in" fo:margin-top="0in" fo:margin-bottom="0in" loext:contextual-spacing="false" fo:text-indent="0in" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
|
||||
<style:style style:name="Quotations" style:family="paragraph" style:parent-style-name="Standard" style:class="html">
|
||||
<style:paragraph-properties fo:margin-left="0.3937in" fo:margin-right="0.3937in" fo:margin-top="0in" fo:margin-bottom="0.1965in" loext:contextual-spacing="false" fo:text-indent="0in" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="Title" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="28pt" fo:font-weight="bold" style:font-size-asian="28pt" style:font-weight-asian="bold" style:font-size-complex="28pt" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Subtitle" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:margin-top="0.0417in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" style:font-size-complex="18pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Placeholder" style:family="text">
|
||||
<style:text-properties fo:font-variant="small-caps" fo:color="#008080" style:text-underline-style="dotted" style:text-underline-width="auto" style:text-underline-color="font-color"/>
|
||||
</style:style>
|
||||
<style:style style:name="Bullet_20_Symbols" style:display-name="Bullet Symbols" style:family="text">
|
||||
<style:text-properties style:font-name="StarSymbol" fo:font-family="StarSymbol" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-size-complex="9pt"/>
|
||||
</style:style>
|
||||
<text:outline-style style:name="Outline">
|
||||
<text:outline-level-style text:level="1" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="2" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="3" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="4" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="5" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="6" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="7" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="8" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="9" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="10" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
</text:outline-style>
|
||||
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
|
||||
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
|
||||
<text:linenumbering-configuration text:number-lines="false" text:offset="0.1965in" style:num-format="1" text:number-position="left" text:increment="5"/>
|
||||
</office:styles>
|
||||
<office:automatic-styles>
|
||||
<style:style style:name="Table1" style:family="table">
|
||||
<style:table-properties style:width="6.6924in" fo:margin-left="0in" fo:margin-right="0in" fo:margin-top="0.15in" fo:margin-bottom="0in" table:align="margins"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="1.8438in" style:rel-column-width="18053*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="1.8444in" style:rel-column-width="18060*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="1.1611in" style:rel-column-width="11369*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A1" style:family="table-cell">
|
||||
<style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000">
|
||||
<style:background-image/>
|
||||
</style:table-cell-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D1" style:family="table-cell">
|
||||
<style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.0382in" fo:border="0.05pt solid #000000">
|
||||
<style:background-image/>
|
||||
</style:table-cell-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.B3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00201d29"/>
|
||||
</style:style>
|
||||
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00201d29"/>
|
||||
</style:style>
|
||||
<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="12pt" officeooo:paragraph-rsid="00201d29" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P4" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00215c08"/>
|
||||
</style:style>
|
||||
<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00201d29"/>
|
||||
</style:style>
|
||||
<style:style style:name="P7" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="12pt" officeooo:paragraph-rsid="00201d29" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00201d29"/>
|
||||
</style:style>
|
||||
<style:style style:name="P9" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="00215c08"/>
|
||||
</style:style>
|
||||
<style:style style:name="P10" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P11" style:family="paragraph" style:parent-style-name="Table_20_Heading">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties style:font-name="Liberation Serif2"/>
|
||||
</style:style>
|
||||
<style:style style:name="P12" style:family="paragraph" style:parent-style-name="Table_20_Contents">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P13" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:break-before="page"/>
|
||||
</style:style>
|
||||
<style:style style:name="P14" style:family="paragraph" style:parent-style-name="Heading_20_1">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" fo:break-before="page"/>
|
||||
<style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
|
||||
</style:style>
|
||||
<style:style style:name="P15" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:text-properties officeooo:paragraph-rsid="001d944d"/>
|
||||
</style:style>
|
||||
<style:style style:name="T1" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T2" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" officeooo:rsid="00236359" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T3" style:family="text">
|
||||
<style:text-properties fo:font-weight="normal" style:font-weight-asian="normal" style:font-weight-complex="normal"/>
|
||||
</style:style>
|
||||
<style:page-layout style:name="pm1">
|
||||
<style:page-layout-properties fo:page-width="8.2673in" fo:page-height="11.6925in" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.7874in" fo:margin-bottom="0.7874in" fo:margin-left="0.7874in" fo:margin-right="0.7874in" style:writing-mode="lr-tb" style:footnote-max-height="0in">
|
||||
<style:footnote-sep style:width="0.0071in" style:distance-before-sep="0.0398in" style:distance-after-sep="0.0398in" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
|
||||
</style:page-layout-properties>
|
||||
<style:header-style>
|
||||
<style:header-footer-properties fo:min-height="0in" fo:margin-left="0in" fo:margin-right="0in" fo:margin-bottom="0.1965in"/>
|
||||
</style:header-style>
|
||||
<style:footer-style>
|
||||
<style:header-footer-properties fo:min-height="0in" fo:margin-left="0in" fo:margin-right="0in" fo:margin-top="0.1965in"/>
|
||||
</style:footer-style>
|
||||
</style:page-layout>
|
||||
</office:automatic-styles>
|
||||
<office:master-styles>
|
||||
<style:master-page style:name="Standard" style:page-layout-name="pm1">
|
||||
<style:header>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><if test="company and company.header"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><for each="line in company.header.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P3"><text:placeholder text:placeholder-type="text"><company.rec_name if company else ''></text:placeholder></text:p>
|
||||
</style:header>
|
||||
<style:footer>
|
||||
<text:p text:style-name="P4"><text:placeholder text:placeholder-type="text"><if test="company and company.footer"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P4"><text:placeholder text:placeholder-type="text"><for each="line in company.footer.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P4"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P4"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P4"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P5"><text:page-number text:select-page="current">2</text:page-number>/<text:page-count>2</text:page-count></text:p>
|
||||
</style:footer>
|
||||
</style:master-page>
|
||||
</office:master-styles>
|
||||
<office:body>
|
||||
<office:text text:use-soft-page-breaks="true">
|
||||
<office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
|
||||
<text:sequence-decls>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
|
||||
</text:sequence-decls>
|
||||
<text:p text:style-name="P13"><text:placeholder text:placeholder-type="text"><for each="shipment in records"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14">Picking List</text:p>
|
||||
<text:p text:style-name="P15"><text:span text:style-name="T2">Shipment Number</text:span><text:span text:style-name="T1">: </text:span><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"><shipment.number></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Reference:</text:span><text:span text:style-name="T3"> </text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.origins or ''></text:placeholder></text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><', ' if (shipment.origins and shipment.reference) else ''></text:placeholder></text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.reference or ''></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Customer:</text:span><text:span text:style-name="T3"> </text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.customer.rec_name></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Planned Date:</text:span><text:span text:style-name="T3"> </text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.planned_date and format_date(shipment.planned_date, user.language) or ''></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Warehouse:</text:span><text:span text:style-name="T3"> </text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.warehouse.rec_name></text:placeholder></text:span></text:p>
|
||||
<table:table table:name="Table1" table:style-name="Table1">
|
||||
<table:table-column table:style-name="Table1.A" table:number-columns-repeated="2"/>
|
||||
<table:table-column table:style-name="Table1.C"/>
|
||||
<table:table-column table:style-name="Table1.D"/>
|
||||
<table:table-header-rows>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P11">From Location</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P11">To Location</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P11">Product</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D1" office:value-type="string">
|
||||
<text:p text:style-name="P11">Quantity</text:p>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
</table:table-header-rows>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="2" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><for each="move in moves[shipment.id]"></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"/>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"/>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.B3" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.from_location.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.B3" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.to_location.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.product.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="P12"><text:placeholder text:placeholder-type="text"><format_number_symbol(move.quantity, user.language, move.uom, digits=move.uom.digits)></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="2" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"/>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"/>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
</table:table>
|
||||
<text:p text:style-name="Text_20_body"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</office:text>
|
||||
</office:body>
|
||||
</office:document>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,414 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.action.wizard" id="wizard_recompute_cost_price">
|
||||
<field name="name">Recompute Cost Price</field>
|
||||
<field name="wiz_name">product.recompute_cost_price</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword"
|
||||
id="wizard_recompute_cost_price_product_keyword1">
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">product.product,-1</field>
|
||||
<field name="action" ref="wizard_recompute_cost_price"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword"
|
||||
id="wizard_recompute_cost_price_template_keyword1">
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">product.template,-1</field>
|
||||
<field name="action" ref="wizard_recompute_cost_price"/>
|
||||
</record>
|
||||
<record model="ir.action-res.group"
|
||||
id="wizard_recompute_cost_price-group_product_admin">
|
||||
<field name="action" ref="wizard_recompute_cost_price"/>
|
||||
<field name="group" ref="product.group_product_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="recompute_cost_price_start_view_form">
|
||||
<field name="model">product.recompute_cost_price.start</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">recompute_cost_price_start_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.cron" id="cron_recompute_cost_price_from_moves">
|
||||
<field name="method">product.product|recompute_cost_price_from_moves</field>
|
||||
<field name="interval_number" eval="1"/>
|
||||
<field name="interval_type">days</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_cost_price_revision_view_form">
|
||||
<field name="model">product.cost_price.revision</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">product_cost_price_revision_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="product_cost_price_revision_view_list">
|
||||
<field name="model">product.cost_price.revision</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">product_cost_price_revision_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_product_cost_price_revision">
|
||||
<field name="name">Cost Price Revision</field>
|
||||
<field name="res_model">product.cost_price.revision</field>
|
||||
<field
|
||||
name="domain"
|
||||
eval="[If(Eval('active_ids', []) == [Eval('active_id')], (If(Eval('active_model') == 'product.template', 'template', 'product'), '=', Eval('active_id', -1)), (If(Eval('active_model') == 'product.template', 'template', 'product'), 'in', Eval('active_ids', [])))]"
|
||||
pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_product_cost_price_revision_list_view">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="product_cost_price_revision_view_list"/>
|
||||
<field name="act_window" ref="act_product_cost_price_revision"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_product_cost_price_revision_form_view">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="product_cost_price_revision_view_form"/>
|
||||
<field name="act_window" ref="act_product_cost_price_revision"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_product_cost_price_revision_keyword1">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.template,-1</field>
|
||||
<field name="action" ref="act_product_cost_price_revision"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_product_cost_price_revision_keyword2">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.product,-1</field>
|
||||
<field name="action" ref="act_product_cost_price_revision"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_product_cost_price_revision_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'product.cost_price.revision')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_product_cost_price_revision_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_product_cost_price_revision_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_product_cost_price_revision">
|
||||
<field name="model" search="[('model', '=', 'product.cost_price.revision')]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_product_cost_price_revision_admin">
|
||||
<field name="model" search="[('model', '=', 'product.cost_price.revision')]"/>
|
||||
<field name="group" ref="product.group_product_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_modify_cost_price_start_form">
|
||||
<field name="model">product.modify_cost_price.start</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">product_modify_cost_price_start_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_product_modify_cost_price">
|
||||
<field name="name">Modify Cost Price</field>
|
||||
<field name="wiz_name">product.modify_cost_price</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="product_modify_cost_price_keyword1">
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">product.product,-1</field>
|
||||
<field name="action" ref="wizard_product_modify_cost_price"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="product_modify_cost_price_keyword2">
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">product.template,-1</field>
|
||||
<field name="action" ref="wizard_product_modify_cost_price"/>
|
||||
</record>
|
||||
<record model="ir.action-res.group" id="wizard_product_modify_cost_price-group_account">
|
||||
<field name="action" ref="wizard_product_modify_cost_price"/>
|
||||
<field name="group" ref="product.group_product_admin" />
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="location_quantity_view_tree">
|
||||
<field name="model">stock.location</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="field_childs">childs</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="name">location_quantity_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="location_quantity_view_form">
|
||||
<field name="model">stock.location</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="name">location_quantity_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="location_quantity_view_list">
|
||||
<field name="model">stock.location</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="name">location_quantity_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_location_quantity_tree">
|
||||
<field name="name">Locations Tree Quantity</field>
|
||||
<field name="res_model">stock.location</field>
|
||||
<field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
|
||||
<field name="context" pyson="1"
|
||||
eval="If(Eval('active_model') == 'product.template', {'product_template': Eval('active_id'), 'stock_skip_warehouse': False}, {'product': Eval('active_id'), 'stock_skip_warehouse': False})"/>
|
||||
<field name="context_model">product.by_location.context</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_location_quantity_tree_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="location_quantity_view_tree"/>
|
||||
<field name="act_window" ref="act_location_quantity_tree"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_location_quantity_tree_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="location_quantity_view_form"/>
|
||||
<field name="act_window" ref="act_location_quantity_tree"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.keyword"
|
||||
id="act_location_quantity_tree_keyword1">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.product,-1</field>
|
||||
<field name="action" ref="act_location_quantity_tree"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword"
|
||||
id="act_location_quantity_tree_keyword2">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.template,-1</field>
|
||||
<field name="action" ref="act_location_quantity_tree"/>
|
||||
</record>
|
||||
<record model="ir.action-res.group"
|
||||
id="act_location-quantity_tree-group_stock">
|
||||
<field name="action" ref="act_location_quantity_tree"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_location_quantity_list">
|
||||
<field name="name">Locations List Quantity</field>
|
||||
<field name="res_model">stock.location</field>
|
||||
<field name="search_value" eval="['OR', ('quantity', '!=', 0), ('forecast_quantity', '!=', 0)]" pyson="1"/>
|
||||
<field name="context" pyson="1"
|
||||
eval="If(Eval('active_model') == 'product.template', {'product_template': Eval('active_id'), 'with_childs': False, 'stock_skip_warehouse': False}, {'product': Eval('active_id'), 'with_childs': False, 'stock_skip_warehouse': False})"/>
|
||||
<field name="context_model">product.by_location.context</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_location_quantity_list_view">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="location_quantity_view_list"/>
|
||||
<field name="act_window" ref="act_location_quantity_list"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword"
|
||||
id="act_location_quantity_list_keyword1">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.product,-1</field>
|
||||
<field name="action" ref="act_location_quantity_list"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword"
|
||||
id="act_location_quantity_list_keyword2">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.template,-1</field>
|
||||
<field name="action" ref="act_location_quantity_list"/>
|
||||
</record>
|
||||
<record model="ir.action-res.group"
|
||||
id="act_location-quantity_list-group_stock">
|
||||
<field name="action" ref="act_location_quantity_list"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_by_location_context_view_form">
|
||||
<field name="model">product.by_location.context</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">product_by_location_context_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_open_product_quantities_by_warehouse">
|
||||
<field name="name">Products Quantities By Warehouse</field>
|
||||
<field name="wiz_name">stock.product_quantities_warehouse.open</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="wizard_open_product_quantities_by_warehouse_keyword_shipment_in_return">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">stock.shipment.in.return,-1</field>
|
||||
<field name="action" ref="wizard_open_product_quantities_by_warehouse"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="wizard_open_product_quantities_by_warehouse_keyword_shipment_out">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">stock.shipment.out,-1</field>
|
||||
<field name="action" ref="wizard_open_product_quantities_by_warehouse"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="wizard_open_product_quantities_by_warehouse_keyword_shipment_internal">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">stock.shipment.internal,-1</field>
|
||||
<field name="action" ref="wizard_open_product_quantities_by_warehouse"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_quantities_warehouse_view_graph">
|
||||
<field name="model">stock.product_quantities_warehouse</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">product_quantities_warehouse_graph</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_quantities_warehouse_view_list">
|
||||
<field name="model">stock.product_quantities_warehouse</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">product_quantities_warehouse_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window"
|
||||
id="act_product_quantities_warehouse">
|
||||
<field name="name">Product Quantities By Warehouse</field>
|
||||
<field name="res_model">stock.product_quantities_warehouse</field>
|
||||
<field name="context" pyson="1"
|
||||
eval="If(Eval('active_model') == 'product.template', {'product_template': Eval('active_ids')}, {'product': Eval('active_ids')})"/>
|
||||
<field name="search_value" eval="[('date', '>=', Date())]"
|
||||
pyson="1"/>
|
||||
<field name="context_model">stock.product_quantities_warehouse.context</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view"
|
||||
id="act_product_quantities_warehouse_graph_view">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="product_quantities_warehouse_view_graph"/>
|
||||
<field name="act_window" ref="act_product_quantities_warehouse"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view"
|
||||
id="act_product_quantities_warehouse_list_view">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="product_quantities_warehouse_view_list"/>
|
||||
<field name="act_window" ref="act_product_quantities_warehouse"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_product_quantities_warehouse_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.product_quantities_warehouse')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_product_quantities_warehouse_companies">
|
||||
<field
|
||||
name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_product_quantities_warehouse_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_product_quantities_warehouse">
|
||||
<field name="model" search="[('model', '=', 'stock.product_quantities_warehouse')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_product_quantities_warehouse_group_stock">
|
||||
<field name="model" search="[('model', '=', 'stock.product_quantities_warehouse')]"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_quantities_warehouse_context_view_form">
|
||||
<field
|
||||
name="model">stock.product_quantities_warehouse.context</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">product_quantities_warehouse_context_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.keyword"
|
||||
id="act_product_quantities_warehouse_keyword1">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.product,-1</field>
|
||||
<field name="action" ref="act_product_quantities_warehouse"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword"
|
||||
id="act_product_quantities_warehouse_keyword2">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.template,-1</field>
|
||||
<field name="action" ref="act_product_quantities_warehouse"/>
|
||||
</record>
|
||||
<record model="ir.action-res.group"
|
||||
id="act_product_quantities_warehouse-group_stock">
|
||||
<field name="action" ref="act_product_quantities_warehouse"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_open_product_quantities_by_warehouse_move">
|
||||
<field name="name">Stock Moves</field>
|
||||
<field name="wiz_name">stock.product_quantities_warehouse.move.open</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="wizard_open_product_quantities_by_warehouse_move_keyword1">
|
||||
<field name="keyword">tree_open</field>
|
||||
<field name="model">stock.product_quantities_warehouse,-1</field>
|
||||
<field name="action" ref="wizard_open_product_quantities_by_warehouse_move"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_quantities_warehouse_move_view_list">
|
||||
<field name="model">stock.product_quantities_warehouse.move</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">product_quantities_warehouse_move_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_product_quantities_warehouse_move">
|
||||
<field name="name">Stock Moves By Warehouse</field>
|
||||
<field name="res_model">stock.product_quantities_warehouse.move</field>
|
||||
<field
|
||||
name="context"
|
||||
eval="If(Eval('active_model') == 'product.template', {'product_template': Eval('active_ids')}, {'product': Eval('active_ids')})"
|
||||
pyson="1"/>
|
||||
<field name="search_value" eval="[('date', '>=', Date())]" pyson="1"/>
|
||||
<field name="context_model">stock.product_quantities_warehouse.context</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_product_quantities_warehouse_move_list_view">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="product_quantities_warehouse_move_view_list"/>
|
||||
<field name="act_window" ref="act_product_quantities_warehouse_move"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.keyword" id="act_product_quantities_warehouse_move_keyword1">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.product,-1</field>
|
||||
<field name="action" ref="act_product_quantities_warehouse_move"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_product_quantities_warehouse_move_keyword2">
|
||||
<field name="keyword">form_relate</field>
|
||||
<field name="model">product.template,-1</field>
|
||||
<field name="action" ref="act_product_quantities_warehouse_move"/>
|
||||
</record>
|
||||
<record model="ir.action-res.group" id="act_product_quantities_warehouse_move-group_stock">
|
||||
<field name="action" ref="act_product_quantities_warehouse_move"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_product_quantities_warehouse_move_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.product_quantities_warehouse.move')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_product_quantities_warehouse_move_companies">
|
||||
<field
|
||||
name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_product_quantities_warehouse_move_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_product_quantities_warehouse_move">
|
||||
<field name="model" search="[('model', '=', 'stock.product_quantities_warehouse.move')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_product_quantities_warehouse_move_group_stock">
|
||||
<field name="model" search="[('model', '=', 'stock.product_quantities_warehouse.move')]"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
@@ -0,0 +1,51 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import fields
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
|
||||
class User(metaclass=PoolMeta):
|
||||
__name__ = 'res.user'
|
||||
|
||||
warehouse = fields.Many2One('stock.location',
|
||||
"Current Warehouse",
|
||||
domain=[('type', '=', 'warehouse')],
|
||||
help="The warehouse that the user works at.")
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(User, cls).__setup__()
|
||||
cls._context_fields.insert(0, 'warehouse')
|
||||
|
||||
@classmethod
|
||||
def _get_preferences(cls, user, context_only=False):
|
||||
preferences = super()._get_preferences(user, context_only=context_only)
|
||||
if user.warehouse:
|
||||
preferences['warehouse'] = user.warehouse.id
|
||||
return preferences
|
||||
|
||||
def get_status_bar(self, name):
|
||||
pool = Pool()
|
||||
Location = pool.get('stock.location')
|
||||
status = super().get_status_bar(name)
|
||||
|
||||
if (self.warehouse
|
||||
and len(Location.search([('type', '=', 'warehouse')])) > 1):
|
||||
status += ' - %s' % self.warehouse.rec_name
|
||||
return status
|
||||
|
||||
@classmethod
|
||||
def read(cls, ids, fields_names):
|
||||
context = Transaction().context
|
||||
user_id = Transaction().user
|
||||
if user_id == 0 and 'user' in Transaction().context:
|
||||
user_id = Transaction().context['user']
|
||||
result = super().read(ids, fields_names)
|
||||
if ('warehouse' in fields_names
|
||||
and context.get('warehouse')
|
||||
and user_id in ids):
|
||||
for values in result:
|
||||
if values['id'] == user_id:
|
||||
values['warehouse'] = context['warehouse']
|
||||
return result
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="user_view_form">
|
||||
<field name="model">res.user</field>
|
||||
<field name="inherit" ref="res.user_view_form"/>
|
||||
<field name="name">user_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="user_view_form_preferences">
|
||||
<field name="model">res.user</field>
|
||||
<field name="inherit" ref="res.user_view_form_preferences"/>
|
||||
<field name="name">user_form_preferences</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
Executable
+155
@@ -0,0 +1,155 @@
|
||||
#!/usr/bin/env python3
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
from configparser import ConfigParser
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
|
||||
def read(fname):
|
||||
content = io.open(
|
||||
os.path.join(os.path.dirname(__file__), fname),
|
||||
'r', encoding='utf-8').read()
|
||||
content = re.sub(
|
||||
r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
|
||||
return content
|
||||
|
||||
|
||||
def get_require_version(name):
|
||||
if minor_version % 2:
|
||||
require = '%s >= %s.%s.dev0, < %s.%s'
|
||||
else:
|
||||
require = '%s >= %s.%s, < %s.%s'
|
||||
require %= (name, major_version, minor_version,
|
||||
major_version, minor_version + 1)
|
||||
return require
|
||||
|
||||
|
||||
config = ConfigParser()
|
||||
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
|
||||
info = dict(config.items('tryton'))
|
||||
for key in ('depends', 'extras_depend', 'xml'):
|
||||
if key in info:
|
||||
info[key] = info[key].strip().splitlines()
|
||||
version = info.get('version', '0.0.1')
|
||||
major_version, minor_version, _ = version.split('.', 2)
|
||||
major_version = int(major_version)
|
||||
minor_version = int(minor_version)
|
||||
name = 'trytond_stock'
|
||||
|
||||
download_url = 'http://downloads.tryton.org/%s.%s/' % (
|
||||
major_version, minor_version)
|
||||
if minor_version % 2:
|
||||
version = '%s.%s.dev0' % (major_version, minor_version)
|
||||
download_url = (
|
||||
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
|
||||
name[8:], name, version))
|
||||
local_version = []
|
||||
if os.environ.get('CI_JOB_ID'):
|
||||
local_version.append(os.environ['CI_JOB_ID'])
|
||||
else:
|
||||
for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']:
|
||||
if os.environ.get(build):
|
||||
local_version.append(os.environ[build])
|
||||
else:
|
||||
local_version = []
|
||||
break
|
||||
if local_version:
|
||||
version += '+' + '.'.join(local_version)
|
||||
|
||||
requires = ['python-sql >= 1.3.0', 'simpleeval']
|
||||
for dep in info.get('depends', []):
|
||||
if not re.match(r'(ir|res)(\W|$)', dep):
|
||||
requires.append(get_require_version('trytond_%s' % dep))
|
||||
requires.append(get_require_version('trytond'))
|
||||
|
||||
tests_require = [get_require_version('proteus')]
|
||||
dependency_links = []
|
||||
if minor_version % 2:
|
||||
dependency_links.append(
|
||||
'https://trydevpi.tryton.org/?local_version='
|
||||
+ '.'.join(local_version))
|
||||
|
||||
setup(name=name,
|
||||
version=version,
|
||||
description='Tryton module for stock and inventory',
|
||||
long_description=read('README.rst'),
|
||||
author='Tryton',
|
||||
author_email='bugs@tryton.org',
|
||||
url='http://www.tryton.org/',
|
||||
download_url=download_url,
|
||||
project_urls={
|
||||
"Bug Tracker": 'https://bugs.tryton.org/',
|
||||
"Documentation": 'https://docs.tryton.org/projects/modules-stock/',
|
||||
"Forum": 'https://www.tryton.org/forum',
|
||||
"Source Code": 'https://hg.tryton.org/modules/stock',
|
||||
},
|
||||
keywords='tryton stock',
|
||||
package_dir={'trytond.modules.stock': '.'},
|
||||
packages=(
|
||||
['trytond.modules.stock']
|
||||
+ ['trytond.modules.stock.%s' % p for p in find_packages()]
|
||||
),
|
||||
package_data={
|
||||
'trytond.modules.stock': (info.get('xml', [])
|
||||
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
|
||||
'icons/*.svg', 'tests/*.rst']),
|
||||
},
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
'Framework :: Tryton',
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: Financial and Insurance Industry',
|
||||
'Intended Audience :: Legal Industry',
|
||||
'Intended Audience :: Manufacturing',
|
||||
'License :: OSI Approved :: '
|
||||
'GNU General Public License v3 or later (GPLv3+)',
|
||||
'Natural Language :: Bulgarian',
|
||||
'Natural Language :: Catalan',
|
||||
'Natural Language :: Chinese (Simplified)',
|
||||
'Natural Language :: Czech',
|
||||
'Natural Language :: Dutch',
|
||||
'Natural Language :: English',
|
||||
'Natural Language :: Finnish',
|
||||
'Natural Language :: French',
|
||||
'Natural Language :: German',
|
||||
'Natural Language :: Hungarian',
|
||||
'Natural Language :: Indonesian',
|
||||
'Natural Language :: Italian',
|
||||
'Natural Language :: Persian',
|
||||
'Natural Language :: Polish',
|
||||
'Natural Language :: Portuguese (Brazilian)',
|
||||
'Natural Language :: Romanian',
|
||||
'Natural Language :: Russian',
|
||||
'Natural Language :: Slovenian',
|
||||
'Natural Language :: Spanish',
|
||||
'Natural Language :: Turkish',
|
||||
'Natural Language :: Ukrainian',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: Implementation :: CPython',
|
||||
'Topic :: Office/Business',
|
||||
],
|
||||
license='GPL-3',
|
||||
python_requires='>=3.7',
|
||||
install_requires=requires,
|
||||
extras_require={
|
||||
'sparklines': ['pygal'],
|
||||
'test': tests_require,
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
stock = trytond.modules.stock
|
||||
""",
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="res.group" id="group_stock">
|
||||
<field name="name">Stock</field>
|
||||
</record>
|
||||
<record model="res.group" id="group_stock_admin">
|
||||
<field name="name">Stock Administration</field>
|
||||
<field name="parent" ref="group_stock"/>
|
||||
</record>
|
||||
<record model="res.group" id="group_stock_force_assignment">
|
||||
<field name="name">Stock Force Assignment</field>
|
||||
<field name="parent" ref="group_stock"/>
|
||||
</record>
|
||||
<record model="res.user-res.group"
|
||||
id="user_admin_group_stock_admin">
|
||||
<field name="user" ref="res.user_admin"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
</record>
|
||||
<record model="res.user-res.group"
|
||||
id="user_admin_group_stock">
|
||||
<field name="user" ref="res.user_admin"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
<record model="res.user-res.group"
|
||||
id="user_admin_group_stock_force_assignment">
|
||||
<field name="user" ref="res.user_admin"/>
|
||||
<field name="group" ref="group_stock_force_assignment"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.icon" id="stock_icon">
|
||||
<field name="name">tryton-stock</field>
|
||||
<field name="path">icons/tryton-stock.svg</field>
|
||||
</record>
|
||||
<record model="ir.ui.icon" id="stock_shipment_in">
|
||||
<field name="name">tryton-shipment-in</field>
|
||||
<field name="path">icons/tryton-shipment-in.svg</field>
|
||||
</record>
|
||||
<record model="ir.ui.icon" id="stock_shipment_out">
|
||||
<field name="name">tryton-shipment-out</field>
|
||||
<field name="path">icons/tryton-shipment-out.svg</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Inventory & Stock"
|
||||
sequence="60"
|
||||
id="menu_stock"
|
||||
icon="tryton-stock"/>
|
||||
<record model="ir.ui.menu-res.group"
|
||||
id="menu_stock_group_stock">
|
||||
<field name="menu" ref="menu_stock"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Configuration"
|
||||
parent="menu_stock"
|
||||
sequence="0"
|
||||
id="menu_configuration"
|
||||
icon="tryton-settings"/>
|
||||
<record model="ir.ui.menu-res.group"
|
||||
id="menu_configuration_group_stock_admin">
|
||||
<field name="menu" ref="menu_configuration"/>
|
||||
<field name="group" ref="group_stock_admin"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Reporting"
|
||||
parent="menu_stock"
|
||||
sequence="100"
|
||||
id="menu_reporting"
|
||||
active="0"/>
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
@@ -0,0 +1,667 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from decimal import Decimal
|
||||
from itertools import tee, zip_longest
|
||||
|
||||
from sql import Literal, Null, With
|
||||
from sql.aggregate import Max, Min, Sum
|
||||
from sql.conditionals import Case, Coalesce
|
||||
from sql.functions import Ceil, CurrentTimestamp, DateTrunc, Log, Power, Round
|
||||
|
||||
try:
|
||||
import pygal
|
||||
except ImportError:
|
||||
pygal = None
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
from trytond.i18n import lazy_gettext
|
||||
from trytond.model import ModelSQL, ModelView, fields
|
||||
from trytond.modules.currency.fields import Monetary
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Eval, If
|
||||
from trytond.tools import grouped_slice, reduce_ids
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
|
||||
def pairwise(iterable):
|
||||
a, b = tee(iterable)
|
||||
next(b)
|
||||
return zip_longest(a, b)
|
||||
|
||||
|
||||
class Abstract(ModelSQL, ModelView):
|
||||
|
||||
company = fields.Many2One(
|
||||
'company.company', lazy_gettext('stock.msg_stock_reporting_company'))
|
||||
cost = Monetary(
|
||||
lazy_gettext('stock.msg_stock_reporting_cost'),
|
||||
currency='currency', digits='currency')
|
||||
revenue = Monetary(
|
||||
lazy_gettext('stock.msg_stock_reporting_revenue'),
|
||||
currency='currency', digits='currency')
|
||||
profit = Monetary(
|
||||
lazy_gettext('stock.msg_stock_reporting_profit'),
|
||||
currency='currency', digits='currency')
|
||||
margin = fields.Numeric(
|
||||
lazy_gettext('stock.msg_stock_reporting_margin'),
|
||||
digits=(14, 4),
|
||||
states={
|
||||
'invisible': ~Eval('margin'),
|
||||
})
|
||||
margin_trend = fields.Function(fields.Char(
|
||||
lazy_gettext('stock.msg_stock_reporting_margin_trend')),
|
||||
'get_trend')
|
||||
time_series = None
|
||||
|
||||
currency = fields.Many2One(
|
||||
'currency.currency',
|
||||
lazy_gettext('stock.msg_stock_reporting_currency'))
|
||||
|
||||
@classmethod
|
||||
def table_query(cls):
|
||||
from_item, tables, withs = cls._joins()
|
||||
return from_item.select(*cls._columns(tables, withs),
|
||||
where=cls._where(tables, withs),
|
||||
group_by=cls._group_by(tables, withs),
|
||||
with_=withs.values())
|
||||
|
||||
@classmethod
|
||||
def _joins(cls):
|
||||
pool = Pool()
|
||||
Company = pool.get('company.company')
|
||||
Currency = pool.get('currency.currency')
|
||||
Move = pool.get('stock.move')
|
||||
Location = pool.get('stock.location')
|
||||
|
||||
tables = {}
|
||||
tables['move'] = move = Move.__table__()
|
||||
tables['move.company'] = company = Company.__table__()
|
||||
tables['move.company.currency'] = currency = Currency.__table__()
|
||||
tables['move.from_location'] = from_location = Location.__table__()
|
||||
tables['move.to_location'] = to_location = Location.__table__()
|
||||
withs = {}
|
||||
withs['currency_rate'] = currency_rate = With(
|
||||
query=Currency.currency_rate_sql())
|
||||
withs['currency_rate_company'] = currency_rate_company = With(
|
||||
query=Currency.currency_rate_sql())
|
||||
|
||||
from_item = (move
|
||||
.join(currency_rate, type_='LEFT',
|
||||
condition=(move.currency == currency_rate.currency)
|
||||
& (currency_rate.start_date <= move.effective_date)
|
||||
& ((currency_rate.end_date == Null)
|
||||
| (currency_rate.end_date > move.effective_date))
|
||||
)
|
||||
.join(company,
|
||||
condition=move.company == company.id)
|
||||
.join(currency,
|
||||
condition=company.currency == currency.id)
|
||||
.join(currency_rate_company,
|
||||
condition=(company.currency == currency_rate_company.currency)
|
||||
& (currency_rate_company.start_date <= move.effective_date)
|
||||
& ((currency_rate_company.end_date == Null)
|
||||
| (currency_rate_company.end_date > move.effective_date))
|
||||
)
|
||||
.join(from_location,
|
||||
condition=(move.from_location == from_location.id))
|
||||
.join(to_location,
|
||||
condition=(move.to_location == to_location.id)))
|
||||
return from_item, tables, withs
|
||||
|
||||
@classmethod
|
||||
def _columns(cls, tables, withs):
|
||||
move = tables['move']
|
||||
from_location = tables['move.from_location']
|
||||
to_location = tables['move.to_location']
|
||||
currency = tables['move.company.currency']
|
||||
|
||||
sign = Case(
|
||||
(from_location.type.in_(cls._to_location_types())
|
||||
& to_location.type.in_(cls._from_location_types()),
|
||||
-1),
|
||||
else_=1)
|
||||
cost = cls._column_cost(tables, withs, sign)
|
||||
revenue = cls._column_revenue(tables, withs, sign)
|
||||
profit = revenue - cost
|
||||
margin = Case(
|
||||
(revenue != 0, profit / revenue),
|
||||
else_=Null)
|
||||
return [
|
||||
cls._column_id(tables, withs).as_('id'),
|
||||
Literal(0).as_('create_uid'),
|
||||
CurrentTimestamp().as_('create_date'),
|
||||
cls.write_uid.sql_cast(Literal(Null)).as_('write_uid'),
|
||||
cls.write_date.sql_cast(Literal(Null)).as_('write_date'),
|
||||
move.company.as_('company'),
|
||||
cls.cost.sql_cast(
|
||||
Round(cost, currency.digits)).as_('cost'),
|
||||
cls.revenue.sql_cast(
|
||||
Round(revenue, currency.digits)).as_('revenue'),
|
||||
cls.profit.sql_cast(
|
||||
Round(profit, currency.digits)).as_('profit'),
|
||||
cls.margin.sql_cast(
|
||||
Round(margin, cls.margin.digits[1])).as_('margin'),
|
||||
currency.id.as_('currency'),
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def _column_id(cls, tables, withs):
|
||||
move = tables['move']
|
||||
return Min(move.id)
|
||||
|
||||
@classmethod
|
||||
def _column_cost(cls, tables, withs, sign):
|
||||
move = tables['move']
|
||||
return Sum(
|
||||
sign * cls.cost.sql_cast(move.internal_quantity)
|
||||
* Coalesce(move.cost_price, 0))
|
||||
|
||||
@classmethod
|
||||
def _column_revenue(cls, tables, withs, sign):
|
||||
move = tables['move']
|
||||
currency = withs['currency_rate']
|
||||
currency_company = withs['currency_rate_company']
|
||||
return Sum(
|
||||
sign * cls.revenue.sql_cast(move.quantity)
|
||||
* Coalesce(move.unit_price, 0)
|
||||
* Coalesce(currency_company.rate / currency.rate, 0))
|
||||
|
||||
@classmethod
|
||||
def _group_by(cls, tables, withs):
|
||||
move = tables['move']
|
||||
currency = tables['move.company.currency']
|
||||
return [move.company, currency.id, currency.digits]
|
||||
|
||||
@classmethod
|
||||
def _where(cls, tables, withs):
|
||||
context = Transaction().context
|
||||
move = tables['move']
|
||||
from_location = tables['move.from_location']
|
||||
to_location = tables['move.to_location']
|
||||
|
||||
where = move.company == context.get('company')
|
||||
where &= ((
|
||||
from_location.type.in_(cls._from_location_types())
|
||||
& to_location.type.in_(cls._to_location_types()))
|
||||
| (
|
||||
from_location.type.in_(cls._to_location_types())
|
||||
& to_location.type.in_(cls._from_location_types())))
|
||||
where &= move.state == 'done'
|
||||
from_date = context.get('from_date')
|
||||
if from_date:
|
||||
where &= move.effective_date >= from_date
|
||||
to_date = context.get('to_date')
|
||||
if to_date:
|
||||
where &= move.effective_date <= to_date
|
||||
return where
|
||||
|
||||
@classmethod
|
||||
def _from_location_types(cls):
|
||||
return ['storage', 'drop']
|
||||
|
||||
@classmethod
|
||||
def _to_location_types(cls):
|
||||
types = ['customer']
|
||||
if Transaction().context.get('include_lost'):
|
||||
types += ['lost_found']
|
||||
return types
|
||||
|
||||
@property
|
||||
def time_series_all(self):
|
||||
delta = self._period_delta()
|
||||
for ts, next_ts in pairwise(self.time_series or []):
|
||||
yield ts
|
||||
if delta and next_ts:
|
||||
date = ts.date + delta
|
||||
while date < next_ts.date:
|
||||
yield None
|
||||
date += delta
|
||||
|
||||
@classmethod
|
||||
def _period_delta(cls):
|
||||
context = Transaction().context
|
||||
return {
|
||||
'year': relativedelta(years=1),
|
||||
'month': relativedelta(months=1),
|
||||
'day': relativedelta(days=1),
|
||||
}.get(context.get('period'))
|
||||
|
||||
def get_trend(self, name):
|
||||
name = name[:-len('_trend')]
|
||||
if pygal:
|
||||
chart = pygal.Line()
|
||||
chart.add('', [getattr(ts, name) or 0 if ts else 0
|
||||
for ts in self.time_series_all])
|
||||
return chart.render_sparktext()
|
||||
|
||||
@classmethod
|
||||
def view_attributes(cls):
|
||||
return super().view_attributes() + [
|
||||
('/tree/field[@name="profit"]', 'visual',
|
||||
If(Eval('profit', 0) < 0, 'danger', '')),
|
||||
('/tree/field[@name="margin"]', 'visual',
|
||||
If(Eval('margin', 0) < 0, 'danger', '')),
|
||||
]
|
||||
|
||||
|
||||
class AbstractTimeseries(Abstract):
|
||||
|
||||
date = fields.Date("Date")
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._order = [('date', 'ASC')]
|
||||
|
||||
@classmethod
|
||||
def _columns(cls, tables, withs):
|
||||
return super()._columns(tables, withs) + [
|
||||
cls._column_date(tables, withs).as_('date')]
|
||||
|
||||
@classmethod
|
||||
def _column_date(cls, tables, withs):
|
||||
context = Transaction().context
|
||||
move = tables['move']
|
||||
date = DateTrunc(context.get('period'), move.effective_date)
|
||||
date = cls.date.sql_cast(date)
|
||||
return date
|
||||
|
||||
@classmethod
|
||||
def _group_by(cls, tables, withs):
|
||||
return super()._group_by(tables, withs) + [
|
||||
cls._column_date(tables, withs)]
|
||||
|
||||
|
||||
class Context(ModelView):
|
||||
"Stock Reporting Margin Context"
|
||||
__name__ = 'stock.reporting.margin.context'
|
||||
|
||||
company = fields.Many2One('company.company', "Company", required=True)
|
||||
from_date = fields.Date("From Date",
|
||||
domain=[
|
||||
If(Eval('to_date') & Eval('from_date'),
|
||||
('from_date', '<=', Eval('to_date')),
|
||||
()),
|
||||
])
|
||||
to_date = fields.Date("To Date",
|
||||
domain=[
|
||||
If(Eval('from_date') & Eval('to_date'),
|
||||
('to_date', '>=', Eval('from_date')),
|
||||
()),
|
||||
])
|
||||
period = fields.Selection([
|
||||
('year', "Year"),
|
||||
('month', "Month"),
|
||||
('day', "Day"),
|
||||
], "Period", required=True)
|
||||
include_lost = fields.Boolean(
|
||||
"Include Lost",
|
||||
help="If checked, the cost of product moved "
|
||||
"to a lost and found location is included.")
|
||||
|
||||
@classmethod
|
||||
def default_company(cls):
|
||||
return Transaction().context.get('company')
|
||||
|
||||
@classmethod
|
||||
def default_from_date(cls):
|
||||
pool = Pool()
|
||||
Date = pool.get('ir.date')
|
||||
context = Transaction().context
|
||||
if 'from_date' in context:
|
||||
return context['from_date']
|
||||
return Date.today() - relativedelta(years=1)
|
||||
|
||||
@classmethod
|
||||
def default_to_date(cls):
|
||||
pool = Pool()
|
||||
Date = pool.get('ir.date')
|
||||
context = Transaction().context
|
||||
if 'to_date' in context:
|
||||
return context['to_date']
|
||||
return Date.today()
|
||||
|
||||
@classmethod
|
||||
def default_period(cls):
|
||||
return Transaction().context.get('period', 'month')
|
||||
|
||||
@classmethod
|
||||
def default_include_lost(cls):
|
||||
return Transaction().context.get('include_lost', False)
|
||||
|
||||
|
||||
class Main(Abstract, ModelView):
|
||||
"Stock Reporting Margin"
|
||||
__name__ = 'stock.reporting.margin.main'
|
||||
|
||||
time_series = fields.Function(fields.One2Many(
|
||||
'stock.reporting.margin.main.time_series', None, "Time Series"),
|
||||
'get_time_series')
|
||||
|
||||
def get_rec_name(self, name):
|
||||
return ''
|
||||
|
||||
def get_time_series(self, name):
|
||||
pool = Pool()
|
||||
Timeseries = pool.get('stock.reporting.margin.main.time_series')
|
||||
return [t.id for t in Timeseries.search([])]
|
||||
|
||||
|
||||
class MainTimeseries(AbstractTimeseries, ModelView):
|
||||
"Stock Reporting Margin"
|
||||
__name__ = 'stock.reporting.margin.main.time_series'
|
||||
|
||||
|
||||
class ProductMixin:
|
||||
__slots__ = ()
|
||||
|
||||
product = fields.Many2One(
|
||||
'product.product', "Product",
|
||||
context={
|
||||
'company': Eval('company', -1),
|
||||
},
|
||||
depends={'company'})
|
||||
internal_quantity = fields.Float("Internal Quantity")
|
||||
quantity = fields.Function(fields.Float(
|
||||
"Quantity", digits='unit'), 'get_quantity')
|
||||
unit = fields.Many2One('product.uom', "Unit")
|
||||
|
||||
@classmethod
|
||||
def _joins(cls):
|
||||
pool = Pool()
|
||||
Product = pool.get('product.product')
|
||||
Template = pool.get('product.template')
|
||||
from_item, tables, withs = super()._joins()
|
||||
if 'move.product' not in tables:
|
||||
product = Product.__table__()
|
||||
tables['move.product'] = product
|
||||
move = tables['move']
|
||||
from_item = (from_item
|
||||
.join(product, condition=move.product == product.id))
|
||||
if 'move.product.template' not in tables:
|
||||
template = Template.__table__()
|
||||
tables['move.product.template'] = template
|
||||
product = tables['move.product']
|
||||
from_item = (from_item
|
||||
.join(template, condition=product.template == template.id))
|
||||
return from_item, tables, withs
|
||||
|
||||
@classmethod
|
||||
def _columns(cls, tables, withs):
|
||||
move = tables['move']
|
||||
from_location = tables['move.from_location']
|
||||
to_location = tables['move.to_location']
|
||||
template = tables['move.product.template']
|
||||
sign = Case(
|
||||
(from_location.type.in_(cls._to_location_types())
|
||||
& to_location.type.in_(cls._from_location_types()),
|
||||
-1),
|
||||
else_=1)
|
||||
return super()._columns(tables, withs) + [
|
||||
move.product.as_('product'),
|
||||
Sum(sign * move.internal_quantity).as_('internal_quantity'),
|
||||
template.default_uom.as_('unit'),
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def _group_by(cls, tables, withs):
|
||||
move = tables['move']
|
||||
template = tables['move.product.template']
|
||||
return super()._group_by(tables, withs) + [
|
||||
move.product, template.default_uom]
|
||||
|
||||
def get_rec_name(self, name):
|
||||
return self.product.rec_name
|
||||
|
||||
def get_quantity(self, name):
|
||||
return self.unit.round(self.internal_quantity)
|
||||
|
||||
|
||||
class Product(ProductMixin, Abstract, ModelView):
|
||||
"Stock Reporting Margin per Product"
|
||||
__name__ = 'stock.reporting.margin.product'
|
||||
|
||||
time_series = fields.One2Many(
|
||||
'stock.reporting.margin.product.time_series', 'product', "Time Series")
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._order.insert(0, ('product', 'ASC'))
|
||||
|
||||
@classmethod
|
||||
def _column_id(cls, tables, withs):
|
||||
move = tables['move']
|
||||
return move.product
|
||||
|
||||
|
||||
class ProductTimeseries(ProductMixin, AbstractTimeseries, ModelView):
|
||||
"Stock Reporting Margin per Product"
|
||||
__name__ = 'stock.reporting.margin.product.time_series'
|
||||
|
||||
|
||||
class CategoryMixin:
|
||||
__slots__ = ()
|
||||
|
||||
category = fields.Many2One('product.category', "Category")
|
||||
|
||||
@classmethod
|
||||
def _joins(cls):
|
||||
pool = Pool()
|
||||
Product = pool.get('product.product')
|
||||
TemplateCategory = pool.get('product.template-product.category.all')
|
||||
from_item, tables, withs = super()._joins()
|
||||
if 'move.product' not in tables:
|
||||
product = Product.__table__()
|
||||
tables['move.product'] = product
|
||||
move = tables['move']
|
||||
from_item = (from_item
|
||||
.join(product, condition=move.product == product.id))
|
||||
if 'move.product.template_category' not in tables:
|
||||
template_category = TemplateCategory.__table__()
|
||||
tables['move.product.template_category'] = template_category
|
||||
product = tables['move.product']
|
||||
from_item = (from_item
|
||||
.join(template_category,
|
||||
condition=product.template == template_category.template))
|
||||
return from_item, tables, withs
|
||||
|
||||
@classmethod
|
||||
def _columns(cls, tables, withs):
|
||||
template_category = tables['move.product.template_category']
|
||||
return super()._columns(tables, withs) + [
|
||||
template_category.category.as_('category')]
|
||||
|
||||
@classmethod
|
||||
def _column_id(cls, tables, withs):
|
||||
pool = Pool()
|
||||
Category = pool.get('product.category')
|
||||
category = Category.__table__()
|
||||
move = tables['move']
|
||||
template_category = tables['move.product.template_category']
|
||||
# Get a stable number of category over time
|
||||
# by using number one order bigger.
|
||||
nb_category = category.select(
|
||||
Power(10, (Ceil(Log(Max(category.id))) + Literal(1))))
|
||||
return Min(move.id * nb_category + template_category.id)
|
||||
|
||||
@classmethod
|
||||
def _group_by(cls, tables, withs):
|
||||
template_category = tables['move.product.template_category']
|
||||
return super()._group_by(tables, withs) + [template_category.category]
|
||||
|
||||
@classmethod
|
||||
def _where(cls, tables, withs):
|
||||
template_category = tables['move.product.template_category']
|
||||
where = super()._where(tables, withs)
|
||||
where &= template_category.category != Null
|
||||
return where
|
||||
|
||||
def get_rec_name(self, name):
|
||||
return self.category.rec_name if self.category else None
|
||||
|
||||
|
||||
class Category(CategoryMixin, Abstract, ModelView):
|
||||
"Stock Reporting Margin per Category"
|
||||
__name__ = 'stock.reporting.margin.category'
|
||||
|
||||
time_series = fields.One2Many(
|
||||
'stock.reporting.margin.category.time_series', 'category',
|
||||
"Time Series")
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._order.insert(0, ('category', 'ASC'))
|
||||
|
||||
@classmethod
|
||||
def _column_id(cls, tables, withs):
|
||||
template_category = tables['move.product.template_category']
|
||||
return template_category.category
|
||||
|
||||
|
||||
class CategoryTimeseries(CategoryMixin, AbstractTimeseries, ModelView):
|
||||
"Stock Reporting Margin per Category"
|
||||
__name__ = 'stock.reporting.margin.category.time_series'
|
||||
|
||||
|
||||
class CategoryTree(ModelSQL, ModelView):
|
||||
"Stock Reporting Margin per Category"
|
||||
__name__ = 'stock.reporting.margin.category.tree'
|
||||
|
||||
name = fields.Function(fields.Char("Name"), 'get_name')
|
||||
parent = fields.Many2One('stock.reporting.margin.category.tree', "Parent")
|
||||
children = fields.One2Many(
|
||||
'stock.reporting.margin.category.tree', 'parent', "Children")
|
||||
cost = fields.Function(Monetary(
|
||||
lazy_gettext('stock.msg_stock_reporting_cost'),
|
||||
currency='currency', digits='currency'),
|
||||
'get_total')
|
||||
revenue = fields.Function(Monetary(
|
||||
lazy_gettext('stock.msg_stock_reporting_revenue'),
|
||||
currency='currency', digits='currency'),
|
||||
'get_total')
|
||||
profit = fields.Function(Monetary(
|
||||
lazy_gettext('stock.msg_stock_reporting_profit'),
|
||||
currency='currency', digits='currency'),
|
||||
'get_total')
|
||||
margin = fields.Function(Monetary(
|
||||
lazy_gettext('stock.msg_stock_reporting_margin'),
|
||||
digits=(14, 4)),
|
||||
'get_margin')
|
||||
|
||||
currency = fields.Function(fields.Many2One(
|
||||
'currency.currency',
|
||||
lazy_gettext('stock.msg_stock_reporting_currency')),
|
||||
'get_currency')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._order.insert(0, ('name', 'ASC'))
|
||||
|
||||
@classmethod
|
||||
def table_query(cls):
|
||||
pool = Pool()
|
||||
Category = pool.get('product.category')
|
||||
return Category.__table__()
|
||||
|
||||
@classmethod
|
||||
def get_name(cls, categories, name):
|
||||
pool = Pool()
|
||||
Category = pool.get('product.category')
|
||||
categories = Category.browse(categories)
|
||||
return {c.id: c.name for c in categories}
|
||||
|
||||
@classmethod
|
||||
def order_name(cls, tables):
|
||||
pool = Pool()
|
||||
Category = pool.get('product.category')
|
||||
table, _ = tables[None]
|
||||
if 'category' not in tables:
|
||||
category = Category.__table__()
|
||||
tables['category'] = {
|
||||
None: (category, table.id == category.id),
|
||||
}
|
||||
return Category.name.convert_order(
|
||||
'name', tables['category'], Category)
|
||||
|
||||
def time_series_all(self):
|
||||
return []
|
||||
|
||||
@classmethod
|
||||
def get_total(cls, categories, names):
|
||||
pool = Pool()
|
||||
ReportingCategory = pool.get('stock.reporting.margin.category')
|
||||
table = cls.__table__()
|
||||
reporting_category = ReportingCategory.__table__()
|
||||
cursor = Transaction().connection.cursor()
|
||||
|
||||
categories = cls.search([
|
||||
('parent', 'child_of', [c.id for c in categories]),
|
||||
])
|
||||
ids = [c.id for c in categories]
|
||||
parents = {}
|
||||
reporting_categories = []
|
||||
for sub_ids in grouped_slice(ids):
|
||||
sub_ids = list(sub_ids)
|
||||
where = reduce_ids(table.id, sub_ids)
|
||||
cursor.execute(*table.select(table.id, table.parent, where=where))
|
||||
parents.update(cursor)
|
||||
|
||||
where = reduce_ids(reporting_category.id, sub_ids)
|
||||
cursor.execute(
|
||||
*reporting_category.select(reporting_category.id, where=where))
|
||||
reporting_categories.extend(r for r, in cursor)
|
||||
|
||||
result = {}
|
||||
reporting_categories = ReportingCategory.browse(reporting_categories)
|
||||
for name in names:
|
||||
values = dict.fromkeys(ids, 0)
|
||||
values.update(
|
||||
(c.id, getattr(c, name)) for c in reporting_categories)
|
||||
result[name] = cls._sum_tree(categories, values, parents)
|
||||
return result
|
||||
|
||||
@classmethod
|
||||
def _sum_tree(cls, categories, values, parents):
|
||||
result = values.copy()
|
||||
categories = set((c.id for c in categories))
|
||||
leafs = categories - set(parents.values())
|
||||
while leafs:
|
||||
for category in leafs:
|
||||
categories.remove(category)
|
||||
parent = parents.get(category)
|
||||
if parent in result:
|
||||
result[parent] += result[category]
|
||||
next_leafs = set(categories)
|
||||
for category in categories:
|
||||
parent = parents.get(category)
|
||||
if not parent:
|
||||
continue
|
||||
if parent in next_leafs and parent in categories:
|
||||
next_leafs.remove(parent)
|
||||
leafs = next_leafs
|
||||
return result
|
||||
|
||||
def get_margin(self, name):
|
||||
digits = self.__class__.margin.digits
|
||||
if self.profit is not None and self.revenue:
|
||||
return (self.profit / self.revenue).quantize(
|
||||
Decimal(1) / 10 ** digits[1])
|
||||
|
||||
def get_currency(self, name):
|
||||
pool = Pool()
|
||||
Company = pool.get('company.company')
|
||||
company = Transaction().context.get('company')
|
||||
if company:
|
||||
return Company(company).currency.id
|
||||
|
||||
@classmethod
|
||||
def view_attributes(cls):
|
||||
return super().view_attributes() + [
|
||||
('/tree/field[@name="profit"]', 'visual',
|
||||
If(Eval('profit', 0) < 0, 'danger', '')),
|
||||
('/tree/field[@name="margin"]', 'visual',
|
||||
If(Eval('margin', 0) < 0, 'danger', '')),
|
||||
]
|
||||
@@ -0,0 +1,591 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<menuitem
|
||||
name="Margins"
|
||||
parent="product.menu_reporting"
|
||||
sequence="50"
|
||||
id="menu_reporting_margin"
|
||||
icon="tryton-graph"/>
|
||||
<record model="ir.ui.menu-res.group" id="menu_reporting_margin_group_product_admin">
|
||||
<field name="menu" ref="menu_reporting_margin"/>
|
||||
<field name="group" ref="product.group_product_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_context_view_form">
|
||||
<field name="model">stock.reporting.margin.context</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">reporting_margin_context_form</field>
|
||||
</record>
|
||||
|
||||
<!-- Main -->
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_main_view_list">
|
||||
<field name="model">stock.reporting.margin.main</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">reporting_margin_main_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_main_view_graph_margin">
|
||||
<field name="model">stock.reporting.margin.main</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_graph_margin</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_main_view_graph_profit">
|
||||
<field name="model">stock.reporting.margin.main</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_graph_profit</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_main_view_graph_amount">
|
||||
<field name="model">stock.reporting.margin.main</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_graph_amount</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_reporting_margin_main">
|
||||
<field name="name">Margins</field>
|
||||
<field name="res_model">stock.reporting.margin.main</field>
|
||||
<field name="context_model">stock.reporting.margin.context</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_main_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="reporting_margin_main_view_list"/>
|
||||
<field name="act_window" ref="act_reporting_margin_main"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_main_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="reporting_margin_main_view_graph_margin"/>
|
||||
<field name="act_window" ref="act_reporting_margin_main"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_main_view3">
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="view" ref="reporting_margin_main_view_graph_profit"/>
|
||||
<field name="act_window" ref="act_reporting_margin_main"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_main_view4">
|
||||
<field name="sequence" eval="40"/>
|
||||
<field name="view" ref="reporting_margin_main_view_graph_amount"/>
|
||||
<field name="act_window" ref="act_reporting_margin_main"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_reporting_margin_main_keyword1">
|
||||
<field name="keyword">tree_open</field>
|
||||
<field name="model" ref="menu_reporting_margin"/>
|
||||
<field name="action" ref="act_reporting_margin_main"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_reporting_margin_main_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.main')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_reporting_margin_main_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_reporting_margin_main_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_reporting_margin_main">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.main')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_reporting_margin_main_product_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.main')]"/>
|
||||
<field name="group" ref="product.group_product_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_main_time_series_view_list">
|
||||
<field name="model">stock.reporting.margin.main.time_series</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">reporting_margin_main_time_series_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_main_time_series_view_graph_margin">
|
||||
<field name="model">stock.reporting.margin.main.time_series</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_time_series_graph_margin</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_main_time_series_view_graph_profit">
|
||||
<field name="model">stock.reporting.margin.main.time_series</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_time_series_graph_profit</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_main_time_series_view_graph_amount">
|
||||
<field name="model">stock.reporting.margin.main.time_series</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_time_series_graph_amount</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_reporting_margin_main_time_series">
|
||||
<field name="name">Margins</field>
|
||||
<field name="res_model">stock.reporting.margin.main.time_series</field>
|
||||
<field name="context_model">stock.reporting.margin.context</field>
|
||||
<field name="order" eval="[('date', 'DESC')]" pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_main_time_series_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="reporting_margin_main_time_series_view_list"/>
|
||||
<field name="act_window" ref="act_reporting_margin_main_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_main_time_series_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="reporting_margin_main_time_series_view_graph_margin"/>
|
||||
<field name="act_window" ref="act_reporting_margin_main_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_main_time_series_view3">
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="view" ref="reporting_margin_main_time_series_view_graph_profit"/>
|
||||
<field name="act_window" ref="act_reporting_margin_main_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_main_time_series_view4">
|
||||
<field name="sequence" eval="40"/>
|
||||
<field name="view" ref="reporting_margin_main_time_series_view_graph_amount"/>
|
||||
<field name="act_window" ref="act_reporting_margin_main_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_reporting_margin_main_time_series_keyword1">
|
||||
<field name="keyword">tree_open</field>
|
||||
<field name="model">stock.reporting.margin.main,-1</field>
|
||||
<field name="action" ref="act_reporting_margin_main_time_series"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_reporting_margin_main_time_series_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.main.time_series')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_reporting_margin_main_time_series_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_reporting_margin_main_time_series_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_reporting_margin_main_time_series">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.main.time_series')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_reporting_margin_main_time_series_main_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.main.time_series')]"/>
|
||||
<field name="group" ref="product.group_product_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!-- Product -->
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_product_view_list">
|
||||
<field name="model">stock.reporting.margin.product</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="reporting_margin_main_view_list"/>
|
||||
<field name="name">reporting_margin_product_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_product_view_graph_margin">
|
||||
<field name="model">stock.reporting.margin.product</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="reporting_margin_main_view_graph_margin"/>
|
||||
<field name="name">reporting_margin_product_graph_margin</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_product_view_graph_profit">
|
||||
<field name="model">stock.reporting.margin.product</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="reporting_margin_main_view_graph_profit"/>
|
||||
<field name="name">reporting_margin_product_graph_profit</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_product_view_graph_amount">
|
||||
<field name="model">stock.reporting.margin.product</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="reporting_margin_main_view_graph_amount"/>
|
||||
<field name="name">reporting_margin_product_graph_amount</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_reporting_margin_product">
|
||||
<field name="name">Margins per Product</field>
|
||||
<field name="res_model">stock.reporting.margin.product</field>
|
||||
<field name="context_model">stock.reporting.margin.context</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_product_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="reporting_margin_product_view_list"/>
|
||||
<field name="act_window" ref="act_reporting_margin_product"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_product_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="reporting_margin_product_view_graph_margin"/>
|
||||
<field name="act_window" ref="act_reporting_margin_product"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_product_view3">
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="view" ref="reporting_margin_product_view_graph_profit"/>
|
||||
<field name="act_window" ref="act_reporting_margin_product"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_product_view4">
|
||||
<field name="sequence" eval="40"/>
|
||||
<field name="view" ref="reporting_margin_product_view_graph_amount"/>
|
||||
<field name="act_window" ref="act_reporting_margin_product"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_reporting_margin_product_keyword1">
|
||||
<field name="keyword">tree_open</field>
|
||||
<field name="model" ref="menu_reporting_margin"/>
|
||||
<field name="action" ref="act_reporting_margin_product"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_reporting_margin_product_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.product')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_reporting_margin_product_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_reporting_margin_product_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_reporting_margin_product">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.product')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_reporting_margin_product_product_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.product')]"/>
|
||||
<field name="group" ref="product.group_product_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_product_time_series_view_list">
|
||||
<field name="model">stock.reporting.margin.product.time_series</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="reporting_margin_main_time_series_view_list"/>
|
||||
<field name="name">reporting_margin_product_time_series_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_product_time_series_view_graph_margin">
|
||||
<field name="model">stock.reporting.margin.product.time_series</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_time_series_graph_margin</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_product_time_series_view_graph_profit">
|
||||
<field name="model">stock.reporting.margin.product.time_series</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_time_series_graph_profit</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_product_time_series_view_graph_amount">
|
||||
<field name="model">stock.reporting.margin.product.time_series</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_time_series_graph_amount</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_reporting_margin_product_time_series">
|
||||
<field name="name">Margins per Product</field>
|
||||
<field name="res_model">stock.reporting.margin.product.time_series</field>
|
||||
<field name="context_model">stock.reporting.margin.context</field>
|
||||
<field
|
||||
name="domain"
|
||||
eval="[('product', '=', Eval('active_id', -1))]"
|
||||
pyson="1"/>
|
||||
<field name="order" eval="[('date', 'DESC')]" pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_product_time_series_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="reporting_margin_product_time_series_view_list"/>
|
||||
<field name="act_window" ref="act_reporting_margin_product_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_product_time_series_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="reporting_margin_product_time_series_view_graph_margin"/>
|
||||
<field name="act_window" ref="act_reporting_margin_product_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_product_time_series_view3">
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="view" ref="reporting_margin_product_time_series_view_graph_profit"/>
|
||||
<field name="act_window" ref="act_reporting_margin_product_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_product_time_series_view4">
|
||||
<field name="sequence" eval="40"/>
|
||||
<field name="view" ref="reporting_margin_product_time_series_view_graph_amount"/>
|
||||
<field name="act_window" ref="act_reporting_margin_product_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_reporting_margin_product_time_series_keyword1">
|
||||
<field name="keyword">tree_open</field>
|
||||
<field name="model">stock.reporting.margin.product,-1</field>
|
||||
<field name="action" ref="act_reporting_margin_product_time_series"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_reporting_margin_product_time_series_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.product.time_series')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_reporting_margin_product_time_series_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_reporting_margin_product_time_series_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_reporting_margin_product_time_series">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.product.time_series')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_reporting_margin_product_time_series_product_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.product.time_series')]"/>
|
||||
<field name="group" ref="product.group_product_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!-- Category -->
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_category_tree_view_tree">
|
||||
<field name="model">stock.reporting.margin.category.tree</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="field_childs">children</field>
|
||||
<field name="name">reporting_margin_category_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_reporting_margin_category_tree">
|
||||
<field name="name">Margins per Category</field>
|
||||
<field name="res_model">stock.reporting.margin.category.tree</field>
|
||||
<field name="context_model">stock.reporting.margin.context</field>
|
||||
<field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_category_tree_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="reporting_margin_category_tree_view_tree"/>
|
||||
<field name="act_window" ref="act_reporting_margin_category_tree"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_reporting_margin_category_tree_keyword1">
|
||||
<field name="keyword">tree_open</field>
|
||||
<field name="model" ref="menu_reporting_margin"/>
|
||||
<field name="action" ref="act_reporting_margin_category_tree"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_reporting_margin_category_tree">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.category.tree')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_reporting_margin_category_tree_product_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.category.tree')]"/>
|
||||
<field name="group" ref="product.group_product_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_category_view_list">
|
||||
<field name="model">stock.reporting.margin.category</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="reporting_margin_main_view_list"/>
|
||||
<field name="name">reporting_margin_category_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_category_view_graph_margin">
|
||||
<field name="model">stock.reporting.margin.category</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="reporting_margin_main_view_graph_margin"/>
|
||||
<field name="name">reporting_margin_category_graph_margin</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_category_view_graph_profit">
|
||||
<field name="model">stock.reporting.margin.category</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="reporting_margin_main_view_graph_profit"/>
|
||||
<field name="name">reporting_margin_category_graph_profit</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_category_view_graph_amount">
|
||||
<field name="model">stock.reporting.margin.category</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="reporting_margin_main_view_graph_amount"/>
|
||||
<field name="name">reporting_margin_category_graph_amount</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_reporting_margin_category">
|
||||
<field name="name">Margins per Category</field>
|
||||
<field name="res_model">stock.reporting.margin.category</field>
|
||||
<field name="context_model">stock.reporting.margin.context</field>
|
||||
<field
|
||||
name="domain"
|
||||
eval="[('category', 'child_of', Eval('active_ids', []), 'parent')]"
|
||||
pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_category_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="reporting_margin_category_view_list"/>
|
||||
<field name="act_window" ref="act_reporting_margin_category"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_category_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="reporting_margin_category_view_graph_margin"/>
|
||||
<field name="act_window" ref="act_reporting_margin_category"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_category_view3">
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="view" ref="reporting_margin_category_view_graph_profit"/>
|
||||
<field name="act_window" ref="act_reporting_margin_category"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_category_view4">
|
||||
<field name="sequence" eval="40"/>
|
||||
<field name="view" ref="reporting_margin_category_view_graph_amount"/>
|
||||
<field name="act_window" ref="act_reporting_margin_category"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_reporting_margin_category_keyword1">
|
||||
<field name="keyword">tree_open</field>
|
||||
<field name="model">stock.reporting.margin.category.tree,-1</field>
|
||||
<field name="action" ref="act_reporting_margin_category"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_reporting_margin_category_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.category')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_reporting_margin_category_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_reporting_margin_category_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_reporting_margin_category">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.category')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_reporting_margin_category_product_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.category')]"/>
|
||||
<field name="group" ref="product.group_product_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_category_time_series_view_list">
|
||||
<field name="model">stock.reporting.margin.category.time_series</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">reporting_margin_main_time_series_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_category_time_series_view_graph_margin">
|
||||
<field name="model">stock.reporting.margin.category.time_series</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_time_series_graph_margin</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_category_time_series_view_graph_profit">
|
||||
<field name="model">stock.reporting.margin.category.time_series</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_time_series_graph_profit</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="reporting_margin_category_time_series_view_graph_amount">
|
||||
<field name="model">stock.reporting.margin.category.time_series</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="name">reporting_margin_main_time_series_graph_amount</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_reporting_margin_category_time_series">
|
||||
<field name="name">Margins per Category</field>
|
||||
<field name="res_model">stock.reporting.margin.category.time_series</field>
|
||||
<field name="context_model">stock.reporting.margin.context</field>
|
||||
<field
|
||||
name="domain"
|
||||
eval="[('category', '=', Eval('active_id', -1))]"
|
||||
pyson="1"/>
|
||||
<field name="order" eval="[('date', 'DESC')]" pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_category_time_series_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="reporting_margin_category_time_series_view_list"/>
|
||||
<field name="act_window" ref="act_reporting_margin_category_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_category_time_series_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="reporting_margin_category_time_series_view_graph_margin"/>
|
||||
<field name="act_window" ref="act_reporting_margin_category_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_category_time_series_view3">
|
||||
<field name="sequence" eval="30"/>
|
||||
<field name="view" ref="reporting_margin_category_time_series_view_graph_profit"/>
|
||||
<field name="act_window" ref="act_reporting_margin_category_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_reporting_margin_category_time_series_view4">
|
||||
<field name="sequence" eval="40"/>
|
||||
<field name="view" ref="reporting_margin_category_time_series_view_graph_amount"/>
|
||||
<field name="act_window" ref="act_reporting_margin_category_time_series"/>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_reporting_margin_category_time_series_keyword1">
|
||||
<field name="keyword">tree_open</field>
|
||||
<field name="model">stock.reporting.margin.category,-1</field>
|
||||
<field name="action" ref="act_reporting_margin_category_time_series"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_reporting_margin_category_time_series_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.category.time_series')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_reporting_margin_category_time_series_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_reporting_margin_category_time_series_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="access_reporting_margin_category_time_series">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.category.time_series')]"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_reporting_margin_category_time_series_product_admin">
|
||||
<field name="model" search="[('model', '=', 'stock.reporting.margin.category.time_series')]"/>
|
||||
<field name="group" ref="product.group_product_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
@@ -0,0 +1,482 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:meta><meta:generator>LibreOffice/5.2.7.2$Linux_X86_64 LibreOffice_project/20m0$Build-2</meta:generator><meta:initial-creator>Bertrand Chenal</meta:initial-creator><meta:creation-date>2009-03-26T13:54:48</meta:creation-date><dc:date>2016-03-21T16:06:02.540152813</dc:date><meta:editing-cycles>51</meta:editing-cycles><meta:editing-duration>PT6H57M42S</meta:editing-duration><meta:document-statistic meta:character-count="832" meta:image-count="0" meta:non-whitespace-character-count="789" meta:object-count="0" meta:page-count="2" meta:paragraph-count="30" meta:table-count="1" meta:word-count="73"/><meta:user-defined meta:name="Info 1"/><meta:user-defined meta:name="Info 2"/><meta:user-defined meta:name="Info 3"/><meta:user-defined meta:name="Info 4"/></office:meta>
|
||||
<office:settings>
|
||||
<config:config-item-set config:name="ooo:view-settings">
|
||||
<config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="ViewAreaWidth" config:type="long">43760</config:config-item>
|
||||
<config:config-item config:name="ViewAreaHeight" config:type="long">21691</config:config-item>
|
||||
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item-map-indexed config:name="Views">
|
||||
<config:config-item-map-entry>
|
||||
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
|
||||
<config:config-item config:name="ViewLeft" config:type="long">2630</config:config-item>
|
||||
<config:config-item config:name="ViewTop" config:type="long">5313</config:config-item>
|
||||
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="VisibleRight" config:type="long">43759</config:config-item>
|
||||
<config:config-item config:name="VisibleBottom" config:type="long">21689</config:config-item>
|
||||
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
|
||||
<config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
|
||||
</config:config-item-map-entry>
|
||||
</config:config-item-map-indexed>
|
||||
</config:config-item-set>
|
||||
<config:config-item-set config:name="ooo:configuration-settings">
|
||||
<config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintFaxName" config:type="string"/>
|
||||
<config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrinterName" config:type="string"/>
|
||||
<config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
|
||||
<config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="Rsid" config:type="int">1829759</config:config-item>
|
||||
<config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
|
||||
<config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
|
||||
<config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
|
||||
<config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="RsidRoot" config:type="int">1289861</config:config-item>
|
||||
<config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
|
||||
<config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
|
||||
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
|
||||
<config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
|
||||
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
|
||||
</config:config-item-set>
|
||||
</office:settings>
|
||||
<office:scripts>
|
||||
<office:script script:language="ooo:Basic">
|
||||
<ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
|
||||
</office:script>
|
||||
</office:scripts>
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/>
|
||||
<style:font-face style:name="Liberation Serif2" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif1" svg:font-family="'Liberation Serif'" style:font-adornments="Bold" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-adornments="Regular" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Thorndale AMT" svg:font-family="'Thorndale AMT'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Andale Sans UI" svg:font-family="'Andale Sans UI'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
</office:font-face-decls>
|
||||
<office:styles>
|
||||
<style:default-style style:family="graphic">
|
||||
<style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.1181in" draw:shadow-offset-y="0.1181in" draw:start-line-spacing-horizontal="0.1114in" draw:start-line-spacing-vertical="0.1114in" draw:end-line-spacing-horizontal="0.1114in" draw:end-line-spacing-vertical="0.1114in" style:flow-with-text="false"/>
|
||||
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
|
||||
<style:tab-stops/>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties style:use-window-font-color="true" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Andale Sans UI" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="paragraph">
|
||||
<style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="0.4925in" style:writing-mode="lr-tb"/>
|
||||
<style:text-properties style:use-window-font-color="true" style:font-name="Thorndale AMT" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Andale Sans UI" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table">
|
||||
<style:table-properties table:border-model="collapsing"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table-row">
|
||||
<style:table-row-properties fo:keep-together="auto"/>
|
||||
</style:default-style>
|
||||
<style:style style:name="Standard" style:family="paragraph" style:class="text">
|
||||
<style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.1665in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false" fo:keep-with-next="always"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" style:font-style-name="Regular" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="16pt" style:font-name-asian="DejaVu Sans" style:font-family-asian="'DejaVu Sans'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans" style:font-family-complex="'DejaVu Sans'" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false"/>
|
||||
<style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
|
||||
<style:text-properties style:font-size-asian="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties fo:margin-top="0.0835in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-size-complex="12pt" style:font-style-complex="italic"/>
|
||||
</style:style>
|
||||
<style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-size-asian="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="16pt" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table_20_Heading" style:display-name="Table Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents" style:class="extra" style:master-page-name="">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" text:number-lines="false" text:line-number="0"/>
|
||||
<style:text-properties style:font-name="Liberation Serif1" fo:font-family="'Liberation Serif'" style:font-style-name="Bold" style:font-family-generic="roman" style:font-pitch="variable" fo:font-weight="bold" style:font-size-asian="10.5pt" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="3.4626in" style:type="center"/>
|
||||
<style:tab-stop style:position="6.9252in" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
|
||||
<style:paragraph-properties text:number-lines="false" text:line-number="0">
|
||||
<style:tab-stops>
|
||||
<style:tab-stop style:position="3.4626in" style:type="center"/>
|
||||
<style:tab-stop style:position="6.9252in" style:type="right"/>
|
||||
</style:tab-stops>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties fo:font-size="9pt" style:font-size-asian="10.5pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_body_20_indent" style:display-name="Text body indent" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-left="0.1965in" fo:margin-right="0in" fo:margin-top="0in" fo:margin-bottom="0in" loext:contextual-spacing="false" fo:text-indent="0in" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
|
||||
<style:style style:name="Quotations" style:family="paragraph" style:parent-style-name="Standard" style:class="html">
|
||||
<style:paragraph-properties fo:margin-left="0.3937in" fo:margin-right="0.3937in" fo:margin-top="0in" fo:margin-bottom="0.1965in" loext:contextual-spacing="false" fo:text-indent="0in" style:auto-text-indent="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="Title" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="28pt" fo:font-weight="bold" style:font-size-asian="28pt" style:font-weight-asian="bold" style:font-size-complex="28pt" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="Subtitle" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:margin-top="0.0417in" fo:margin-bottom="0.0835in" loext:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" style:font-size-complex="18pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Placeholder" style:family="text">
|
||||
<style:text-properties fo:font-variant="small-caps" fo:color="#008080" style:text-underline-style="dotted" style:text-underline-width="auto" style:text-underline-color="font-color"/>
|
||||
</style:style>
|
||||
<style:style style:name="Bullet_20_Symbols" style:display-name="Bullet Symbols" style:family="text">
|
||||
<style:text-properties style:font-name="StarSymbol" fo:font-family="StarSymbol" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-size-complex="9pt"/>
|
||||
</style:style>
|
||||
<text:outline-style style:name="Outline">
|
||||
<text:outline-level-style text:level="1" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="2" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="3" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="4" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="5" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="6" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="7" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="8" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="9" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="10" style:num-format="">
|
||||
<style:list-level-properties text:min-label-distance="0.15in"/>
|
||||
</text:outline-level-style>
|
||||
</text:outline-style>
|
||||
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
|
||||
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
|
||||
<text:linenumbering-configuration text:number-lines="false" text:offset="0.1965in" style:num-format="1" text:number-position="left" text:increment="5"/>
|
||||
</office:styles>
|
||||
<office:automatic-styles>
|
||||
<style:style style:name="Table1" style:family="table">
|
||||
<style:table-properties style:width="6.6924in" fo:margin-left="0in" fo:margin-right="0in" fo:margin-top="0.15in" fo:margin-bottom="0in" table:align="margins"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="1.8438in" style:rel-column-width="18053*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="1.8444in" style:rel-column-width="18060*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D" style:family="table-column">
|
||||
<style:table-column-properties style:column-width="1.1611in" style:rel-column-width="11369*"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A1" style:family="table-cell">
|
||||
<style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000">
|
||||
<style:background-image/>
|
||||
</style:table-cell-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D1" style:family="table-cell">
|
||||
<style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.0382in" fo:border="0.05pt solid #000000">
|
||||
<style:background-image/>
|
||||
</style:table-cell-properties>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D2" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.B3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D3" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.A4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.C4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="Table1.D4" style:family="table-cell">
|
||||
<style:table-cell-properties fo:padding="0.0382in" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
|
||||
</style:style>
|
||||
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="0018924f"/>
|
||||
</style:style>
|
||||
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="0018924f"/>
|
||||
</style:style>
|
||||
<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="12pt" officeooo:paragraph-rsid="0018924f" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P4" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="0018924f"/>
|
||||
</style:style>
|
||||
<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Header">
|
||||
<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
|
||||
<style:text-properties fo:font-size="12pt" officeooo:paragraph-rsid="0018924f" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P7" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties officeooo:paragraph-rsid="0018924f"/>
|
||||
</style:style>
|
||||
<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Footer">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P9" style:family="paragraph" style:parent-style-name="Table_20_Heading">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||
<style:text-properties style:font-name="Liberation Serif2"/>
|
||||
</style:style>
|
||||
<style:style style:name="P10" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:break-before="page"/>
|
||||
</style:style>
|
||||
<style:style style:name="P11" style:family="paragraph" style:parent-style-name="Table_20_Contents">
|
||||
<style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
|
||||
</style:style>
|
||||
<style:style style:name="P12" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:text-properties officeooo:paragraph-rsid="0014daa2"/>
|
||||
</style:style>
|
||||
<style:style style:name="P13" style:family="paragraph" style:parent-style-name="Heading_20_1" style:master-page-name="">
|
||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" fo:break-before="page"/>
|
||||
<style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
|
||||
</style:style>
|
||||
<style:style style:name="T1" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T2" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold" officeooo:rsid="001a23ce" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
|
||||
</style:style>
|
||||
<style:style style:name="T3" style:family="text">
|
||||
<style:text-properties fo:font-weight="normal" style:font-weight-asian="normal" style:font-weight-complex="normal"/>
|
||||
</style:style>
|
||||
<style:page-layout style:name="pm1">
|
||||
<style:page-layout-properties fo:page-width="8.2673in" fo:page-height="11.6925in" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.7874in" fo:margin-bottom="0.7874in" fo:margin-left="0.7874in" fo:margin-right="0.7874in" style:writing-mode="lr-tb" style:footnote-max-height="0in">
|
||||
<style:footnote-sep style:width="0.0071in" style:distance-before-sep="0.0398in" style:distance-after-sep="0.0398in" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
|
||||
</style:page-layout-properties>
|
||||
<style:header-style>
|
||||
<style:header-footer-properties fo:min-height="0in" fo:margin-left="0in" fo:margin-right="0in" fo:margin-bottom="0.1965in"/>
|
||||
</style:header-style>
|
||||
<style:footer-style>
|
||||
<style:header-footer-properties fo:min-height="0in" fo:margin-left="0in" fo:margin-right="0in" fo:margin-top="0.1965in"/>
|
||||
</style:footer-style>
|
||||
</style:page-layout>
|
||||
</office:automatic-styles>
|
||||
<office:master-styles>
|
||||
<style:master-page style:name="Standard" style:page-layout-name="pm1">
|
||||
<style:header>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><if test="company and company.header"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><for each="line in company.header.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P1"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P3"><text:placeholder text:placeholder-type="text"><company.rec_name if company else ''></text:placeholder></text:p>
|
||||
</style:header>
|
||||
<style:footer>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><if test="company and company.footer"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><for each="line in company.footer.split('\n')"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P2"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
|
||||
<text:p text:style-name="P4"><text:page-number text:select-page="current">2</text:page-number>/<text:page-count>2</text:page-count></text:p>
|
||||
</style:footer>
|
||||
</style:master-page>
|
||||
</office:master-styles>
|
||||
<office:body>
|
||||
<office:text text:use-soft-page-breaks="true">
|
||||
<office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
|
||||
<text:sequence-decls>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
|
||||
</text:sequence-decls>
|
||||
<text:p text:style-name="P10"><text:placeholder text:placeholder-type="text"><for each="shipment in records"></text:placeholder></text:p>
|
||||
<text:p text:style-name="P13">Restocking List</text:p>
|
||||
<text:p text:style-name="P12"><text:span text:style-name="T2">Shipment Number</text:span><text:span text:style-name="T1">: </text:span><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"><shipment.number></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Reference:</text:span><text:span text:style-name="T3"> </text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.origins or ''></text:placeholder></text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><', ' if (shipment.origins and shipment.reference) else ''></text:placeholder></text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.reference or ''></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Supplier:</text:span><text:span text:style-name="T3"> </text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.supplier.rec_name></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Planned Date:</text:span><text:span text:style-name="T3"> </text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.planned_date and format_date(shipment.planned_date, user.language) or ''></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:span text:style-name="T1">Warehouse:</text:span><text:span text:style-name="T3"> </text:span><text:span text:style-name="T3"><text:placeholder text:placeholder-type="text"><shipment.warehouse.rec_name></text:placeholder></text:span></text:p>
|
||||
<table:table table:name="Table1" table:style-name="Table1">
|
||||
<table:table-column table:style-name="Table1.A" table:number-columns-repeated="2"/>
|
||||
<table:table-column table:style-name="Table1.C"/>
|
||||
<table:table-column table:style-name="Table1.D"/>
|
||||
<table:table-header-rows>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P9">From Location</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P9">To Location</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P9">Product</text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D1" office:value-type="string">
|
||||
<text:p text:style-name="P9">Quantity</text:p>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
</table:table-header-rows>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="2" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><for each="move in moves[shipment.id]"></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"/>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"/>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.B3" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.from_location.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.B3" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.to_location.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"><move.product.rec_name></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="P11"><text:placeholder text:placeholder-type="text"><format_number_symbol(move.quantity, user.language, move.uom, digits=move.uom.digits)></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
<table:table-row>
|
||||
<table:table-cell table:style-name="Table1.A4" table:number-columns-spanned="2" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
<table:table-cell table:style-name="Table1.C4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"/>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Table1.D4" office:value-type="string">
|
||||
<text:p text:style-name="Table_20_Contents"/>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
</table:table>
|
||||
<text:p text:style-name="Text_20_body"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</office:text>
|
||||
</office:body>
|
||||
</office:document>
|
||||
@@ -0,0 +1,2 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
@@ -0,0 +1,253 @@
|
||||
========================
|
||||
Stock Average Cost Price
|
||||
========================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> today = datetime.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> Product = Model.get('product.product')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('300')
|
||||
>>> template.cost_price_method = 'average'
|
||||
>>> product, = template.products
|
||||
>>> product.cost_price = Decimal('80')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Negative Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('28')
|
||||
>>> template.cost_price_method = 'average'
|
||||
>>> negative_product, = template.products
|
||||
>>> negative_product.cost_price = Decimal('5.0000')
|
||||
>>> template.save()
|
||||
>>> negative_product, = template.products
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> storage_sub_loc = Location(
|
||||
... name="Storage Sub", type='storage', parent=storage_loc)
|
||||
>>> storage_sub_loc.save()
|
||||
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
|
||||
|
||||
Make 1 unit of the product available @ 100 ::
|
||||
|
||||
>>> StockMove = Model.get('stock.move')
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = product
|
||||
>>> incoming_move.uom = unit
|
||||
>>> incoming_move.quantity = 1
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_sub_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('100')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_move.click('do')
|
||||
|
||||
Check Cost Price is 100::
|
||||
|
||||
>>> product.reload()
|
||||
>>> product.cost_price
|
||||
Decimal('100.0000')
|
||||
|
||||
Add 1 more unit @ 200::
|
||||
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = product
|
||||
>>> incoming_move.uom = unit
|
||||
>>> incoming_move.quantity = 1
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('200')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_move.click('do')
|
||||
|
||||
Check Cost Price Average is 150::
|
||||
|
||||
>>> product.reload()
|
||||
>>> product.cost_price
|
||||
Decimal('150.0000')
|
||||
|
||||
Add twice 1 more unit @ 200::
|
||||
|
||||
>>> incoming_moves = []
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = product
|
||||
>>> incoming_move.uom = unit
|
||||
>>> incoming_move.quantity = 1
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('200')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_move.save()
|
||||
>>> incoming_moves.append(incoming_move)
|
||||
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = product
|
||||
>>> incoming_move.uom = unit
|
||||
>>> incoming_move.quantity = 1
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('200')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_move.save()
|
||||
>>> incoming_moves.append(incoming_move)
|
||||
|
||||
>>> StockMove.click(incoming_moves, 'do')
|
||||
|
||||
Check Cost Price Average is 175::
|
||||
|
||||
>>> product.reload()
|
||||
>>> product.cost_price
|
||||
Decimal('175.0000')
|
||||
|
||||
Reduce Cost Price by 80%, to force to write recomputed price later::
|
||||
|
||||
>>> modify_cost_price = Wizard('product.modify_cost_price', [product])
|
||||
>>> modify_cost_price.form.cost_price = 'cost_price * 0.8'
|
||||
>>> modify_cost_price.form.date = today + datetime.timedelta(days=1)
|
||||
>>> modify_cost_price.execute('modify')
|
||||
>>> product.cost_price
|
||||
Decimal('140.0000')
|
||||
|
||||
Increase Cost Price by 10% using Template wizard::
|
||||
|
||||
>>> modify_cost_price = Wizard(
|
||||
... 'product.modify_cost_price', [product.template])
|
||||
>>> modify_cost_price.form.cost_price = 'cost_price * 1.1'
|
||||
>>> modify_cost_price.form.date = today + datetime.timedelta(days=1)
|
||||
>>> modify_cost_price.execute('modify')
|
||||
>>> product.reload()
|
||||
>>> product.cost_price
|
||||
Decimal('154.0000')
|
||||
|
||||
Send one product we don't have in stock::
|
||||
|
||||
>>> outgoing_move = StockMove()
|
||||
>>> outgoing_move.product = negative_product
|
||||
>>> outgoing_move.uom = unit
|
||||
>>> outgoing_move.quantity = 1
|
||||
>>> outgoing_move.unit_price = Decimal('28')
|
||||
>>> outgoing_move.from_location = storage_loc
|
||||
>>> outgoing_move.to_location = customer_loc
|
||||
>>> outgoing_move.planned_date = today
|
||||
>>> outgoing_move.effective_date = today
|
||||
>>> outgoing_move.company = company
|
||||
>>> outgoing_move.currency = company.currency
|
||||
>>> outgoing_move.click('do')
|
||||
|
||||
Cost price should stay 5::
|
||||
|
||||
>>> negative_product.cost_price
|
||||
Decimal('5.0000')
|
||||
|
||||
Return one product to the supplier::
|
||||
|
||||
>>> outgoing_move = StockMove()
|
||||
>>> outgoing_move.product = negative_product
|
||||
>>> outgoing_move.uom = unit
|
||||
>>> outgoing_move.quantity = 1
|
||||
>>> outgoing_move.unit_price = Decimal('28')
|
||||
>>> outgoing_move.currency = company.currency
|
||||
>>> outgoing_move.from_location = storage_loc
|
||||
>>> outgoing_move.to_location = supplier_loc
|
||||
>>> outgoing_move.planned_date = today
|
||||
>>> outgoing_move.effective_date = today
|
||||
>>> outgoing_move.company = company
|
||||
>>> outgoing_move.click('do')
|
||||
|
||||
Cost price should stay 5::
|
||||
|
||||
>>> negative_product.cost_price
|
||||
Decimal('5.0000')
|
||||
|
||||
Receive one unit of the product with negative stock so the stock stays negative::
|
||||
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = negative_product
|
||||
>>> incoming_move.uom = unit
|
||||
>>> incoming_move.quantity = 1
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('3')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_move.click('do')
|
||||
|
||||
Cost price should be set to last unit price::
|
||||
|
||||
>>> negative_product.reload()
|
||||
>>> negative_product.cost_price
|
||||
Decimal('3.0000')
|
||||
|
||||
Receive two units of the product so the stock becomes positive::
|
||||
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = negative_product
|
||||
>>> incoming_move.uom = unit
|
||||
>>> incoming_move.quantity = 2
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('2')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_move.click('do')
|
||||
|
||||
Cost price should be set to last unit price::
|
||||
|
||||
>>> negative_product.reload()
|
||||
>>> negative_product.cost_price
|
||||
Decimal('2.0000')
|
||||
|
||||
Recompute Cost Price::
|
||||
|
||||
>>> recompute = Wizard('product.recompute_cost_price', [negative_product])
|
||||
>>> recompute.execute('recompute')
|
||||
>>> negative_product.cost_price
|
||||
Decimal('2.0000')
|
||||
@@ -0,0 +1,247 @@
|
||||
========================
|
||||
Stock Inventory Scenario
|
||||
========================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> today = datetime.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
|
||||
>>> lost_found_loc, = Location.find([('type', '=', 'lost_found')])
|
||||
|
||||
Create products::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('300')
|
||||
>>> template.cost_price_method = 'average'
|
||||
>>> product, = template.products
|
||||
>>> product.cost_price = Decimal('80')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
>>> kg, = ProductUom.find([('name', '=', 'Kilogram')])
|
||||
>>> template2 = ProductTemplate()
|
||||
>>> template2.name = 'Product'
|
||||
>>> template2.default_uom = kg
|
||||
>>> template2.type = 'goods'
|
||||
>>> template2.list_price = Decimal('140')
|
||||
>>> template2.cost_price_method = 'average'
|
||||
>>> product2, = template2.products
|
||||
>>> product2.cost_price = Decimal('60')
|
||||
>>> template2.save()
|
||||
>>> product2, = template2.products
|
||||
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.consumable = True
|
||||
>>> template.list_price = Decimal('300')
|
||||
>>> template.cost_price_method = 'average'
|
||||
>>> consumable, = template.products
|
||||
>>> consumable.cost_price = Decimal('80')
|
||||
>>> template.save()
|
||||
>>> consumable, = template.products
|
||||
|
||||
Fill storage::
|
||||
|
||||
>>> StockMove = Model.get('stock.move')
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = product
|
||||
>>> incoming_move.uom = unit
|
||||
>>> incoming_move.quantity = 1
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('100')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_moves = [incoming_move]
|
||||
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = product2
|
||||
>>> incoming_move.uom = kg
|
||||
>>> incoming_move.quantity = 2.5
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('70')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_moves.append(incoming_move)
|
||||
>>> StockMove.click(incoming_moves, 'do')
|
||||
|
||||
Create an inventory::
|
||||
|
||||
>>> Inventory = Model.get('stock.inventory')
|
||||
>>> inventory = Inventory()
|
||||
>>> inventory.location = storage_loc
|
||||
>>> inventory.empty_quantity = 'keep'
|
||||
>>> inventory.save()
|
||||
>>> inventory.click('complete_lines')
|
||||
>>> line_by_product = {l.product.id: l for l in inventory.lines}
|
||||
>>> line_p1 = line_by_product[product.id]
|
||||
>>> line_p1.expected_quantity
|
||||
1.0
|
||||
>>> line_p1.quantity = 3
|
||||
>>> line_p2 = line_by_product[product2.id]
|
||||
>>> line_p2.expected_quantity
|
||||
2.5
|
||||
>>> inventory.save()
|
||||
|
||||
Fill storage with more quantities::
|
||||
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = product
|
||||
>>> incoming_move.uom = unit
|
||||
>>> incoming_move.quantity = 1
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('100')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_moves = [incoming_move]
|
||||
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = product2
|
||||
>>> incoming_move.uom = kg
|
||||
>>> incoming_move.quantity = 1.3
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('70')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_moves.append(incoming_move)
|
||||
>>> StockMove.click(incoming_moves, 'do')
|
||||
|
||||
Update the inventory::
|
||||
|
||||
>>> inventory.click('complete_lines')
|
||||
>>> line_p1.reload()
|
||||
>>> line_p1.expected_quantity
|
||||
2.0
|
||||
>>> line_p1.quantity
|
||||
3.0
|
||||
>>> line_p2.reload()
|
||||
>>> line_p2.expected_quantity
|
||||
3.8
|
||||
>>> line_p2.quantity = 3.8
|
||||
>>> line_p2.save()
|
||||
|
||||
Confirm the inventory::
|
||||
|
||||
>>> inventory.click('confirm')
|
||||
>>> line_p1.reload()
|
||||
>>> line_p1.expected_quantity
|
||||
2.0
|
||||
>>> move, = line_p1.moves
|
||||
>>> move.quantity
|
||||
1.0
|
||||
>>> move.from_location == lost_found_loc
|
||||
True
|
||||
>>> move.to_location == inventory.location
|
||||
True
|
||||
>>> line_p2.reload()
|
||||
>>> len(line_p2.moves)
|
||||
0
|
||||
|
||||
Creating an inventory with empty quantities::
|
||||
|
||||
>>> inventory = Inventory()
|
||||
>>> inventory.location = storage_loc
|
||||
>>> inventory.empty_quantity = 'keep'
|
||||
>>> line = inventory.lines.new()
|
||||
>>> line.product = product
|
||||
>>> inventory.click('confirm')
|
||||
>>> line, = inventory.lines
|
||||
>>> len(line.moves)
|
||||
0
|
||||
|
||||
Empty storage::
|
||||
|
||||
>>> Inventory = Model.get('stock.inventory')
|
||||
>>> inventory = Inventory()
|
||||
>>> inventory.location = storage_loc
|
||||
>>> inventory.empty_quantity = 'keep'
|
||||
>>> line = inventory.lines.new()
|
||||
>>> line.product = product
|
||||
>>> line.quantity = 0
|
||||
>>> line = inventory.lines.new()
|
||||
>>> line.product = product2
|
||||
>>> line.quantity = 0
|
||||
>>> inventory.save()
|
||||
>>> line_p1, line_p2 = inventory.lines
|
||||
>>> line_p1.quantity
|
||||
0.0
|
||||
>>> line_p1.expected_quantity
|
||||
3.0
|
||||
>>> line_p2.quantity
|
||||
0.0
|
||||
>>> line_p2.expected_quantity
|
||||
3.8
|
||||
>>> inventory.click('confirm')
|
||||
|
||||
Add quantity of consumable product::
|
||||
|
||||
>>> inventory = Inventory()
|
||||
>>> inventory.location = storage_loc
|
||||
>>> inventory.empty_quantity = 'keep'
|
||||
>>> line = inventory.lines.new()
|
||||
>>> line.product = consumable
|
||||
>>> line.quantity = 5.0
|
||||
>>> inventory.click('complete_lines')
|
||||
>>> len(inventory.lines)
|
||||
1
|
||||
>>> inventory.click('confirm')
|
||||
>>> line, = inventory.lines
|
||||
>>> move, = line.moves
|
||||
>>> move.quantity
|
||||
5.0
|
||||
>>> move.from_location == lost_found_loc
|
||||
True
|
||||
>>> move.to_location == inventory.location
|
||||
True
|
||||
|
||||
Create an inventory that should be empty after completion::
|
||||
|
||||
>>> Inventory = Model.get('stock.inventory')
|
||||
>>> inventory = Inventory()
|
||||
>>> inventory.location = storage_loc
|
||||
>>> inventory.empty_quantity = 'keep'
|
||||
>>> inventory.click('complete_lines')
|
||||
>>> len(inventory.lines)
|
||||
0
|
||||
@@ -0,0 +1,120 @@
|
||||
==============================
|
||||
Stock Inventory Count Scenario
|
||||
==============================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> today = datetime.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
|
||||
|
||||
Create products::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('300')
|
||||
>>> template.cost_price_method = 'average'
|
||||
>>> product, = template.products
|
||||
>>> product.cost_price = Decimal('80')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
>>> kg, = ProductUom.find([('name', '=', 'Kilogram')])
|
||||
>>> template2 = ProductTemplate()
|
||||
>>> template2.name = 'Product'
|
||||
>>> template2.default_uom = kg
|
||||
>>> template2.type = 'goods'
|
||||
>>> template2.list_price = Decimal('140')
|
||||
>>> template2.cost_price_method = 'average'
|
||||
>>> product2, = template2.products
|
||||
>>> product2.cost_price = Decimal('60')
|
||||
>>> template2.save()
|
||||
>>> product2, = template2.products
|
||||
|
||||
Create an inventory::
|
||||
|
||||
>>> Inventory = Model.get('stock.inventory')
|
||||
>>> inventory = Inventory()
|
||||
>>> inventory.location = storage_loc
|
||||
>>> inventory.empty_quantity = 'keep'
|
||||
>>> inventory.save()
|
||||
|
||||
Count inventory::
|
||||
|
||||
>>> _ = inventory.click('do_count')
|
||||
>>> count = Wizard('stock.inventory.count', [inventory])
|
||||
|
||||
>>> count.form.search = product
|
||||
|
||||
>>> count.execute('quantity') # doctest: +IGNORE_EXCEPTION_DETAIL
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
InventoryCountWarning: ...
|
||||
|
||||
>>> Model.get('res.user.warning')(user=config.user,
|
||||
... name='stock.inventory,%s.product.product,%s.count_create' % (
|
||||
... inventory.id, product.id)).save()
|
||||
>>> count.execute('quantity')
|
||||
>>> count.form.quantity
|
||||
1.0
|
||||
>>> count.form.total_quantity
|
||||
1.0
|
||||
>>> count.execute('add')
|
||||
|
||||
>>> count.form.search = product
|
||||
>>> count.execute('quantity')
|
||||
>>> count.form.total_quantity
|
||||
2.0
|
||||
>>> count.execute('add')
|
||||
|
||||
>>> count.form.search = product2
|
||||
>>> Model.get('res.user.warning')(user=config.user,
|
||||
... name='stock.inventory,%s.product.product,%s.count_create' % (
|
||||
... inventory.id, product2.id)).save()
|
||||
>>> count.execute('quantity')
|
||||
>>> count.form.quantity
|
||||
>>> count.form.total_quantity
|
||||
>>> count.form.quantity = 10
|
||||
>>> count.form.total_quantity
|
||||
10.0
|
||||
>>> count.execute('add')
|
||||
|
||||
>>> count.execute('end')
|
||||
|
||||
Check inventory::
|
||||
|
||||
>>> len(inventory.lines)
|
||||
2
|
||||
>>> line1, = [l for l in inventory.lines if l.product == product]
|
||||
>>> line1.quantity
|
||||
2.0
|
||||
>>> line2, = [l for l in inventory.lines if l.product == product2]
|
||||
>>> line2.quantity
|
||||
10.0
|
||||
@@ -0,0 +1,88 @@
|
||||
=======================================
|
||||
Stock Inventory Scenario Empty Quantity
|
||||
=======================================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> today = datetime.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
|
||||
>>> lost_found_loc, = Location.find([('type', '=', 'lost_found')])
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('300')
|
||||
>>> template.cost_price_method = 'average'
|
||||
>>> product, = template.products
|
||||
>>> product.cost_price = Decimal('80')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
Fill storage::
|
||||
|
||||
>>> StockMove = Model.get('stock.move')
|
||||
>>> incoming_move = StockMove()
|
||||
>>> incoming_move.product = product
|
||||
>>> incoming_move.uom = unit
|
||||
>>> incoming_move.quantity = 1
|
||||
>>> incoming_move.from_location = supplier_loc
|
||||
>>> incoming_move.to_location = storage_loc
|
||||
>>> incoming_move.planned_date = today
|
||||
>>> incoming_move.effective_date = today
|
||||
>>> incoming_move.company = company
|
||||
>>> incoming_move.unit_price = Decimal('100')
|
||||
>>> incoming_move.currency = company.currency
|
||||
>>> incoming_move.click('do')
|
||||
|
||||
Creating an inventory with empty quantities creates and empty move::
|
||||
|
||||
>>> Inventory = Model.get('stock.inventory')
|
||||
>>> inventory = Inventory()
|
||||
>>> inventory.location = storage_loc
|
||||
>>> inventory.empty_quantity = 'empty'
|
||||
>>> inventory.save()
|
||||
>>> inventory.click('complete_lines')
|
||||
>>> line, = inventory.lines
|
||||
>>> line.expected_quantity
|
||||
1.0
|
||||
>>> line.quantity
|
||||
>>> inventory.click('confirm')
|
||||
>>> line.reload()
|
||||
>>> line.expected_quantity
|
||||
1.0
|
||||
>>> move, = line.moves
|
||||
>>> move.quantity
|
||||
1.0
|
||||
>>> move.from_location == inventory.location
|
||||
True
|
||||
>>> move.to_location == lost_found_loc
|
||||
True
|
||||
@@ -0,0 +1,71 @@
|
||||
=============================
|
||||
Stock Move In Future Scenario
|
||||
=============================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import (
|
||||
... create_company, get_company)
|
||||
>>> today = datetime.date.today()
|
||||
>>> tomorrow = today + relativedelta(days=1)
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> Product = Model.get('product.product')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('20')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
>>> product.cost_price = Decimal('1')
|
||||
>>> product.save()
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
|
||||
A warning is raised when doing a move in the future::
|
||||
|
||||
>>> Move = Model.get('stock.move')
|
||||
>>> move = Move()
|
||||
>>> move.product = product
|
||||
>>> move.quantity = 1
|
||||
>>> move.from_location = supplier_loc
|
||||
>>> move.to_location = storage_loc
|
||||
>>> move.currency = company.currency
|
||||
>>> move.effective_date = tomorrow
|
||||
>>> move.quantity = 2
|
||||
>>> move.unit_price = Decimal('1')
|
||||
>>> move.save()
|
||||
>>> move.click('do') # doctest: +IGNORE_EXCEPTION_DETAIL
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
MoveFutureWarning: ...
|
||||
|
||||
But it can be done for today::
|
||||
|
||||
>>> move.effective_date = today
|
||||
>>> move.click('do')
|
||||
>>> move.state
|
||||
'done'
|
||||
@@ -0,0 +1,126 @@
|
||||
=====================================
|
||||
Stock Product Quantities by Warehouse
|
||||
=====================================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model, Wizard, Report
|
||||
>>> from trytond import backend
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> today = datetime.date.today()
|
||||
>>> yesterday = today - relativedelta(days=1)
|
||||
>>> tomorrow = today + relativedelta(days=1)
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('20')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> warehouse_loc, = Location.find([('code', '=', 'WH')])
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
|
||||
Fill warehouse::
|
||||
|
||||
>>> Move = Model.get('stock.move')
|
||||
>>> move = Move()
|
||||
>>> move.product = product
|
||||
>>> move.from_location = supplier_loc
|
||||
>>> move.to_location = storage_loc
|
||||
>>> move.uom = unit
|
||||
>>> move.quantity = 10
|
||||
>>> move.effective_date = yesterday
|
||||
>>> move.unit_price = Decimal('10')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.click('do')
|
||||
|
||||
Forecast some moves::
|
||||
|
||||
>>> move = Move()
|
||||
>>> move.product = product
|
||||
>>> move.from_location = storage_loc
|
||||
>>> move.to_location = customer_loc
|
||||
>>> move.uom = unit
|
||||
>>> move.quantity = 6
|
||||
>>> move.planned_date = tomorrow
|
||||
>>> move.unit_price = Decimal('20')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.save()
|
||||
|
||||
>>> move = Move()
|
||||
>>> move.product = product
|
||||
>>> move.from_location = supplier_loc
|
||||
>>> move.to_location = storage_loc
|
||||
>>> move.uom = unit
|
||||
>>> move.quantity = 5
|
||||
>>> move.planned_date = tomorrow
|
||||
>>> move.unit_price = Decimal('10')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.save()
|
||||
|
||||
>>> move = Move()
|
||||
>>> move.product = product
|
||||
>>> move.from_location = storage_loc
|
||||
>>> move.to_location = customer_loc
|
||||
>>> move.uom = unit
|
||||
>>> move.quantity = 3
|
||||
>>> move.planned_date = tomorrow
|
||||
>>> move.unit_price = Decimal('20')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.save()
|
||||
|
||||
|
||||
Check Product Quantities by Warehouse::
|
||||
|
||||
>>> ProductQuantitiesByWarehouse = Model.get('stock.product_quantities_warehouse')
|
||||
>>> with config.set_context(
|
||||
... product_template=template.id, warehouse=warehouse_loc.id):
|
||||
... records = ProductQuantitiesByWarehouse.find([])
|
||||
>>> len(records)
|
||||
3
|
||||
>>> [(r.date, r.quantity) for r in records] == [
|
||||
... (yesterday, 10), (today, 10), (tomorrow, 6)]
|
||||
True
|
||||
|
||||
Check Product Quantities by Warehouse Moves::
|
||||
|
||||
>>> ProductQuantitiesByWarehouseMove = Model.get(
|
||||
... 'stock.product_quantities_warehouse.move')
|
||||
>>> with config.set_context(
|
||||
... product_template=template.id, warehouse=warehouse_loc.id):
|
||||
... records = ProductQuantitiesByWarehouseMove.find([])
|
||||
>>> len(records)
|
||||
4
|
||||
>>> [(r.date, r.cumulative_quantity_start, r.quantity, r.cumulative_quantity_end)
|
||||
... for r in records] == [
|
||||
... (yesterday, 0, 10, 10),
|
||||
... (tomorrow, 10, -6, 4),
|
||||
... (tomorrow, 4, 5, 9),
|
||||
... (tomorrow, 9, -3, 6)]
|
||||
True
|
||||
@@ -0,0 +1,164 @@
|
||||
==================================
|
||||
Stock Recompute Average Cost Price
|
||||
==================================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('300')
|
||||
>>> template.cost_price_method = 'average'
|
||||
>>> product, = template.products
|
||||
>>> product.cost_price = Decimal('80')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
|
||||
|
||||
Create some moves::
|
||||
|
||||
>>> StockMove = Model.get('stock.move')
|
||||
>>> StockMove(
|
||||
... product=product,
|
||||
... quantity=1,
|
||||
... from_location=supplier_loc,
|
||||
... to_location=storage_loc,
|
||||
... unit_price=Decimal('100'),
|
||||
... currency=company.currency,
|
||||
... effective_date=today - dt.timedelta(days=2)).click('do')
|
||||
>>> StockMove(
|
||||
... product=product,
|
||||
... quantity=2,
|
||||
... from_location=storage_loc,
|
||||
... to_location=customer_loc,
|
||||
... unit_price=Decimal('300'),
|
||||
... currency=company.currency,
|
||||
... effective_date=today - dt.timedelta(days=1)).click('do')
|
||||
>>> StockMove(
|
||||
... product=product,
|
||||
... quantity=2,
|
||||
... from_location=supplier_loc,
|
||||
... to_location=storage_loc,
|
||||
... unit_price=Decimal('120'),
|
||||
... currency=company.currency,
|
||||
... effective_date=today - dt.timedelta(days=1)).click('do')
|
||||
>>> StockMove(
|
||||
... product=product,
|
||||
... quantity=3,
|
||||
... from_location=supplier_loc,
|
||||
... to_location=storage_loc,
|
||||
... unit_price=Decimal('100'),
|
||||
... currency=company.currency,
|
||||
... effective_date=today).click('do')
|
||||
|
||||
>>> [m.cost_price for m in StockMove.find([])]
|
||||
[Decimal('105.0000'), Decimal('120.0000'), Decimal('100.0000'), Decimal('100.0000')]
|
||||
|
||||
>>> product.reload()
|
||||
>>> product.cost_price
|
||||
Decimal('105.0000')
|
||||
|
||||
Recompute cost price::
|
||||
|
||||
>>> recompute = Wizard('product.recompute_cost_price', [product])
|
||||
>>> recompute.execute('recompute')
|
||||
|
||||
>>> [m.cost_price for m in StockMove.find([])]
|
||||
[Decimal('105.0000'), Decimal('120.0000'), Decimal('120.0000'), Decimal('100.0000')]
|
||||
|
||||
>>> product.reload()
|
||||
>>> product.cost_price
|
||||
Decimal('105.0000')
|
||||
|
||||
Recompute cost price from a date::
|
||||
|
||||
>>> recompute = Wizard('product.recompute_cost_price', [product])
|
||||
>>> recompute.form.from_ = today - dt.timedelta(days=1)
|
||||
>>> recompute.execute('recompute')
|
||||
|
||||
>>> [m.cost_price for m in StockMove.find([])]
|
||||
[Decimal('105.0000'), Decimal('120.0000'), Decimal('120.0000'), Decimal('100.0000')]
|
||||
|
||||
>>> product.reload()
|
||||
>>> product.cost_price
|
||||
Decimal('105.0000')
|
||||
|
||||
Update unit price of a move::
|
||||
|
||||
>>> move, = StockMove.find([
|
||||
... ('from_location', '=', supplier_loc.id),
|
||||
... ('effective_date', '=', today - dt.timedelta(days=1)),
|
||||
... ])
|
||||
>>> bool(move.unit_price_updated)
|
||||
False
|
||||
>>> move.unit_price = Decimal('130')
|
||||
>>> move.save()
|
||||
>>> bool(move.unit_price_updated)
|
||||
True
|
||||
|
||||
>>> recompute = Wizard('product.recompute_cost_price', [product])
|
||||
>>> recompute.form.from_ = move.effective_date + dt.timedelta(days=1)
|
||||
>>> recompute.execute('recompute')
|
||||
>>> move.reload()
|
||||
>>> bool(move.unit_price_updated)
|
||||
True
|
||||
|
||||
>>> recompute = Wizard('product.recompute_cost_price', [product])
|
||||
>>> recompute.form.from_ == move.effective_date
|
||||
True
|
||||
>>> recompute.execute('recompute')
|
||||
>>> move.reload()
|
||||
>>> bool(move.unit_price_updated)
|
||||
False
|
||||
>>> [m.cost_price for m in StockMove.find([])]
|
||||
[Decimal('107.5000'), Decimal('130.0000'), Decimal('130.0000'), Decimal('100.0000')]
|
||||
|
||||
Launch cron task::
|
||||
|
||||
>>> move.unit_price = Decimal('120')
|
||||
>>> move.save()
|
||||
|
||||
>>> Cron = Model.get('ir.cron')
|
||||
>>> Company = Model.get('company.company')
|
||||
>>> cron_recompute, = Cron.find([
|
||||
... ('method', '=', 'product.product|recompute_cost_price_from_moves'),
|
||||
... ])
|
||||
>>> cron_recompute.companies.append(Company(company.id))
|
||||
>>> cron_recompute.click('run_once')
|
||||
|
||||
>>> move.reload()
|
||||
>>> bool(move.unit_price_updated)
|
||||
False
|
||||
>>> [m.cost_price for m in StockMove.find([])]
|
||||
[Decimal('105.0000'), Decimal('120.0000'), Decimal('120.0000'), Decimal('100.0000')]
|
||||
@@ -0,0 +1,107 @@
|
||||
=============================================
|
||||
Stock Recompute Average Cost Price Production
|
||||
=============================================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import (
|
||||
... create_company, get_company)
|
||||
|
||||
>>> today = dt.date.today()
|
||||
>>> yesterday = today - dt.timedelta(days=1)
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> StockMove = Model.get('stock.move')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('50.0000')
|
||||
>>> template.cost_price_method = 'average'
|
||||
>>> product, = template.products
|
||||
>>> product.cost_price = Decimal('40.0000')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> production_loc = Location(name="Production", type='production')
|
||||
>>> production_loc.save()
|
||||
|
||||
Consume product for production and reverse some::
|
||||
|
||||
>>> StockMove(
|
||||
... product=product,
|
||||
... quantity=10,
|
||||
... from_location=storage_loc,
|
||||
... to_location=production_loc,
|
||||
... effective_date=today).click('do')
|
||||
>>> StockMove(
|
||||
... product=product,
|
||||
... quantity=2,
|
||||
... from_location=production_loc,
|
||||
... to_location=storage_loc,
|
||||
... unit_price=Decimal('40.0000'),
|
||||
... currency=company.currency,
|
||||
... effective_date=today).click('do')
|
||||
|
||||
>>> [m.cost_price for m in StockMove.find([])]
|
||||
[Decimal('40.0000'), Decimal('40.0000')]
|
||||
|
||||
Recompute cost price::
|
||||
|
||||
>>> recompute = Wizard('product.recompute_cost_price', [product])
|
||||
>>> recompute.execute('recompute')
|
||||
|
||||
>>> [m.cost_price for m in StockMove.find([])]
|
||||
[Decimal('0.0000'), Decimal('0.0000')]
|
||||
|
||||
>>> product.reload()
|
||||
>>> product.cost_price
|
||||
Decimal('0.0000')
|
||||
|
||||
Receive product yesterday at new cost::
|
||||
|
||||
>>> StockMove(
|
||||
... product=product,
|
||||
... quantity=16,
|
||||
... from_location=supplier_loc,
|
||||
... to_location=storage_loc,
|
||||
... unit_price=Decimal('20.0000'),
|
||||
... currency=company.currency,
|
||||
... effective_date=yesterday).click('do')
|
||||
|
||||
Recompute cost price::
|
||||
|
||||
>>> recompute = Wizard('product.recompute_cost_price', [product])
|
||||
>>> recompute.execute('recompute')
|
||||
|
||||
>>> [m.cost_price for m in StockMove.find([])]
|
||||
[Decimal('20.0000'), Decimal('20.0000'), Decimal('20.0000')]
|
||||
|
||||
>>> product.reload()
|
||||
>>> product.cost_price
|
||||
Decimal('20.0000')
|
||||
@@ -0,0 +1,167 @@
|
||||
=================================
|
||||
Stock Shipment Reporting Scenario
|
||||
=================================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model, Wizard, Report
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> today = datetime.date.today()
|
||||
>>> yesterday = today - relativedelta(days=1)
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create customer & supplier::
|
||||
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> customer = Party(name='Customer')
|
||||
>>> customer.save()
|
||||
>>> supplier = Party(name='Supplier')
|
||||
>>> supplier.save()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> Product = Model.get('product.product')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('20')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> warehouse_loc, = Location.find([('code', '=', 'WH')])
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
|
||||
>>> input_loc, = Location.find([('code', '=', 'IN')])
|
||||
>>> output_loc, = Location.find([('code', '=', 'OUT')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> lost_loc, = Location.find([('type', '=', 'lost_found')])
|
||||
|
||||
Create Shipment In::
|
||||
|
||||
>>> ShipmentIn = Model.get('stock.shipment.in')
|
||||
>>> shipment_in = ShipmentIn()
|
||||
>>> shipment_in.planned_date = today
|
||||
>>> shipment_in.supplier = supplier
|
||||
>>> shipment_in.warehouse = warehouse_loc
|
||||
>>> shipment_in.company = company
|
||||
|
||||
Receive a bunch of products::
|
||||
|
||||
>>> move = shipment_in.incoming_moves.new()
|
||||
>>> move.product = product
|
||||
>>> move.uom = unit
|
||||
>>> move.quantity = 100
|
||||
>>> move.from_location = supplier_loc
|
||||
>>> move.to_location = input_loc
|
||||
>>> move.company = company
|
||||
>>> move.unit_price = Decimal('1')
|
||||
>>> move.currency = company.currency
|
||||
>>> shipment_in.save()
|
||||
>>> shipment_in.click('receive')
|
||||
>>> shipment_in.click('done')
|
||||
|
||||
Testing the report::
|
||||
|
||||
>>> supplier_restocking_list = Report('stock.shipment.in.restocking_list')
|
||||
>>> ext, _, _, name = supplier_restocking_list.execute([shipment_in], {})
|
||||
>>> ext
|
||||
'odt'
|
||||
>>> name
|
||||
'Restocking List-1'
|
||||
|
||||
Create Shipment Out::
|
||||
|
||||
>>> ShipmentOut = Model.get('stock.shipment.out')
|
||||
>>> shipment_out = ShipmentOut()
|
||||
>>> shipment_out.planned_date = today
|
||||
>>> shipment_out.customer = customer
|
||||
>>> shipment_out.warehouse = warehouse_loc
|
||||
>>> shipment_out.company = company
|
||||
|
||||
Add two shipment lines of same product and go through the workflow::
|
||||
|
||||
>>> move = shipment_out.outgoing_moves.new()
|
||||
>>> move.product = product
|
||||
>>> move.uom = unit
|
||||
>>> move.quantity = 1
|
||||
>>> move.from_location = output_loc
|
||||
>>> move.to_location = customer_loc
|
||||
>>> move.company = company
|
||||
>>> move.unit_price = Decimal('1')
|
||||
>>> move.currency = company.currency
|
||||
>>> shipment_out.save()
|
||||
>>> shipment_out.click('wait')
|
||||
>>> shipment_out.click('assign_try')
|
||||
True
|
||||
>>> shipment_out.click('pick')
|
||||
>>> shipment_out.click('pack')
|
||||
>>> shipment_out.click('done')
|
||||
|
||||
Testing the reports::
|
||||
|
||||
>>> delivery_note = Report('stock.shipment.out.delivery_note')
|
||||
>>> ext, _, _, name = delivery_note.execute([shipment_out], {})
|
||||
>>> ext
|
||||
'odt'
|
||||
>>> name
|
||||
'Delivery Note-1'
|
||||
|
||||
>>> picking_list = Report('stock.shipment.out.picking_list')
|
||||
>>> ext, _, _, name = picking_list.execute([shipment_out], {})
|
||||
>>> ext
|
||||
'odt'
|
||||
>>> name
|
||||
'Picking List-1'
|
||||
|
||||
Create an internal shipment::
|
||||
|
||||
>>> ShipmentInternal = Model.get('stock.shipment.internal')
|
||||
>>> shipment_internal = ShipmentInternal()
|
||||
>>> shipment_internal.planned_date = today
|
||||
>>> shipment_internal.company = company
|
||||
>>> shipment_internal.from_location = storage_loc
|
||||
>>> shipment_internal.to_location = lost_loc
|
||||
>>> move = shipment_internal.moves.new()
|
||||
>>> move.product = product
|
||||
>>> move.uom = unit
|
||||
>>> move.quantity = 1
|
||||
>>> move.from_location = storage_loc
|
||||
>>> move.to_location = lost_loc
|
||||
>>> move.company = company
|
||||
>>> move.unit_price = Decimal('1')
|
||||
>>> move.currency = company.currency
|
||||
>>> shipment_internal.save()
|
||||
>>> shipment_internal.click('wait')
|
||||
>>> shipment_internal.click('assign_try')
|
||||
True
|
||||
>>> shipment_internal.click('done')
|
||||
|
||||
Testing the report::
|
||||
|
||||
>>> internal_report = Report('stock.shipment.internal.report')
|
||||
>>> ext, _, _, name = internal_report.execute([shipment_internal], {})
|
||||
>>> ext
|
||||
'odt'
|
||||
>>> name
|
||||
'Internal Shipment-1'
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
===============================
|
||||
Stock Reporting Margin Scenario
|
||||
===============================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import (
|
||||
... create_company, get_company)
|
||||
>>> today = dt.date.today()
|
||||
>>> yesterday = today - dt.timedelta(days=1)
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('40')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
>>> product.cost_price = Decimal('20')
|
||||
>>> product.save()
|
||||
>>> template2, = template.duplicate()
|
||||
>>> product2, = template2.products
|
||||
|
||||
>>> Category = Model.get('product.category')
|
||||
>>> category_root = Category(name="Root")
|
||||
>>> category_root.save()
|
||||
>>> category1 = Category(name="Child1", parent=category_root)
|
||||
>>> category1.save()
|
||||
>>> category2 = Category(name="Child2", parent=category_root)
|
||||
>>> category2.save()
|
||||
|
||||
>>> template.categories.append(Category(category1.id))
|
||||
>>> template.save()
|
||||
>>> template2.categories.append(Category(category2.id))
|
||||
>>> template2.save()
|
||||
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> lost_loc, = Location.find([('type', '=', 'lost_found')])
|
||||
|
||||
Create some moves::
|
||||
|
||||
>>> Move = Model.get('stock.move')
|
||||
>>> move = Move()
|
||||
>>> move.product = product
|
||||
>>> move.from_location = supplier_loc
|
||||
>>> move.to_location = storage_loc
|
||||
>>> move.quantity = 8
|
||||
>>> move.unit_price = Decimal('20')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.effective_date = yesterday
|
||||
>>> move.click('do')
|
||||
|
||||
>>> move = Move()
|
||||
>>> move.product = product
|
||||
>>> move.from_location = storage_loc
|
||||
>>> move.to_location = customer_loc
|
||||
>>> move.quantity = 2
|
||||
>>> move.unit_price = Decimal('40')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.effective_date = yesterday
|
||||
>>> move.click('do')
|
||||
|
||||
>>> move = Move()
|
||||
>>> move.product = product
|
||||
>>> move.from_location = storage_loc
|
||||
>>> move.to_location = customer_loc
|
||||
>>> move.quantity = 4
|
||||
>>> move.unit_price = Decimal('30')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.effective_date = today
|
||||
>>> move.click('do')
|
||||
|
||||
>>> move = Move()
|
||||
>>> move.product = product
|
||||
>>> move.from_location = customer_loc
|
||||
>>> move.to_location = storage_loc
|
||||
>>> move.quantity = 1
|
||||
>>> move.unit_price = Decimal('30')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.effective_date = today
|
||||
>>> move.click('do')
|
||||
|
||||
>>> move = Move()
|
||||
>>> move.product = product2
|
||||
>>> move.from_location = storage_loc
|
||||
>>> move.to_location = customer_loc
|
||||
>>> move.quantity = 2
|
||||
>>> move.unit_price = Decimal('50')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.effective_date = today
|
||||
>>> move.click('do')
|
||||
|
||||
>>> move = Move()
|
||||
>>> move.product = product
|
||||
>>> move.from_location = storage_loc
|
||||
>>> move.to_location = lost_loc
|
||||
>>> move.quantity = 1
|
||||
>>> move.effective_date = today
|
||||
>>> move.click('do')
|
||||
|
||||
Check reporting margin per product::
|
||||
|
||||
>>> MarginProduct = Model.get('stock.reporting.margin.product')
|
||||
>>> MarginProductTimeseries = Model.get(
|
||||
... 'stock.reporting.margin.product.time_series')
|
||||
>>> context = {
|
||||
... 'from_date': yesterday,
|
||||
... 'to_date': today,
|
||||
... 'period': 'day',
|
||||
... }
|
||||
>>> with config.set_context(context=context):
|
||||
... reports = MarginProduct.find([])
|
||||
... time_series = MarginProductTimeseries.find([])
|
||||
>>> len(reports)
|
||||
2
|
||||
>>> report, = [r for r in reports if r.product == product]
|
||||
>>> (report.quantity, report.cost, report.revenue,
|
||||
... report.profit, report.margin) == (
|
||||
... 5, Decimal('100.00'), Decimal('170.00'),
|
||||
... Decimal('70.00'), Decimal('0.4118'))
|
||||
True
|
||||
>>> len(time_series)
|
||||
3
|
||||
>>> with config.set_context(context=context):
|
||||
... sorted((
|
||||
... r.product.id, str(r.date), r.quantity, r.cost, r.revenue,
|
||||
... r.profit, r.margin)
|
||||
... for r in time_series) == sorted([
|
||||
... (product.id, str(yesterday), 2, Decimal('40.00'), Decimal('80.00'),
|
||||
... Decimal('40.00'), Decimal('0.5000')),
|
||||
... (product.id, str(today), 3, Decimal('60.00'), Decimal('90.00'),
|
||||
... Decimal('30.00'), Decimal('0.3333')),
|
||||
... (product2.id, str(today), 2, Decimal('40.00'), Decimal('100.00'),
|
||||
... Decimal('60.00'), Decimal('0.6000'))])
|
||||
True
|
||||
|
||||
Check reporting margin per categories::
|
||||
|
||||
>>> MarginCategory = Model.get('stock.reporting.margin.category')
|
||||
>>> MarginCategoryTimeseries = Model.get(
|
||||
... 'stock.reporting.margin.category.time_series')
|
||||
>>> MarginCategoryTree = Model.get(
|
||||
... 'stock.reporting.margin.category.tree')
|
||||
>>> with config.set_context(context=context):
|
||||
... reports = MarginCategory.find([])
|
||||
... time_series = MarginCategoryTimeseries.find([])
|
||||
... tree = MarginCategoryTree.find([])
|
||||
>>> len(reports)
|
||||
2
|
||||
>>> with config.set_context(context=context):
|
||||
... sorted((r.category.id, r.cost, r.revenue, r.profit, r.margin)
|
||||
... for r in reports) == sorted([
|
||||
... (category1.id, Decimal('100.00'), Decimal('170.00'),
|
||||
... Decimal('70.00'), Decimal('0.4118')),
|
||||
... (category2.id, Decimal('40.00'), Decimal('100.00'),
|
||||
... Decimal('60.00'), Decimal('0.6000'))])
|
||||
True
|
||||
>>> len(time_series)
|
||||
3
|
||||
>>> with config.set_context(context=context):
|
||||
... sorted((r.category.id, str(r.date), r.cost, r.revenue, r.profit, r.margin)
|
||||
... for r in time_series) == sorted([
|
||||
... (category1.id, str(yesterday), Decimal('40.00'), Decimal('80.00'),
|
||||
... Decimal('40.00'), Decimal('0.5000')),
|
||||
... (category1.id, str(today), Decimal('60.00'), Decimal('90.00'),
|
||||
... Decimal('30.00'), Decimal('0.3333')),
|
||||
... (category2.id, str(today), Decimal('40.00'), Decimal('100.00'),
|
||||
... Decimal('60.00'), Decimal('0.6000'))])
|
||||
True
|
||||
>>> len(tree)
|
||||
3
|
||||
>>> with config.set_context(context=context):
|
||||
... sorted((r.name, r.cost, r.revenue, r.profit, r.margin)
|
||||
... for r in tree) == sorted([
|
||||
... ("Root", Decimal('140.00'), Decimal('270.00'),
|
||||
... Decimal('130.00'), Decimal('0.4815')),
|
||||
... ("Child1", Decimal('100.00'), Decimal('170.00'),
|
||||
... Decimal('70.00'), Decimal('0.4118')),
|
||||
... ('Child2', Decimal('40.00'), Decimal('100.00'),
|
||||
... Decimal('60.00'), Decimal('0.6000'))])
|
||||
True
|
||||
|
||||
Check reporting margin including lost::
|
||||
|
||||
>>> context['include_lost'] = True
|
||||
|
||||
>>> with config.set_context(context=context):
|
||||
... reports = MarginProduct.find([])
|
||||
>>> len(reports)
|
||||
2
|
||||
>>> report, = [r for r in reports if r.product == product]
|
||||
>>> (report.quantity, report.cost, report.revenue,
|
||||
... report.profit, report.margin) == (
|
||||
... 6, Decimal('120.00'), Decimal('170.00'),
|
||||
... Decimal('50.00'), Decimal('0.2941'))
|
||||
True
|
||||
@@ -0,0 +1,81 @@
|
||||
=================================
|
||||
Stock Shipment In Return Scenario
|
||||
=================================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> today = datetime.date.today()
|
||||
>>> yesterday = today - relativedelta(days=1)
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create supplier::
|
||||
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> supplier = Party(name='Supplier')
|
||||
>>> supplier.save()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> Product = Model.get('product.product')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('20')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
|
||||
Create Shipment In::
|
||||
|
||||
>>> ShipmentInReturn = Model.get('stock.shipment.in.return')
|
||||
>>> shipment_return = ShipmentInReturn()
|
||||
>>> shipment_return.planned_date = yesterday
|
||||
>>> shipment_return.supplier = supplier
|
||||
>>> shipment_return.from_location = storage_loc
|
||||
>>> move = shipment_return.moves.new()
|
||||
>>> move.product = product
|
||||
>>> move.uom =unit
|
||||
>>> move.quantity = 1
|
||||
>>> move.from_location = storage_loc
|
||||
>>> move.to_location = supplier_loc
|
||||
>>> move.company = company
|
||||
>>> move.unit_price = Decimal('1')
|
||||
>>> move.currency = company.currency
|
||||
>>> shipment_return.click('wait')
|
||||
>>> shipment_return.state
|
||||
'waiting'
|
||||
|
||||
Reschedule shipment::
|
||||
|
||||
>>> Cron = Model.get('ir.cron')
|
||||
>>> cron = Cron(method='stock.shipment.in.return|reschedule')
|
||||
>>> cron.interval_number = 1
|
||||
>>> cron.interval_type = 'months'
|
||||
>>> cron.click('run_once')
|
||||
>>> shipment_return.reload()
|
||||
>>> shipment_return.planned_date == today
|
||||
True
|
||||
@@ -0,0 +1,86 @@
|
||||
=================================================
|
||||
Stock Shipment In Same Storage and Input Scenario
|
||||
=================================================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create supplier::
|
||||
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> supplier = Party(name='Supplier')
|
||||
>>> supplier.save()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('20')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> warehouse_loc, = Location.find([('code', '=', 'WH')])
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> storage1 = Location(name="Storage 1", parent=storage_loc)
|
||||
>>> storage1.save()
|
||||
|
||||
Use storage location as input location::
|
||||
|
||||
>>> warehouse_loc.input_location = storage_loc
|
||||
>>> warehouse_loc.save()
|
||||
|
||||
Create Shipment In::
|
||||
|
||||
>>> ShipmentIn = Model.get('stock.shipment.in')
|
||||
>>> shipment_in = ShipmentIn()
|
||||
>>> shipment_in.supplier = supplier
|
||||
>>> shipment_in.warehouse = warehouse_loc
|
||||
>>> shipment_in.company = company
|
||||
>>> move = shipment_in.incoming_moves.new()
|
||||
>>> move.product = product
|
||||
>>> move.uom = unit
|
||||
>>> move.quantity = 1
|
||||
>>> move.unit_price = Decimal('5')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.from_location = supplier_loc
|
||||
>>> move.to_location = storage1
|
||||
>>> shipment_in.save()
|
||||
|
||||
>>> len(shipment_in.incoming_moves)
|
||||
1
|
||||
>>> len(shipment_in.inventory_moves)
|
||||
0
|
||||
|
||||
Incoming moves are done when receiving the shipment::
|
||||
|
||||
>>> shipment_in.click('receive')
|
||||
>>> shipment_in.state
|
||||
'done'
|
||||
>>> move, = shipment_in.incoming_moves
|
||||
>>> move.state
|
||||
'done'
|
||||
>>> len(shipment_in.inventory_moves)
|
||||
0
|
||||
@@ -0,0 +1,152 @@
|
||||
================================
|
||||
Stock Shipment Internal Scenario
|
||||
================================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules, set_user
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> today = datetime.date.today()
|
||||
>>> yesterday = today - relativedelta(days=1)
|
||||
>>> tomorrow = today + relativedelta(days=1)
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> Product = Model.get('product.product')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('20')
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> lost_found_loc, = Location.find([('type', '=', 'lost_found')])
|
||||
>>> storage_loc, = Location.find([('code', '=', 'STO')])
|
||||
>>> internal_loc = Location(
|
||||
... name="Internal", type='storage', parent=storage_loc.parent)
|
||||
>>> internal_loc.save()
|
||||
|
||||
Create stock user::
|
||||
|
||||
>>> User = Model.get('res.user')
|
||||
>>> Group = Model.get('res.group')
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> Employee = Model.get('company.employee')
|
||||
>>> stock_user = User()
|
||||
>>> stock_user.name = 'Stock'
|
||||
>>> stock_user.login = 'stock'
|
||||
>>> stock_group, = Group.find([('name', '=', 'Stock')])
|
||||
>>> stock_user.groups.append(stock_group)
|
||||
>>> employee_party = Party(name="Employee")
|
||||
>>> employee_party.save()
|
||||
>>> employee = Employee(party=employee_party)
|
||||
>>> employee.save()
|
||||
>>> stock_user.employees.append(employee)
|
||||
>>> stock_user.employee = employee
|
||||
>>> stock_user.save()
|
||||
|
||||
Create Internal Shipment::
|
||||
|
||||
>>> set_user(stock_user)
|
||||
>>> Shipment = Model.get('stock.shipment.internal')
|
||||
>>> StockMove = Model.get('stock.move')
|
||||
>>> shipment = Shipment()
|
||||
>>> shipment.planned_date = today
|
||||
>>> shipment.from_location = internal_loc
|
||||
>>> shipment.to_location = storage_loc
|
||||
>>> move = shipment.moves.new()
|
||||
>>> move.product = product
|
||||
>>> move.quantity = 1
|
||||
>>> move.from_location = internal_loc
|
||||
>>> move.to_location = storage_loc
|
||||
>>> move.currency = company.currency
|
||||
>>> shipment.save()
|
||||
>>> shipment.assigned_by
|
||||
>>> shipment.done_by
|
||||
|
||||
>>> shipment.click('wait')
|
||||
>>> shipment.state
|
||||
'waiting'
|
||||
>>> shipment.click('assign_try')
|
||||
False
|
||||
>>> shipment.assigned_by
|
||||
>>> shipment.done_by
|
||||
|
||||
Create Internal Shipment from lost_found location::
|
||||
|
||||
>>> lost_found_shipment = Shipment()
|
||||
>>> lost_found_shipment.planned_date = today
|
||||
>>> lost_found_shipment.company = company
|
||||
>>> lost_found_shipment.from_location = lost_found_loc
|
||||
>>> lost_found_shipment.to_location = internal_loc
|
||||
>>> move = StockMove()
|
||||
>>> move = lost_found_shipment.moves.new()
|
||||
>>> move.product = product
|
||||
>>> move.uom = unit
|
||||
>>> move.quantity = 2
|
||||
>>> move.from_location = lost_found_loc
|
||||
>>> move.to_location = internal_loc
|
||||
>>> move.currency = company.currency
|
||||
>>> lost_found_shipment.click('wait')
|
||||
>>> lost_found_shipment.click('assign_try')
|
||||
True
|
||||
>>> lost_found_shipment.state
|
||||
'assigned'
|
||||
>>> lost_found_shipment.click('done')
|
||||
>>> lost_found_shipment.state
|
||||
'done'
|
||||
|
||||
Check that now we can finish the older shipment::
|
||||
|
||||
>>> shipment.click('assign_try')
|
||||
True
|
||||
>>> shipment.assigned_by == employee
|
||||
True
|
||||
>>> shipment.done_by
|
||||
|
||||
>>> shipment.click('done')
|
||||
>>> shipment.state
|
||||
'done'
|
||||
>>> shipment.done_by == employee
|
||||
True
|
||||
|
||||
Duplicate Internal Shipment::
|
||||
|
||||
>>> shipment_copy, = shipment.duplicate()
|
||||
>>> len(shipment_copy.moves)
|
||||
1
|
||||
|
||||
Reschedule shipment::
|
||||
|
||||
>>> shipment_copy.planned_date = yesterday
|
||||
>>> shipment_copy.click('wait')
|
||||
>>> set_user(1)
|
||||
>>> Cron = Model.get('ir.cron')
|
||||
>>> cron = Cron(method='stock.shipment.internal|reschedule')
|
||||
>>> cron.interval_number = 1
|
||||
>>> cron.interval_type = 'months'
|
||||
>>> cron.click('run_once')
|
||||
>>> shipment_copy.reload()
|
||||
>>> shipment_copy.planned_date == today
|
||||
True
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user